https://bugs.webkit.org/show_bug.cgi?id=56425
authorbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 18 Mar 2011 17:07:22 +0000 (17:07 +0000)
committerbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 18 Mar 2011 17:07:22 +0000 (17:07 +0000)
commit9acf70b181baab7fc5d2f4307583e335dedb9510
treefb734282d9849314515cc9ae2dad05f557685ba5
parentbfcdfe0399191acf08cff3e2bc2dd545e1ecbfa7
https://bugs.webkit.org/show_bug.cgi?id=56425
More groundwork for WebKit2 IconDatabase

Reviewed by Sam Weinig.

../WebCore:

-Update the synchronous method names to be prefixed with "synchronous."
-Call asynchronous versions of the appropriate methods if the IconDatabase supports them.

Update icon database calls to be prefixed with "synchronous":
* loader/archive/cf/LegacyWebArchive.cpp:
(WebCore::LegacyWebArchive::create):
* loader/icon/IconDatabaseBase.h:
(WebCore::IconDatabaseBase::synchronousIconDataKnownForIconURL):
(WebCore::IconDatabaseBase::synchronousLoadDecisionForIconURL):
(WebCore::IconDatabaseBase::synchronousIconForPageURL):
* loader/icon/IconDatabase.cpp:
(WebCore::IconDatabase::synchronousIconForPageURL):
(WebCore::IconDatabase::readIconForPageURLFromDisk):
(WebCore::IconDatabase::synchronousIconURLForPageURL):
(WebCore::IconDatabase::synchronousLoadDecisionForIconURL):
(WebCore::IconDatabase::synchronousIconDataKnownForIconURL):
* loader/icon/IconDatabase.h:
* loader/icon/IconDatabaseBase.cpp:
(WebCore::IconDatabaseBase::synchronousIconURLForPageURL):

Add nascent support for an asynchronous icon database mode:
* loader/icon/IconDatabaseBase.h:
(WebCore::EnumCallback::create):
(WebCore::EnumCallback::~EnumCallback):
(WebCore::EnumCallback::performCallback):
(WebCore::EnumCallback::invalidate):
(WebCore::EnumCallback::EnumCallback):
(WebCore::ObjectCallback::create):
(WebCore::ObjectCallback::~ObjectCallback):
(WebCore::ObjectCallback::performCallback):
(WebCore::ObjectCallback::invalidate):
(WebCore::ObjectCallback::ObjectCallback):
(WebCore::IconDatabaseBase::supportsAsynchronousMode):
(WebCore::IconDatabaseBase::loadDecisionForIconURL):
(WebCore::IconDatabaseBase::iconDataForIconURL):

Add interfaces to use the asynchronous versions of certain IconDatabase calls:
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::~DocumentLoader):
(WebCore::DocumentLoader::iconLoadDecisionAvailable):
(WebCore::iconLoadDecisionCallback):
(WebCore::DocumentLoader::getIconLoadDecisionForIconURL):
(WebCore::DocumentLoader::continueIconLoadWithDecision):
(WebCore::iconDataCallback):
(WebCore::DocumentLoader::getIconDataForIconURL):
* loader/DocumentLoader.h:

Break "startIconLoader" into two pieces so it can be used from both the synchronous and asynchronous
icon database modes:
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::iconLoadDecisionReceived):
(WebCore::FrameLoader::startIconLoader):
(WebCore::FrameLoader::continueIconLoadWithDecision):
* loader/FrameLoader.h:

* WebCore.exp.in:

../WebKit/efl:

Update already-used function names:
* ewk/ewk_history.cpp:
(ewk_history_item_icon_surface_get):
(ewk_history_item_icon_object_add):
* ewk/ewk_settings.cpp:
(ewk_settings_icon_database_icon_surface_get):
(ewk_settings_icon_database_icon_object_add):

../WebKit/gtk:

Update already-used function names:
* webkit/webkiticondatabase.cpp:
(webkit_icon_database_get_icon_uri):
(webkit_icon_database_get_icon_pixbuf):
* webkit/webkitwebview.cpp:
(webkit_web_view_get_icon_uri):

../WebKit/mac:

Update already-used function names:
* Misc/WebIconDatabase.mm:
(-[WebIconDatabase iconForURL:withSize:cache:]):
(-[WebIconDatabase iconURLForURL:]):
* WebView/WebView.mm:
(-[WebView _dispatchDidReceiveIconFromWebFrame:]):

../WebKit/qt:

Update already-used function names:
* Api/qwebhistory.cpp:
(QWebHistoryItem::icon):
* Api/qwebsettings.cpp:
(QWebSettings::iconForUrl):

../WebKit/win:

Update already-used function names:
* WebIconDatabase.cpp:
(WebIconDatabase::iconForURL):
(WebIconDatabase::iconURLForURL):
(WebIconDatabase::hasIconForURL):

../WebKit2:

-Update the synchronous method names to be prefixed with "synchronous."
-Add empty implementations for the asynchronous accessors.

* WebProcess/IconDatabase/WebIconDatabaseProxy.cpp:
(WebKit::WebIconDatabaseProxy::setEnabled):
(WebKit::WebIconDatabaseProxy::synchronousIconForPageURL):
(WebKit::WebIconDatabaseProxy::synchronousIconURLForPageURL):
(WebKit::WebIconDatabaseProxy::synchronousIconDataKnownForIconURL):
(WebKit::WebIconDatabaseProxy::synchronousLoadDecisionForIconURL):
(WebKit::WebIconDatabaseProxy::supportsAsynchronousMode):
(WebKit::WebIconDatabaseProxy::loadDecisionForIconURL):
(WebKit::WebIconDatabaseProxy::iconDataForIconURL):
* WebProcess/IconDatabase/WebIconDatabaseProxy.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@81484 268f45cc-cd09-0410-ab3c-d52691b4dbfc
28 files changed:
Source/WebCore/ChangeLog
Source/WebCore/WebCore.exp.in
Source/WebCore/loader/DocumentLoader.cpp
Source/WebCore/loader/DocumentLoader.h
Source/WebCore/loader/FrameLoader.cpp
Source/WebCore/loader/FrameLoader.h
Source/WebCore/loader/archive/cf/LegacyWebArchive.cpp
Source/WebCore/loader/icon/IconDatabase.cpp
Source/WebCore/loader/icon/IconDatabase.h
Source/WebCore/loader/icon/IconDatabaseBase.cpp
Source/WebCore/loader/icon/IconDatabaseBase.h
Source/WebKit/efl/ChangeLog
Source/WebKit/efl/ewk/ewk_history.cpp
Source/WebKit/efl/ewk/ewk_settings.cpp
Source/WebKit/gtk/ChangeLog
Source/WebKit/gtk/webkit/webkiticondatabase.cpp
Source/WebKit/gtk/webkit/webkitwebview.cpp
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/Misc/WebIconDatabase.mm
Source/WebKit/mac/WebView/WebView.mm
Source/WebKit/qt/Api/qwebhistory.cpp
Source/WebKit/qt/Api/qwebsettings.cpp
Source/WebKit/qt/ChangeLog
Source/WebKit/win/ChangeLog
Source/WebKit/win/WebIconDatabase.cpp
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/IconDatabase/WebIconDatabaseProxy.cpp
Source/WebKit2/WebProcess/IconDatabase/WebIconDatabaseProxy.h