[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677

mjs mjs at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 06:25:40 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit d82f902d0f1333441d144dceb51f70fb25241fa8
Author: mjs <mjs at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Sun Jul 21 01:22:36 2002 +0000

    WebCore:
    
    	Changed the code to handle "icon" and "SHORTCUT ICON" links
    	separately, and give higher priority to the former.
    
    	- fixed 3003672 - Assertion failure related to iconloader on metafilter
    
            * khtml/html/html_headimpl.cpp:
            (HTMLLinkElementImpl::process): Changed to handle both "icon" and
    	"SHORTCUT ICON" links properly.
            * kwq/KWQKHTMLPartBrowserExtension.mm:
    	(KHTMLPartBrowserExtension::setIconURL): Moved here from
    	KWQKHTMLPartImpl to do it more the way KDE does.
            (KHTMLPartBrowserExtension::setTypedIconURL): New method for
    	handling moz-style icon links, which include a type as well as a
    	URL.
            * kwq/KWQKHTMLPartImpl.h:
            * kwq/KWQKHTMLPartImpl.mm:
            (KWQKHTMLPartImpl::loadIcon): Removed.
            * kwq/WebCoreBridge.h: Prototype setIcon: and setIcon:withType: methods.
            * kwq/khtml/khtml_ext.h: Prototype new methods.
            * kwq/kparts/browserextension.h: Make setIcon pure virtual instead
    	of a no-op.
    
    WebKit:
    
    	Changed the code to handle "icon" and "SHORTCUT ICON" links
    	separately, and give higher priority to the former.
    
    	Also, we don't start loading the icon the moment khtml finds one
    	in the document any more, instead we wait until the document is
    	done loading, in case there are both "icon" and "SHORTCUT ICON"
    	link tags.
    
    	- fixed 3003672 - Assertion failure related to iconloader on metafilter
    
            * WebCoreSupport.subproj/WebBridge.m:
            (-[WebBridge setIconURL:]): Forward to the data source.
            (-[WebBridge setIconURL:withType:]): Likewise.
            * WebView.subproj/WebDataSourcePrivate.h:
            * WebView.subproj/WebDataSourcePrivate.m:
            (-[WebDataSourcePrivate dealloc]): Release iconURL.
            (-[WebDataSource _setDefaultIconURLIfUnset]): Renamed from
    	_loadPageIconIfNecessary, and changed to only set iconURL rather
    	than actually loading.
            (-[WebDataSource _setPrimaryLoadComplete:]): Call _loadIcon
    	instead of _loadPageIconIfNecessary, since we defer all loads to
    	this point.
            (-[WebDataSource _loadIcon]): Load current iconURL if set.
            (-[WebDataSource _setIconURL:]): Set iconURL if not set already
    	(since typed icons are higher priority).
            (-[WebDataSource _setIconURL:withType:]): Set the iconURL.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@1606 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index 1dcf4ea..31c1a16 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,3 +1,27 @@
+2002-07-20  Maciej Stachowiak  <mjs at apple.com>
+
+	Changed the code to handle "icon" and "SHORTCUT ICON" links
+	separately, and give higher priority to the former.
+
+	- fixed 3003672 - Assertion failure related to iconloader on metafilter
+	
+        * khtml/html/html_headimpl.cpp:
+        (HTMLLinkElementImpl::process): Changed to handle both "icon" and
+	"SHORTCUT ICON" links properly.
+        * kwq/KWQKHTMLPartBrowserExtension.mm:
+	(KHTMLPartBrowserExtension::setIconURL): Moved here from
+	KWQKHTMLPartImpl to do it more the way KDE does.
+        (KHTMLPartBrowserExtension::setTypedIconURL): New method for
+	handling moz-style icon links, which include a type as well as a
+	URL.
+        * kwq/KWQKHTMLPartImpl.h:
+        * kwq/KWQKHTMLPartImpl.mm:
+        (KWQKHTMLPartImpl::loadIcon): Removed.
+        * kwq/WebCoreBridge.h: Prototype setIcon: and setIcon:withType: methods.
+        * kwq/khtml/khtml_ext.h: Prototype new methods.
+        * kwq/kparts/browserextension.h: Make setIcon pure virtual instead
+	of a no-op.
+
 2002-07-19  Chris Blumenberg  <cblu at apple.com>
 
 	Per darin, only define loadIcon in KWQKHTMLPartImpl
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 1dcf4ea..31c1a16 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,27 @@
+2002-07-20  Maciej Stachowiak  <mjs at apple.com>
+
+	Changed the code to handle "icon" and "SHORTCUT ICON" links
+	separately, and give higher priority to the former.
+
+	- fixed 3003672 - Assertion failure related to iconloader on metafilter
+	
+        * khtml/html/html_headimpl.cpp:
+        (HTMLLinkElementImpl::process): Changed to handle both "icon" and
+	"SHORTCUT ICON" links properly.
+        * kwq/KWQKHTMLPartBrowserExtension.mm:
+	(KHTMLPartBrowserExtension::setIconURL): Moved here from
+	KWQKHTMLPartImpl to do it more the way KDE does.
+        (KHTMLPartBrowserExtension::setTypedIconURL): New method for
+	handling moz-style icon links, which include a type as well as a
+	URL.
+        * kwq/KWQKHTMLPartImpl.h:
+        * kwq/KWQKHTMLPartImpl.mm:
+        (KWQKHTMLPartImpl::loadIcon): Removed.
+        * kwq/WebCoreBridge.h: Prototype setIcon: and setIcon:withType: methods.
+        * kwq/khtml/khtml_ext.h: Prototype new methods.
+        * kwq/kparts/browserextension.h: Make setIcon pure virtual instead
+	of a no-op.
+
 2002-07-19  Chris Blumenberg  <cblu at apple.com>
 
 	Per darin, only define loadIcon in KWQKHTMLPartImpl
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 1dcf4ea..31c1a16 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,27 @@
+2002-07-20  Maciej Stachowiak  <mjs at apple.com>
+
+	Changed the code to handle "icon" and "SHORTCUT ICON" links
+	separately, and give higher priority to the former.
+
+	- fixed 3003672 - Assertion failure related to iconloader on metafilter
+	
+        * khtml/html/html_headimpl.cpp:
+        (HTMLLinkElementImpl::process): Changed to handle both "icon" and
+	"SHORTCUT ICON" links properly.
+        * kwq/KWQKHTMLPartBrowserExtension.mm:
+	(KHTMLPartBrowserExtension::setIconURL): Moved here from
+	KWQKHTMLPartImpl to do it more the way KDE does.
+        (KHTMLPartBrowserExtension::setTypedIconURL): New method for
+	handling moz-style icon links, which include a type as well as a
+	URL.
+        * kwq/KWQKHTMLPartImpl.h:
+        * kwq/KWQKHTMLPartImpl.mm:
+        (KWQKHTMLPartImpl::loadIcon): Removed.
+        * kwq/WebCoreBridge.h: Prototype setIcon: and setIcon:withType: methods.
+        * kwq/khtml/khtml_ext.h: Prototype new methods.
+        * kwq/kparts/browserextension.h: Make setIcon pure virtual instead
+	of a no-op.
+
 2002-07-19  Chris Blumenberg  <cblu at apple.com>
 
 	Per darin, only define loadIcon in KWQKHTMLPartImpl
diff --git a/WebCore/khtml/html/html_headimpl.cpp b/WebCore/khtml/html/html_headimpl.cpp
index 2296544..e026899 100644
--- a/WebCore/khtml/html/html_headimpl.cpp
+++ b/WebCore/khtml/html/html_headimpl.cpp
@@ -168,11 +168,16 @@ void HTMLLinkElementImpl::process()
 
     // IE extension: location of small icon for locationbar / bookmarks
 #ifdef APPLE_CHANGES
-    if ( part && rel.contains("icon") && !m_url.isEmpty() && !part->parentPart())
-        part->impl->loadIcon( KURL(m_url.string()) );
+    if ( part && rel == "shortcut icon" && !m_url.isEmpty() && !part->parentPart())
 #else
     if ( part && rel.contains("shortcut icon") && !m_url.isEmpty() && !part->parentPart())
+#endif
     	part->browserExtension()->setIconURL( KURL(m_url.string()) );
+
+#ifdef APPLE_CHANGES
+    // Mozilla extension to IE extension: icon specified with type
+    if ( part && rel == "icon" && !m_url.isEmpty() && !part->parentPart())
+    	part->browserExtension()->setTypedIconURL( KURL(m_url.string()), type );
 #endif
 
     // Stylesheet
diff --git a/WebCore/kwq/KWQKHTMLPart.h b/WebCore/kwq/KWQKHTMLPart.h
index a33ccc9..d87c09b 100644
--- a/WebCore/kwq/KWQKHTMLPart.h
+++ b/WebCore/kwq/KWQKHTMLPart.h
@@ -60,7 +60,6 @@ public:
 
     void setTitle(const DOM::DOMString &);
     void setStatusBarText(const QString &status);
-    void loadIcon(const KURL &url);
     QString documentSource() const;
 
     bool frameExists(const QString &frameName);
diff --git a/WebCore/kwq/KWQKHTMLPart.mm b/WebCore/kwq/KWQKHTMLPart.mm
index 791caa9..25f75c7 100644
--- a/WebCore/kwq/KWQKHTMLPart.mm
+++ b/WebCore/kwq/KWQKHTMLPart.mm
@@ -733,8 +733,3 @@ void KWQKHTMLPartImpl::overURL( const QString &url, const QString &target, int m
   
   setStatusBarText(QString::fromNSString([NSString stringWithFormat:format, url.getNSString()]));
 }
-
-void KWQKHTMLPartImpl::loadIcon(const KURL &url)
-{
-    [bridge loadIcon:url.getNSURL()];
-}
diff --git a/WebCore/kwq/KWQKHTMLPartBrowserExtension.h b/WebCore/kwq/KWQKHTMLPartBrowserExtension.h
index 380ada4..ad504e5 100644
--- a/WebCore/kwq/KWQKHTMLPartBrowserExtension.h
+++ b/WebCore/kwq/KWQKHTMLPartBrowserExtension.h
@@ -44,6 +44,9 @@ public:
 				 const KParts::URLArgs &urlArgs, 
 				 const KParts::WindowArgs &winArgs, 
 				 KParts::ReadOnlyPart *&part);
