Title: [92551] trunk/Source/WebCore
Revision
92551
Author
[email protected]
Date
2011-08-06 08:57:09 -0700 (Sat, 06 Aug 2011)

Log Message

REGRESSION (r91540): Favicons are not loaded
https://bugs.webkit.org/show_bug.cgi?id=65692

Patch by Rafael Brandao <[email protected]> on 2011-08-06
Reviewed by Darin Adler.

The policy that evaluates whether a page can have icon or not should not
need to be reimplemented each time a new IconDatabaseBase is derived,
so it was moved to WebCore's scope.

* loader/icon/IconController.cpp:
(WebCore::IconController::startLoader):
* loader/icon/IconDatabase.cpp:
* loader/icon/IconDatabase.h:
* loader/icon/IconDatabaseBase.cpp:
(WebCore::documentCanHaveIcon):
* loader/icon/IconDatabaseBase.h:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (92550 => 92551)


--- trunk/Source/WebCore/ChangeLog	2011-08-06 15:23:59 UTC (rev 92550)
+++ trunk/Source/WebCore/ChangeLog	2011-08-06 15:57:09 UTC (rev 92551)
@@ -1,3 +1,22 @@
+2011-08-06  Rafael Brandao  <[email protected]>
+
+        REGRESSION (r91540): Favicons are not loaded
+        https://bugs.webkit.org/show_bug.cgi?id=65692
+
+        Reviewed by Darin Adler.
+
+        The policy that evaluates whether a page can have icon or not should not
+        need to be reimplemented each time a new IconDatabaseBase is derived,
+        so it was moved to WebCore's scope.
+
+        * loader/icon/IconController.cpp:
+        (WebCore::IconController::startLoader):
+        * loader/icon/IconDatabase.cpp:
+        * loader/icon/IconDatabase.h:
+        * loader/icon/IconDatabaseBase.cpp:
+        (WebCore::documentCanHaveIcon):
+        * loader/icon/IconDatabaseBase.h:
+
 2011-08-06  Kenichi Ishibashi  <[email protected]>
 
         Should use C++-style cast in CSSParser.cpp

Modified: trunk/Source/WebCore/loader/icon/IconController.cpp (92550 => 92551)


--- trunk/Source/WebCore/loader/icon/IconController.cpp	2011-08-06 15:23:59 UTC (rev 92550)
+++ trunk/Source/WebCore/loader/icon/IconController.cpp	2011-08-06 15:57:09 UTC (rev 92551)
@@ -114,7 +114,7 @@
         return;
 
     ASSERT(!m_frame->tree()->parent());
-    if (!iconDatabase().documentCanHaveIcon(m_frame->document()->url()))
+    if (!documentCanHaveIcon(m_frame->document()->url()))
         return;
 
     KURL iconURL(url());

Modified: trunk/Source/WebCore/loader/icon/IconDatabase.cpp (92550 => 92551)


--- trunk/Source/WebCore/loader/icon/IconDatabase.cpp	2011-08-06 15:23:59 UTC (rev 92550)
+++ trunk/Source/WebCore/loader/icon/IconDatabase.cpp	2011-08-06 15:57:09 UTC (rev 92551)
@@ -99,11 +99,6 @@
     return defaultClient;
 }
 
-bool IconDatabase::documentCanHaveIcon(const String& documentURL) const
-{
-    return !documentURL.isEmpty() && !protocolIs(documentURL, "about");
-}
-
 // ************************
 // *** Main Thread Only ***
 // ************************

Modified: trunk/Source/WebCore/loader/icon/IconDatabase.h (92550 => 92551)


--- trunk/Source/WebCore/loader/icon/IconDatabase.h	2011-08-06 15:23:59 UTC (rev 92550)
+++ trunk/Source/WebCore/loader/icon/IconDatabase.h	2011-08-06 15:57:09 UTC (rev 92551)
@@ -136,7 +136,6 @@
 public:
     virtual bool isOpen() const;
     virtual String databasePath() const;
-    virtual bool documentCanHaveIcon(const String& documentURL) const;
     static String defaultDatabaseFilename();
 
 private:

Modified: trunk/Source/WebCore/loader/icon/IconDatabaseBase.cpp (92550 => 92551)


--- trunk/Source/WebCore/loader/icon/IconDatabaseBase.cpp	2011-08-06 15:23:59 UTC (rev 92550)
+++ trunk/Source/WebCore/loader/icon/IconDatabaseBase.cpp	2011-08-06 15:57:09 UTC (rev 92551)
@@ -27,6 +27,7 @@
 #include "IconDatabaseBase.h"
 
 #include "IconDatabase.h"
+#include "KURL.h"
 #include "SharedBuffer.h"
 
 namespace WebCore {
@@ -66,4 +67,9 @@
     globalDatabase = newGlobalDatabase;
 }
 
+bool documentCanHaveIcon(const String& documentURL)
+{
+    return !documentURL.isEmpty() && !protocolIs(documentURL, "about");
+}
+
 } // namespace WebCore

Modified: trunk/Source/WebCore/loader/icon/IconDatabaseBase.h (92550 => 92551)


--- trunk/Source/WebCore/loader/icon/IconDatabaseBase.h	2011-08-06 15:23:59 UTC (rev 92550)
+++ trunk/Source/WebCore/loader/icon/IconDatabaseBase.h	2011-08-06 15:57:09 UTC (rev 92551)
@@ -165,7 +165,6 @@
 
     // Used internally by WebCore
     virtual bool isEnabled() const { return false; }
-    virtual bool documentCanHaveIcon(const String&) const { return false; }
         
     virtual void retainIconForPageURL(const String&) { }
     virtual void releaseIconForPageURL(const String&) { }
@@ -216,6 +215,7 @@
 // Functions to get/set the global icon database.
 IconDatabaseBase& iconDatabase();
 void setGlobalIconDatabase(IconDatabaseBase*);
+bool documentCanHaveIcon(const String&);
 
 } // namespace WebCore
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to