[EFL][WK2] Implement Favicons API
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 15 Oct 2012 19:44:09 +0000 (19:44 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 15 Oct 2012 19:44:09 +0000 (19:44 +0000)
commit172b6a5734e3ef8b68b7b40dc6dea75fa6270ad7
tree62e2ddf79c361d250819cf6b9ebcfb6dc8474b6d
parentf0de171ae3d41d78286d0ffe7c41e4eca1d48eda
[EFL][WK2] Implement Favicons API
https://bugs.webkit.org/show_bug.cgi?id=99087

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

Source/WebCore:

Moved ewk_util from WebKit to WebCore and rename it
to CairoUtilityEfl so that the code can be shared
between WebKit1 and WebKit2. Some related utility
code was also moved from RenderThemeEfl to
CairoUtilityEfl.

No new tests, no behavior change.

* PlatformEfl.cmake:
* platform/efl/RenderThemeEfl.cpp:
* platform/graphics/efl/CairoUtilitiesEfl.cpp: Renamed from Source/WebKit/efl/ewk/ewk_util.cpp.
(WebCore):
(WebCore::evasObjectFromCairoImageSurface):
(WebCore::createSurfaceForBackingStore):
* platform/graphics/efl/CairoUtilitiesEfl.h: Renamed from Source/WebKit/efl/ewk/ewk_util_private.h.
(WebCore):

Source/WebKit:

Remove ewk_util.cpp from PlatformEfl.cmake now that its
code has been moved to WebCore to be reused in WK2.

* PlatformEfl.cmake:

Source/WebKit/efl:

Remove ewk_util now that its code has been moved
to CairoUtilitiesEfl in WebCore.

* ewk/ewk_history.cpp:
(ewk_history_item_icon_object_add):
* ewk/ewk_settings.cpp:
(ewk_settings_icon_database_icon_object_get):

Source/WebKit2:

Add support for favicon API to EFL WK2 port via
Ewk_Favicon_Database. The API can be used to
retrieve the favicon URL and data for a given
page URL.

* PlatformEfl.cmake:
* UIProcess/API/efl/EWebKit2.h:
* UIProcess/API/efl/ewk_context.cpp:
(_Ewk_Context):
(_Ewk_Context::_Ewk_Context):
(_Ewk_Context::~_Ewk_Context):
(ewk_context_favicon_database_get): Add getter to retrieve the favicon
database instance from the context.
* UIProcess/API/efl/ewk_context.h:
* UIProcess/API/efl/ewk_favicon_database.cpp: Added.
(IconChangeCallbackData):
(IconChangeCallbackData::IconChangeCallbackData):
(IconRequestCallbackData):
(IconRequestCallbackData::IconRequestCallbackData):
(_Ewk_Favicon_Database):
(_Ewk_Favicon_Database::_Ewk_Favicon_Database):
(didChangeIconForPageURL):
(getIconSurfaceSynchronously):
(iconDataReadyForPageURL):
(ewk_favicon_database_new):
(ewk_favicon_database_free):
(ewk_favicon_database_icon_url_get):
(AsyncIconRequestResponse):
(AsyncIconRequestResponse::AsyncIconRequestResponse):
(respond_icon_request_idle):
(ewk_favicon_database_async_icon_get):
(ewk_favicon_database_icon_change_callback_add):
(ewk_favicon_database_icon_change_callback_del):
* UIProcess/API/efl/ewk_favicon_database.h: Added.
* UIProcess/API/efl/ewk_favicon_database_private.h: Copied from Source/WebKit2/UIProcess/efl/WebContextEfl.cpp.
* UIProcess/API/efl/ewk_view.cpp:
(_Ewk_View_Private_Data):
(_Ewk_View_Private_Data::~_Ewk_View_Private_Data):
(_ewk_view_on_favicon_changed):
(_ewk_view_initialize):
(ewk_view_url_update):
(ewk_view_icon_url_get): Add a getter to the view to retrieve the icon URL for
the page that is currently shown.
(ewk_view_update_icon):
* UIProcess/API/efl/ewk_view.h: Emit a new "icon,changed" signal on the view whenever
the view's icon has changed.
* UIProcess/API/efl/ewk_view_private.h:
* UIProcess/API/efl/tests/resources/blank.ico: Added.
* UIProcess/API/efl/tests/test_ewk2_context.cpp: Add unit test for new favicon database getter.
(TEST_F):
* UIProcess/API/efl/tests/test_ewk2_favicon_database.cpp: Added unit tests for the new Ewk_Favicon_Database API.
(serverCallback):
(onIconChanged):
(TEST_F):
(onIconDataReady):
(IconRequestData):
(requestFaviconData):
* UIProcess/efl/WebContextEfl.cpp:
(WebKit::WebContext::platformDefaultIconDatabasePath): Return a valid default path for the icon database.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@131337 268f45cc-cd09-0410-ab3c-d52691b4dbfc
25 files changed:
Source/WebCore/ChangeLog
Source/WebCore/PlatformEfl.cmake
Source/WebCore/platform/efl/RenderThemeEfl.cpp
Source/WebCore/platform/graphics/efl/CairoUtilitiesEfl.cpp [moved from Source/WebKit/efl/ewk/ewk_util.cpp with 50% similarity]
Source/WebCore/platform/graphics/efl/CairoUtilitiesEfl.h [moved from Source/WebKit/efl/ewk/ewk_util_private.h with 72% similarity]
Source/WebKit/ChangeLog
Source/WebKit/PlatformEfl.cmake
Source/WebKit/efl/ChangeLog
Source/WebKit/efl/ewk/ewk_history.cpp
Source/WebKit/efl/ewk/ewk_settings.cpp
Source/WebKit2/ChangeLog
Source/WebKit2/PlatformEfl.cmake
Source/WebKit2/UIProcess/API/efl/EWebKit2.h
Source/WebKit2/UIProcess/API/efl/ewk_context.cpp
Source/WebKit2/UIProcess/API/efl/ewk_context.h
Source/WebKit2/UIProcess/API/efl/ewk_favicon_database.cpp [new file with mode: 0644]
Source/WebKit2/UIProcess/API/efl/ewk_favicon_database.h [new file with mode: 0644]
Source/WebKit2/UIProcess/API/efl/ewk_favicon_database_private.h [new file with mode: 0644]
Source/WebKit2/UIProcess/API/efl/ewk_view.cpp
Source/WebKit2/UIProcess/API/efl/ewk_view.h
Source/WebKit2/UIProcess/API/efl/ewk_view_private.h
Source/WebKit2/UIProcess/API/efl/tests/resources/blank.ico [new file with mode: 0644]
Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_context.cpp
Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_favicon_database.cpp [new file with mode: 0644]
Source/WebKit2/UIProcess/efl/WebContextEfl.cpp