+
+    virtual void setIconURL(const KURL &url);
+    virtual void setTypedIconURL(const KURL &url, const QString &type);
     
 private:
      void createNewWindow(const KURL &url, 
diff --git a/WebCore/kwq/KWQKHTMLPartBrowserExtension.mm b/WebCore/kwq/KWQKHTMLPartBrowserExtension.mm
index dbc09e2..d17b351 100644
--- a/WebCore/kwq/KWQKHTMLPartBrowserExtension.mm
+++ b/WebCore/kwq/KWQKHTMLPartBrowserExtension.mm
@@ -114,3 +114,13 @@ void KHTMLPartBrowserExtension::createNewWindow(const KURL &url,
     //}
     *partResult = [bridge part];
 }
+
+void KHTMLPartBrowserExtension::setIconURL(const KURL &url)
+{
+    [m_part->impl->getBridge() setIconURL:url.getNSURL()];
+}
+
+void KHTMLPartBrowserExtension::setTypedIconURL(const KURL &url, const QString &type)
+{
+    [m_part->impl->getBridge() setIconURL:url.getNSURL() withType:type.getNSString()];
+}
diff --git a/WebCore/kwq/KWQKHTMLPartImpl.h b/WebCore/kwq/KWQKHTMLPartImpl.h
index a33ccc9..d87c09b 100644
--- a/WebCore/kwq/KWQKHTMLPartImpl.h
+++ b/WebCore/kwq/KWQKHTMLPartImpl.h
@@ -60,7 +60,6 @@ public:
 
     void setTitle(const DOM::DOMString &);
     void setStatusBarText(const QString &status);
-    void loadIcon(const KURL &url);
     QString documentSource() const;
 
     bool frameExists(const QString &frameName);
diff --git a/WebCore/kwq/KWQKHTMLPartImpl.mm b/WebCore/kwq/KWQKHTMLPartImpl.mm
index 791caa9..25f75c7 100644
--- a/WebCore/kwq/KWQKHTMLPartImpl.mm
+++ b/WebCore/kwq/KWQKHTMLPartImpl.mm
@@ -733,8 +733,3 @@ void KWQKHTMLPartImpl::overURL( const QString &url, const QString &target, int m
   
   setStatusBarText(QString::fromNSString([NSString stringWithFormat:format, url.getNSString()]));
 }
-
-void KWQKHTMLPartImpl::loadIcon(const KURL &url)
-{
-    [bridge loadIcon:url.getNSURL()];
-}
diff --git a/WebCore/kwq/KWQKPartsBrowserExtension.h b/WebCore/kwq/KWQKPartsBrowserExtension.h
index 5a37f89..23679d8 100644
--- a/WebCore/kwq/KWQKPartsBrowserExtension.h
+++ b/WebCore/kwq/KWQKPartsBrowserExtension.h
@@ -85,7 +85,8 @@ public:
 				  const KParts::WindowArgs &winArgs, 
 				  KParts::ReadOnlyPart *&part) = 0;
 
