[EFL][WK2] The icon database path should be set by the client
authorcommit-queue <commit-queue@webkit.org>
Mon, 5 Nov 2012 08:55:40 +0000 (08:55 +0000)
committercommit-queue <commit-queue@webkit.org>
Mon, 5 Nov 2012 08:55:40 +0000 (08:55 +0000)
commitf1406b72bdba82e06f14e6d9661c27c872d9f2a5
treef076518019a4e228c135ad597a98f68c43aea0d7
parent0afb777bdf5e004656100441a3e61bcad470c361
[EFL][WK2] The icon database path should be set by the client
https://bugs.webkit.org/show_bug.cgi?id=101182

Patch by Christophe Dumez <christophe.dumez@intel.com> on 2012-11-05
Reviewed by Kenneth Rohde Christiansen.

Source/WebKit2:

No longer set the favicon database path in database instance getter.
Instead, a new ewk_context_favicon_database_directory_set() API
function was added to let the client set the icon database path.
This is needed because the icon database path can only be set once
and setting it unconditionally in the getter prevents the client
from setting it.

This will also avoid crashes in WebKitTestRunner since WKTR was
setting the path once and ewk_context was attempting to override it.

Note that the favicon database functionality is disabled until the
client sets its path.

* UIProcess/API/efl/ewk_context.cpp:
(Ewk_Context::ensureFaviconDatabase):
(Ewk_Context::setFaviconDatabaseDirectoryPath):
(Ewk_Context::faviconDatabase):
(ewk_context_favicon_database_directory_set):
* UIProcess/API/efl/ewk_context.h:
* UIProcess/API/efl/ewk_context_private.h:
(Ewk_Context):
* UIProcess/API/efl/ewk_favicon_database.cpp:
(Ewk_Favicon_Database::Ewk_Favicon_Database):
(Ewk_Favicon_Database::~Ewk_Favicon_Database):
(Ewk_Favicon_Database::iconURLForPageURL):
(Ewk_Favicon_Database::iconForPageURL):
(Ewk_Favicon_Database::getIconSurfaceSynchronously):
* UIProcess/API/efl/ewk_favicon_database_private.h:
(WebKit):
(Ewk_Favicon_Database::create):
(Ewk_Favicon_Database):
* UIProcess/API/efl/tests/test_ewk2_favicon_database.cpp:
(TEST_F):

Tools:

Enable favicon database functionality in MiniBrowser since
it is used and it is no longer enabled by default.

* MiniBrowser/efl/main.c:
(elm_main):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133442 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/efl/ewk_context.cpp
Source/WebKit2/UIProcess/API/efl/ewk_context.h
Source/WebKit2/UIProcess/API/efl/ewk_context_private.h
Source/WebKit2/UIProcess/API/efl/ewk_favicon_database.cpp
Source/WebKit2/UIProcess/API/efl/ewk_favicon_database_private.h
Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_favicon_database.cpp
Tools/ChangeLog
Tools/MiniBrowser/efl/main.c