-     void setIconURL(const KURL &) { }
+     virtual void setIconURL(const KURL &url) = 0;
+     virtual void setTypedIconURL(const KURL &url, const QString &type) = 0;
      
      void setURLArgs(const KParts::URLArgs &args) { m_args = args; }
      KParts::URLArgs urlArgs() const { return m_args; }
diff --git a/WebCore/kwq/WebCoreBridge.h b/WebCore/kwq/WebCoreBridge.h
index 3643691..59bc4a6 100644
--- a/WebCore/kwq/WebCoreBridge.h
+++ b/WebCore/kwq/WebCoreBridge.h
@@ -124,7 +124,8 @@ typedef khtml::RenderPart KHTMLRenderPart;
 - (void)setTitle:(NSString *)title;
 - (void)setStatusText:(NSString *)status;
 
-- (void)loadIcon:(NSURL *)url;
+- (void)setIconURL:(NSURL *)url;
+- (void)setIconURL:(NSURL *)url withType:(NSString *)string;
 
 - (BOOL)createChildFrameNamed:(NSString *)frameName
     withURL:(NSURL *)URL renderPart:(KHTMLRenderPart *)renderPart
diff --git a/WebCore/kwq/khtml/khtml_ext.h b/WebCore/kwq/khtml/khtml_ext.h
index 380ada4..ad504e5 100644
--- a/WebCore/kwq/khtml/khtml_ext.h
+++ b/WebCore/kwq/khtml/khtml_ext.h
@@ -44,6 +44,9 @@ public:
 				 const KParts::URLArgs &urlArgs, 
 				 const KParts::WindowArgs &winArgs, 
 				 KParts::ReadOnlyPart *&part);
+
+    virtual void setIconURL(const KURL &url);
+    virtual void setTypedIconURL(const KURL &url, const QString &type);
     
 private:
      void createNewWindow(const KURL &url, 
diff --git a/WebCore/kwq/kparts/browserextension.h b/WebCore/kwq/kparts/browserextension.h
index 5a37f89..23679d8 100644
--- a/WebCore/kwq/kparts/browserextension.h
+++ b/WebCore/kwq/kparts/browserextension.h
@@ -85,7 +85,8 @@ public:
 				  const KParts::WindowArgs &winArgs, 
 				  KParts::ReadOnlyPart *&part) = 0;
 
-     void setIconURL(const KURL &) { }
+     virtual void setIconURL(const KURL &url) = 0;
+     virtual void setTypedIconURL(const KURL &url, const QString &type) = 0;
      
      void setURLArgs(const KParts::URLArgs &args) { m_args = args; }
      KParts::URLArgs urlArgs() const { return m_args; }
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index facc248..eb660f7 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,32 @@
+2002-07-20  Maciej Stachowiak  <mjs at apple.com>
+
+	Changed the code to handle "icon" and "SHORTCUT ICON" links
+	separately, and give higher priority to the former. 
+
+	Also, we don't start loading the icon the moment khtml finds one
+	in the document any more, instead we wait until the document is
+	done loading, in case there are both "icon" and "SHORTCUT ICON"
+	link tags.
+
+	- fixed 3003672 - Assertion failure related to iconloader on metafilter
+
+        * WebCoreSupport.subproj/WebBridge.m:
+        (-[WebBridge setIconURL:]): Forward to the data source.
+        (-[WebBridge setIconURL:withType:]): Likewise.
+        * WebView.subproj/WebDataSourcePrivate.h:
+        * WebView.subproj/WebDataSourcePrivate.m:
+        (-[WebDataSourcePrivate dealloc]): Release iconURL.
+        (-[WebDataSource _setDefaultIconURLIfUnset]): Renamed from
+	_loadPageIconIfNecessary, and changed to only set iconURL rather
+	than actually loading.
+        (-[WebDataSource _setPrimaryLoadComplete:]): Call _loadIcon
+	instead of _loadPageIconIfNecessary, since we defer all loads to
+	this point.
+        (-[WebDataSource _loadIcon]): Load current iconURL if set.
+        (-[WebDataSource _setIconURL:]): Set iconURL if not set already
+	(since typed icons are higher priority).
+        (-[WebDataSource _setIconURL:withType:]): Set the iconURL.
+
 2002-07-20  Darin Adler  <darin at apple.com>
 
 	- fixed 2999616 -- Possible leak in +[IFPluginDatabase installedPlugins]
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index facc248..eb660f7 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,3 +1,32 @@
+2002-07-20  Maciej Stachowiak  <mjs at apple.com>
+
+	Changed the code to handle "icon" and "SHORTCUT ICON" links
+	separately, and give higher priority to the former. 
+
+	Also, we don't start loading the icon the moment khtml finds one
+	in the document any more, instead we wait until the document is
+	done loading, in case there are both "icon" and "SHORTCUT ICON"
+	link tags.
+
+	- fixed 3003672 - Assertion failure related to iconloader on metafilter
+
+        * WebCoreSupport.subproj/WebBridge.m:
+        (-[WebBridge setIconURL:]): Forward to the data source.
+        (-[WebBridge setIconURL:withType:]): Likewise.
+        * WebView.subproj/WebDataSourcePrivate.h:
+        * WebView.subproj/WebDataSourcePrivate.m:
+        (-[WebDataSourcePrivate dealloc]): Release iconURL.
+        (-[WebDataSource _setDefaultIconURLIfUnset]): Renamed from
+	_loadPageIconIfNecessary, and changed to only set iconURL rather
+	than actually loading.
+        (-[WebDataSource _setPrimaryLoadComplete:]): Call _loadIcon
+	instead of _loadPageIconIfNecessary, since we defer all loads to
+	this point.
+        (-[WebDataSource _loadIcon]): Load current iconURL if set.
+        (-[WebDataSource _setIconURL:]): Set iconURL if not set already
+	(since typed icons are higher priority).
+        (-[WebDataSource _setIconURL:withType:]): Set the iconURL.
+
 2002-07-20  Darin Adler  <darin at apple.com>
 
 	- fixed 2999616 -- Possible leak in +[IFPluginDatabase installedPlugins]
diff --git a/WebKit/WebCoreSupport.subproj/WebBridge.m b/WebKit/WebCoreSupport.subproj/WebBridge.m
index cc80a8a..67a5225 100644
--- a/WebKit/WebCoreSupport.subproj/WebBridge.m
+++ b/WebKit/WebCoreSupport.subproj/WebBridge.m
@@ -230,9 +230,14 @@
     return [WebHTMLView _modifierTrackingEnabled];
 }
 
-- (void)loadIcon:(NSURL *)url
+- (void)setIconURL:(NSURL *)url
 {
-    [dataSource _loadIcon:url];
+    [dataSource _setIconURL:url];
+}
+
+- (void)setIconURL:(NSURL *)url withType:(NSString *)type
+{
+    [dataSource _setIconURL:url withType:type];
 }
 
 @end
diff --git a/WebKit/WebView.subproj/WebDataSourcePrivate.h b/WebKit/WebView.subproj/WebDataSourcePrivate.h
index 09af645..de31c06 100644
--- a/WebKit/WebView.subproj/WebDataSourcePrivate.h
+++ b/WebKit/WebView.subproj/WebDataSourcePrivate.h
@@ -72,6 +72,7 @@
     BOOL gotFirstByte; // got first byte
     BOOL committed; // This data source has been committed
     
+    NSURL *iconURL;
     WebIconLoader *iconLoader;
 }
 
@@ -106,7 +107,10 @@
 + (NSMutableDictionary *)_repTypes;
 + (BOOL)_canShowMIMEType:(NSString *)MIMEType;
 - (void)_removeFromFrame;
-- (void)_loadIcon:(NSURL *)url;
+- (void)_loadIcon;
+- (void)_setIconURL:(NSURL *)url;
+- (void)_setIconURL:(NSURL *)url withType:(NSString *)iconType;
+
 
 // Convenience interface for getting here from an WebDataSource.
 // This returns nil if the representation is not an WebHTMLRepresentation.
diff --git a/WebKit/WebView.subproj/WebDataSourcePrivate.m b/WebKit/WebView.subproj/WebDataSourcePrivate.m
index 8342871..073970a 100644
--- a/WebKit/WebView.subproj/WebDataSourcePrivate.m
+++ b/WebKit/WebView.subproj/WebDataSourcePrivate.m
@@ -75,6 +75,7 @@
     [locationChangeHandler release];
     [iconLoader setDelegate:nil];
     [iconLoader release];
+    [iconURL release];
     
     [super dealloc];
 }
@@ -137,20 +138,18 @@
     _private->parent = p;
 }
 
-- (void)_loadPageIconIfNecessary
+- (void)_setDefaultIconURLIfUnset
 {
-    // Start loading the page icon from the server's root directory 
-    // since no page icon has already been requested with the LINK tag
-    if(!_private->iconLoader && !_private->mainDocumentError){
+    // Use the site icon from the server's root directory 
+    // since no site icon has already been requested with the LINK tag
+    if(_private->iconURL == nil && !_private->mainDocumentError){
         NSURL *dataSourceURL = [self wasRedirected] ? [self redirectedURL] : [self inputURL];
-        NSURL *iconURL;
         
         if([dataSourceURL isFileURL]){
-            iconURL = dataSourceURL;
+            _private->iconURL = [dataSourceURL retain];
         } else {
-            iconURL = [NSURL _web_URLWithString:@"/favicon.ico" relativeToURL:dataSourceURL];
+            _private->iconURL = [[NSURL _web_URLWithString:@"/favicon.ico" relativeToURL:dataSourceURL] retain];
         }
-        [self _loadIcon:iconURL];
     }
 }
 
@@ -159,7 +158,11 @@
     _private->primaryLoadComplete = flag;
     
     if (flag) {
-        [self _loadPageIconIfNecessary];
+	// FIXME: We could actually load it as soon as we've parsed
+	// the HEAD section, or determined there isn't one - but
+	// there's no callback for that.
+        [self _loadIcon];
+
         [_private->mainResourceHandleClient release];
         _private->mainResourceHandleClient = 0; 
         [_private->mainHandle release];
@@ -494,14 +497,35 @@
     [_private->locationChangeHandler receivedPageIcon:image forDataSource:self];
 }
 
-- (void)_loadIcon:(NSURL *)url
+- (void)_loadIcon
 {
     WEBKIT_ASSERT(!_private->iconLoader);
+
+    [self _setDefaultIconURLIfUnset];
     
-    if([self isMainDocument]){
-        _private->iconLoader = [[WebIconLoader alloc] initWithURL:url];
+    if([self isMainDocument] && _private->iconURL != nil) {
+        _private->iconLoader = [[WebIconLoader alloc] initWithURL:_private->iconURL];
         [_private->iconLoader setDelegate:self];
         [_private->iconLoader startLoading];
     }
 }
+
+- (void)_setIconURL:(NSURL *)url
+{
+    // Lower priority than typed icon, so ignore this if we
+    // already have an iconURL
+    if (_private->iconURL == nil) {
+	[_private->iconURL release];
+	_private->iconURL = [url retain];
+    }
+}
+
+- (void)_setIconURL:(NSURL *)url withType:(NSString *)iconType
+{
+    // FIXME: should check to make sure the type is one we know how to
+    // handle
+    [_private->iconURL release];
+    _private->iconURL = [url retain];
+}
+
 @end

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list