Revert "[CherryPick] Input Method upversion"
authorTaeyun An <ty.an@samsung.com>
Thu, 28 Mar 2013 15:01:19 +0000 (00:01 +0900)
committerTaeyun An <ty.an@samsung.com>
Thu, 28 Mar 2013 15:01:19 +0000 (00:01 +0900)
This reverts commit 8b1930512c6400a038d38d4f13c3c7d0669901f5.

Conflicts:

Source/WebKit2/UIProcess/API/efl/ewk_context.cpp

Change-Id: I87e8df1c9ff8c7c7293e96ca4cf53bbdd0e466fa

302 files changed:
LayoutTests/platform/wk2/Skipped [changed mode: 0755->0644]
Source/JavaScriptCore/CMakeLists.txt
Source/JavaScriptCore/PlatformEfl.cmake [changed mode: 0755->0644]
Source/JavaScriptCore/shell/PlatformEfl.cmake
Source/WTF/wtf/CMakeLists.txt
Source/WTF/wtf/OwnPtrCommon.h [changed mode: 0755->0644]
Source/WTF/wtf/PlatformEfl.cmake [changed mode: 0755->0644]
Source/WTF/wtf/efl/OwnPtrEfl.cpp
Source/WebCore/CMakeLists.txt
Source/WebCore/PlatformEfl.cmake [changed mode: 0755->0644]
Source/WebCore/WebCore.exp.in
Source/WebCore/platform/efl/RenderThemeEfl.cpp
Source/WebCore/platform/graphics/efl/CairoUtilitiesEfl.cpp [deleted file]
Source/WebCore/platform/network/NetworkingContext.h
Source/WebCore/platform/network/ResourceHandle.h [changed mode: 0755->0644]
Source/WebCore/platform/network/ResourceHandleInternal.h
Source/WebCore/platform/network/soup/ResourceHandleSoup.cpp [changed mode: 0755->0644]
Source/WebCore/platform/network/soup/tizen/ResourceHandleSoupTizen.cpp
Source/WebKit/PlatformEfl.cmake
Source/WebKit/efl/WebCoreSupport/FrameNetworkingContextEfl.cpp
Source/WebKit/efl/WebCoreSupport/FrameNetworkingContextEfl.h
Source/WebKit/efl/ewk/ewk_frame.cpp
Source/WebKit/efl/ewk/ewk_history.cpp
Source/WebKit/efl/ewk/ewk_main.cpp
Source/WebKit/efl/ewk/ewk_private.h
Source/WebKit/efl/ewk/ewk_settings.cpp
Source/WebKit/efl/ewk/ewk_tiled_backing_store.cpp
Source/WebKit/efl/ewk/ewk_tiled_backing_store_private.h
Source/WebKit/efl/ewk/ewk_tiled_matrix.cpp
Source/WebKit/efl/ewk/ewk_tiled_matrix_private.h [changed mode: 0755->0644]
Source/WebKit/efl/ewk/ewk_util.cpp [new file with mode: 0644]
Source/WebKit/efl/ewk/ewk_util_private.h [moved from Source/WebCore/platform/graphics/efl/CairoUtilitiesEfl.h with 72% similarity, mode: 0644]
Source/WebKit/efl/ewk/ewk_view.cpp
Source/WebKit/efl/ewk/ewk_view.h
Source/WebKit/efl/ewk/ewk_view_private.h
Source/WebKit/efl/ewk/ewk_view_tiled.cpp
Source/WebKit/gtk/WebCoreSupport/FrameNetworkingContextGtk.cpp
Source/WebKit/gtk/WebCoreSupport/FrameNetworkingContextGtk.h
Source/WebKit2/CMakeLists.txt [changed mode: 0755->0644]
Source/WebKit2/GNUmakefile.list.am
Source/WebKit2/Platform/tizen/AboutData/AboutDataTizen.cpp [changed mode: 0755->0644]
Source/WebKit2/PlatformEfl.cmake
Source/WebKit2/PlatformTizen.cmake
Source/WebKit2/Shared/API/c/WKURL.cpp
Source/WebKit2/Shared/API/c/WKURL.h
Source/WebKit2/Shared/API/c/WKURLRequest.cpp
Source/WebKit2/Shared/API/c/WKURLRequest.h
Source/WebKit2/Shared/API/c/WKURLResponse.cpp
Source/WebKit2/Shared/API/c/WKURLResponse.h
Source/WebKit2/Shared/APIClientTraits.cpp
Source/WebKit2/Shared/APIClientTraits.h
Source/WebKit2/Shared/NativeWebKeyboardEvent.h [changed mode: 0755->0644]
Source/WebKit2/Shared/WebURL.h
Source/WebKit2/Shared/efl/NativeWebKeyboardEventEfl.cpp
Source/WebKit2/UIProcess/API/C/WKIconDatabase.h
Source/WebKit2/UIProcess/API/C/efl/WKView.cpp
Source/WebKit2/UIProcess/API/C/soup/WKSoupRequestManager.h
Source/WebKit2/UIProcess/API/cpp/efl/WKEinaSharedString.cpp [deleted file]
Source/WebKit2/UIProcess/API/cpp/efl/WKEinaSharedString.h [deleted file]
Source/WebKit2/UIProcess/API/efl/EWebKit2.h
Source/WebKit2/UIProcess/API/efl/EwkViewImpl.cpp [changed mode: 0755->0644]
Source/WebKit2/UIProcess/API/efl/EwkViewImpl.h [changed mode: 0755->0644]
Source/WebKit2/UIProcess/API/efl/PageClientImpl.cpp [changed mode: 0755->0644]
Source/WebKit2/UIProcess/API/efl/PageClientImpl.h [changed mode: 0755->0644]
Source/WebKit2/UIProcess/API/efl/VibrationProvider.cpp
Source/WebKit2/UIProcess/API/efl/VibrationProvider.h
Source/WebKit2/UIProcess/API/efl/ewk_back_forward_list.cpp [deleted file]
Source/WebKit2/UIProcess/API/efl/ewk_back_forward_list.h [deleted file]
Source/WebKit2/UIProcess/API/efl/ewk_back_forward_list_item.cpp [deleted file]
Source/WebKit2/UIProcess/API/efl/ewk_back_forward_list_item_private.h [deleted file]
Source/WebKit2/UIProcess/API/efl/ewk_back_forward_list_private.h [deleted file]
Source/WebKit2/UIProcess/API/efl/ewk_context.cpp
Source/WebKit2/UIProcess/API/efl/ewk_context.h
Source/WebKit2/UIProcess/API/efl/ewk_context_download_client.cpp [new file with mode: 0644]
Source/WebKit2/UIProcess/API/efl/ewk_context_download_client_private.h [moved from Source/WebKit2/UIProcess/API/efl/tests/InjectedBundle/injected_bundle_sample.cpp with 81% similarity]
Source/WebKit2/UIProcess/API/efl/ewk_context_injected_bundle_client.cpp [changed mode: 0755->0644]
Source/WebKit2/UIProcess/API/efl/ewk_context_private.h [changed mode: 0755->0644]
Source/WebKit2/UIProcess/API/efl/ewk_context_request_manager_client.cpp [moved from Source/WebKit2/UIProcess/API/efl/ewk_navigation_data.cpp with 52% similarity]
Source/WebKit2/UIProcess/API/efl/ewk_context_request_manager_client_private.h [moved from Source/WebKit2/UIProcess/API/efl/ewk_resource_private.h with 67% similarity]
Source/WebKit2/UIProcess/API/efl/ewk_cookie_manager.cpp
Source/WebKit2/UIProcess/API/efl/ewk_cookie_manager.h
Source/WebKit2/UIProcess/API/efl/ewk_cookie_manager_private.h
Source/WebKit2/UIProcess/API/efl/ewk_download_job.cpp [changed mode: 0755->0644]
Source/WebKit2/UIProcess/API/efl/ewk_download_job.h
Source/WebKit2/UIProcess/API/efl/ewk_download_job_private.h [changed mode: 0755->0644]
Source/WebKit2/UIProcess/API/efl/ewk_error.cpp [changed mode: 0755->0644]
Source/WebKit2/UIProcess/API/efl/ewk_error.h [changed mode: 0755->0644]
Source/WebKit2/UIProcess/API/efl/ewk_error_private.h [changed mode: 0755->0644]
Source/WebKit2/UIProcess/API/efl/ewk_favicon_database.cpp [deleted file]
Source/WebKit2/UIProcess/API/efl/ewk_favicon_database.h [deleted file]
Source/WebKit2/UIProcess/API/efl/ewk_favicon_database_private.h [deleted file]
Source/WebKit2/UIProcess/API/efl/ewk_form_submission_request.cpp
Source/WebKit2/UIProcess/API/efl/ewk_form_submission_request.h
Source/WebKit2/UIProcess/API/efl/ewk_form_submission_request_private.h
Source/WebKit2/UIProcess/API/efl/ewk_geolocation_private.h [changed mode: 0755->0644]
Source/WebKit2/UIProcess/API/efl/ewk_intent.cpp [changed mode: 0755->0644]
Source/WebKit2/UIProcess/API/efl/ewk_intent.h
Source/WebKit2/UIProcess/API/efl/ewk_intent_private.h
Source/WebKit2/UIProcess/API/efl/ewk_intent_service.cpp [changed mode: 0755->0644]
Source/WebKit2/UIProcess/API/efl/ewk_intent_service.h
Source/WebKit2/UIProcess/API/efl/ewk_intent_service_private.h
Source/WebKit2/UIProcess/API/efl/ewk_main.cpp [changed mode: 0755->0644]
Source/WebKit2/UIProcess/API/efl/ewk_navigation_data.h [deleted file]
Source/WebKit2/UIProcess/API/efl/ewk_navigation_data_private.h [deleted file]
Source/WebKit2/UIProcess/API/efl/ewk_navigation_policy_decision.cpp
Source/WebKit2/UIProcess/API/efl/ewk_navigation_policy_decision.h
Source/WebKit2/UIProcess/API/efl/ewk_navigation_policy_decision_private.h
Source/WebKit2/UIProcess/API/efl/ewk_notification.cpp [changed mode: 0755->0644]
Source/WebKit2/UIProcess/API/efl/ewk_notification_private.h [changed mode: 0755->0644]
Source/WebKit2/UIProcess/API/efl/ewk_popup_menu_item.cpp [changed mode: 0755->0644]
Source/WebKit2/UIProcess/API/efl/ewk_popup_menu_item.h [changed mode: 0755->0644]
Source/WebKit2/UIProcess/API/efl/ewk_popup_menu_item_private.h [changed mode: 0755->0644]
Source/WebKit2/UIProcess/API/efl/ewk_private.h
Source/WebKit2/UIProcess/API/efl/ewk_settings.cpp [changed mode: 0755->0644]
Source/WebKit2/UIProcess/API/efl/ewk_settings.h
Source/WebKit2/UIProcess/API/efl/ewk_settings_private.h [changed mode: 0755->0644]
Source/WebKit2/UIProcess/API/efl/ewk_text_checker_private.h [changed mode: 0755->0644]
Source/WebKit2/UIProcess/API/efl/ewk_touch.h
Source/WebKit2/UIProcess/API/efl/ewk_url_request.cpp [changed mode: 0755->0644]
Source/WebKit2/UIProcess/API/efl/ewk_url_request.h
Source/WebKit2/UIProcess/API/efl/ewk_url_request_private.h
Source/WebKit2/UIProcess/API/efl/ewk_url_response.cpp
Source/WebKit2/UIProcess/API/efl/ewk_url_response.h
Source/WebKit2/UIProcess/API/efl/ewk_url_response_private.h
Source/WebKit2/UIProcess/API/efl/ewk_url_scheme_request.cpp
Source/WebKit2/UIProcess/API/efl/ewk_url_scheme_request.h [changed mode: 0755->0644]
Source/WebKit2/UIProcess/API/efl/ewk_url_scheme_request_private.h [changed mode: 0755->0644]
Source/WebKit2/UIProcess/API/efl/ewk_view.cpp
Source/WebKit2/UIProcess/API/efl/ewk_view.h [changed mode: 0755->0644]
Source/WebKit2/UIProcess/API/efl/ewk_view_context_menu_client.cpp [changed mode: 0755->0644]
Source/WebKit2/UIProcess/API/efl/ewk_view_find_client.cpp [new file with mode: 0644]
Source/WebKit2/UIProcess/API/efl/ewk_view_find_client.h [new file with mode: 0644]
Source/WebKit2/UIProcess/API/efl/ewk_view_find_client_private.h [moved from Source/WebKit2/UIProcess/efl/FindClientEfl.h with 67% similarity]
Source/WebKit2/UIProcess/API/efl/ewk_view_form_client.cpp [moved from Source/WebKit2/UIProcess/efl/FormClientEfl.cpp with 57% similarity]
Source/WebKit2/UIProcess/API/efl/ewk_view_form_client_private.h [new file with mode: 0644]
Source/WebKit2/UIProcess/API/efl/ewk_view_icondatabase_client.cpp [changed mode: 0755->0644]
Source/WebKit2/UIProcess/API/efl/ewk_view_loader_client.cpp [new file with mode: 0755]
Source/WebKit2/UIProcess/API/efl/ewk_view_loader_client_private.h [new file with mode: 0644]
Source/WebKit2/UIProcess/API/efl/ewk_view_policy_client.cpp [moved from Source/WebKit2/UIProcess/efl/PagePolicyClientEfl.cpp with 62% similarity]
Source/WebKit2/UIProcess/API/efl/ewk_view_policy_client_private.h [new file with mode: 0644]
Source/WebKit2/UIProcess/API/efl/ewk_view_private.h
Source/WebKit2/UIProcess/API/efl/ewk_view_resource_load_client.cpp [new file with mode: 0755]
Source/WebKit2/UIProcess/API/efl/ewk_view_resource_load_client_private.h [new file with mode: 0644]
Source/WebKit2/UIProcess/API/efl/ewk_view_tizen_client.cpp
Source/WebKit2/UIProcess/API/efl/ewk_view_ui_client.cpp [new file with mode: 0644]
Source/WebKit2/UIProcess/API/efl/ewk_view_ui_client.h [new file with mode: 0644]
Source/WebKit2/UIProcess/API/efl/ewk_web_error.cpp [new file with mode: 0644]
Source/WebKit2/UIProcess/API/efl/ewk_web_error.h [moved from Source/WebKit2/UIProcess/API/efl/ewk_back_forward_list_item.h with 51% similarity]
Source/WebKit2/UIProcess/API/efl/ewk_web_error_private.h [moved from Tools/EWebLauncher/url_utils.h with 85% similarity]
Source/WebKit2/UIProcess/API/efl/ewk_web_resource.cpp [moved from Source/WebKit2/UIProcess/efl/FindClientEfl.cpp with 51% similarity, mode: 0644]
Source/WebKit2/UIProcess/API/efl/ewk_web_resource.h [moved from Source/WebKit2/UIProcess/API/efl/ewk_resource.h with 82% similarity]
Source/WebKit2/UIProcess/API/efl/ewk_web_resource_private.h [moved from Source/WebKit2/UIProcess/API/efl/ewk_resource.cpp with 66% similarity]
Source/WebKit2/UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp [changed mode: 0755->0644]
Source/WebKit2/UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.h [changed mode: 0755->0644]
Source/WebKit2/UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestEnvironment.cpp [changed mode: 0755->0644]
Source/WebKit2/UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestEnvironment.h [changed mode: 0755->0644]
Source/WebKit2/UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestServer.cpp
Source/WebKit2/UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestServer.h
Source/WebKit2/UIProcess/API/efl/tests/resources/blank.ico [deleted file]
Source/WebKit2/UIProcess/API/efl/tests/resources/default_test_page.html
Source/WebKit2/UIProcess/API/efl/tests/resources/intent-request.html [deleted file]
Source/WebKit2/UIProcess/API/efl/tests/resources/intent-service.html [deleted file]
Source/WebKit2/UIProcess/API/efl/tests/resources/redirect_uri_to_default.html [moved from Source/WebKit2/UIProcess/API/efl/tests/resources/redirect_url_to_default.html with 100% similarity]
Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_back_forward_list.cpp [deleted file]
Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_context.cpp [changed mode: 0755->0644]
Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_context_history_callbacks.cpp [deleted file]
Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_cookie_manager.cpp [changed mode: 0755->0644]
Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_download_job.cpp
Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_eina_shared_string.cpp [deleted file]
Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_favicon_database.cpp [deleted file]
Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_intents.cpp [deleted file]
Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_settings.cpp [changed mode: 0755->0644]
Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_view.cpp [changed mode: 0755->0644]
Source/WebKit2/UIProcess/API/efl/tizen/ClipboardHelper.cpp [changed mode: 0755->0644]
Source/WebKit2/UIProcess/API/efl/tizen/ClipboardHelper.h [changed mode: 0755->0644]
Source/WebKit2/UIProcess/API/efl/tizen/Drag.cpp [changed mode: 0755->0644]
Source/WebKit2/UIProcess/API/efl/tizen/Drag.h [changed mode: 0755->0644]
Source/WebKit2/UIProcess/API/efl/tizen/Flick.cpp [changed mode: 0755->0644]
Source/WebKit2/UIProcess/API/efl/tizen/Flick.h [changed mode: 0755->0644]
Source/WebKit2/UIProcess/API/efl/tizen/FocusRing.cpp
Source/WebKit2/UIProcess/API/efl/tizen/FocusRing.h
Source/WebKit2/UIProcess/API/efl/tizen/FormDataCandidate.cpp [changed mode: 0755->0644]
Source/WebKit2/UIProcess/API/efl/tizen/FormDataCandidate.h [changed mode: 0755->0644]
Source/WebKit2/UIProcess/API/efl/tizen/GestureClient.cpp
Source/WebKit2/UIProcess/API/efl/tizen/LinkMagnifierProxy.cpp
Source/WebKit2/UIProcess/API/efl/tizen/LinkMagnifierProxy.h
Source/WebKit2/UIProcess/API/efl/tizen/OfflinePageSave.cpp [changed mode: 0755->0644]
Source/WebKit2/UIProcess/API/efl/tizen/OfflinePageSave.h [changed mode: 0755->0644]
Source/WebKit2/UIProcess/API/efl/tizen/Pan.cpp
Source/WebKit2/UIProcess/API/efl/tizen/Pan.h [changed mode: 0755->0644]
Source/WebKit2/UIProcess/API/efl/tizen/ScreenReaderProxy.cpp
Source/WebKit2/UIProcess/API/efl/tizen/ScreenReaderProxy.h
Source/WebKit2/UIProcess/API/efl/tizen/SmartZoom.cpp [changed mode: 0755->0644]
Source/WebKit2/UIProcess/API/efl/tizen/SmartZoom.h [changed mode: 0755->0644]
Source/WebKit2/UIProcess/API/efl/tizen/TextSelection.cpp [changed mode: 0755->0644]
Source/WebKit2/UIProcess/API/efl/tizen/TextSelection.h
Source/WebKit2/UIProcess/API/efl/tizen/TextSelectionMagnifier.cpp
Source/WebKit2/UIProcess/API/efl/tizen/TextSelectionMagnifier.h
Source/WebKit2/UIProcess/API/efl/tizen/Zoom.cpp [changed mode: 0755->0644]
Source/WebKit2/UIProcess/API/efl/tizen/Zoom.h [changed mode: 0755->0644]
Source/WebKit2/UIProcess/API/gtk/WebKitFaviconDatabase.cpp [deleted file]
Source/WebKit2/UIProcess/API/gtk/WebKitFaviconDatabase.h [deleted file]
Source/WebKit2/UIProcess/API/gtk/WebKitFaviconDatabasePrivate.h [deleted file]
Source/WebKit2/UIProcess/API/gtk/WebKitPrivate.h
Source/WebKit2/UIProcess/API/gtk/WebKitRequestManagerClient.cpp
Source/WebKit2/UIProcess/API/gtk/WebKitURISchemeRequest.cpp
Source/WebKit2/UIProcess/API/gtk/WebKitURISchemeRequest.h
Source/WebKit2/UIProcess/API/gtk/WebKitURISchemeRequestPrivate.h
Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp [changed mode: 0755->0644]
Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.h [changed mode: 0755->0644]
Source/WebKit2/UIProcess/API/gtk/docs/webkit2gtk-docs.sgml
Source/WebKit2/UIProcess/API/gtk/docs/webkit2gtk-sections.txt [changed mode: 0755->0644]
Source/WebKit2/UIProcess/API/gtk/tests/GNUmakefile.am
Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitFaviconDatabase.cpp [deleted file]
Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitWebContext.cpp
Source/WebKit2/UIProcess/API/gtk/webkit2.h
Source/WebKit2/UIProcess/PageClient.h
Source/WebKit2/UIProcess/WebIconDatabase.cpp
Source/WebKit2/UIProcess/WebIconDatabase.h
Source/WebKit2/UIProcess/WebIconDatabase.messages.in
Source/WebKit2/UIProcess/WebIconDatabaseClient.cpp
Source/WebKit2/UIProcess/WebIconDatabaseClient.h
Source/WebKit2/UIProcess/WebPageProxy.cpp
Source/WebKit2/UIProcess/WebPageProxy.h
Source/WebKit2/UIProcess/WebPageProxy.messages.in
Source/WebKit2/UIProcess/cairo/BackingStoreCairo.cpp [changed mode: 0755->0644]
Source/WebKit2/UIProcess/efl/ContextHistoryClientEfl.cpp [deleted file]
Source/WebKit2/UIProcess/efl/ContextHistoryClientEfl.h [deleted file]
Source/WebKit2/UIProcess/efl/DownloadManagerEfl.cpp [deleted file]
Source/WebKit2/UIProcess/efl/DownloadManagerEfl.h [deleted file]
Source/WebKit2/UIProcess/efl/FormClientEfl.h [deleted file]
Source/WebKit2/UIProcess/efl/InputMethodContextEfl.cpp [deleted file]
Source/WebKit2/UIProcess/efl/InputMethodContextEfl.h [deleted file]
Source/WebKit2/UIProcess/efl/PageLoadClientEfl.cpp [deleted file]
Source/WebKit2/UIProcess/efl/PageLoadClientEfl.h [deleted file]
Source/WebKit2/UIProcess/efl/PagePolicyClientEfl.h [deleted file]
Source/WebKit2/UIProcess/efl/PageUIClientEfl.cpp [deleted file]
Source/WebKit2/UIProcess/efl/PageUIClientEfl.h [deleted file]
Source/WebKit2/UIProcess/efl/RequestManagerClientEfl.cpp [deleted file]
Source/WebKit2/UIProcess/efl/RequestManagerClientEfl.h [deleted file]
Source/WebKit2/UIProcess/efl/ResourceLoadClientEfl.cpp [deleted file]
Source/WebKit2/UIProcess/efl/ResourceLoadClientEfl.h [deleted file]
Source/WebKit2/UIProcess/efl/WebContextEfl.cpp
Source/WebKit2/UIProcess/efl/WebFullScreenManagerProxyEfl.cpp
Source/WebKit2/UIProcess/efl/WebInspectorProxyEfl.cpp [changed mode: 0755->0644]
Source/WebKit2/UIProcess/efl/WebPageProxyEfl.cpp
Source/WebKit2/UIProcess/efl/WebPopupMenuProxyEfl.cpp [changed mode: 0755->0644]
Source/WebKit2/UIProcess/efl/WebPopupMenuProxyEfl.h [changed mode: 0755->0644]
Source/WebKit2/UIProcess/gtk/WebContextGtk.cpp
Source/WebKit2/UIProcess/soup/WebSoupRequestManagerClient.cpp
Source/WebKit2/UIProcess/soup/WebSoupRequestManagerClient.h
Source/WebKit2/UIProcess/soup/WebSoupRequestManagerProxy.cpp
Source/WebKit2/UIProcess/soup/WebSoupRequestManagerProxy.h
Source/WebKit2/UIProcess/soup/WebSoupRequestManagerProxy.messages.in
Source/WebKit2/UIProcess/tizen/WebContextMenuProxyTizen.cpp [changed mode: 0755->0644]
Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
Source/WebKit2/WebProcess/WebCoreSupport/efl/WebEditorClientEfl.cpp
Source/WebKit2/WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp
Source/WebKit2/WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.h
Source/WebKit2/WebProcess/WebPage/WebPage.h
Source/WebKit2/WebProcess/WebPage/WebPage.messages.in
Source/WebKit2/WebProcess/WebPage/efl/WebPageEfl.cpp
Source/WebKit2/WebProcess/soup/WebSoupRequestManager.cpp
Source/cmake/EFLHelpers.cmake [deleted file]
Source/cmake/FindEFL.cmake [new file with mode: 0755]
Source/cmake/FindE_DBus.cmake [deleted file]
Source/cmake/FindEcore.cmake [deleted file]
Source/cmake/FindEdje.cmake [deleted file]
Source/cmake/FindEeze.cmake [deleted file]
Source/cmake/FindEfreet.cmake [deleted file]
Source/cmake/FindEina.cmake [deleted file]
Source/cmake/FindEvas.cmake [deleted file]
Source/cmake/FindGIO.cmake [new file with mode: 0644]
Source/cmake/FindGLIB.cmake [deleted file]
Source/cmake/FindGlib.cmake [new file with mode: 0644]
Source/cmake/FindGthread.cmake [new file with mode: 0644]
Source/cmake/FindLibSoup.cmake [deleted file]
Source/cmake/FindLibSoup2.cmake [new file with mode: 0644]
Source/cmake/OptionsEfl.cmake [changed mode: 0755->0644]
Source/cmake/OptionsTizen.cmake
Tools/CMakeLists.txt
Tools/DumpRenderTree/efl/CMakeLists.txt [changed mode: 0755->0644]
Tools/DumpRenderTree/efl/DumpRenderTree.cpp
Tools/EWebLauncher/CMakeLists.txt [changed mode: 0755->0644]
Tools/EWebLauncher/ControlTheme/CMakeLists.txt [deleted file]
Tools/EWebLauncher/ControlTheme/entry.edc [deleted file]
Tools/EWebLauncher/main.c
Tools/EWebLauncher/url_bar.c [deleted file]
Tools/EWebLauncher/url_bar.h [deleted file]
Tools/EWebLauncher/url_utils.c [deleted file]
Tools/MiniBrowser/efl/CMakeLists.txt
Tools/MiniBrowser/efl/main.c [changed mode: 0755->0644]
Tools/Scripts/webkitpy/layout_tests/port/efl.py [changed mode: 0755->0644]
Tools/TestWebKitAPI/PlatformEfl.cmake [changed mode: 0755->0644]
Tools/WebKitTestRunner/CMakeLists.txt
Tools/WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl
Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp [changed mode: 0755->0644]
Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp
Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.h [changed mode: 0755->0644]
Tools/WebKitTestRunner/PlatformEfl.cmake [changed mode: 0755->0644]
Tools/WebKitTestRunner/efl/PlatformWebViewEfl.cpp
Tools/WebKitTestRunner/efl/main.cpp [changed mode: 0755->0644]

old mode 100755 (executable)
new mode 100644 (file)
index 2b56b38..24df713
@@ -385,6 +385,35 @@ webarchive/loading/mainresource-null-mimetype-crash.html
 webarchive/loading/missing-data.html
 http/tests/security/xssAuditor/script-tag-with-callbacks.html
 
+# WebKitTestRunner needs layoutTestController.dumpResourceLoadCallbacks
+# <https://bugs.webkit.org/show_bug.cgi?id=42332>
+fast/images/support-broken-image-delegate.html
+fast/loader/file-protocol-fragment.html
+fast/loader/main-document-url-for-non-http-loads.html
+fast/loader/user-style-sheet-resource-load-callbacks.html
+http/tests/loading/307-after-303-after-post.html
+http/tests/loading/pdf-commit-load-callbacks.html
+http/tests/loading/redirect-methods.html
+http/tests/misc/favicon-loads-with-images-disabled.html
+http/tests/misc/favicon-loads-with-icon-loading-override.html
+http/tests/misc/link-rel-icon-beforeload.html
+http/tests/misc/will-send-request-returns-null-on-redirect.html
+http/tests/misc/willCacheResponse-delegate-callback.html
+http/tests/misc/window-dot-stop.html
+http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-in-body.html
+http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-parent-same-origin-allow.html
+http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-parent-same-origin-deny.html
+http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag.html
+http/tests/security/XFrameOptions/x-frame-options-deny.html
+http/tests/security/XFrameOptions/x-frame-options-parent-same-origin-allow.html
+http/tests/security/XFrameOptions/x-frame-options-parent-same-origin-deny.html
+http/tests/xmlhttprequest/abort-should-cancel-load.html
+security/block-test-no-port.html
+security/block-test.html
+webarchive/loading/cache-expired-subresource.html
+webarchive/loading/test-loading-archive.html
+webarchive/loading/test-loading-archive-subresource-null-mimetype.html
+
 # WebKitTestRunner needs textInputController
 # <https://bugs.webkit.org/show_bug.cgi?id=42337>
 editing/input/setting-input-value-cancel-ime-composition.html
@@ -796,25 +825,12 @@ fast/text-autosizing
 ########################################
 ### START OF (2) Classified failures without bug reports (yet)
 
-# WebKitTestRunner needs layoutTestController.shouldPaintBrockenImage
-fast/images/support-broken-image-delegate.html
-
-# WebKitTestRunner needs layoutTestController.setWillSendRequestReturnNullOnRedirect
-http/tests/misc/will-send-request-returns-null-on-redirect.html
-
-# WebKitTestRunner needs ReceiveServerRedirectForProvisionalLoadForFrame logging
-http/tests/loading/307-after-303-after-post.html
-http/tests/loading/redirect-methods.html
-
 # WebKitTestrunner needs layoutTestController.dumpSourceAsWebArchive
 webarchive/doctype.html
 webarchive/archive-empty-frame-source.html
 
 # WebKitTestRunner needs layoutTestController.setIconDatabaseEnabled
 webarchive/test-link-rel-icon.html
-http/tests/misc/favicon-loads-with-images-disabled.html
-http/tests/misc/favicon-loads-with-icon-loading-override.html
-http/tests/misc/link-rel-icon-beforeload.html
 
 # WebKitTestRunner should dump text/plain content as text
 http/tests/incremental/slow-utf8-text.pl
@@ -1047,10 +1063,6 @@ http/tests/security/video-cross-origin-readback.html
 # https://bugs.webkit.org/show_bug.cgi?id=85558
 http/tests/security/contentSecurityPolicy/1.1
 
-webarchive/loading/cache-expired-subresource.html
-webarchive/loading/test-loading-archive.html
-webarchive/loading/test-loading-archive-subresource-null-mimetype.html
-
 ### END OF (2) Classified failures without bug reports (yet)
 ########################################
 
@@ -1310,10 +1322,6 @@ fast/loader/window-properties-restored-from-page-cache.html
 # https://bugs.webkit.org/show_bug.cgi?id=81616
 fast/harness/page-cache-crash-on-data-urls.html
 
-# Wrong logging order
-fast/loader/file-protocol-fragment.html
-http/tests/loading/pdf-commit-load-callbacks.html
-
 ### END OF (3) Unclassified failures
 ########################################
 
index 2a6a1f5..436221a 100644 (file)
@@ -429,6 +429,10 @@ TARGET_LINK_LIBRARIES(${JavaScriptCore_LIBRARY_NAME} ${JavaScriptCore_LIBRARIES}
 SET_TARGET_PROPERTIES(${JavaScriptCore_LIBRARY_NAME} PROPERTIES FOLDER "JavaScriptCore")
 SET_TARGET_PROPERTIES(${JavaScriptCore_LIBRARY_NAME} PROPERTIES LINK_INTERFACE_LIBRARIES "")
 
+IF (JavaScriptCore_LINK_FLAGS)
+    ADD_TARGET_PROPERTIES(${JavaScriptCore_LIBRARY_NAME} LINK_FLAGS "${JavaScriptCore_LINK_FLAGS}")
+ENDIF ()
+
 IF (SHARED_CORE)
     SET_TARGET_PROPERTIES(${JavaScriptCore_LIBRARY_NAME} PROPERTIES VERSION ${PROJECT_VERSION} SOVERSION ${PROJECT_VERSION_MAJOR})
     INSTALL(TARGETS ${JavaScriptCore_LIBRARY_NAME} DESTINATION "${LIB_INSTALL_DIR}")
old mode 100755 (executable)
new mode 100644 (file)
index ae95146..964091a
@@ -12,7 +12,6 @@ IF (ENABLE_TIZEN_GC_ACTIVITY_CALLBACK)
     )
     LIST(APPEND JavaScriptCore_INCLUDE_DIRECTORIES
         ${ECORE_X_INCLUDE_DIRS}
-        ${EINA_INCLUDE_DIRS}
     )
 ENDIF ()
 
@@ -30,6 +29,10 @@ IF (ENABLE_GLIB_SUPPORT)
   )
 ENDIF ()
 
+LIST(APPEND JavaScriptCore_LINK_FLAGS
+    ${ECORE_LDFLAGS}
+)
+
 IF (ENABLE_MEMORY_SAMPLER)
     LIST(APPEND JavaScriptCore_SOURCES
         runtime/MemoryStatistics.cpp
index 22fe20a..c35af2d 100644 (file)
@@ -1,5 +1,9 @@
 LIST(APPEND JSC_LIBRARIES
-    ${GLIB_LIBRARIES}
+    ${Glib_LIBRARIES}
     ${ECORE_LIBRARIES}
     ${CMAKE_DL_LIBS}
 )
+
+LIST(APPEND JSC_LINK_FLAGS
+    ${ECORE_LDFLAGS}
+)
index e0394b1..1f12fb8 100644 (file)
@@ -215,3 +215,7 @@ ADD_DEFINITIONS(-DBUILDING_WTF)
 ADD_LIBRARY(${WTF_LIBRARY_NAME} STATIC ${WTF_HEADERS} ${WTF_SOURCES})
 TARGET_LINK_LIBRARIES(${WTF_LIBRARY_NAME} ${WTF_LIBRARIES})
 SET_TARGET_PROPERTIES(${WTF_LIBRARY_NAME} PROPERTIES FOLDER "JavaScriptCore")
+
+IF (WTF_LINK_FLAGS)
+    ADD_TARGET_PROPERTIES(${WTF_LIBRARY_NAME} LINK_FLAGS "${WTF_LINK_FLAGS}")
+ENDIF ()
old mode 100755 (executable)
new mode 100644 (file)
index babb589..86670e9
@@ -40,7 +40,6 @@ typedef struct HRGN__* HRGN;
 
 #if PLATFORM(EFL)
 typedef struct _Ecore_Evas Ecore_Evas;
-typedef struct _Ecore_IMF_Context Ecore_IMF_Context;
 typedef struct _Ecore_Pipe Ecore_Pipe;
 typedef struct _Ecore_Timer Ecore_Timer;
 typedef struct _Eina_Hash Eina_Hash;
@@ -68,13 +67,12 @@ namespace WTF {
 #endif
 
 #if PLATFORM(EFL)
-    WTF_EXPORT_PRIVATE void deleteOwnedPtr(Ecore_Evas*);
-    WTF_EXPORT_PRIVATE void deleteOwnedPtr(Ecore_IMF_Context*);
-    WTF_EXPORT_PRIVATE void deleteOwnedPtr(Ecore_Pipe*);
-    WTF_EXPORT_PRIVATE void deleteOwnedPtr(Ecore_Timer*);
-    WTF_EXPORT_PRIVATE void deleteOwnedPtr(Eina_Hash*);
-    WTF_EXPORT_PRIVATE void deleteOwnedPtr(Eina_Module*);
-    WTF_EXPORT_PRIVATE void deleteOwnedPtr(Evas_Object*);
+    void deleteOwnedPtr(Ecore_Evas*);
+    void deleteOwnedPtr(Ecore_Pipe*);
+    void deleteOwnedPtr(Ecore_Timer*);
+    void deleteOwnedPtr(Eina_Hash*);
+    void deleteOwnedPtr(Eina_Module*);
+    void deleteOwnedPtr(Evas_Object*);
 #endif
 
 } // namespace WTF
old mode 100755 (executable)
new mode 100644 (file)
index 88fa162..ef7eaf5
@@ -21,14 +21,11 @@ LIST(APPEND WTF_SOURCES
 
 LIST(APPEND WTF_LIBRARIES
     pthread
-    ${GLIB_LIBRARIES}
-    ${GLIB_GIO_LIBRARIES}
-    ${GLIB_GOBJECT_LIBRARIES}
+    ${Glib_LIBRARIES}
     ${ICU_LIBRARIES}
     ${ICU_I18N_LIBRARIES}
     ${ECORE_LIBRARIES}
     ${ECORE_EVAS_LIBRARIES}
-    ${ECORE_IMF_LIBRARIES}
     ${EINA_LIBRARIES}
     ${EVAS_LIBRARIES}
 )
@@ -39,12 +36,17 @@ LIST(APPEND WTF_LIBRARIES
     ${Dlog_LIBRARIES}
 )
 
+LIST(APPEND WTF_LINK_FLAGS
+    ${ECORE_LDFLAGS}
+    ${ECORE_EVAS_LDFLAGS}
+    ${EVAS_LDFLAGS}
+)
+
 LIST(APPEND WTF_INCLUDE_DIRECTORIES
     ${ECORE_INCLUDE_DIRS}
     ${ECORE_EVAS_INCLUDE_DIRS}
-    ${EINA_INCLUDE_DIRS}
     ${EVAS_INCLUDE_DIRS}
-    ${GLIB_INCLUDE_DIRS}
+    ${Glib_INCLUDE_DIRS}
     ${ICU_INCLUDE_DIRS}
     ${JAVASCRIPTCORE_DIR}/wtf/gobject
     ${JAVASCRIPTCORE_DIR}/wtf/unicode/
index 5ec9c4f..6501a96 100644 (file)
@@ -29,7 +29,6 @@
 
 #include <Ecore.h>
 #include <Ecore_Evas.h>
-#include <Ecore_IMF.h>
 #include <Eina.h>
 #include <Evas.h>
 
@@ -70,10 +69,4 @@ void deleteOwnedPtr(Ecore_Timer* ptr)
         ecore_timer_del(ptr);
 }
 
-void deleteOwnedPtr(Ecore_IMF_Context* ptr)
-{
-    if (ptr)
-        ecore_imf_context_del(ptr);
-}
-
 }
index 119f22e..cb8d2f6 100755 (executable)
@@ -2715,6 +2715,8 @@ SET(IDL_ATTRIBUTES_FILE ${WEBCORE_DIR}/bindings/scripts/IDLAttributes.txt)
 SET(WebCore_LIBRARIES
      ${WTF_LIBRARY_NAME}
 )
+    
+SET(WebCore_LINK_FLAGS "")
 WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS()
 
 # FIXME: Tizen specific change. PlatformTizen.cmake should be called before UseJSC.cmake.
@@ -2940,6 +2942,11 @@ ADD_DEPENDENCIES(${WebCoreTestSupport_LIBRARY_NAME} ${WebCore_LIBRARY_NAME})
 
 TARGET_LINK_LIBRARIES(${WebCore_LIBRARY_NAME} ${WebCore_LIBRARIES})
 
+IF (WebCore_LINK_FLAGS)
+    ADD_TARGET_PROPERTIES(${WebCore_LIBRARY_NAME} LINK_FLAGS "${WebCore_LINK_FLAGS}")
+    ADD_TARGET_PROPERTIES(${WebCoreTestSupport_LIBRARY_NAME} LINK_FLAGS "${WebCore_LINK_FLAGS}")
+ENDIF ()
+
 IF (SHARED_CORE)
     SET_TARGET_PROPERTIES(${WebCore_LIBRARY_NAME} PROPERTIES VERSION ${PROJECT_VERSION} SOVERSION ${PROJECT_VERSION_MAJOR})
     INSTALL(TARGETS ${WebCore_LIBRARY_NAME} DESTINATION "${LIB_INSTALL_DIR}")
old mode 100755 (executable)
new mode 100644 (file)
index 0e1633c..b4ec6dd
@@ -1,3 +1,8 @@
+LIST(APPEND WebCore_LINK_FLAGS
+    ${ECORE_X_LDFLAGS}
+    ${EFLDEPS_LDFLAGS}
+)
+
 LIST(APPEND WebCore_INCLUDE_DIRECTORIES
   "${WTF_DIR}/wtf/gobject"
   "${WEBCORE_DIR}/accessibility/efl"
@@ -68,7 +73,6 @@ LIST(APPEND WebCore_SOURCES
   platform/efl/WidgetEfl.cpp
 
   platform/graphics/ImageSource.cpp
-  platform/graphics/efl/CairoUtilitiesEfl.cpp
   platform/graphics/efl/IconEfl.cpp
   platform/graphics/efl/ImageEfl.cpp
   platform/graphics/efl/IntPointEfl.cpp
@@ -378,15 +382,8 @@ ENDIF ()
 
 LIST(APPEND WebCore_LIBRARIES
   ${CAIRO_LIBRARIES}
-  ${ECORE_LIBRARIES}
-  ${ECORE_EVAS_LIBRARIES}
-  ${ECORE_FILE_LIBRARIES}
   ${ECORE_X_LIBRARIES}
-  ${E_DBUS_LIBRARIES}
-  ${E_DBUS_EUKIT_LIBRARIES}
-  ${EDJE_LIBRARIES}
-  ${EEZE_LIBRARIES}
-  ${EINA_LIBRARIES}
+  ${EFLDEPS_LIBRARIES}
   ${EVAS_LIBRARIES}
   ${FONTCONFIG_LIBRARIES}
   ${FREETYPE_LIBRARIES}
@@ -396,32 +393,23 @@ LIST(APPEND WebCore_LIBRARIES
   ${LIBXSLT_LIBRARIES}
   ${PNG_LIBRARY}
   ${SQLITE_LIBRARIES}
-  ${GLIB_LIBRARIES}
-  ${GLIB_GIO_LIBRARIES}
-  ${GLIB_GOBJECT_LIBRARIES}
-  ${LIBSOUP_LIBRARIES}
+  ${Glib_LIBRARIES}
+  ${LIBSOUP24_LIBRARIES}
   ${ZLIB_LIBRARIES}
 )
 
 LIST(APPEND WebCore_INCLUDE_DIRECTORIES
   ${CAIRO_INCLUDE_DIRS}
-  ${ECORE_INCLUDE_DIRS}
-  ${ECORE_EVAS_INCLUDE_DIRS}
-  ${ECORE_FILE_INCLUDE_DIRS}
   ${ECORE_X_INCLUDE_DIRS}
-  ${E_DBUS_INCLUDE_DIRS}
-  ${E_DBUS_EUKIT_INCLUDE_DIRS}
-  ${EDJE_INCLUDE_DIRS}
-  ${EEZE_INCLUDE_DIRS}
-  ${EINA_INCLUDE_DIRS}
+  ${EFLDEPS_INCLUDE_DIRS}
   ${EVAS_INCLUDE_DIRS}
   ${FREETYPE_INCLUDE_DIRS}
   ${ICU_INCLUDE_DIRS}
   ${LIBXML2_INCLUDE_DIR}
   ${LIBXSLT_INCLUDE_DIR}
   ${SQLITE_INCLUDE_DIR}
-  ${GLIB_INCLUDE_DIRS}
-  ${LIBSOUP_INCLUDE_DIRS}
+  ${Glib_INCLUDE_DIRS}
+  ${LIBSOUP24_INCLUDE_DIRS}
   ${ZLIB_INCLUDE_DIRS}
 )
 
@@ -509,4 +497,4 @@ ENDIF ()
 
 IF (ENABLE_TIZEN_SUPPORT)
     INCLUDE_IF_EXISTS(${WEBCORE_DIR}/PlatformTizen.cmake)
-ENDIF ()
+ENDIF ()
\ No newline at end of file
index d69947d..aa05880 100644 (file)
@@ -1215,7 +1215,6 @@ __ZNK7WebCore17ResourceErrorBase8lazyInitEv
 __ZNK7WebCore18PlatformPasteboard11changeCountEv
 __ZNK7WebCore19AnimationController24numberOfActiveAnimationsEPNS_8DocumentE
 __ZNK7WebCore19InspectorController12getHighlightEPNS_9HighlightE
-__ZNK7WebCore19ResourceRequestBase20firstPartyForCookiesEv
 __ZNK7WebCore19ResourceRequestBase10httpMethodEv
 __ZNK7WebCore19ResourceRequestBase15httpHeaderFieldEPKc
 __ZNK7WebCore19ResourceRequestBase3urlEv
index 4877a76..08d9f63 100755 (executable)
@@ -27,7 +27,6 @@
 #include "RenderThemeEfl.h"
 
 #include "CSSValueKeywords.h"
-#include "CairoUtilitiesEfl.h"
 #include "GraphicsContext.h"
 #include "HTMLInputElement.h"
 #include "NotImplemented.h"
diff --git a/Source/WebCore/platform/graphics/efl/CairoUtilitiesEfl.cpp b/Source/WebCore/platform/graphics/efl/CairoUtilitiesEfl.cpp
deleted file mode 100755 (executable)
index d723241..0000000
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
-    Copyright (C) 2009-2010 ProFUSION embedded systems
-    Copyright (C) 2009-2010 Samsung Electronics
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Library General Public
-    License as published by the Free Software Foundation; either
-    version 2 of the License, or (at your option) any later version.
-
-    This library is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-    Library General Public License for more details.
-
-    You should have received a copy of the GNU Library General Public License
-    along with this library; see the file COPYING.LIB.  If not, write to
-    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-    Boston, MA 02110-1301, USA.
-*/
-
-#include "config.h"
-#include "CairoUtilitiesEfl.h"
-
-#include "RefPtrCairo.h"
-
-namespace WebCore {
-
-PassRefPtr<Evas_Object> evasObjectFromCairoImageSurface(Evas* canvas, cairo_surface_t* surface)
-{
-    EINA_SAFETY_ON_NULL_RETURN_VAL(canvas, 0);
-    EINA_SAFETY_ON_NULL_RETURN_VAL(surface, 0);
-
-    cairo_status_t status = cairo_surface_status(surface);
-    if (status != CAIRO_STATUS_SUCCESS) {
-        fprintf(stderr, "cairo surface is invalid: %s", cairo_status_to_string(status));
-        return 0;
-    }
-
-    cairo_surface_type_t type = cairo_surface_get_type(surface);
-    if (type != CAIRO_SURFACE_TYPE_IMAGE) {
-        fprintf(stderr, "unknown surface type %d, required %d (CAIRO_SURFACE_TYPE_IMAGE).",
-            type, CAIRO_SURFACE_TYPE_IMAGE);
-        return 0;
-    }
-
-    cairo_format_t format = cairo_image_surface_get_format(surface);
-    if (format != CAIRO_FORMAT_ARGB32 && format != CAIRO_FORMAT_RGB24) {
-        fprintf(stderr, "unknown surface format %d, expected %d or %d.",
-            format, CAIRO_FORMAT_ARGB32, CAIRO_FORMAT_RGB24);
-        return 0;
-    }
-
-    int width = cairo_image_surface_get_width(surface);
-    int height = cairo_image_surface_get_height(surface);
-    int stride = cairo_image_surface_get_stride(surface);
-    if (width <= 0 || height <= 0 || stride <= 0) {
-        fprintf(stderr, "invalid image size %dx%d, stride=%d", width, height, stride);
-        return 0;
-    }
-
-    void* data = cairo_image_surface_get_data(surface);
-    if (!data) {
-        fprintf(stderr, "could not get source data.");
-        return 0;
-    }
-
-    RefPtr<Evas_Object> image = adoptRef(evas_object_image_filled_add(canvas));
-    if (!image) {
-        fprintf(stderr, "could not add image to canvas.");
-        return 0;
-    }
-
-    evas_object_image_colorspace_set(image.get(), EVAS_COLORSPACE_ARGB8888);
-    evas_object_image_size_set(image.get(), width, height);
-    evas_object_image_alpha_set(image.get(), format == CAIRO_FORMAT_ARGB32);
-
-    if (evas_object_image_stride_get(image.get()) != stride) {
-        fprintf(stderr, "evas' stride %d diverges from cairo's %d.",
-            evas_object_image_stride_get(image.get()), stride);
-        return 0;
-    }
-
-    evas_object_image_data_copy_set(image.get(), data);
-
-    return image.release();
-}
-
-PassRefPtr<cairo_surface_t> createSurfaceForBackingStore(Ecore_Evas* ee)
-{
-    ASSERT(ee);
-
-    int width;
-    int height;
-    ecore_evas_geometry_get(ee, 0, 0, &width, &height);
-    ASSERT(width > 0 && height > 0);
-
-    unsigned char* buffer = static_cast<unsigned char*>(const_cast<void*>(ecore_evas_buffer_pixels_get(ee)));
-    RefPtr<cairo_surface_t> surface = adoptRef(cairo_image_surface_create_for_data(buffer, CAIRO_FORMAT_ARGB32, width, height, width * 4));
-
-    cairo_status_t status = cairo_surface_status(surface.get());
-    if (status != CAIRO_STATUS_SUCCESS) {
-        EINA_LOG_ERR("Could not create cairo surface: %s", cairo_status_to_string(status));
-        return 0;
-    }
-
-    return surface;
-}
-
-}
index e4c2daf..046085c 100644 (file)
@@ -72,7 +72,6 @@ public:
 
 #if USE(SOUP)
     virtual SoupSession* soupSession() const = 0;
-    virtual uint64_t initiatingPageID() const = 0;
 #endif
 
 protected:
old mode 100755 (executable)
new mode 100644 (file)
index 966db5a..7d33b26
@@ -34,7 +34,6 @@
 
 #if USE(SOUP)
 typedef struct _SoupSession SoupSession;
-typedef struct _SoupRequest SoupRequest;
 #endif
 
 #if USE(CF)
@@ -174,7 +173,6 @@ public:
 
 #if USE(SOUP)
     static SoupSession* defaultSession();
-    static uint64_t getSoupRequestInitiaingPageID(SoupRequest*);
 #endif
 
     // Used to work around the fact that you don't get any more NSURLConnection callbacks until you return from the one you're in.
index e5bd0c1..fc9a5e0 100644 (file)
@@ -198,7 +198,6 @@ namespace WebCore {
         unsigned long m_bodyDataSent;
         RefPtr<NetworkingContext> m_context;
         SoupSession* soupSession();
-        uint64_t initiatingPageID();
 #endif
 #if PLATFORM(QT)
         QNetworkReplyHandler* m_job;
old mode 100755 (executable)
new mode 100644 (file)
index 4540163..09d094a
@@ -193,11 +193,6 @@ SoupSession* ResourceHandleInternal::soupSession()
     return sessionFromContext(m_context.get());
 }
 
-uint64_t ResourceHandleInternal::initiatingPageID()
-{
-    return (m_context && m_context->isValid()) ? m_context->initiatingPageID() : 0;
-}
-
 ResourceHandle::~ResourceHandle()
 {
     cleanupSoupRequestOperation(this, true);
@@ -619,18 +614,6 @@ static void networkEventCallback(SoupMessage*, GSocketClientEvent event, GIOStre
 }
 #endif
 
-static const char* gSoupRequestInitiaingPageIDKey = "wk-soup-request-initiaing-page-id";
-
-static void setSoupRequestInitiaingPageID(SoupRequest* request, uint64_t initiatingPageID)
-{
-    if (!initiatingPageID)
-        return;
-
-    uint64_t* initiatingPageIDPtr = static_cast<uint64_t*>(fastMalloc(sizeof(uint64_t)));
-    *initiatingPageIDPtr = initiatingPageID;
-    g_object_set_data_full(G_OBJECT(request), g_intern_static_string(gSoupRequestInitiaingPageIDKey), initiatingPageIDPtr, fastFree);
-}
-
 static bool startHTTPRequest(ResourceHandle* handle)
 {
     ASSERT(handle);
@@ -653,8 +636,6 @@ static bool startHTTPRequest(ResourceHandle* handle)
         return false;
     }
 
-    setSoupRequestInitiaingPageID(d->m_soupRequest.get(), d->initiatingPageID());
-
     d->m_soupMessage = adoptGRef(soup_request_http_get_message(SOUP_REQUEST_HTTP(d->m_soupRequest.get())));
     if (!d->m_soupMessage)
         return false;
@@ -986,8 +967,6 @@ static bool startNonHTTPRequest(ResourceHandle* handle, KURL url)
     // balanced by a deref() in cleanupSoupRequestOperation, which should always run
     handle->ref();
 
-    setSoupRequestInitiaingPageID(d->m_soupRequest.get(), d->initiatingPageID());
-
     // Send the request only if it's not been explicitly deferred.
     if (!d->m_defersLoading) {
         d->m_cancellable = adoptGRef(g_cancellable_new());
@@ -1029,10 +1008,4 @@ SoupSession* ResourceHandle::defaultSession()
     return session;
 }
 
-uint64_t ResourceHandle::getSoupRequestInitiaingPageID(SoupRequest* request)
-{
-    uint64_t* initiatingPageIDPtr = static_cast<uint64_t*>(g_object_get_data(G_OBJECT(request), gSoupRequestInitiaingPageIDKey));
-    return initiatingPageIDPtr ? *initiatingPageIDPtr : 0;
-}
-
 }
index dbb4e9e..364c03a 100755 (executable)
@@ -206,11 +206,6 @@ SoupSession* ResourceHandleInternal::soupSession()
     return sessionFromContext(m_context.get());
 }
 
-uint64_t ResourceHandleInternal::initiatingPageID()
-{
-    return (m_context && m_context->isValid()) ? m_context->initiatingPageID() : 0;
-}
-
 ResourceHandle::~ResourceHandle()
 {
     cleanupSoupRequestOperation(this, true);
@@ -888,18 +883,6 @@ static void networkEventCallback(SoupMessage*, GSocketClientEvent event, GIOStre
 }
 #endif
 
-static const char* gSoupRequestInitiaingPageIDKey = "wk-soup-request-initiaing-page-id";
-
-static void setSoupRequestInitiaingPageID(SoupRequest* request, uint64_t initiatingPageID)
-{
-    if (!initiatingPageID)
-        return;
-
-    uint64_t* initiatingPageIDPtr = static_cast<uint64_t*>(fastMalloc(sizeof(uint64_t)));
-    *initiatingPageIDPtr = initiatingPageID;
-    g_object_set_data_full(G_OBJECT(request), g_intern_static_string(gSoupRequestInitiaingPageIDKey), initiatingPageIDPtr, fastFree);
-}
-
 static bool startHTTPRequest(ResourceHandle* handle)
 {
     ASSERT(handle);
@@ -928,8 +911,6 @@ static bool startHTTPRequest(ResourceHandle* handle)
         return false;
     }
 
-    setSoupRequestInitiaingPageID(d->m_soupRequest.get(), d->initiatingPageID());
-
     d->m_soupMessage = adoptGRef(soup_request_http_get_message(SOUP_REQUEST_HTTP(d->m_soupRequest.get())));
     if (!d->m_soupMessage) {
         TIZEN_LOGE("ResourceHandleSoup startHTTPRequest error from soup_request_http_get_message");
@@ -978,8 +959,6 @@ static bool startHTTPRequest(ResourceHandle* handle)
     // balanced by a deref() in cleanupSoupRequestOperation, which should always run
     handle->ref();
 
-    setSoupRequestInitiaingPageID(d->m_soupRequest.get(), d->initiatingPageID());
-
 #if ENABLE(WEB_TIMING)
     d->m_response.setResourceLoadTiming(ResourceLoadTiming::create());
 #endif
@@ -1380,12 +1359,6 @@ SoupSession* ResourceHandle::defaultSession()
     return session;
 }
 
-uint64_t ResourceHandle::getSoupRequestInitiaingPageID(SoupRequest* request)
-{
-    uint64_t* initiatingPageIDPtr = static_cast<uint64_t*>(g_object_get_data(G_OBJECT(request), gSoupRequestInitiaingPageIDKey));
-    return initiatingPageIDPtr ? *initiatingPageIDPtr : 0;
-}
-
 #if ENABLE(TIZEN_PAUSE_NETWORK)
 bool ResourceHandle::suspendRequest()
 {
index 7305156..2738013 100755 (executable)
@@ -1,3 +1,11 @@
+LIST(APPEND WebKit_LINK_FLAGS
+    ${ECORE_X_LDFLAGS}
+    ${EDJE_LDFLAGS}
+    ${EFLDEPS_LDFLAGS}
+    ${EFREET_LDFLAGS}
+    ${EVAS_LDFLAGS}
+)
+
 LIST(APPEND WebKit_INCLUDE_DIRECTORIES
     "${CMAKE_SOURCE_DIR}/Source"
     "${WEBKIT_DIR}/efl/ewk"
@@ -8,19 +16,18 @@ LIST(APPEND WebKit_INCLUDE_DIRECTORIES
     "${WEBCORE_DIR}/platform/graphics/efl"
     "${WEBCORE_DIR}/platform/network/soup"
     ${CAIRO_INCLUDE_DIRS}
-    ${ECORE_INCLUDE_DIRS}
-    ${ECORE_EVAS_INCLUDE_DIRS}
-    ${ECORE_INPUT_INCLUDE_DIRS}
+    ${ECORE_X_INCLUDE_DIRS}
     ${EDJE_INCLUDE_DIRS}
+    ${EFLDEPS_INCLUDE_DIRS}
     ${EFREET_INCLUDE_DIRS}
-    ${EINA_INCLUDE_DIRS}
     ${EVAS_INCLUDE_DIRS}
-    ${HARFBUZZ_INCLUDE_DIRS}
+    ${EUKIT_INCLUDE_DIRS}
+    ${EDBUS_INCLUDE_DIRS}
     ${LIBXML2_INCLUDE_DIR}
     ${LIBXSLT_INCLUDE_DIR}
     ${SQLITE_INCLUDE_DIR}
-    ${GLIB_INCLUDE_DIRS}
-    ${LIBSOUP_INCLUDE_DIRS}
+    ${Glib_INCLUDE_DIRS}
+    ${LIBSOUP24_INCLUDE_DIRS}
 )
 
 IF (ENABLE_SVG)
@@ -129,6 +136,7 @@ LIST(APPEND WebKit_SOURCES
     efl/ewk/ewk_tiled_backing_store.cpp
     efl/ewk/ewk_tiled_matrix.cpp
     efl/ewk/ewk_tiled_model.cpp
+    efl/ewk/ewk_util.cpp
     efl/ewk/ewk_view.cpp
     efl/ewk/ewk_view_single.cpp
     efl/ewk/ewk_view_tiled.cpp
@@ -138,21 +146,20 @@ LIST(APPEND WebKit_SOURCES
 
 LIST(APPEND WebKit_LIBRARIES
     ${CAIRO_LIBRARIES}
-    ${ECORE_LIBRARIES}
-    ${ECORE_EVAS_LIBRARIES}
-    ${ECORE_INPUT_LIBRARIES}
+    ${ECORE_X_LIBRARIES}
+    ${EFLDEPS_LIBRARIES}
     ${EFREET_LIBRARIES}
-    ${EVAS_LIBRARIES}
+    ${EUKIT_LIBRARIES}
+    ${EDBUS_LIBRARIES}
     ${FREETYPE_LIBRARIES}
-    ${HARFBUZZ_LIBRARIES}
     ${LIBXML2_LIBRARIES}
     ${SQLITE_LIBRARIES}
     ${FONTCONFIG_LIBRARIES}
     ${PNG_LIBRARY}
     ${JPEG_LIBRARY}
     ${CMAKE_DL_LIBS}
-    ${GLIB_LIBRARIES}
-    ${LIBSOUP_LIBRARIES}
+    ${Glib_LIBRARIES}
+    ${LIBSOUP24_LIBRARIES}
 )
 
 IF (SHARED_CORE)
@@ -220,11 +227,18 @@ SET(EWKUnitTests_INCLUDE_DIRECTORIES
     ${EDJE_INCLUDE_DIRS}
 )
 
+SET(EWKUnitTests_LINK_FLAGS
+    ${ECORE_LDFLAGS}
+    ${ECORE_EVAS_LDFLAGS}
+    ${EVAS_LDFLAGS}
+    ${EDJE_LDFLAGS}
+)
+
 IF (ENABLE_GLIB_SUPPORT)
     LIST(APPEND EWKUnitTests_INCLUDE_DIRECTORIES "${WTF_DIR}/wtf/gobject")
     LIST(APPEND EWKUnitTests_LIBRARIES
-        ${GLIB_LIBRARIES}
-        ${GLIB_GTHREAD_LIBRARIES}
+        ${Glib_LIBRARIES}
+        ${Gthread_LIBRARIES}
     )
 ENDIF ()
 
@@ -253,6 +267,7 @@ IF (ENABLE_API_TESTS)
         ADD_TEST(${testName} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${testName})
         SET_TESTS_PROPERTIES(${testName} PROPERTIES TIMEOUT 60)
         TARGET_LINK_LIBRARIES(${testName} ${EWKUnitTests_LIBRARIES} ewkTestUtils)
+        ADD_TARGET_PROPERTIES(${testName} LINK_FLAGS "${EWKUnitTests_LINK_FLAGS}")
         SET_TARGET_PROPERTIES(${testName} PROPERTIES FOLDER "WebKit")
     ENDFOREACH ()
 ENDIF ()
index 53c05fb..8c20b21 100644 (file)
@@ -30,7 +30,6 @@
 #include "config.h"
 #include "FrameNetworkingContextEfl.h"
 
-#include "NotImplemented.h"
 #include "ResourceHandle.h"
 #include "ewk_frame.h"
 #include "ewk_view.h"
@@ -55,10 +54,4 @@ SoupSession* FrameNetworkingContextEfl::soupSession() const
     return ewk_view_soup_session_get(ewk_frame_view_get(m_ewkFrame));
 }
 
-uint64_t FrameNetworkingContextEfl::initiatingPageID() const
-{
-    notImplemented();
-    return 0;
-}
-
 }
index 68531cc..93ffd48 100644 (file)
@@ -41,7 +41,6 @@ public:
 
     WebCore::Frame* coreFrame() const { return frame(); }
     virtual SoupSession* soupSession() const;
-    virtual uint64_t initiatingPageID() const;
 
 private:
     FrameNetworkingContextEfl(Frame*, Evas_Object*);
index 74fc709..491b699 100644 (file)
@@ -261,7 +261,7 @@ static void _ewk_frame_smart_resize(Evas_Object* ewkFrame, Evas_Coord width, Eva
     evas_object_resize(smartData->region, width, height);
     Evas_Coord x, y;
     evas_object_geometry_get(smartData->region, &x, &y, &width, &height);
-    INFO("region=%p, visible=%d, geo=%d,%d + %dx%d",
+    INF("region=%p, visible=%d, geo=%d,%d + %dx%d",
         smartData->region, evas_object_visible_get(smartData->region), x, y, width, height);
     _ewk_frame_debug(ewkFrame);
 #endif
@@ -1672,7 +1672,7 @@ ssize_t ewk_frame_source_get(const Evas_Object* ewkFrame, char** frameSource)
 
     if (!smartData->frame->document()->isHTMLDocument()) {
         // FIXME: Support others documents.
-        WARN("Only HTML documents are supported");
+        WRN("Only HTML documents are supported");
         return -1;
     }
 
@@ -1831,7 +1831,7 @@ bool ewk_frame_uri_changed(Evas_Object* ewkFrame)
     EINA_SAFETY_ON_NULL_RETURN_VAL(smartData->frame, false);
     WTF::CString uri(smartData->frame->document()->url().string().utf8());
 
-    INFO("uri=%s", uri.data());
+    INF("uri=%s", uri.data());
     if (!uri.data()) {
         ERR("no uri");
         return false;
index 49c3a1a..0dae03d 100644 (file)
@@ -22,7 +22,6 @@
 #include "ewk_history.h"
 
 #include "BackForwardListImpl.h"
-#include "CairoUtilitiesEfl.h"
 #include "HistoryItem.h"
 #include "IconDatabaseBase.h"
 #include "Image.h"
@@ -31,6 +30,7 @@
 #include "PageGroup.h"
 #include "ewk_history_private.h"
 #include "ewk_private.h"
+#include "ewk_util_private.h"
 #include <Eina.h>
 #include <eina_safety_checks.h>
 #include <wtf/text/CString.h>
@@ -355,7 +355,7 @@ Evas_Object* ewk_history_item_icon_object_add(const Ewk_History_Item* item, Evas
     }
 
     cairo_surface_t* surface = icon->surface();
-    return surface ? WebCore::evasObjectFromCairoImageSurface(canvas, surface).leakRef() : 0;
+    return surface ? ewk_util_image_from_cairo_surface_add(canvas, surface) : 0;
 }
 
 Eina_Bool ewk_history_item_page_cache_exists(const Ewk_History_Item* item)
index 1351870..c2ccc6a 100644 (file)
 #include <sys/stat.h>
 #include <wtf/Threading.h>
 
-#ifdef HAVE_ECORE_X
-#include <Ecore_X.h>
-#endif
-
 static int _ewkInitCount = 0;
 
 /**
@@ -97,13 +93,6 @@ int ewk_init(void)
         goto error_edje;
     }
 
-#ifdef HAVE_ECORE_X
-    if (!ecore_x_init(0)) {
-        CRITICAL("could not init ecore_x.");
-        goto error_ecore_x;
-    }
-#endif
-
     if (!_ewk_init_body()) {
         CRITICAL("could not init body");
         goto error_edje;
@@ -111,10 +100,6 @@ int ewk_init(void)
 
     return ++_ewkInitCount;
 
-#ifdef HAVE_ECORE_X
-error_ecore_x:
-    edje_shutdown();
-#endif
 error_edje:
     ecore_evas_shutdown();
 error_ecore_evas:
@@ -136,10 +121,6 @@ int ewk_shutdown(void)
     if (_ewkInitCount)
         return _ewkInitCount;
 
-#ifdef HAVE_ECORE_X
-    ecore_x_shutdown();
-#endif
-    edje_shutdown();
     ecore_evas_shutdown();
     ecore_shutdown();
     evas_shutdown();
@@ -162,7 +143,7 @@ Eina_Bool _ewk_init_body(void)
     g_type_init();
 
     if (!ecore_main_loop_glib_integrate())
-        WARN("Ecore was not compiled with GLib support, some plugins will not "
+        WRN("Ecore was not compiled with GLib support, some plugins will not "
             "work (ie: Adobe Flash)");
 
     WebCore::ScriptController::initializeThreading();
index 11ec1af..e09483a 100644 (file)
@@ -46,8 +46,8 @@ extern int _ewk_log_dom;
 
 #define CRITICAL(...) EINA_LOG_DOM_CRIT(_ewk_log_dom, __VA_ARGS__)
 #define ERR(...) EINA_LOG_DOM_ERR(_ewk_log_dom, __VA_ARGS__)
-#define WARN(...) EINA_LOG_DOM_WARN(_ewk_log_dom, __VA_ARGS__)
-#define INFO(...) EINA_LOG_DOM_INFO(_ewk_log_dom, __VA_ARGS__)
+#define WRN(...) EINA_LOG_DOM_WARN(_ewk_log_dom, __VA_ARGS__)
+#define INF(...) EINA_LOG_DOM_INFO(_ewk_log_dom, __VA_ARGS__)
 #define DBG(...) EINA_LOG_DOM_DBG(_ewk_log_dom, __VA_ARGS__)
 
 #endif // ewk_private_h
index 58b46a4..e0dcd11 100644 (file)
@@ -23,7 +23,6 @@
 #include "ewk_settings.h"
 
 #include "ApplicationCacheStorage.h"
-#include "CairoUtilitiesEfl.h"
 #include "CrossOriginPreflightResultCache.h"
 #include "DatabaseTracker.h"
 #include "StorageTracker.h"
@@ -38,6 +37,7 @@
 #include "RuntimeEnabledFeatures.h"
 #include "Settings.h"
 #include "ewk_private.h"
+#include "ewk_util_private.h"
 #include <Eina.h>
 #include <eina_safety_checks.h>
 #include <errno.h>
@@ -228,7 +228,7 @@ Evas_Object* ewk_settings_icon_database_icon_object_get(const char* url, Evas* c
     }
 
     cairo_surface_t* surface = icon->surface();
-    return surface ? WebCore::evasObjectFromCairoImageSurface(canvas, surface).leakRef() : 0;
+    return surface ? ewk_util_image_from_cairo_surface_add(canvas, surface) : 0;
 }
 
 void ewk_settings_object_cache_capacity_set(unsigned minDeadCapacity, unsigned maxDeadCapacity, unsigned totalCapacity)
index ddae173..903498f 100644 (file)
@@ -35,6 +35,8 @@
 #include <wtf/OwnPtr.h>
 #include <wtf/PassOwnPtr.h>
 
+#define IDX(column, row, rowspan) (column + (row * rowspan))
+
 typedef struct _Ewk_Tiled_Backing_Store_Data Ewk_Tiled_Backing_Store_Data;
 typedef struct _Ewk_Tiled_Backing_Store_Item Ewk_Tiled_Backing_Store_Item;
 typedef struct _Ewk_Tiled_Backing_Store_Pre_Render_Request Ewk_Tiled_Backing_Store_Pre_Render_Request;
@@ -42,7 +44,9 @@ typedef struct _Ewk_Tiled_Backing_Store_Pre_Render_Request Ewk_Tiled_Backing_Sto
 struct _Ewk_Tiled_Backing_Store_Item {
     EINA_INLIST;
     Ewk_Tile* tile;
-    Evas_Coord_Rectangle geometry;
+    struct {
+        Evas_Coord x, y, width, height;
+    } geometry;
     bool smoothScale;
 };
 
@@ -59,7 +63,7 @@ struct _Ewk_Tiled_Backing_Store_Data {
     struct {
         Eina_Inlist** items;
         Evas_Coord x, y, width, height;
-        unsigned long columns, rows;
+        long columns, rows;
         struct {
             Evas_Coord width, height;
             float zoom;
@@ -85,7 +89,7 @@ struct _Ewk_Tiled_Backing_Store_Data {
         Evas_Coord width, height;
     } model;
     struct {
-        bool (*callback)(void* data, Ewk_Tile* tile, const Eina_Rectangle* area);
+        Eina_Bool (*callback)(void* data, Ewk_Tile* tile, const Eina_Rectangle* area);
         void* data;
         Eina_Inlist* preRenderRequests;
         Ecore_Idler* idler;
@@ -121,14 +125,13 @@ static Evas_Smart_Class _parent_sc = EVAS_SMART_CLASS_INIT_NULL;
     }
 
 static void _ewk_tiled_backing_store_fill_renderers(Ewk_Tiled_Backing_Store_Data* priv);
-static inline void _ewk_tiled_backing_store_changed(Ewk_Tiled_Backing_Store_Data* priv);
-
-#ifdef DEBUG_MEM_LEAKS
 static inline void _ewk_tiled_backing_store_view_dbg(const Ewk_Tiled_Backing_Store_Data* priv);
-#endif
+static inline void _ewk_tiled_backing_store_changed(Ewk_Tiled_Backing_Store_Data* priv);
 
 static inline void _ewk_tiled_backing_store_updates_process(Ewk_Tiled_Backing_Store_Data* priv)
 {
+    void* data = 0;
+
     /* Do not process updates. Note that we still want to get updates requests
      * in the queue in order to not miss any updates after the render is
      * resumed.
@@ -136,7 +139,8 @@ static inline void _ewk_tiled_backing_store_updates_process(Ewk_Tiled_Backing_St
     if (priv->render.suspend || !priv->view.visible)
         return;
 
-    void* data = priv->process.preCallback ? priv->process.preCallback(priv->process.preData, priv->self) : 0;
+    if (priv->process.preCallback)
+        data = priv->process.preCallback(priv->process.preData, priv->self);
 
     ewk_tile_matrix_updates_process(priv->model.matrix);
 
@@ -144,7 +148,7 @@ static inline void _ewk_tiled_backing_store_updates_process(Ewk_Tiled_Backing_St
         priv->process.postCallback(priv->process.postData, data, priv->self);
 }
 
-static void _ewk_tiled_backing_store_flush(void* data)
+static int _ewk_tiled_backing_store_flush(void* data)
 {
     Ewk_Tiled_Backing_Store_Data* priv = static_cast<Ewk_Tiled_Backing_Store_Data*>(data);
     Ewk_Tile_Unused_Cache* tiledUnusedCache = ewk_tile_matrix_unused_cache_get(priv->model.matrix);
@@ -154,17 +158,22 @@ static void _ewk_tiled_backing_store_flush(void* data)
         ewk_tile_unused_cache_auto_flush(tiledUnusedCache);
     } else
         ERR("no cache?!");
+
+    return 0;
 }
 
 static Ewk_Tile* _ewk_tiled_backing_store_tile_new(Ewk_Tiled_Backing_Store_Data* priv, unsigned long column, unsigned long row, float zoom)
 {
+    Ewk_Tile* tile;
     Evas* evas = evas_object_evas_get(priv->self);
     if (!evas) {
         CRITICAL("evas_object_evas_get failed!");
         return 0;
     }
 
-    Ewk_Tile* tile = ewk_tile_matrix_tile_new(priv->model.matrix, evas, column, row, zoom);
+    tile = ewk_tile_matrix_tile_new
+               (priv->model.matrix, evas, column, row, zoom);
+
     if (!tile) {
         CRITICAL("ewk_tile_matrix_tile_new failed!");
         return 0;
@@ -184,25 +193,24 @@ static void _ewk_tiled_backing_store_item_move(Ewk_Tiled_Backing_Store_Item* ite
 
 static void _ewk_tiled_backing_store_item_resize(Ewk_Tiled_Backing_Store_Item* item, Evas_Coord width, Evas_Coord height)
 {
-    item->geometry.w = width;
-    item->geometry.h = height;
+    item->geometry.width = width;
+    item->geometry.height = height;
 
-    if (!item->tile)
-        return;
-
-    evas_object_resize(item->tile->image, width, height);
-    evas_object_image_fill_set(item->tile->image, 0, 0, width, height);
+    if (item->tile) {
+        evas_object_resize(item->tile->image, width, height);
+        evas_object_image_fill_set(item->tile->image, 0, 0, width, height);
+    }
 }
 
 static void _ewk_tiled_backing_store_tile_associate(Ewk_Tiled_Backing_Store_Data* priv, Ewk_Tile* tile, Ewk_Tiled_Backing_Store_Item* item)
 {
     if (item->tile)
         CRITICAL("item->tile=%p, but it should be 0!", item->tile);
-
     item->tile = tile;
     evas_object_move(item->tile->image, item->geometry.x, item->geometry.y);
-    evas_object_resize(item->tile->image, item->geometry.w, item->geometry.h);
-    evas_object_image_fill_set(item->tile->image, 0, 0, item->geometry.w, item->geometry.h);
+    evas_object_resize(item->tile->image, item->geometry.width, item->geometry.height);
+    evas_object_image_fill_set
+        (item->tile->image, 0, 0, item->geometry.width, item->geometry.height);
     evas_object_image_smooth_scale_set(item->tile->image, item->smoothScale);
     evas_object_image_alpha_set(item->tile->image, priv->view.tile.hasAlpha);
 
@@ -214,12 +222,12 @@ static void _ewk_tiled_backing_store_tile_associate(Ewk_Tiled_Backing_Store_Data
 
 static void _ewk_tiled_backing_store_tile_dissociate(Ewk_Tiled_Backing_Store_Data* priv, Ewk_Tiled_Backing_Store_Item* item, double lastUsed)
 {
+    Ewk_Tile_Unused_Cache* tileUnusedCache;
     ewk_tile_hide(item->tile);
     if (!ewk_tile_visible_get(item->tile))
         evas_object_smart_member_del(item->tile->image);
-
     ewk_tile_matrix_tile_put(priv->model.matrix, item->tile, lastUsed);
-    Ewk_Tile_Unused_Cache* tileUnusedCache = ewk_tile_matrix_unused_cache_get(priv->model.matrix);
+    tileUnusedCache = ewk_tile_matrix_unused_cache_get(priv->model.matrix);
     ewk_tile_unused_cache_auto_flush(tileUnusedCache);
 
     item->tile = 0;
@@ -227,23 +235,25 @@ static void _ewk_tiled_backing_store_tile_dissociate(Ewk_Tiled_Backing_Store_Dat
 
 static void _ewk_tiled_backing_store_tile_dissociate_all(Ewk_Tiled_Backing_Store_Data* priv)
 {
+    Eina_Inlist* list;
+    Ewk_Tiled_Backing_Store_Item* item;
+    int i;
     double last_used = ecore_loop_time_get();
 
-    for (unsigned long i = 0; i < priv->view.rows; ++i) {
-        Ewk_Tiled_Backing_Store_Item* item;
-        Eina_Inlist* list = priv->view.items[i];
-        EINA_INLIST_FOREACH(list, item) {
+    for (i = 0; i < priv->view.rows; i++) {
+        list = priv->view.items[i];
+        EINA_INLIST_FOREACH(list, item)
             if (item->tile)
                 _ewk_tiled_backing_store_tile_dissociate(priv, item, last_used);
-        }
     }
 }
 
-static inline bool _ewk_tiled_backing_store_pre_render_request_add(Ewk_Tiled_Backing_Store_Data* priv, unsigned long column, unsigned long row, float zoom)
+static inline Eina_Bool _ewk_tiled_backing_store_pre_render_request_add(Ewk_Tiled_Backing_Store_Data* priv, unsigned long column, unsigned long row, float zoom)
 {
     Ewk_Tiled_Backing_Store_Pre_Render_Request* request = new Ewk_Tiled_Backing_Store_Pre_Render_Request;
 
-    priv->render.preRenderRequests = eina_inlist_append(priv->render.preRenderRequests, EINA_INLIST_GET(request));
+    priv->render.preRenderRequests = eina_inlist_append
+                                           (priv->render.preRenderRequests, EINA_INLIST_GET(request));
 
     request->column = column;
     request->row = row;
@@ -254,13 +264,16 @@ static inline bool _ewk_tiled_backing_store_pre_render_request_add(Ewk_Tiled_Bac
 
 static inline void _ewk_tiled_backing_store_pre_render_request_del(Ewk_Tiled_Backing_Store_Data* priv, Ewk_Tiled_Backing_Store_Pre_Render_Request* request)
 {
-    priv->render.preRenderRequests = eina_inlist_remove(priv->render.preRenderRequests, EINA_INLIST_GET(request));
+    priv->render.preRenderRequests = eina_inlist_remove
+                                           (priv->render.preRenderRequests, EINA_INLIST_GET(request));
     delete request;
 }
 
 static inline Ewk_Tiled_Backing_Store_Pre_Render_Request* _ewk_tiled_backing_store_pre_render_request_first(const Ewk_Tiled_Backing_Store_Data* priv)
 {
-    return EINA_INLIST_CONTAINER_GET(priv->render.preRenderRequests, Ewk_Tiled_Backing_Store_Pre_Render_Request);
+    return EINA_INLIST_CONTAINER_GET(
+               priv->render.preRenderRequests,
+               Ewk_Tiled_Backing_Store_Pre_Render_Request);
 }
 
 static void _ewk_tiled_backing_store_pre_render_request_flush(Ewk_Tiled_Backing_Store_Data* priv)
@@ -277,10 +290,12 @@ static void _ewk_tiled_backing_store_pre_render_request_flush(Ewk_Tiled_Backing_
 static void _ewk_tiled_backing_store_pre_render_request_clear(Ewk_Tiled_Backing_Store_Data* priv)
 {
     Eina_Inlist** preRenderList = &priv->render.preRenderRequests;
-    Eina_Inlist* iter = *preRenderList;
+    Eina_Inlist* iter = *preRenderList, *next;
     while (iter) {
-        Ewk_Tiled_Backing_Store_Pre_Render_Request* request = EINA_INLIST_CONTAINER_GET(iter, Ewk_Tiled_Backing_Store_Pre_Render_Request);
-        Eina_Inlist* next = iter->next;
+        Ewk_Tiled_Backing_Store_Pre_Render_Request* request =
+            EINA_INLIST_CONTAINER_GET(
+                iter, Ewk_Tiled_Backing_Store_Pre_Render_Request);
+        next = iter->next;
         *preRenderList = eina_inlist_remove(*preRenderList, iter);
         iter = next;
         delete request;
@@ -290,39 +305,49 @@ static void _ewk_tiled_backing_store_pre_render_request_clear(Ewk_Tiled_Backing_
 /* assumes priv->process.preCallback was called if required! */
 static void _ewk_tiled_backing_store_pre_render_request_process_single(Ewk_Tiled_Backing_Store_Data* priv)
 {
+    Ewk_Tiled_Backing_Store_Pre_Render_Request* request;
+    Eina_Rectangle area;
     Ewk_Tile_Matrix* tileMatrix = priv->model.matrix;
+    Ewk_Tile* tile;
+    Ewk_Tile_Unused_Cache* tileUnusedCache;
+    unsigned long column, row;
+    float zoom;
     double last_used = ecore_loop_time_get();
 
-    Ewk_Tiled_Backing_Store_Pre_Render_Request* request = _ewk_tiled_backing_store_pre_render_request_first(priv);
+    request = _ewk_tiled_backing_store_pre_render_request_first(priv);
     if (!request)
         return;
 
-    unsigned long column = request->column;
-    unsigned long row = request->row;
-    float zoom = request->zoom;
+    column = request->column;
+    row = request->row;
+    zoom = request->zoom;
 
     if (ewk_tile_matrix_tile_exact_exists(tileMatrix, column, row, zoom)) {
         DBG("no pre-render required for tile %lu,%lu @ %f.", column, row, zoom);
-        _ewk_tiled_backing_store_pre_render_request_del(priv, request);
-        ewk_tile_unused_cache_auto_flush(ewk_tile_matrix_unused_cache_get(priv->model.matrix));
-        return;
+        goto end;
     }
 
-    Ewk_Tile* tile = _ewk_tiled_backing_store_tile_new(priv, column, row, zoom);
-    if (!tile) {
-        _ewk_tiled_backing_store_pre_render_request_del(priv, request);
-        ewk_tile_unused_cache_auto_flush(ewk_tile_matrix_unused_cache_get(priv->model.matrix));
-        return;
-    }
+    tile = _ewk_tiled_backing_store_tile_new(priv, column, row, zoom);
+    if (!tile)
+        goto end;
 
-    Eina_Rectangle area;
-    EINA_RECTANGLE_SET(&area, 0, 0, priv->view.tile.width, priv->view.tile.height);
+    area.x = 0;
+    area.y = 0;
+    area.w = priv->view.tile.width;
+    area.h = priv->view.tile.height;
 
     priv->render.callback(priv->render.data, tile, &area);
-    evas_object_image_data_update_add(tile->image, area.x, area.y, area.w, area.h);
+    evas_object_image_data_update_add(
+        tile->image,
+        area.x, area.y, area.w, area.h);
     ewk_tile_matrix_tile_updates_clear(tileMatrix, tile);
 
     ewk_tile_matrix_tile_put(tileMatrix, tile, last_used);
+
+end:
+    _ewk_tiled_backing_store_pre_render_request_del(priv, request);
+    tileUnusedCache = ewk_tile_matrix_unused_cache_get(priv->model.matrix);
+    ewk_tile_unused_cache_auto_flush(tileUnusedCache);
 }
 
 static Eina_Bool _ewk_tiled_backing_store_item_process_idler_cb(void* data)
@@ -358,11 +383,11 @@ static inline void _ewk_tiled_backing_store_item_process_idler_start(Ewk_Tiled_B
 {
     if (priv->render.idler || !priv->view.visible)
         return;
-
-    priv->render.idler = ecore_idler_add(_ewk_tiled_backing_store_item_process_idler_cb, priv);
+    priv->render.idler = ecore_idler_add(
+        _ewk_tiled_backing_store_item_process_idler_cb, priv);
 }
 
-static bool _ewk_tiled_backing_store_disable_render(Ewk_Tiled_Backing_Store_Data* priv)
+static Eina_Bool _ewk_tiled_backing_store_disable_render(Ewk_Tiled_Backing_Store_Data* priv)
 {
     if (priv->render.suspend)
         return true;
@@ -372,7 +397,7 @@ static bool _ewk_tiled_backing_store_disable_render(Ewk_Tiled_Backing_Store_Data
     return true;
 }
 
-static bool _ewk_tiled_backing_store_enable_render(Ewk_Tiled_Backing_Store_Data* priv)
+static Eina_Bool _ewk_tiled_backing_store_enable_render(Ewk_Tiled_Backing_Store_Data* priv)
 {
     if (!priv->render.suspend)
         return true;
@@ -385,7 +410,7 @@ static bool _ewk_tiled_backing_store_enable_render(Ewk_Tiled_Backing_Store_Data*
     return true;
 }
 
-static inline bool _ewk_tiled_backing_store_item_fill(Ewk_Tiled_Backing_Store_Data* priv, Ewk_Tiled_Backing_Store_Item* item, unsigned long column, unsigned long row)
+static inline Eina_Bool _ewk_tiled_backing_store_item_fill(Ewk_Tiled_Backing_Store_Data* priv, Ewk_Tiled_Backing_Store_Item* item, unsigned long column, unsigned long row)
 {
     if (!priv->view.visible)
         return false;
@@ -398,6 +423,7 @@ static inline bool _ewk_tiled_backing_store_item_fill(Ewk_Tiled_Backing_Store_Da
         if (item->tile)
             _ewk_tiled_backing_store_tile_dissociate(priv, item, lastUsed);
     } else {
+        Ewk_Tile* tile;
         const float zoom = priv->view.tile.zoom;
 
         if (item->tile) {
@@ -405,10 +431,11 @@ static inline bool _ewk_tiled_backing_store_item_fill(Ewk_Tiled_Backing_Store_Da
             if (old->row != currentRow || old->column != currentColumn || old->zoom != zoom)
                 _ewk_tiled_backing_store_tile_dissociate(priv, item, lastUsed);
             else if (old->row == currentRow && old->column == currentColumn && old->zoom == zoom)
-                return true;
+                goto end;
         }
 
-        Ewk_Tile* tile = ewk_tile_matrix_tile_exact_get(priv->model.matrix, currentColumn, currentRow, zoom);
+        tile = ewk_tile_matrix_tile_exact_get(priv->model.matrix, currentColumn, currentRow, zoom);
+
         if (!tile) {
             /* NOTE: it never returns 0 if item->tile was set! */
             if (item->tile) {
@@ -430,6 +457,10 @@ static inline bool _ewk_tiled_backing_store_item_fill(Ewk_Tiled_Backing_Store_Da
                                                          item, lastUsed);
             _ewk_tiled_backing_store_tile_associate(priv, tile, item);
         }
+
+end:
+
+        return true;
     }
 
     return true;
@@ -437,12 +468,14 @@ static inline bool _ewk_tiled_backing_store_item_fill(Ewk_Tiled_Backing_Store_Da
 
 static Ewk_Tiled_Backing_Store_Item* _ewk_tiled_backing_store_item_add(Ewk_Tiled_Backing_Store_Data* priv, unsigned long column, unsigned long row)
 {
+    Evas_Coord x, y, tileWidth, tileHeight;
+
     DBG("ewkBackingStore=%p", priv->self);
 
-    Evas_Coord tileWidth = priv->view.tile.width;
-    Evas_Coord tileHeight = priv->view.tile.height;
-    Evas_Coord x = priv->view.offset.base.x + priv->view.x + tileWidth * column;
-    Evas_Coord y = priv->view.offset.base.y + priv->view.y + tileHeight * row;
+    tileWidth = priv->view.tile.width;
+    tileHeight = priv->view.tile.height;
+    x = priv->view.offset.base.x + priv->view.x + tileWidth * column;
+    y = priv->view.offset.base.y + priv->view.y + tileHeight * row;
 
     OwnPtr<Ewk_Tiled_Backing_Store_Item> item = adoptPtr(new Ewk_Tiled_Backing_Store_Item);
     item->tile = 0;
@@ -466,7 +499,7 @@ static void _ewk_tiled_backing_store_item_del(Ewk_Tiled_Backing_Store_Data* priv
     delete item;
 }
 
-static void _ewk_tiled_backing_store_item_smooth_scale_set(Ewk_Tiled_Backing_Store_Item* item, bool smoothScale)
+static void _ewk_tiled_backing_store_item_smooth_scale_set(Ewk_Tiled_Backing_Store_Item* item, Eina_Bool smoothScale)
 {
     if (item->smoothScale == smoothScale)
         return;
@@ -479,18 +512,21 @@ static inline void _ewk_tiled_backing_store_changed(Ewk_Tiled_Backing_Store_Data
 {
     if (priv->changed.any)
         return;
-
     evas_object_smart_changed(priv->self);
     priv->changed.any = true;
 }
 
-static void _ewk_tiled_backing_store_view_cols_end_del(Ewk_Tiled_Backing_Store_Data* priv, Eina_Inlist** rowList, unsigned long count)
+static void _ewk_tiled_backing_store_view_cols_end_del(Ewk_Tiled_Backing_Store_Data* priv, Eina_Inlist** rowList, unsigned int count)
 {
+    Eina_Inlist* nextItem;
+    unsigned int i;
+
     if (!count)
         return;
 
-    Eina_Inlist* nextItem = (*rowList)->last;
-    for (unsigned long i = 0; i < count; ++i) {
+    nextItem = (*rowList)->last;
+
+    for (i = 0; i < count; i++) {
         Ewk_Tiled_Backing_Store_Item* item;
         item = EINA_INLIST_CONTAINER_GET(nextItem, Ewk_Tiled_Backing_Store_Item);
         nextItem = nextItem->prev;
@@ -499,14 +535,16 @@ static void _ewk_tiled_backing_store_view_cols_end_del(Ewk_Tiled_Backing_Store_D
     }
 }
 
-static bool _ewk_tiled_backing_store_view_cols_end_add(Ewk_Tiled_Backing_Store_Data* priv, Eina_Inlist** rowList, unsigned long baseColumn, unsigned long count)
+static Eina_Bool _ewk_tiled_backing_store_view_cols_end_add(Ewk_Tiled_Backing_Store_Data* priv, Eina_Inlist** rowList, unsigned int baseColumn, unsigned int count)
 {
-    const unsigned long row = rowList - priv->view.items;
+    unsigned int i, row = rowList - priv->view.items;
+
+    for (i = 0; i < count; i++, baseColumn++) {
+        Ewk_Tiled_Backing_Store_Item* item;
 
-    for (unsigned long i = 0; i < count; ++i, ++baseColumn) {
-        Ewk_Tiled_Backing_Store_Item* item = _ewk_tiled_backing_store_item_add(priv, baseColumn, row);
+        item = _ewk_tiled_backing_store_item_add(priv, baseColumn, row);
         if (!item) {
-            CRITICAL("failed to add column %lu of %lu in row %lu.", i, count, row);
+            CRITICAL("failed to add column %u of %u in row %u.", i, count, row);
             _ewk_tiled_backing_store_view_cols_end_del(priv, rowList, i);
             return false;
         }
@@ -519,7 +557,8 @@ static bool _ewk_tiled_backing_store_view_cols_end_add(Ewk_Tiled_Backing_Store_D
 static void _ewk_tiled_backing_store_view_row_del(Ewk_Tiled_Backing_Store_Data* priv, Eina_Inlist* row)
 {
     while (row) {
-        Ewk_Tiled_Backing_Store_Item* item = EINA_INLIST_CONTAINER_GET(row, Ewk_Tiled_Backing_Store_Item);
+        Ewk_Tiled_Backing_Store_Item* item;
+        item = EINA_INLIST_CONTAINER_GET(row, Ewk_Tiled_Backing_Store_Item);
         row = row->next;
         _ewk_tiled_backing_store_item_del(priv, item);
     }
@@ -527,7 +566,7 @@ static void _ewk_tiled_backing_store_view_row_del(Ewk_Tiled_Backing_Store_Data*
 
 static void _ewk_tiled_backing_store_view_rows_range_del(Ewk_Tiled_Backing_Store_Data* priv, Eina_Inlist** start, Eina_Inlist** end)
 {
-    for (; start < end; ++start) {
+    for (; start < end; start++) {
         _ewk_tiled_backing_store_view_row_del(priv, *start);
         *start = 0;
     }
@@ -535,8 +574,11 @@ static void _ewk_tiled_backing_store_view_rows_range_del(Ewk_Tiled_Backing_Store
 
 static void _ewk_tiled_backing_store_view_rows_all_del(Ewk_Tiled_Backing_Store_Data* priv)
 {
-    Eina_Inlist** start = priv->view.items;
-    Eina_Inlist** end = priv->view.items + priv->view.rows;
+    Eina_Inlist** start;
+    Eina_Inlist** end;
+
+    start = priv->view.items;
+    end = priv->view.items + priv->view.rows;
     _ewk_tiled_backing_store_view_rows_range_del(priv, start, end);
 
     free(priv->view.items);
@@ -549,7 +591,7 @@ static void _ewk_tiled_backing_store_render(void* data, Ewk_Tile* tile, const Ei
 {
     Ewk_Tiled_Backing_Store_Data* priv = static_cast<Ewk_Tiled_Backing_Store_Data*>(data);
 
-    INFO("TODO %p (visible? %d) [%lu,%lu] %d,%d + %dx%d",
+    INF("TODO %p (visible? %d) [%lu,%lu] %d,%d + %dx%d",
         tile, tile->visible, tile->column, tile->row, area->x, area->y, area->w, area->h);
 
     if (!tile->visible)
@@ -584,7 +626,6 @@ static void _ewk_tiled_backing_store_smart_member_del(Evas_Object* ewkBackingSto
     PRIV_DATA_GET_OR_RETURN(ewkBackingStore, priv);
     if (!priv->contentsClipper)
         return;
-
     evas_object_clip_unset(member);
     if (!evas_object_clipees_get(priv->contentsClipper))
         evas_object_hide(priv->contentsClipper);
@@ -595,7 +636,6 @@ static void _ewk_tiled_backing_store_smart_member_add(Evas_Object* ewkBackingSto
     PRIV_DATA_GET_OR_RETURN(ewkBackingStore, priv);
     if (!priv->contentsClipper)
         return;
-
     evas_object_clip_set(member, priv->contentsClipper);
     if (priv->view.visible)
         evas_object_show(priv->contentsClipper);
@@ -604,9 +644,9 @@ static void _ewk_tiled_backing_store_smart_member_add(Evas_Object* ewkBackingSto
 #ifdef DEBUG_MEM_LEAKS
 static void _ewk_tiled_backing_store_mem_dbg(Ewk_Tiled_Backing_Store_Data* priv)
 {
-    static unsigned run = 0;
+    static int run = 0;
 
-    ++run;
+    run++;
 
     printf("\n--- BEGIN DEBUG TILED BACKING STORE MEMORY [%d] --\n"
            "tile=%0.2f, obj=%p, priv=%p, view.items=%p, matrix=%p\n",
@@ -619,28 +659,30 @@ static void _ewk_tiled_backing_store_mem_dbg(Ewk_Tiled_Backing_Store_Data* priv)
     printf("--- END DEBUG TILED BACKING STORE MEMORY [%d] --\n\n", run);
 }
 
-static bool _ewk_tiled_backing_store_sig_usr(void* data, int type, void* event)
+static Eina_Bool _ewk_tiled_backing_store_sig_usr(void* data, int type, void* event)
 {
-    Ecore_Event_Signal_User* signalUser = static_cast<Ecore_Event_Signal_User*>(event);
-    Ewk_Tiled_Backing_Store_Data* priv = static_cast<Ewk_Tiled_Backing_Store_Data*>(data);
+    Ecore_Event_Signal_User* signalUser = (Ecore_Event_Signal_User*)event;
+    Ewk_Tiled_Backing_Store_Data* priv = (Ewk_Tiled_Backing_Store_Data*)data;
 
     if (signalUser->number == 2) {
-        Ewk_Tile_Unused_Cache* tileUnusedCache = ewk_tile_matrix_unused_cache_get(priv->model.matrix);
+        Ewk_Tile_Unused_Cache* tileUnusedCache;
+        tileUnusedCache = ewk_tile_matrix_unused_cache_get(priv->model.matrix);
         ewk_tile_unused_cache_auto_flush(tileUnusedCache);
     }
 
     _ewk_tiled_backing_store_view_dbg(priv);
     _ewk_tiled_backing_store_mem_dbg(priv);
-
     return true;
 }
 #endif
 
 static void _ewk_tiled_backing_store_smart_add(Evas_Object* ewkBackingStore)
 {
+    Ewk_Tiled_Backing_Store_Data* priv;
+
     DBG("ewkBackingStore=%p", ewkBackingStore);
 
-    Ewk_Tiled_Backing_Store_Data* priv = static_cast<Ewk_Tiled_Backing_Store_Data*>(calloc(1, sizeof(*priv)));
+    priv = static_cast<Ewk_Tiled_Backing_Store_Data*>(calloc(1, sizeof(*priv)));
     if (!priv)
         return;
 
@@ -693,8 +735,9 @@ static void _ewk_tiled_backing_store_smart_del(Evas_Object* ewkBackingStore)
 {
     PRIV_DATA_GET_OR_RETURN(ewkBackingStore, priv);
     DBG("ewkBackingStore=%p", ewkBackingStore);
+    Ewk_Tile_Unused_Cache* tileUnusedCache;
 
-    Ewk_Tile_Unused_Cache* tileUnusedCache = ewk_tile_matrix_unused_cache_get(priv->model.matrix);
+    tileUnusedCache = ewk_tile_matrix_unused_cache_get(priv->model.matrix);
     ewk_tile_unused_cache_unlock_area(tileUnusedCache);
 
     _ewk_tiled_backing_store_flush(priv);
@@ -756,7 +799,6 @@ static void _ewk_tiled_backing_store_smart_resize(Evas_Object* ewkBackingStore,
 static void _ewk_tiled_backing_store_smart_show(Evas_Object* ewkBackingStore)
 {
     PRIV_DATA_GET_OR_RETURN(ewkBackingStore, priv);
-
     priv->view.visible = true;
     ewk_tiled_backing_store_enable_render(ewkBackingStore);
     _parent_sc.show(ewkBackingStore);
@@ -765,7 +807,6 @@ static void _ewk_tiled_backing_store_smart_show(Evas_Object* ewkBackingStore)
 static void _ewk_tiled_backing_store_smart_hide(Evas_Object* ewkBackingStore)
 {
     PRIV_DATA_GET_OR_RETURN(ewkBackingStore, priv);
-
     priv->view.visible = false;
     ewk_tiled_backing_store_disable_render(ewkBackingStore);
     _ewk_tiled_backing_store_tile_dissociate_all(priv);
@@ -774,22 +815,25 @@ static void _ewk_tiled_backing_store_smart_hide(Evas_Object* ewkBackingStore)
 
 static void _ewk_tiled_backing_store_recalc_renderers(Ewk_Tiled_Backing_Store_Data* priv, Evas_Coord width, Evas_Coord height, Evas_Coord tileWidth, Evas_Coord tileHeight)
 {
-    INFO("ewkBackingStore=%p, new size: %dx%d", priv->self, width, height);
+    long columns, rows, oldRows, oldCols;
+    INF("ewkBackingStore=%p, new size: %dx%d", priv->self, width, height);
 
-    unsigned long columns = 1 + static_cast<unsigned long>(ceil(width / static_cast<float>(tileWidth)));
-    unsigned long rows = 1 + static_cast<unsigned long>(ceil(height / static_cast<float>(tileHeight)));
+    columns = 1 + static_cast<int>(ceil(width / static_cast<float>(tileWidth)));
+    rows = 1 + static_cast<int>(ceil(height / static_cast<float>(tileHeight)));
 
-    INFO("ewkBackingStore=%p new grid size columns: %lu, rows: %lu, was %lu, %lu", priv->self, columns, rows, priv->view.columns, priv->view.rows);
+    INF("ewkBackingStore=%p new grid size columns: %ld, rows: %ld, was %ld, %ld",
+        priv->self, columns, rows, priv->view.columns, priv->view.rows);
 
     if (priv->view.columns == columns && priv->view.rows == rows)
         return;
 
-    unsigned long oldCols = priv->view.columns;
-    unsigned long oldRows = priv->view.rows;
+    oldCols = priv->view.columns;
+    oldRows = priv->view.rows;
 
     if (rows < oldRows) {
-        Eina_Inlist** start = priv->view.items + rows;
-        Eina_Inlist** end = priv->view.items + oldRows;
+        Eina_Inlist** start, **end;
+        start = priv->view.items + rows;
+        end = priv->view.items + oldRows;
         _ewk_tiled_backing_store_view_rows_range_del(priv, start, end);
     }
 
@@ -803,9 +847,9 @@ static void _ewk_tiled_backing_store_recalc_renderers(Ewk_Tiled_Backing_Store_Da
     if (rows > oldRows) {
         Eina_Inlist** start = priv->view.items + oldRows;
         Eina_Inlist** end = priv->view.items + rows;
-        for (; start < end; ++start) {
+        for (; start < end; start++) {
             *start = 0;
-            bool result = _ewk_tiled_backing_store_view_cols_end_add(priv, start, 0, columns);
+            Eina_Bool result = _ewk_tiled_backing_store_view_cols_end_add(priv, start, 0, columns);
             if (!result) {
                 CRITICAL("failed to allocate %ld columns", columns);
                 _ewk_tiled_backing_store_view_rows_range_del(priv, priv->view.items + oldRows, start);
@@ -816,16 +860,16 @@ static void _ewk_tiled_backing_store_recalc_renderers(Ewk_Tiled_Backing_Store_Da
     }
 
     if (columns != oldCols) {
-        long todo = columns - oldCols;
+        int todo = columns - oldCols;
         Eina_Inlist** start = priv->view.items;
         Eina_Inlist** end = start + std::min(oldRows, rows);
         if (todo > 0) {
-            for (; start < end; ++start) {
-                bool result = _ewk_tiled_backing_store_view_cols_end_add(priv, start, oldCols, todo);
+            for (; start < end; start++) {
+                Eina_Bool result = _ewk_tiled_backing_store_view_cols_end_add(priv, start, oldCols, todo);
                 if (!result) {
-                    CRITICAL("failed to allocate %ld columns!", todo);
+                    CRITICAL("failed to allocate %d columns!", todo);
 
-                    for (start--; start >= priv->view.items; --start)
+                    for (start--; start >= priv->view.items; start--)
                         _ewk_tiled_backing_store_view_cols_end_del(priv, start, todo);
                     if (rows > oldRows) {
                         start = priv->view.items + oldRows;
@@ -838,7 +882,7 @@ static void _ewk_tiled_backing_store_recalc_renderers(Ewk_Tiled_Backing_Store_Da
             }
         } else if (todo < 0) {
             todo = -todo;
-            for (; start < end; ++start)
+            for (; start < end; start++)
                 _ewk_tiled_backing_store_view_cols_end_del(priv, start, todo);
         }
     }
@@ -853,13 +897,14 @@ static void _ewk_tiled_backing_store_smart_calculate_size(Ewk_Tiled_Backing_Stor
     priv->view.width = width;
     priv->view.height = height;
 
-    _ewk_tiled_backing_store_recalc_renderers(priv, width, height, priv->view.tile.width, priv->view.tile.height);
+    _ewk_tiled_backing_store_recalc_renderers(
+        priv, width, height, priv->view.tile.width, priv->view.tile.height);
 }
 
-#ifdef DEBUG_MEM_LEAKS
 // TODO: remove me later.
 static inline void _ewk_tiled_backing_store_view_dbg(const Ewk_Tiled_Backing_Store_Data* priv)
 {
+    Eina_Inlist** start, **end;
     printf("tiles=%2ld,%2ld  model=%2ld,%2ld [%dx%d] base=%+3ld,%+4ld offset=%+4d,%+4d old=%+4d,%+4d base=%+3d,%+3d\n",
            priv->view.columns, priv->view.rows,
            priv->model.current.columns, priv->model.current.rows,
@@ -869,9 +914,9 @@ static inline void _ewk_tiled_backing_store_view_dbg(const Ewk_Tiled_Backing_Sto
            priv->view.offset.old.x, priv->view.offset.old.y,
            priv->view.offset.base.x, priv->view.offset.base.y);
 
-    Eina_Inlist** start = priv->view.items;
-    Eina_Inlist** end = priv->view.items + priv->view.rows;
-    for (; start < end; ++start) {
+    start = priv->view.items;
+    end = priv->view.items + priv->view.rows;
+    for (; start < end; start++) {
         const Ewk_Tiled_Backing_Store_Item* item;
 
         EINA_INLIST_FOREACH(*start, item) {
@@ -886,7 +931,6 @@ static inline void _ewk_tiled_backing_store_view_dbg(const Ewk_Tiled_Backing_Sto
     }
     printf("---\n");
 }
-#endif
 
 /**
  * @internal
@@ -901,36 +945,36 @@ static inline void _ewk_tiled_backing_store_view_dbg(const Ewk_Tiled_Backing_Sto
  *
  * @param count the number of times to repeat the process.
  */
-static void _ewk_tiled_backing_store_view_wrap_up(Ewk_Tiled_Backing_Store_Data* priv, Evas_Coord x, Evas_Coord y, unsigned long count)
+static void _ewk_tiled_backing_store_view_wrap_up(Ewk_Tiled_Backing_Store_Data* priv, Evas_Coord x, Evas_Coord y, unsigned int count)
 {
-    unsigned long lastRow = priv->view.rows - 1;
+    unsigned int lastRow = priv->view.rows - 1;
     Evas_Coord tileWidth = priv->view.tile.width;
     Evas_Coord tileHeight = priv->view.tile.height;
     Evas_Coord offsetY = priv->view.offset.base.y + count * tileHeight;
     Evas_Coord tilePositionY = y + (lastRow - count + 1) * tileHeight + offsetY;
+    Eina_Inlist** iteratorStart, **iteratorEnd;
     Evas_Coord originX = x + priv->view.offset.base.x;
 
-    Eina_Inlist** start = priv->view.items;
-    Eina_Inlist** end = start + lastRow;
-
-    for (; count > 0; --count) {
-        Eina_Inlist** it;
-        Eina_Inlist* temp = *start;
+    iteratorStart = priv->view.items;
+    iteratorEnd = iteratorStart + lastRow;
 
-        for (it = start; it < end; ++it)
-            *it = *(it + 1);
-        *it = temp;
+    for (; count > 0; count--) {
+        Eina_Inlist** iteratorList;
+        Eina_Inlist* temp = *iteratorStart;
+        Ewk_Tiled_Backing_Store_Item* item;
+        Evas_Coord tilePositionX = originX;
+        int column = 0;
 
-        ++priv->model.base.row;
+        for (iteratorList = iteratorStart; iteratorList < iteratorEnd; iteratorList++)
+            *iteratorList = *(iteratorList + 1);
+        *iteratorList = temp;
 
-        Evas_Coord tilePositionX = originX;
-        unsigned long column = 0;
-        Ewk_Tiled_Backing_Store_Item* item;
+        priv->model.base.row++;
         EINA_INLIST_FOREACH(temp, item) {
             _ewk_tiled_backing_store_item_move(item, tilePositionX, tilePositionY);
             tilePositionX += tileWidth;
             _ewk_tiled_backing_store_item_fill(priv, item, column, lastRow);
-            ++column;
+            column++;
         }
         tilePositionY += tileHeight;
     }
@@ -950,35 +994,35 @@ static void _ewk_tiled_backing_store_view_wrap_up(Ewk_Tiled_Backing_Store_Data*
  *
  * @param count the number of times to repeat the process.
  */
-static void _ewk_tiled_backing_store_view_wrap_down(Ewk_Tiled_Backing_Store_Data* priv, Evas_Coord x, Evas_Coord y, unsigned long count)
+static void _ewk_tiled_backing_store_view_wrap_down(Ewk_Tiled_Backing_Store_Data* priv, Evas_Coord x, Evas_Coord y, unsigned int count)
 {
     Evas_Coord tileWidth = priv->view.tile.width;
     Evas_Coord tileHeight = priv->view.tile.height;
     Evas_Coord offsetY = priv->view.offset.base.y - count * tileHeight;
     Evas_Coord tilePositionY = y + offsetY + (count - 1) * tileHeight;
+    Eina_Inlist** iteratorStart, **iteratorEnd;
     Evas_Coord originX = x + priv->view.offset.base.x;
 
-    Eina_Inlist** start = priv->view.items + priv->view.rows - 1;
-    Eina_Inlist** end = priv->view.items;
+    iteratorStart = priv->view.items + priv->view.rows - 1;
+    iteratorEnd = priv->view.items;
 
-    for (; count > 0; --count) {
-        Eina_Inlist** it;
-        Eina_Inlist* temp = *start;
+    for (; count > 0; count--) {
+        Eina_Inlist** iteratorList;
+        Eina_Inlist* temp = *iteratorStart;
+        Ewk_Tiled_Backing_Store_Item* item;
         Evas_Coord tilePositionX = originX;
+        int column = 0;
 
-        for (it = start; it > end; --it)
-            *it = *(it - 1);
-        *it = temp;
-
-        --priv->model.base.row;
+        for (iteratorList = iteratorStart; iteratorList > iteratorEnd; iteratorList--)
+            *iteratorList = *(iteratorList - 1);
+        *iteratorList = temp;
 
-        unsigned long column = 0;
-        Ewk_Tiled_Backing_Store_Item* item;
+        priv->model.base.row--;
         EINA_INLIST_FOREACH(temp, item) {
             _ewk_tiled_backing_store_item_move(item, tilePositionX, tilePositionY);
             tilePositionX += tileWidth;
             _ewk_tiled_backing_store_item_fill(priv, item, column, 0);
-            ++column;
+            column++;
         }
         tilePositionY -= tileHeight;
     }
@@ -998,32 +1042,35 @@ static void _ewk_tiled_backing_store_view_wrap_down(Ewk_Tiled_Backing_Store_Data
  *
  * @param count the number of times to repeat the process.
  */
-static void _ewk_tiled_backing_store_view_wrap_left(Ewk_Tiled_Backing_Store_Data* priv, Evas_Coord x, Evas_Coord y, unsigned long count)
+static void _ewk_tiled_backing_store_view_wrap_left(Ewk_Tiled_Backing_Store_Data* priv, Evas_Coord x, Evas_Coord y, unsigned int count)
 {
-    unsigned long lastColumn = priv->view.columns - 1;
+    unsigned int row, lastColumn = priv->view.columns - 1;
     Evas_Coord tileWidth = priv->view.tile.width;
     Evas_Coord tileHeight = priv->view.tile.height;
     Evas_Coord offsetX = priv->view.offset.base.x + count * tileWidth;
     Evas_Coord offsetY = y + priv->view.offset.base.y;
-
-    unsigned long baseColumn = lastColumn - count + 1;
+    Eina_Inlist** iterator;
+    Eina_Inlist** iteratorEnd;
+    unsigned int baseColumn = lastColumn - count + 1;
     Evas_Coord originX = x + baseColumn * tileWidth + offsetX;
 
-    Eina_Inlist** it = priv->view.items;
-    Eina_Inlist** end = it + priv->view.rows;
+    iterator = priv->view.items;
+    iteratorEnd = iterator + priv->view.rows;
+    row = 0;
 
     priv->model.base.column += count;
 
-    for (unsigned long row = 0; it < end; ++it, ++row) {
+    for (; iterator < iteratorEnd; iterator++, row++) {
         Evas_Coord tilePositionX = originX;
-        unsigned long column = baseColumn;
+        unsigned int column = baseColumn;
 
-        for (unsigned long i = 0; i < count; ++i, ++column, tilePositionX += tileWidth) {
-            Ewk_Tiled_Backing_Store_Item* item = EINA_INLIST_CONTAINER_GET(*it, Ewk_Tiled_Backing_Store_Item);
-            *it = eina_inlist_demote(*it, *it);
+        for (unsigned int i = 0; i < count; i++, column++, tilePositionX += tileWidth) {
+            Ewk_Tiled_Backing_Store_Item* it;
+            it = EINA_INLIST_CONTAINER_GET(*iterator, Ewk_Tiled_Backing_Store_Item);
+            *iterator = eina_inlist_demote(*iterator, *iterator);
 
-            _ewk_tiled_backing_store_item_move(item, tilePositionX, offsetY);
-            _ewk_tiled_backing_store_item_fill(priv, item, column, row);
+            _ewk_tiled_backing_store_item_move(it, tilePositionX, offsetY);
+            _ewk_tiled_backing_store_item_fill(priv, it, column, row);
         }
         offsetY += tileHeight;
     }
@@ -1044,28 +1091,31 @@ static void _ewk_tiled_backing_store_view_wrap_left(Ewk_Tiled_Backing_Store_Data
  *
  * @param count the number of times to repeat the process.
  */
-static void _ewk_tiled_backing_store_view_wrap_right(Ewk_Tiled_Backing_Store_Data* priv, Evas_Coord x, Evas_Coord y, unsigned long count)
+static void _ewk_tiled_backing_store_view_wrap_right(Ewk_Tiled_Backing_Store_Data* priv, Evas_Coord x, Evas_Coord y, unsigned int count)
 {
+    unsigned int row;
     Evas_Coord tileWidth = priv->view.tile.width;
     Evas_Coord tileHeight = priv->view.tile.height;
     Evas_Coord offsetX = priv->view.offset.base.x - count * tileWidth;
     Evas_Coord tilePositionY = y + priv->view.offset.base.y;
-
-    unsigned long baseColumn = count - 1;
+    Eina_Inlist** iterator, ** iteratorEnd;
+    unsigned int baseColumn = count - 1;
     Evas_Coord originX = x + baseColumn * tileWidth + offsetX;
 
-    Eina_Inlist** it = priv->view.items;
-    Eina_Inlist** end = it + priv->view.rows;
+    iterator = priv->view.items;
+    iteratorEnd = iterator + priv->view.rows;
+    row = 0;
 
     priv->model.base.column -= count;
 
-    for (unsigned long row = 0; it < end; ++it, ++row) {
+    for (; iterator < iteratorEnd; iterator++, row++) {
         Evas_Coord tilePositionX = originX;
-        unsigned long column = baseColumn;
+        unsigned int column = baseColumn;
 
-        for (unsigned long i = 0; i < count; ++i, --column, tilePositionX -= tileWidth) {
-            Ewk_Tiled_Backing_Store_Item* item = EINA_INLIST_CONTAINER_GET((*it)->last, Ewk_Tiled_Backing_Store_Item);
-            *it = eina_inlist_promote(*it, (*it)->last);
+        for (unsigned int i = 0; i < count; i++, column--, tilePositionX -= tileWidth) {
+            Ewk_Tiled_Backing_Store_Item* item;
+            item = EINA_INLIST_CONTAINER_GET((*iterator)->last, Ewk_Tiled_Backing_Store_Item);
+            *iterator = eina_inlist_promote(*iterator, (*iterator)->last);
 
             _ewk_tiled_backing_store_item_move(item, tilePositionX, tilePositionY);
             _ewk_tiled_backing_store_item_fill(priv, item, column, row);
@@ -1078,28 +1128,33 @@ static void _ewk_tiled_backing_store_view_wrap_right(Ewk_Tiled_Backing_Store_Dat
 
 static void _ewk_tiled_backing_store_view_refill(Ewk_Tiled_Backing_Store_Data* priv, Evas_Coord x, Evas_Coord y, int stepX, int stepY)
 {
+    Eina_Inlist** iterator, **iteratorEnd;
+    Evas_Coord baseTilePositionX, tilePositionY, tileWidth, tileHeight;
+    unsigned int row;
+
     evas_object_move(priv->base.clipper, x, y);
 
-    Evas_Coord tileWidth = priv->view.tile.width;
-    Evas_Coord tileHeight = priv->view.tile.height;
+    tileWidth = priv->view.tile.width;
+    tileHeight = priv->view.tile.height;
 
-    Evas_Coord baseTilePositionX = x + priv->view.offset.base.x;
-    Evas_Coord tilePositionY = y + priv->view.offset.base.y;
+    baseTilePositionX = x + priv->view.offset.base.x;
+    tilePositionY = y + priv->view.offset.base.y;
 
-    Eina_Inlist** it = priv->view.items;
-    Eina_Inlist** end = it + priv->view.rows;
+    iterator = priv->view.items;
+    iteratorEnd = iterator + priv->view.rows;
+    row = 0;
 
     priv->model.base.column -= stepX;
     priv->model.base.row -= stepY;
 
-    for (unsigned long row = 0; it < end; ++it, ++row) {
+    for (; iterator < iteratorEnd; iterator++, row++) {
         Ewk_Tiled_Backing_Store_Item* item;
         Evas_Coord newTilePositionX = baseTilePositionX;
-        unsigned long column = 0;
-        EINA_INLIST_FOREACH(*it, item) {
+        unsigned int column = 0;
+        EINA_INLIST_FOREACH(*iterator, item) {
             _ewk_tiled_backing_store_item_fill(priv, item, column, row);
             _ewk_tiled_backing_store_item_move(item, newTilePositionX, tilePositionY);
-            ++column;
+            column++;
             newTilePositionX += tileWidth;
         }
         tilePositionY += tileHeight;
@@ -1108,20 +1163,23 @@ static void _ewk_tiled_backing_store_view_refill(Ewk_Tiled_Backing_Store_Data* p
 
 static void _ewk_tiled_backing_store_view_pos_apply(Ewk_Tiled_Backing_Store_Data* priv, Evas_Coord x, Evas_Coord y)
 {
+    Eina_Inlist** iterator, **iteratorEnd;
+    Evas_Coord baseTilePositionX, baseTilePositionY, tileWidth, tileHeight;
+
     evas_object_move(priv->base.clipper, x, y);
 
-    Evas_Coord tileWidth = priv->view.tile.width;
-    Evas_Coord tileHeight = priv->view.tile.height;
+    tileWidth = priv->view.tile.width;
+    tileHeight = priv->view.tile.height;
 
-    Evas_Coord baseTilePositionX = x + priv->view.offset.base.x;
-    Evas_Coord baseTilePositionY = y + priv->view.offset.base.y;
+    baseTilePositionX = x + priv->view.offset.base.x;
+    baseTilePositionY = y + priv->view.offset.base.y;
 
-    Eina_Inlist** it = priv->view.items;
-    Eina_Inlist** end = it + priv->view.rows;
-    for (; it < end; ++it) {
+    iterator = priv->view.items;
+    iteratorEnd = iterator + priv->view.rows;
+    for (; iterator < iteratorEnd; iterator++) {
         Ewk_Tiled_Backing_Store_Item* item;
         Evas_Coord offsetX = baseTilePositionX;
-        EINA_INLIST_FOREACH(*it, item) {
+        EINA_INLIST_FOREACH(*iterator, item) {
             _ewk_tiled_backing_store_item_move(item, offsetX, baseTilePositionY);
             offsetX += tileWidth;
         }
@@ -1133,59 +1191,72 @@ static void _ewk_tiled_backing_store_smart_calculate_offset_force(Ewk_Tiled_Back
 {
     Evas_Coord deltaX = priv->view.offset.current.x - priv->view.offset.old.x;
     Evas_Coord deltaY = priv->view.offset.current.y - priv->view.offset.old.y;
+    Evas_Coord tileWidth, tileHeight;
+    int stepY, stepX;
 
-    INFO("ewkBackingStore=%p, offset: %+4d, %+4d (%+4d, %+4d)",
+    INF("ewkBackingStore=%p, offset: %+4d, %+4d (%+4d, %+4d)",
         priv->self, deltaX, deltaY, priv->view.offset.current.x, priv->view.offset.current.y);
 
-    Evas_Coord tileWidth = priv->view.tile.width;
-    Evas_Coord tileHeight = priv->view.tile.height;
+    tileWidth = priv->view.tile.width;
+    tileHeight = priv->view.tile.height;
 
-    unsigned long newColumn = -priv->view.offset.current.x / tileWidth;
-    int stepX = priv->model.base.column - newColumn;
-    unsigned long newRow = -priv->view.offset.current.y / tileHeight;
-    int stepY = priv->model.base.row - newRow;
+    long newColumn = -priv->view.offset.current.x / tileWidth;
+    stepX = priv->model.base.column - newColumn;
+    long newRow = -priv->view.offset.current.y / tileHeight;
+    stepY = priv->model.base.row - newRow;
 
     priv->view.offset.old.x = priv->view.offset.current.x;
     priv->view.offset.old.y = priv->view.offset.current.y;
-    evas_object_move(priv->contentsClipper, priv->view.offset.current.x + priv->view.x, priv->view.offset.current.y + priv->view.y);
+    evas_object_move(
+        priv->contentsClipper,
+        priv->view.offset.current.x + priv->view.x,
+        priv->view.offset.current.y + priv->view.y);
 
     priv->view.offset.base.x += deltaX - stepX * tileWidth;
     priv->view.offset.base.y += deltaY - stepY * tileHeight;
 
-    _ewk_tiled_backing_store_view_refill(priv, priv->view.x, priv->view.y, stepX, stepY);
+    _ewk_tiled_backing_store_view_refill
+        (priv, priv->view.x, priv->view.y, stepX, stepY);
 }
 
 static void _ewk_tiled_backing_store_smart_calculate_offset(Ewk_Tiled_Backing_Store_Data* priv, Evas_Coord x, Evas_Coord y)
 {
     Evas_Coord deltaX = priv->view.offset.current.x - priv->view.offset.old.x;
     Evas_Coord deltaY = priv->view.offset.current.y - priv->view.offset.old.y;
+    Evas_Coord tileWidth, tileHeight;
+    int stepY, stepX;
 
-    INFO("ewkBackingStore=%p, offset: %+4d, %+4d (%+4d, %+4d)", priv->self, deltaX, deltaY, priv->view.offset.current.x, priv->view.offset.current.y);
+    INF("ewkBackingStore=%p, offset: %+4d, %+4d (%+4d, %+4d)",
+        priv->self, deltaX, deltaY, priv->view.offset.current.x, priv->view.offset.current.y);
 
     if (!deltaX && !deltaY)
         return;
 
-    Evas_Coord tileWidth = priv->view.tile.width;
-    Evas_Coord tileHeight = priv->view.tile.height;
+    tileWidth = priv->view.tile.width;
+    tileHeight = priv->view.tile.height;
 
     long newCol = -priv->view.offset.current.x / tileWidth;
-    long stepX = priv->model.base.column - newCol;
+    stepX = priv->model.base.column - newCol;
     long newRow = -priv->view.offset.current.y / tileHeight;
-    long stepY = priv->model.base.row - newRow;
+    stepY = priv->model.base.row - newRow;
 
     priv->view.offset.old.x = priv->view.offset.current.x;
     priv->view.offset.old.y = priv->view.offset.current.y;
-    evas_object_move(priv->contentsClipper, priv->view.offset.current.x + priv->view.x, priv->view.offset.current.y + priv->view.y);
+    evas_object_move(
+        priv->contentsClipper,
+        priv->view.offset.current.x + priv->view.x,
+        priv->view.offset.current.y + priv->view.y);
 
-    if ((stepX < 0 && stepX <= -static_cast<long>(priv->view.columns))
-        || (stepX > 0 && stepX >= static_cast<long>(priv->view.columns))
-        || (stepY < 0 && stepY <= -static_cast<long>(priv->view.rows))
-        || (stepY > 0 && stepY >= static_cast<long>(priv->view.rows))) {
+    if ((stepX < 0 && stepX <= -priv->view.columns)
+        || (stepX > 0 && stepX >= priv->view.columns)
+        || (stepY < 0 && stepY <= -priv->view.rows)
+        || (stepY > 0 && stepY >= priv->view.rows)) {
 
         priv->view.offset.base.x += deltaX - stepX * tileWidth;
         priv->view.offset.base.y += deltaY - stepY * tileHeight;
 
-        _ewk_tiled_backing_store_view_refill(priv, priv->view.x, priv->view.y, stepX, stepY);
+        _ewk_tiled_backing_store_view_refill
+            (priv, priv->view.x, priv->view.y, stepX, stepY);
         return;
     }
 
@@ -1210,16 +1281,21 @@ static void _ewk_tiled_backing_store_smart_calculate_pos(Ewk_Tiled_Backing_Store
     _ewk_tiled_backing_store_view_pos_apply(priv, x, y);
     priv->view.x = x;
     priv->view.y = y;
-    evas_object_move(priv->contentsClipper, priv->view.offset.current.x + priv->view.x, priv->view.offset.current.y + priv->view.y);
+    evas_object_move(
+        priv->contentsClipper,
+        priv->view.offset.current.x + priv->view.x,
+        priv->view.offset.current.y + priv->view.y);
 }
 
 static void _ewk_tiled_backing_store_fill_renderers(Ewk_Tiled_Backing_Store_Data* priv)
 {
-    for (unsigned long i = 0; i < priv->view.rows; ++i) {
-        Eina_Inlist* list = priv->view.items[i];
+    Eina_Inlist* list;
+    Ewk_Tiled_Backing_Store_Item* item;
+    int i, j;
 
-        unsigned long j = 0;
-        Ewk_Tiled_Backing_Store_Item* item;
+    for (i = 0; i < priv->view.rows; i++) {
+        list = priv->view.items[i];
+        j = 0;
         EINA_INLIST_FOREACH(list, item)
             _ewk_tiled_backing_store_item_fill(priv, item, j++, i);
     }
@@ -1242,8 +1318,10 @@ static void _ewk_tiled_backing_store_smart_calculate(Evas_Object* ewkBackingStor
         ewk_tile_matrix_invalidate(priv->model.matrix);
 
     if (!priv->render.suspend && (priv->changed.model || priv->changed.contentsSize)) {
-        unsigned long columns = priv->model.width / priv->view.tile.width + 1;
-        unsigned long rows = priv->model.height / priv->view.tile.height + 1;
+        unsigned long columns, rows;
+
+        columns = priv->model.width / priv->view.tile.width + 1;
+        rows = priv->model.height / priv->view.tile.height + 1;
 
         priv->model.old.columns = priv->model.current.columns;
         priv->model.old.rows = priv->model.current.rows;
@@ -1281,8 +1359,10 @@ static void _ewk_tiled_backing_store_smart_calculate(Evas_Object* ewkBackingStor
 
         /* Make sure we do not miss any important repaint by
          * repainting the whole viewport */
-        const Eina_Rectangle rect = { 0, 0, priv->model.width, priv->model.height };
-        ewk_tile_matrix_update(priv->model.matrix, &rect, priv->view.tile.zoom);
+        const Eina_Rectangle rect =
+        { 0, 0, priv->model.width, priv->model.height };
+        ewk_tile_matrix_update(priv->model.matrix, &rect,
+                               priv->view.tile.zoom);
 
         priv->changed.contentsSize = false;
     }
@@ -1294,12 +1374,12 @@ static void _ewk_tiled_backing_store_smart_calculate(Evas_Object* ewkBackingStor
     if (priv->view.offset.base.x > 0
         || priv->view.offset.base.x <= - priv->view.tile.width
         || priv->view.offset.base.y > 0
-        || priv->view.offset.base.y <= - priv->view.tile.height) {
+        || priv->view.offset.base.y <= - priv->view.tile.height)
         ERR("incorrect base offset %+4d,%+4d, tile=%dx%d, current=%+4d,%+4d\n",
             priv->view.offset.base.x, priv->view.offset.base.y,
             priv->view.tile.width, priv->view.tile.height,
             priv->view.offset.current.x, priv->view.offset.current.y);
-    }
+
 }
 
 Evas_Object* ewk_tiled_backing_store_add(Evas* canvas)
@@ -1329,19 +1409,17 @@ Evas_Object* ewk_tiled_backing_store_add(Evas* canvas)
     return evas_object_smart_add(canvas, smart);
 }
 
-void ewk_tiled_backing_store_render_cb_set(Evas_Object* ewkBackingStore, bool (*callback)(void* data, Ewk_Tile* tile, const Eina_Rectangle* area), const void* data)
+void ewk_tiled_backing_store_render_cb_set(Evas_Object* ewkBackingStore, Eina_Bool (*callback)(void* data, Ewk_Tile* tile, const Eina_Rectangle* area), const void* data)
 {
     EINA_SAFETY_ON_NULL_RETURN(callback);
     PRIV_DATA_GET_OR_RETURN(ewkBackingStore, priv);
-
     priv->render.callback = callback;
-    priv->render.data = const_cast<void*>(data);
+    priv->render.data = (void*)data;
 }
 
 Ewk_Tile_Unused_Cache* ewk_tiled_backing_store_tile_unused_cache_get(const Evas_Object* ewkBackingStore)
 {
     PRIV_DATA_GET_OR_RETURN(ewkBackingStore, priv, 0);
-
     return ewk_tile_matrix_unused_cache_get(priv->model.matrix);
 }
 
@@ -1355,7 +1433,7 @@ void ewk_tiled_backing_store_tile_unused_cache_set(Evas_Object* ewkBackingStore,
     _ewk_tiled_backing_store_model_matrix_create(priv, tileUnusedCache);
 }
 
-static bool _ewk_tiled_backing_store_scroll_full_offset_set_internal(Ewk_Tiled_Backing_Store_Data* priv, Evas_Coord x, Evas_Coord y)
+static Eina_Bool _ewk_tiled_backing_store_scroll_full_offset_set_internal(Ewk_Tiled_Backing_Store_Data* priv, Evas_Coord x, Evas_Coord y)
 {
     /* TODO: check offset go out of bounds, clamp */
     if (priv->render.disabled)
@@ -1370,7 +1448,7 @@ static bool _ewk_tiled_backing_store_scroll_full_offset_set_internal(Ewk_Tiled_B
     return true;
 }
 
-bool ewk_tiled_backing_store_scroll_full_offset_set(Evas_Object* ewkBackingStore, Evas_Coord x, Evas_Coord y)
+Eina_Bool ewk_tiled_backing_store_scroll_full_offset_set(Evas_Object* ewkBackingStore, Evas_Coord x, Evas_Coord y)
 {
     DBG("ewkBackingStore=%p, x=%d, y=%d", ewkBackingStore, x, y);
 
@@ -1381,7 +1459,7 @@ bool ewk_tiled_backing_store_scroll_full_offset_set(Evas_Object* ewkBackingStore
     return _ewk_tiled_backing_store_scroll_full_offset_set_internal(priv, x, y);
 }
 
-bool ewk_tiled_backing_store_scroll_full_offset_add(Evas_Object* ewkBackingStore, Evas_Coord deltaX, Evas_Coord deltaY)
+Eina_Bool ewk_tiled_backing_store_scroll_full_offset_add(Evas_Object* ewkBackingStore, Evas_Coord deltaX, Evas_Coord deltaY)
 {
     DBG("ewkBackingStore=%p, deltaX=%d, deltaY=%d", ewkBackingStore, deltaX, deltaY);
 
@@ -1389,10 +1467,11 @@ bool ewk_tiled_backing_store_scroll_full_offset_add(Evas_Object* ewkBackingStore
     if (!deltaX && !deltaY)
         return true;
 
-    return _ewk_tiled_backing_store_scroll_full_offset_set_internal(priv, priv->view.offset.current.x + deltaX, priv->view.offset.current.y + deltaY);
+    return _ewk_tiled_backing_store_scroll_full_offset_set_internal
+               (priv, priv->view.offset.current.x + deltaX, priv->view.offset.current.y + deltaY);
 }
 
-static bool _ewk_tiled_backing_store_zoom_set_internal(Ewk_Tiled_Backing_Store_Data* priv, float* zoom, Evas_Coord currentX, Evas_Coord currentY, Evas_Coord* offsetX, Evas_Coord* offsetY)
+static Eina_Bool _ewk_tiled_backing_store_zoom_set_internal(Ewk_Tiled_Backing_Store_Data* priv, float* zoom, Evas_Coord currentX, Evas_Coord currentY, Evas_Coord* offsetX, Evas_Coord* offsetY)
 {
     *offsetX = priv->view.offset.current.x;
     *offsetY = priv->view.offset.current.y;
@@ -1400,16 +1479,16 @@ static bool _ewk_tiled_backing_store_zoom_set_internal(Ewk_Tiled_Backing_Store_D
     if (fabsf(priv->view.tile.zoom - *zoom) < zoomStepMinimum) {
         DBG("ignored as zoom difference is < %f: %f",
             (double)zoomStepMinimum, fabsf(priv->view.tile.zoom - *zoom));
-
         return true;
     }
 
     _ewk_tiled_backing_store_pre_render_request_flush(priv);
+    Evas_Coord tileWidth, tileHeight;
 
     *zoom = ROUNDED_ZOOM(priv->view.tile.width, *zoom);
 
-    Evas_Coord tileWidth = priv->view.tile.width;
-    Evas_Coord tileHeight = priv->view.tile.height;
+    tileWidth = priv->view.tile.width;
+    tileHeight = priv->view.tile.height;
 
     float scale = *zoom / priv->view.tile.zoom;
 
@@ -1429,6 +1508,8 @@ static bool _ewk_tiled_backing_store_zoom_set_internal(Ewk_Tiled_Backing_Store_D
         priv->view.offset.base.y = 0;
         return true;
     }
+    Eina_Inlist** iterator, **iteratorEnd;
+    Ewk_Tiled_Backing_Store_Item* item;
 
     Evas_Coord newX = currentX + (priv->view.offset.current.x - currentX) * scale;
     Evas_Coord newY = currentY + (priv->view.offset.current.y - currentY) * scale;
@@ -1465,19 +1546,23 @@ static bool _ewk_tiled_backing_store_zoom_set_internal(Ewk_Tiled_Backing_Store_D
     *offsetX = priv->view.offset.current.x;
     *offsetY = priv->view.offset.current.y;
 
-    evas_object_move(priv->contentsClipper, newX + priv->view.x, newY + priv->view.y);
+    evas_object_move(
+        priv->contentsClipper,
+        newX + priv->view.x,
+        newY + priv->view.y);
 
     _ewk_tiled_backing_store_fill_renderers(priv);
 
     Evas_Coord tilePositionY = priv->view.offset.base.y + priv->view.y;
     Evas_Coord baseTilePositionX = priv->view.x + priv->view.offset.base.x;
 
-    Eina_Inlist** it = priv->view.items;
-    Eina_Inlist** end = it + priv->view.rows;
-    for (; it < end; ++it) {
+    iterator = priv->view.items;
+    iteratorEnd = iterator + priv->view.rows;
+
+    for (; iterator < iteratorEnd; iterator++) {
         Evas_Coord tilePositionX = baseTilePositionX;
-        Eina_Inlist* lst = *it;
-        Ewk_Tiled_Backing_Store_Item* item;
+        Eina_Inlist* lst = *iterator;
+
         EINA_INLIST_FOREACH(lst, item) {
             _ewk_tiled_backing_store_item_move(item, tilePositionX, tilePositionY);
             _ewk_tiled_backing_store_item_resize(item, tileWidth, tileHeight);
@@ -1489,7 +1574,7 @@ static bool _ewk_tiled_backing_store_zoom_set_internal(Ewk_Tiled_Backing_Store_D
     return true;
 }
 
-bool ewk_tiled_backing_store_zoom_set(Evas_Object* ewkBackingStore, float* zoom, Evas_Coord currentX, Evas_Coord currentY, Evas_Coord* offsetX, Evas_Coord* offsetY)
+Eina_Bool ewk_tiled_backing_store_zoom_set(Evas_Object* ewkBackingStore, float* zoom, Evas_Coord currentX, Evas_Coord currentY, Evas_Coord* offsetX, Evas_Coord* offsetY)
 {
     DBG("ewkBackingStore=%p, zoom=%f", ewkBackingStore, *zoom);
 
@@ -1498,20 +1583,22 @@ bool ewk_tiled_backing_store_zoom_set(Evas_Object* ewkBackingStore, float* zoom,
     return _ewk_tiled_backing_store_zoom_set_internal(priv, zoom, currentX, currentY, offsetX, offsetY);
 }
 
-bool ewk_tiled_backing_store_zoom_weak_set(Evas_Object* ewkBackingStore, float zoom, Evas_Coord currentX, Evas_Coord currentY)
+Eina_Bool ewk_tiled_backing_store_zoom_weak_set(Evas_Object* ewkBackingStore, float zoom, Evas_Coord currentX, Evas_Coord currentY)
 {
     DBG("ewkBackingStore=%p, zoom=%f", ewkBackingStore, zoom);
     PRIV_DATA_GET_OR_RETURN(ewkBackingStore, priv, false);
     if (!priv->view.width || !priv->view.height)
         return false;
-
-    bool reCalculate = false;
+    Eina_Inlist** iterator, ** iteratorEnd;
+    Ewk_Tiled_Backing_Store_Item* item;
+    Evas_Coord tileWidth, tileHeight;
+    Eina_Bool reCalculate = false;
 
     float scale = zoom / priv->view.tile.zoom;
 
-    Evas_Coord tileWidth = TILE_SIZE_AT_ZOOM(priv->view.tile.width, scale);
+    tileWidth = TILE_SIZE_AT_ZOOM(priv->view.tile.width, scale);
     scale = TILE_ZOOM_AT_SIZE(tileWidth, priv->view.tile.width);
-    Evas_Coord tileHeight = TILE_SIZE_AT_ZOOM(priv->view.tile.height, scale);
+    tileHeight = TILE_SIZE_AT_ZOOM(priv->view.tile.height, scale);
     zoom = scale * priv->view.tile.zoom;
 
     Evas_Coord modelWidth = priv->model.width * scale;
@@ -1519,8 +1606,8 @@ bool ewk_tiled_backing_store_zoom_weak_set(Evas_Object* ewkBackingStore, float z
 
     evas_object_resize(priv->contentsClipper, modelWidth, modelHeight);
 
-    unsigned long vrows = static_cast<unsigned long>(ceil(priv->view.height /static_cast<float>(tileHeight)) + 1);
-    unsigned long vcols = static_cast<unsigned long>(ceil(priv->view.width / static_cast<float>(tileWidth)) + 1);
+    int vrows = static_cast<int>(ceil(priv->view.height /static_cast<float>(tileHeight)) + 1);
+    int vcols = static_cast<int>(ceil(priv->view.width / static_cast<float>(tileWidth)) + 1);
     Evas_Coord newX = currentX + (priv->view.offset.current.x - currentX) * scale;
     Evas_Coord newY = currentY + (priv->view.offset.current.y - currentY) * scale;
     Evas_Coord baseX = newX % tileWidth;
@@ -1548,14 +1635,17 @@ bool ewk_tiled_backing_store_zoom_weak_set(Evas_Object* ewkBackingStore, float z
     Evas_Coord baseTilePositionX = baseX + priv->view.x;
     Evas_Coord tilePositionY = baseY + priv->view.y;
 
-    evas_object_move(priv->contentsClipper, newX + priv->view.x, newY + priv->view.y);
+    evas_object_move(priv->contentsClipper,
+                     newX + priv->view.x,
+                     newY + priv->view.y);
 
-    Eina_Inlist** it = priv->view.items;
-    Eina_Inlist** end = it + priv->view.rows;
-    for (; it < end; ++it) {
+    iterator = priv->view.items;
+    iteratorEnd = iterator + priv->view.rows;
+
+    for (; iterator < iteratorEnd; iterator++) {
         Evas_Coord tilePositionX = baseTilePositionX;
-        Eina_Inlist* list = *it;
-        Ewk_Tiled_Backing_Store_Item* item;
+        Eina_Inlist* list = *iterator;
+
         EINA_INLIST_FOREACH(list, item) {
             _ewk_tiled_backing_store_item_move(item, tilePositionX, tilePositionY);
             _ewk_tiled_backing_store_item_resize(item, tileWidth, tileHeight);
@@ -1570,7 +1660,8 @@ bool ewk_tiled_backing_store_zoom_weak_set(Evas_Object* ewkBackingStore, float z
 void ewk_tiled_backing_store_fix_offsets(Evas_Object* ewkBackingStore, Evas_Coord width, Evas_Coord height)
 {
     PRIV_DATA_GET_OR_RETURN(ewkBackingStore, priv);
-
+    Eina_Inlist** iterator, **iteratorEnd;
+    Ewk_Tiled_Backing_Store_Item* item;
     Evas_Coord newX = priv->view.offset.current.x;
     Evas_Coord newY = priv->view.offset.current.y;
     Evas_Coord baseX = priv->view.offset.base.x;
@@ -1606,17 +1697,20 @@ void ewk_tiled_backing_store_fix_offsets(Evas_Object* ewkBackingStore, Evas_Coor
     priv->view.offset.old.y = newY;
     priv->view.offset.base.x = baseX;
     priv->view.offset.base.y = baseY;
-    evas_object_move(priv->contentsClipper, newX + priv->view.x, newY + priv->view.y);
+    evas_object_move(priv->contentsClipper,
+                     newX + priv->view.x,
+                     newY + priv->view.y);
 
     Evas_Coord tilePositionY = priv->view.offset.base.y + priv->view.y;
     Evas_Coord baseTilePositionX = priv->view.x + priv->view.offset.base.x;
 
-    Eina_Inlist** it = priv->view.items;
-    Eina_Inlist** end = it + priv->view.rows;
-    for (; it < end; ++it) {
+    iterator = priv->view.items;
+    iteratorEnd = iterator + priv->view.rows;
+
+    for (; iterator < iteratorEnd; iterator++) {
         Evas_Coord tilePositionX = baseTilePositionX;
-        Eina_Inlist* lst = *it;
-        Ewk_Tiled_Backing_Store_Item* item;
+        Eina_Inlist* lst = *iterator;
+
         EINA_INLIST_FOREACH(lst, item) {
             _ewk_tiled_backing_store_item_move(item, tilePositionX, tilePositionY);
             _ewk_tiled_backing_store_item_resize(item, tileWidth, tileHeight);
@@ -1626,50 +1720,53 @@ void ewk_tiled_backing_store_fix_offsets(Evas_Object* ewkBackingStore, Evas_Coor
     }
 }
 
-void ewk_tiled_backing_store_zoom_weak_smooth_scale_set(Evas_Object* ewkBackingStore, bool smoothScale)
+void ewk_tiled_backing_store_zoom_weak_smooth_scale_set(Evas_Object* ewkBackingStore, Eina_Bool smoothScale)
 {
     PRIV_DATA_GET_OR_RETURN(ewkBackingStore, priv);
+    Eina_Inlist** iterator, **iteratorEnd;
 
-    Eina_Inlist** it = priv->view.items;
-    Eina_Inlist** end = it + priv->view.rows;
+    iterator = priv->view.items;
+    iteratorEnd = iterator + priv->view.rows;
     priv->view.tile.zoomWeakSmoothScale = smoothScale;
 
-    for (; it< end; ++it) {
+    for (; iterator< iteratorEnd; iterator++) {
         Ewk_Tiled_Backing_Store_Item* item;
-        EINA_INLIST_FOREACH(*it, item)
+        EINA_INLIST_FOREACH(*iterator, item)
             if (item->tile)
-                _ewk_tiled_backing_store_item_smooth_scale_set(item, smoothScale);
+                _ewk_tiled_backing_store_item_smooth_scale_set
+                    (item, smoothScale);
     }
 }
 
-void ewk_tiled_backing_store_alpha_set(Evas_Object* ewkBackingStore, bool hasAlpha)
+void ewk_tiled_backing_store_alpha_set(Evas_Object* ewkBackingStore, Eina_Bool hasAlpha)
 {
     PRIV_DATA_GET_OR_RETURN(ewkBackingStore, priv);
     priv->view.tile.hasAlpha = hasAlpha;
 }
 
-bool ewk_tiled_backing_store_update(Evas_Object* ewkBackingStore, const Eina_Rectangle* update)
+Eina_Bool ewk_tiled_backing_store_update(Evas_Object* ewkBackingStore, const Eina_Rectangle* update)
 {
     PRIV_DATA_GET_OR_RETURN(ewkBackingStore, priv, false);
 
     if (priv->render.disabled)
         return false;
 
-    return ewk_tile_matrix_update(priv->model.matrix, update, priv->view.tile.zoom);
+    return ewk_tile_matrix_update(priv->model.matrix, update,
+                                  priv->view.tile.zoom);
 }
 
 void ewk_tiled_backing_store_updates_process_pre_set(Evas_Object* ewkBackingStore, void* (*callback)(void* data, Evas_Object *ewkBackingStore), const void* data)
 {
     PRIV_DATA_GET_OR_RETURN(ewkBackingStore, priv);
     priv->process.preCallback = callback;
-    priv->process.preData = const_cast<void*>(data);
+    priv->process.preData = (void*)data;
 }
 
 void ewk_tiled_backing_store_updates_process_post_set(Evas_Object* ewkBackingStore, void* (*callback)(void* data, void* preData, Evas_Object *ewkBackingStore), const void* data)
 {
     PRIV_DATA_GET_OR_RETURN(ewkBackingStore, priv);
     priv->process.postCallback = callback;
-    priv->process.postData = const_cast<void*>(data);
+    priv->process.postData = (void*)data;
 }
 
 void ewk_tiled_backing_store_updates_process(Evas_Object* ewkBackingStore)
@@ -1700,7 +1797,7 @@ void ewk_tiled_backing_store_contents_resize(Evas_Object* ewkBackingStore, Evas_
     _ewk_tiled_backing_store_changed(priv);
 }
 
-void ewk_tiled_backing_store_disabled_update_set(Evas_Object* ewkBackingStore, bool value)
+void ewk_tiled_backing_store_disabled_update_set(Evas_Object* ewkBackingStore, Eina_Bool value)
 {
     PRIV_DATA_GET_OR_RETURN(ewkBackingStore, priv);
 
@@ -1711,6 +1808,7 @@ void ewk_tiled_backing_store_disabled_update_set(Evas_Object* ewkBackingStore, b
 void ewk_tiled_backing_store_flush(Evas_Object* ewkBackingStore)
 {
     PRIV_DATA_GET_OR_RETURN(ewkBackingStore, priv);
+    Ewk_Tile_Unused_Cache* tileUnusedCache = 0;
 
     priv->view.offset.current.x = 0;
     priv->view.offset.current.y = 0;
@@ -1735,7 +1833,7 @@ void ewk_tiled_backing_store_flush(Evas_Object* ewkBackingStore)
 
     _ewk_tiled_backing_store_pre_render_request_flush(priv);
     _ewk_tiled_backing_store_tile_dissociate_all(priv);
-    Ewk_Tile_Unused_Cache* tileUnusedCache = ewk_tile_matrix_unused_cache_get(priv->model.matrix);
+    tileUnusedCache = ewk_tile_matrix_unused_cache_get(priv->model.matrix);
     ewk_tile_unused_cache_clear(tileUnusedCache);
 
 #ifdef DEBUG_MEM_LEAKS
@@ -1744,7 +1842,7 @@ void ewk_tiled_backing_store_flush(Evas_Object* ewkBackingStore)
 #endif
 }
 
-bool ewk_tiled_backing_store_pre_render_tile_add(Evas_Object* ewkBackingStore, unsigned long column, unsigned long row, float zoom)
+Eina_Bool ewk_tiled_backing_store_pre_render_tile_add(Evas_Object* ewkBackingStore, int column, int row, float zoom)
 {
     PRIV_DATA_GET_OR_RETURN(ewkBackingStore, priv, false);
 
@@ -1757,7 +1855,7 @@ bool ewk_tiled_backing_store_pre_render_tile_add(Evas_Object* ewkBackingStore, u
     return true;
 }
 
-bool ewk_tiled_backing_store_pre_render_spiral_queue(Evas_Object* ewkBackingStore, Eina_Rectangle* viewRect, Eina_Rectangle* renderRect, int maxMemory, float zoom)
+Eina_Bool ewk_tiled_backing_store_pre_render_spiral_queue(Evas_Object* ewkBackingStore, Eina_Rectangle* viewRect, Eina_Rectangle* renderRect, int maxMemory, float zoom)
 {
     PRIV_DATA_GET_OR_RETURN(ewkBackingStore, priv, false);
     EINA_SAFETY_ON_NULL_RETURN_VAL(viewRect, false);
@@ -1767,31 +1865,34 @@ bool ewk_tiled_backing_store_pre_render_spiral_queue(Evas_Object* ewkBackingStor
     const int tileHeight = priv->view.tile.height;
 
     Eina_Tile_Grid_Slicer viewSlicer;
-    if (!eina_tile_grid_slicer_setup(&viewSlicer, viewRect->x, viewRect->y, viewRect->w, viewRect->h, tileWidth, tileHeight)) {
+    Eina_Tile_Grid_Slicer renderSlicer;
+
+    if (!eina_tile_grid_slicer_setup(&viewSlicer,
+        viewRect->x, viewRect->y, viewRect->w, viewRect->h, tileWidth, tileHeight)) {
         ERR("could not setup grid viewSlicer for %d,%d+%dx%d tile=%dx%d", viewRect->x, viewRect->y, viewRect->w, viewRect->h, tileWidth, tileHeight);
         return false;
     }
 
-    Eina_Tile_Grid_Slicer renderSlicer;
-    if (!eina_tile_grid_slicer_setup(&renderSlicer, renderRect->x, renderRect->y, renderRect->w, renderRect->h, tileWidth, tileHeight)) {
+    if (!eina_tile_grid_slicer_setup(&renderSlicer,
+        renderRect->x, renderRect->y, renderRect->w, renderRect->h, tileWidth, tileHeight)) {
         ERR("could not setup grid RenderSlicer for %d,%d+%dx%d tile=%dx%d", renderRect->y, renderRect->y, renderRect->w, renderRect->h, tileWidth, tileHeight);
         return false;
     }
 
     // set limits of the loop.
     int memoryLimits = maxMemory / (EWK_ARGB_BYTES_SIZE * tileWidth * tileHeight);
-    const unsigned long maxViewSideLength = std::max(viewSlicer.col2 - viewSlicer.col1, viewSlicer.row2 - viewSlicer.row1);
-    const unsigned long maxRenderSideLength = std::max(renderSlicer.col2 - renderSlicer.col1, renderSlicer.row2 - renderSlicer.row1);
-    const unsigned long maxLoopCount = maxViewSideLength + maxRenderSideLength;
+    const int maxViewSideLength = std::max(viewSlicer.col2 - viewSlicer.col1, viewSlicer.row2 - viewSlicer.row1);
+    const int maxRenderSideLength = std::max(renderSlicer.col2 - renderSlicer.col1, renderSlicer.row2 - renderSlicer.row1);
+    const int maxLoopCount = maxViewSideLength + maxRenderSideLength;
 
     // spire starts from the center of the view area.
-    unsigned long centerColumn = (viewSlicer.col1 + viewSlicer.col2) / 2;
-    unsigned long centerRow = (viewSlicer.row1 + viewSlicer.row2) / 2;
+    int centerColumn = (viewSlicer.col1 + viewSlicer.col2) / 2;
+    int centerRow = (viewSlicer.row1 + viewSlicer.row2) / 2;
 
-    unsigned long step = 1;
-    const unsigned squareSide = 4;
-    for (unsigned loop = 0; loop < maxLoopCount; ++loop) {
-        for (unsigned long i = 1; i < step * squareSide + 1; ++i) {
+    int step = 1;
+    const int squareSide = 4;
+    for (int loop = 0; loop < maxLoopCount; loop++) {
+        for (int i = 1; i < step * squareSide + 1; i++) {
             if (memoryLimits <= 0)
                 goto memoryLimitsReached;
             /*
@@ -1807,37 +1908,37 @@ bool ewk_tiled_backing_store_pre_render_spiral_queue(Evas_Object* ewkBackingStor
                          333333
             */
             if (i > 0 && i <= step)
-                ++centerColumn; // move left.
+                centerColumn++; // move left.
             else if (i > step && i <= step * 2)
-                ++centerRow; // move down.
+                centerRow++; // move down.
             else if (i > step * 2 && i <= step * 3)
-                --centerColumn; // move right.
+                centerColumn--; // move right.
             else if (i > step * 3 && i <= step * 4)
-                --centerRow; // move up.
+                centerRow--; // move up.
             else
                 ERR("ERROR : out of bounds\r\n");
 
             // skip in view port area.
-            if (viewSlicer.col1 < centerColumn
-                && viewSlicer.col2 > centerColumn
-                && viewSlicer.row1 < centerRow
-                && viewSlicer.row2 > centerRow)
+            if (static_cast<int>(viewSlicer.col1) < centerColumn
+                && static_cast<int>(viewSlicer.col2) > centerColumn
+                && static_cast<int>(viewSlicer.row1) < centerRow
+                && static_cast<int>(viewSlicer.row2) > centerRow)
                 continue;
 
-            if (renderSlicer.col1 <= centerColumn
-                && renderSlicer.col2 >= centerColumn
-                && renderSlicer.row1 <= centerRow
-                && renderSlicer.row2 >= centerRow) {
+            if (static_cast<int>(renderSlicer.col1) <= centerColumn
+                && static_cast<int>(renderSlicer.col2) >= centerColumn
+                && static_cast<int>(renderSlicer.row1) <= centerRow
+                && static_cast<int>(renderSlicer.row2) >= centerRow) {
 
                 if (!ewk_tiled_backing_store_pre_render_tile_add(ewkBackingStore, centerColumn, centerRow, zoom))
                     continue;
-                DBG("R>[%lu %lu] ", centerColumn, centerRow);
-                --memoryLimits;
+                DBG("R>[%d %d] ", centerColumn, centerRow);
+                memoryLimits--;
             }
         }
-        --centerRow;
-        --centerColumn;
-        step += 2;
+        centerRow--;
+        centerColumn--;
+        step = step + 2;
     }
 
 memoryLimitsReached:
@@ -1846,22 +1947,24 @@ memoryLimitsReached:
     return true;
 }
 
-bool ewk_tiled_backing_store_pre_render_region(Evas_Object* ewkBackingStore, Evas_Coord x, Evas_Coord y, Evas_Coord width, Evas_Coord height, float zoom)
+Eina_Bool ewk_tiled_backing_store_pre_render_region(Evas_Object* ewkBackingStore, Evas_Coord x, Evas_Coord y, Evas_Coord width, Evas_Coord height, float zoom)
 {
     PRIV_DATA_GET_OR_RETURN(ewkBackingStore, priv, false);
+    Eina_Tile_Grid_Slicer slicer;
+    const Eina_Tile_Grid_Info* gridInfo;
+    Evas_Coord tileWidth, tileHeight;
+    Ewk_Tile_Unused_Cache* tileUnusedCache;
 
-    Evas_Coord tileWidth = priv->view.tile.width;
-    Evas_Coord tileHeight = priv->view.tile.height;
+    tileWidth = priv->view.tile.width;
+    tileHeight = priv->view.tile.height;
     zoom = ROUNDED_ZOOM(priv->view.tile.width, zoom);
 
-    Eina_Tile_Grid_Slicer slicer;
     if (!eina_tile_grid_slicer_setup(&slicer, x, y, width, height, tileWidth, tileHeight)) {
         ERR("could not setup grid slicer for %d,%d+%dx%d tile=%dx%d",
             x, y, width, height, tileWidth, tileHeight);
         return false;
     }
 
-    const Eina_Tile_Grid_Info* gridInfo;
     while (eina_tile_grid_slicer_next(&slicer, &gridInfo)) {
         const unsigned long column = gridInfo->col;
         const unsigned long row = gridInfo->row;
@@ -1871,37 +1974,42 @@ bool ewk_tiled_backing_store_pre_render_region(Evas_Object* ewkBackingStore, Eva
 
     _ewk_tiled_backing_store_item_process_idler_start(priv);
 
-    Ewk_Tile_Unused_Cache* tileUnusedCache = ewk_tile_matrix_unused_cache_get(priv->model.matrix);
+    tileUnusedCache = ewk_tile_matrix_unused_cache_get(priv->model.matrix);
     ewk_tile_unused_cache_lock_area(tileUnusedCache, x, y, width, height, zoom);
-
     return true;
 }
 
-bool ewk_tiled_backing_store_pre_render_relative_radius(Evas_Object* ewkBackingStore, unsigned int n, float zoom)
+Eina_Bool ewk_tiled_backing_store_pre_render_relative_radius(Evas_Object* ewkBackingStore, unsigned int n, float zoom)
 {
     PRIV_DATA_GET_OR_RETURN(ewkBackingStore, priv, false);
+    unsigned long startRow, endRow, startCol, endCol, i, j, width, height;
+    Ewk_Tile_Unused_Cache* tileUnusedCache;
 
-    INFO("priv->model.base.row =%ld, n=%u priv->view.rows=%lu", priv->model.base.row, n, priv->view.rows);
-    unsigned long startRow = priv->model.base.row - n;
-    unsigned long startCol = priv->model.base.column - n;
-    unsigned long endRow = std::min(priv->model.current.rows - 1, priv->model.base.row + priv->view.rows + n - 1);
-    unsigned long endCol = std::min(priv->model.current.columns - 1, priv->model.base.column + priv->view.columns + n - 1);
+    INF("priv->model.base.row =%ld, n=%u priv->view.rows=%lu",
+        priv->model.base.row, n, priv->view.rows);
+    startRow = (long)priv->model.base.row - n;
+    startCol = (long)priv->model.base.column - n;
+    endRow = std::min(priv->model.current.rows - 1,
+                       priv->model.base.row + priv->view.rows + n - 1);
+    endCol = std::min(priv->model.current.columns - 1,
+                       priv->model.base.column + priv->view.columns + n - 1);
 
-    INFO("startRow=%lu, endRow=%lu, startCol=%lu, endCol=%lu", startRow, endRow, startCol, endCol);
+    INF("startRow=%lu, endRow=%lu, startCol=%lu, endCol=%lu",
+        startRow, endRow, startCol, endCol);
 
     zoom = ROUNDED_ZOOM(priv->view.tile.width, zoom);
 
-    for (unsigned long i = startRow; i <= endRow; ++i)
-        for (unsigned long j = startCol; j <= endCol; ++j)
+    for (i = startRow; i <= endRow; i++)
+        for (j = startCol; j <= endCol; j++)
             if (!_ewk_tiled_backing_store_pre_render_request_add(priv, j, i, zoom))
                 goto start_processing;
 
 start_processing:
     _ewk_tiled_backing_store_item_process_idler_start(priv);
 
-    Ewk_Tile_Unused_Cache* tileUnusedCache = ewk_tile_matrix_unused_cache_get(priv->model.matrix);
-    unsigned long height = (endRow - startRow + 1) * TILE_SIZE_AT_ZOOM(priv->view.tile.height, zoom);
-    unsigned long width = (endCol - startCol + 1) * TILE_SIZE_AT_ZOOM(priv->view.tile.width, zoom);
+    tileUnusedCache = ewk_tile_matrix_unused_cache_get(priv->model.matrix);
+    height = (endRow - startRow + 1) * TILE_SIZE_AT_ZOOM(priv->view.tile.height, zoom);
+    width = (endCol - startCol + 1) * TILE_SIZE_AT_ZOOM(priv->view.tile.width, zoom);
     ewk_tile_unused_cache_lock_area(tileUnusedCache,
                                     startCol * TILE_SIZE_AT_ZOOM(priv->view.tile.width, zoom),
                                     startRow * TILE_SIZE_AT_ZOOM(priv->view.tile.height, zoom), width, height, zoom);
@@ -1912,24 +2020,23 @@ start_processing:
 void ewk_tiled_backing_store_pre_render_cancel(Evas_Object* ewkBackingStore)
 {
     PRIV_DATA_GET_OR_RETURN(ewkBackingStore, priv);
+    Ewk_Tile_Unused_Cache* tileUnusedCache;
 
     _ewk_tiled_backing_store_pre_render_request_clear(priv);
 
-    Ewk_Tile_Unused_Cache* tileUnusedCache = ewk_tile_matrix_unused_cache_get(priv->model.matrix);
+    tileUnusedCache = ewk_tile_matrix_unused_cache_get(priv->model.matrix);
     ewk_tile_unused_cache_unlock_area(tileUnusedCache);
 }
 
-bool ewk_tiled_backing_store_disable_render(Evas_Object* ewkBackingStore)
+Eina_Bool ewk_tiled_backing_store_disable_render(Evas_Object* ewkBackingStore)
 {
     PRIV_DATA_GET_OR_RETURN(ewkBackingStore, priv, false);
-
     return _ewk_tiled_backing_store_disable_render(priv);
 }
 
-bool ewk_tiled_backing_store_enable_render(Evas_Object* ewkBackingStore)
+Eina_Bool ewk_tiled_backing_store_enable_render(Evas_Object* ewkBackingStore)
 {
     PRIV_DATA_GET_OR_RETURN(ewkBackingStore, priv, false);
     _ewk_tiled_backing_store_changed(priv);
-
     return _ewk_tiled_backing_store_enable_render(priv);
 }
index 15362d0..2aa0b1d 100644 (file)
  */
 #undef DEBUG_MEM_LEAKS
 
-static const int defaultTileWidth = 256;
-static const int defaultTileHeigth = 256;
+const int defaultTileWidth = 256;
+const int defaultTileHeigth = 256;
 
-static const float zoomStepMinimum = 0.01;
+const float zoomStepMinimum = 0.01;
 
 #define TILE_SIZE_AT_ZOOM(SIZE, ZOOM) ((int)roundf((SIZE) * (ZOOM)))
 #define TILE_ZOOM_AT_SIZE(SIZE, ORIG_TILE) ((float)(SIZE) / (float)(ORIG_TILE))
@@ -55,11 +55,11 @@ struct _Ewk_Tile_Stats {
     unsigned int misses;     /**< number of times it became dirty but not
                               * repainted at all since it was not visible.
                               */
-    bool full_update : 1; /**< tile requires full size update */
+    Eina_Bool full_update : 1; /**< tile requires full size update */
 };
 
 struct _Ewk_Tile {
-    Eina_Tilerupdates;    /**< updated/dirty areas */
+    Eina_Tiler *updates;    /**< updated/dirty areas */
     Ewk_Tile_Stats stats;       /**< tile usage statistics */
     unsigned long column, row; /**< tile tile position */
     Evas_Coord x, y;        /**< tile coordinate position */
@@ -73,42 +73,42 @@ struct _Ewk_Tile {
                                    * alignement!
                                    */
     int visible;                  /**< visibility counter of this tile */
-    Evas_Objectimage;           /**< Evas Image, the tile to be rendered */
+    Evas_Object *image;           /**< Evas Image, the tile to be rendered */
 };
 
 /* view */
-Evas_Object* ewk_tiled_backing_store_add(Evas* e);
-
-void ewk_tiled_backing_store_render_cb_set(Evas_Object* o, bool (*cb)(void* data, Ewk_Tile* t, const Eina_Rectangle* area), const void* data);
-
-bool ewk_tiled_backing_store_scroll_full_offset_set(Evas_Object* o, Evas_Coord x, Evas_Coord y);
-bool ewk_tiled_backing_store_scroll_full_offset_add(Evas_Object* o, Evas_Coord dx, Evas_Coord dy);
-bool ewk_tiled_backing_store_scroll_inner_offset_add(Evas_Object* o, Evas_Coord dx, Evas_Coord dy, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h);
-
-bool ewk_tiled_backing_store_zoom_set(Evas_Object* o, float* zoom, Evas_Coord cx, Evas_Coord cy, Evas_Coord* offx, Evas_Coord* offy);
-bool ewk_tiled_backing_store_zoom_weak_set(Evas_Object* o, float zoom, Evas_Coord cx, Evas_Coord cy);
-void ewk_tiled_backing_store_fix_offsets(Evas_Objecto, Evas_Coord w, Evas_Coord h);
-void ewk_tiled_backing_store_zoom_weak_smooth_scale_set(Evas_Object* o, bool smooth_scale);
-void ewk_tiled_backing_store_alpha_set(Evas_Object* o, bool has_alpha);
-bool ewk_tiled_backing_store_update(Evas_Object* o, const Eina_Rectangle* update);
-void ewk_tiled_backing_store_updates_process_pre_set(Evas_Object* o, void* (*cb)(void* data, Evas_Object* o), const void* data);
-void ewk_tiled_backing_store_updates_process_post_set(Evas_Object* o, void* (*cb)(void* data, void* pre_data, Evas_Object* o), const void* data);
-void ewk_tiled_backing_store_updates_process(Evas_Objecto);
-void ewk_tiled_backing_store_updates_clear(Evas_Objecto);
-void ewk_tiled_backing_store_contents_resize(Evas_Objecto, Evas_Coord width, Evas_Coord height);
-void ewk_tiled_backing_store_disabled_update_set(Evas_Object* o, bool value);
-void ewk_tiled_backing_store_flush(Evas_Objecto);
-void ewk_tiled_backing_store_enable_scale_set(Evas_Object* o, bool value);
-
-Ewk_Tile_Unused_Cache* ewk_tiled_backing_store_tile_unused_cache_get(const Evas_Object* o);
-void ewk_tiled_backing_store_tile_unused_cache_set(Evas_Object* o, Ewk_Tile_Unused_Cache* tuc);
-
-bool ewk_tiled_backing_store_pre_render_region(Evas_Object* o, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h, float zoom);
-bool ewk_tiled_backing_store_pre_render_relative_radius(Evas_Object* o, unsigned int n, float zoom);
-bool ewk_tiled_backing_store_pre_render_spiral_queue(Evas_Object* o, Eina_Rectangle* view_rect, Eina_Rectangle* render_rect, int max_memory, float zoom);
-void ewk_tiled_backing_store_pre_render_cancel(Evas_Objecto);
-
-bool ewk_tiled_backing_store_disable_render(Evas_Object* o);
-bool ewk_tiled_backing_store_enable_render(Evas_Object* o);
+Evas_Object *ewk_tiled_backing_store_add(Evas *e);
+
+void ewk_tiled_backing_store_render_cb_set(Evas_Object *o, Eina_Bool (*cb)(void *data, Ewk_Tile *t, const Eina_Rectangle *area), const void *data);
+
+Eina_Bool ewk_tiled_backing_store_scroll_full_offset_set(Evas_Object *o, Evas_Coord x, Evas_Coord y);
+Eina_Bool ewk_tiled_backing_store_scroll_full_offset_add(Evas_Object *o, Evas_Coord dx, Evas_Coord dy);
+Eina_Bool ewk_tiled_backing_store_scroll_inner_offset_add(Evas_Object *o, Evas_Coord dx, Evas_Coord dy, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h);
+
+Eina_Bool ewk_tiled_backing_store_zoom_set(Evas_Object *o, float *zoom, Evas_Coord cx, Evas_Coord cy, Evas_Coord *offx, Evas_Coord *offy);
+Eina_Bool ewk_tiled_backing_store_zoom_weak_set(Evas_Object *o, float zoom, Evas_Coord cx, Evas_Coord cy);
+void ewk_tiled_backing_store_fix_offsets(Evas_Object *o, Evas_Coord w, Evas_Coord h);
+void ewk_tiled_backing_store_zoom_weak_smooth_scale_set(Evas_Object *o, Eina_Bool smooth_scale);
+void ewk_tiled_backing_store_alpha_set(Evas_Object *o, Eina_Bool has_alpha);
+Eina_Bool ewk_tiled_backing_store_update(Evas_Object *o, const Eina_Rectangle *update);
+void ewk_tiled_backing_store_updates_process_pre_set(Evas_Object *o, void*(*cb)(void *data, Evas_Object *o), const void *data);
+void ewk_tiled_backing_store_updates_process_post_set(Evas_Object *o, void*(*cb)(void *data, void *pre_data, Evas_Object *o), const void *data);
+void ewk_tiled_backing_store_updates_process(Evas_Object *o);
+void ewk_tiled_backing_store_updates_clear(Evas_Object *o);
+void ewk_tiled_backing_store_contents_resize(Evas_Object *o, Evas_Coord width, Evas_Coord height);
+void ewk_tiled_backing_store_disabled_update_set(Evas_Object *o, Eina_Bool value);
+void ewk_tiled_backing_store_flush(Evas_Object *o);
+void ewk_tiled_backing_store_enable_scale_set(Evas_Object *o, Eina_Bool value);
+
+Ewk_Tile_Unused_Cache *ewk_tiled_backing_store_tile_unused_cache_get(const Evas_Object *o);
+void ewk_tiled_backing_store_tile_unused_cache_set(Evas_Object *o, Ewk_Tile_Unused_Cache *tuc);
+
+Eina_Bool ewk_tiled_backing_store_pre_render_region(Evas_Object *o, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h, float zoom);
+Eina_Bool ewk_tiled_backing_store_pre_render_relative_radius(Evas_Object *o, unsigned int n, float zoom);
+Eina_Bool ewk_tiled_backing_store_pre_render_spiral_queue(Evas_Object *o, Eina_Rectangle* view_rect, Eina_Rectangle *render_rect, int max_memory, float zoom);
+void ewk_tiled_backing_store_pre_render_cancel(Evas_Object *o);
+
+Eina_Bool ewk_tiled_backing_store_disable_render(Evas_Object *o);
+Eina_Bool ewk_tiled_backing_store_enable_render(Evas_Object *o);
 
 #endif // ewk_tiled_backing_store_h
index 657ea89..a14a1d7 100644 (file)
 #include <wtf/OwnPtr.h>
 #include <wtf/PassOwnPtr.h>
 
-struct Ewk_Tile_Matrix_Entry {
+struct _Ewk_Tile_Matrix_Entry {
     EINA_INLIST;
     float zoom;
     unsigned long count;
     Eina_Matrixsparse* matrix;
 };
 
+typedef struct _Ewk_Tile_Matrix_Entry Ewk_Tile_Matrix_Entry;
+
 struct _Ewk_Tile_Matrix {
     Eina_Matrixsparse* matrix;
     Eina_Inlist* matrices;
@@ -76,11 +78,11 @@ static uint64_t bytes_leaked = 0;
 static Ewk_Tile_Matrix_Entry* ewk_tile_matrix_entry_get(Ewk_Tile_Matrix* tileMatrix, float zoom)
 {
     EINA_SAFETY_ON_NULL_RETURN_VAL(tileMatrix, 0);
+    Ewk_Tile_Matrix_Entry* iterator;
 
-    Ewk_Tile_Matrix_Entry* it;
-    EINA_INLIST_FOREACH(tileMatrix->matrices, it) {
-        if (it->zoom == zoom)
-            return it;
+    EINA_INLIST_FOREACH(tileMatrix->matrices, iterator) {
+        if (iterator->zoom == zoom)
+            return iterator;
     }
 
     return 0;
@@ -103,21 +105,23 @@ static void _ewk_tile_matrix_cell_free(void* userData, void* cellData)
     if (tile->visible)
         ERR("freeing cell that is visible, leaking tile %p", tile);
     else {
-        if (ewk_tile_unused_cache_tile_get(tileMatrix->tileUnusedCache, tile)) {
+        if (!ewk_tile_unused_cache_tile_get(tileMatrix->tileUnusedCache, tile))
+            ERR("tile %p was not in cache %p? leaking...", tile, tileMatrix->tileUnusedCache);
+        else {
+            Ewk_Tile_Matrix_Entry* entry;
             DBG("tile cell does not exist anymore, free it %p", tile);
 #ifdef DEBUG_MEM_LEAKS
             tileMatrix->stats.bytes.freed += tile->bytes;
             tileMatrix->stats.tiles.freed++;
 #endif
-            Ewk_Tile_Matrix_Entry* entry = ewk_tile_matrix_entry_get(tileMatrix, tile->zoom);
+            entry = ewk_tile_matrix_entry_get(tileMatrix, tile->zoom);
             if (!entry)
                 ERR("can't find matrix for zoom %0.3f", tile->zoom);
             else
-                --entry->count;
+                entry->count--;
 
             ewk_tile_free(tile);
-        } else
-            ERR("tile %p was not in cache %p? leaking...", tile, tileMatrix->tileUnusedCache);
+        }
     }
 
     ewk_tile_unused_cache_thaw(tileMatrix->tileUnusedCache);
@@ -127,15 +131,17 @@ static void _ewk_tile_matrix_cell_free(void* userData, void* cellData)
 static void _ewk_tile_matrix_tile_free(void* data, Ewk_Tile* tile)
 {
     Ewk_Tile_Matrix* tileMatrix = static_cast<Ewk_Tile_Matrix*>(data);
+    Ewk_Tile_Matrix_Entry* entry;
+    Eina_Matrixsparse_Cell* cell;
 
-    Ewk_Tile_Matrix_Entry* entry = ewk_tile_matrix_entry_get(tileMatrix, tile->zoom);
+    entry = ewk_tile_matrix_entry_get(tileMatrix, tile->zoom);
     if (!entry) {
         ERR("removing tile %p that was not in any matrix? Leaking...", tile);
         return;
     }
 
-    Eina_Matrixsparse_Cell* cell;
     if (!eina_matrixsparse_cell_idx_get(entry->matrix, tile->row, tile->column, &cell)) {
+
         ERR("removing tile %p that was not in the matrix? Leaking...", tile);
         return;
     }
@@ -163,7 +169,7 @@ static void _ewk_tile_matrix_tile_free(void* data, Ewk_Tile* tile)
     tileMatrix->stats.tiles.freed++;
 #endif
 
-    --entry->count;
+    entry->count--;
     if (!entry->count && entry->matrix != tileMatrix->matrix) {
         eina_matrixsparse_free(entry->matrix);
         tileMatrix->matrices = eina_inlist_remove(tileMatrix->matrices, EINA_INLIST_GET(entry));
@@ -240,15 +246,16 @@ Ewk_Tile_Matrix* ewk_tile_matrix_new(Ewk_Tile_Unused_Cache* tileUnusedCache, uns
 bool ewk_tile_matrix_zoom_level_set(Ewk_Tile_Matrix* tileMatrix, float zoom)
 {
     EINA_SAFETY_ON_NULL_RETURN_VAL(tileMatrix, false);
+    Ewk_Tile_Matrix_Entry* iterator = 0;
+    Ewk_Tile_Matrix_Entry* entry = 0;
 
-    Ewk_Tile_Matrix_Entry* it;
-    EINA_INLIST_FOREACH(tileMatrix->matrices, it) {
-        if (it->zoom == zoom) {
-            tileMatrix->matrices = eina_inlist_promote(tileMatrix->matrices, EINA_INLIST_GET(it));
-            tileMatrix->matrix = it->matrix;
-
-            return true;
-        }
+    EINA_INLIST_FOREACH(tileMatrix->matrices, iterator) {
+        if (iterator->zoom != zoom)
+            continue;
+        entry = iterator;
+        tileMatrix->matrices = eina_inlist_promote(tileMatrix->matrices, EINA_INLIST_GET(entry));
+        tileMatrix->matrix = entry->matrix;
+        return true;
     }
     return false;
 }
@@ -257,31 +264,34 @@ void ewk_tile_matrix_entry_new(Ewk_Tile_Matrix* tileMatrix, float zoom)
 {
     EINA_SAFETY_ON_NULL_RETURN(tileMatrix);
 
-    OwnPtr<Ewk_Tile_Matrix_Entry> entry = adoptPtr(new Ewk_Tile_Matrix_Entry);
+    Ewk_Tile_Matrix_Entry* entry = new Ewk_Tile_Matrix_Entry;
     entry->zoom = zoom;
     entry->count = 0;
     entry->matrix = eina_matrixsparse_new(1, 1, _ewk_tile_matrix_cell_free, tileMatrix);
     if (!entry->matrix) {
         ERR("could not create sparse matrix.");
+        delete entry;
         return;
     }
+    tileMatrix->matrices = eina_inlist_prepend(tileMatrix->matrices, EINA_INLIST_GET(entry));
     tileMatrix->matrix = entry->matrix;
-    tileMatrix->matrices = eina_inlist_prepend(tileMatrix->matrices, EINA_INLIST_GET(entry.leakPtr()));
 }
 
 void ewk_tile_matrix_invalidate(Ewk_Tile_Matrix* tileMatrix)
 {
     EINA_SAFETY_ON_NULL_RETURN(tileMatrix);
+    Ewk_Tile_Matrix_Entry* iterator;
+    Eina_Inlist* matrixList;
 
-    Eina_Inlist* matrixList = tileMatrix->matrices;
+    matrixList = tileMatrix->matrices;
     while (matrixList) {
-        Ewk_Tile_Matrix_Entry* it = EINA_INLIST_CONTAINER_GET(matrixList, Ewk_Tile_Matrix_Entry);
-        Eina_Inlist* next = matrixList->next;
+        iterator = EINA_INLIST_CONTAINER_GET(matrixList, Ewk_Tile_Matrix_Entry);
+        Eina_Inlist* next = (matrixList->next) ? matrixList->next : 0;
 
-        if (it->matrix != tileMatrix->matrix) {
-            eina_matrixsparse_free(it->matrix);
+        if (iterator->matrix != tileMatrix->matrix) {
+            eina_matrixsparse_free(iterator->matrix);
             tileMatrix->matrices = eina_inlist_remove(tileMatrix->matrices, matrixList);
-            delete it;
+            delete iterator;
         }
 
         matrixList = next;
@@ -295,11 +305,16 @@ void ewk_tile_matrix_invalidate(Ewk_Tile_Matrix* tileMatrix)
  */
 void ewk_tile_matrix_free(Ewk_Tile_Matrix* tileMatrix)
 {
+    Ewk_Tile_Matrix_Entry* entry;
+#ifdef DEBUG_MEM_LEAKS
+    uint64_t tiles, bytes;
+#endif
+
     EINA_SAFETY_ON_NULL_RETURN(tileMatrix);
 
     ewk_tile_unused_cache_freeze(tileMatrix->tileUnusedCache);
     ewk_tile_matrix_invalidate(tileMatrix);
-    Ewk_Tile_Matrix_Entry* entry = EINA_INLIST_CONTAINER_GET(tileMatrix->matrices, Ewk_Tile_Matrix_Entry);
+    entry = EINA_INLIST_CONTAINER_GET(tileMatrix->matrices, Ewk_Tile_Matrix_Entry);
     eina_matrixsparse_free(entry->matrix);
     tileMatrix->matrices = eina_inlist_remove(tileMatrix->matrices, reinterpret_cast<Eina_Inlist*>(entry));
     tileMatrix->matrices = 0;
@@ -309,8 +324,8 @@ void ewk_tile_matrix_free(Ewk_Tile_Matrix* tileMatrix)
     ewk_tile_unused_cache_unref(tileMatrix->tileUnusedCache);
 
 #ifdef DEBUG_MEM_LEAKS
-    uint64_t tiles = tileMatrix->stats.tiles.allocated - tileMatrix->stats.tiles.freed;
-    uint64_t bytes = tileMatrix->stats.bytes.allocated - tileMatrix->stats.bytes.freed;
+    tiles = tileMatrix->stats.tiles.allocated - tileMatrix->stats.tiles.freed;
+    bytes = tileMatrix->stats.bytes.allocated - tileMatrix->stats.bytes.freed;
 
     tiles_leaked += tiles;
     bytes_leaked += bytes;
@@ -321,14 +336,14 @@ void ewk_tile_matrix_free(Ewk_Tile_Matrix* tileMatrix)
             tileMatrix->stats.tiles.allocated, tileMatrix->stats.tiles.freed, tiles,
             tileMatrix->stats.bytes.allocated, tileMatrix->stats.bytes.freed, bytes);
     else if (tiles_leaked || bytes_leaked)
-        WARN("tiled matrix had no leaks: tiles[+%" PRIu64 ",-%" PRIu64 "] "
+        WRN("tiled matrix had no leaks: tiles[+%" PRIu64 ",-%" PRIu64 "] "
             "bytes[+%" PRIu64 ",-%" PRIu64 "], but some other leaked "
             "%" PRIu64 " tiles (%" PRIu64 " bytes)",
             tileMatrix->stats.tiles.allocated, tileMatrix->stats.tiles.freed,
             tileMatrix->stats.bytes.allocated, tileMatrix->stats.bytes.freed,
             tiles_leaked, bytes_leaked);
     else
-        INFO("tiled matrix had no leaks: tiles[+%" PRIu64 ",-%" PRIu64 "] "
+        INF("tiled matrix had no leaks: tiles[+%" PRIu64 ",-%" PRIu64 "] "
             "bytes[+%" PRIu64 ",-%" PRIu64 "]",
             tileMatrix->stats.tiles.allocated, tileMatrix->stats.tiles.freed,
             tileMatrix->stats.bytes.allocated, tileMatrix->stats.bytes.freed);
@@ -343,14 +358,12 @@ void ewk_tile_matrix_free(Ewk_Tile_Matrix* tileMatrix)
 void ewk_tile_matrix_resize(Ewk_Tile_Matrix* tileMatrix, unsigned long cols, unsigned long rows)
 {
     EINA_SAFETY_ON_NULL_RETURN(tileMatrix);
-
     eina_matrixsparse_size_set(tileMatrix->matrix, rows, cols);
 }
 
 void ewk_tile_matrix_size_get(Ewk_Tile_Matrix* tileMatrix, unsigned long* columns, unsigned long* rows)
 {
     EINA_SAFETY_ON_NULL_RETURN(tileMatrix);
-
     eina_matrixsparse_size_get(tileMatrix->matrix, rows, columns);
 }
 
@@ -362,7 +375,6 @@ void ewk_tile_matrix_size_get(Ewk_Tile_Matrix* tileMatrix, unsigned long* column
 Ewk_Tile_Unused_Cache* ewk_tile_matrix_unused_cache_get(const Ewk_Tile_Matrix* tileMatrix)
 {
     EINA_SAFETY_ON_NULL_RETURN_VAL(tileMatrix, 0);
-
     return tileMatrix->tileUnusedCache;
 }
 
@@ -393,15 +405,14 @@ Ewk_Tile* ewk_tile_matrix_tile_exact_get(Ewk_Tile_Matrix* tileMatrix, unsigned l
     if (!tile)
         return 0;
 
-    if (tile->zoom != zoom)
-        return 0;
+    if (tile->zoom == zoom)
+        goto end;
 
-#ifndef NDEBUG
+end:
     if (!tile->visible) {
         if (!ewk_tile_unused_cache_tile_get(tileMatrix->tileUnusedCache, tile))
-            WARN("Ewk_Tile was unused but not in cache? bug!");
+            WRN("Ewk_Tile was unused but not in cache? bug!");
     }
-#endif
 
     return tile;
 }
@@ -418,9 +429,12 @@ Ewk_Tile* ewk_tile_matrix_tile_exact_get(Ewk_Tile_Matrix* tileMatrix, unsigned l
  *
  * @see ewk_tile_matrix_tile_exact_get()
  */
-bool ewk_tile_matrix_tile_exact_exists(Ewk_Tile_Matrix* tileMatrix, unsigned long column, unsigned long row, float zoom)
+Eina_Bool ewk_tile_matrix_tile_exact_exists(Ewk_Tile_Matrix* tileMatrix, unsigned long column, unsigned long row, float zoom)
 {
-    return ewk_tile_matrix_tile_exact_get(tileMatrix, column, row, zoom);
+    if (!eina_matrixsparse_data_idx_get(tileMatrix->matrix, row, column))
+        return false;
+
+    return true;
 }
 
 /**
@@ -437,20 +451,23 @@ bool ewk_tile_matrix_tile_exact_exists(Ewk_Tile_Matrix* tileMatrix, unsigned lon
  */
 Ewk_Tile* ewk_tile_matrix_tile_new(Ewk_Tile_Matrix* tileMatrix, Evas* canvas, unsigned long column, unsigned long row, float zoom)
 {
+    Evas_Coord tileWidth, tileHeight;
+    Ewk_Tile* tile;
+    Ewk_Tile_Matrix_Entry* entry;
+
     EINA_SAFETY_ON_NULL_RETURN_VAL(tileMatrix, 0);
     EINA_SAFETY_ON_FALSE_RETURN_VAL(zoom > 0.0, 0);
-
-    Ewk_Tile_Matrix_Entry* entry = ewk_tile_matrix_entry_get(tileMatrix, zoom);
+    entry = ewk_tile_matrix_entry_get(tileMatrix, zoom);
     if (!entry) {
         ERR("could not get matrix at zoom %f for tile", zoom);
         return 0;
     }
-    ++entry->count;
+    entry->count++;
 
-    Evas_Coord tileWidth = tileMatrix->tile.width;
-    Evas_Coord tileHeight = tileMatrix->tile.height;
+    tileWidth = tileMatrix->tile.width;
+    tileHeight = tileMatrix->tile.height;
 
-    Ewk_Tile* tile = ewk_tile_new(canvas, tileWidth, tileHeight, zoom, tileMatrix->cspace);
+    tile = ewk_tile_new(canvas, tileWidth, tileHeight, zoom, tileMatrix->cspace);
     if (!tile) {
         ERR("could not create tile %dx%d at %f, cspace=%d", tileWidth, tileHeight, (double)zoom, tileMatrix->cspace);
         return 0;
@@ -494,7 +511,7 @@ Ewk_Tile* ewk_tile_matrix_tile_new(Ewk_Tile_Matrix* tileMatrix, Evas* canvas, un
  *
  * @return #true on success or #false on failure.
  */
-bool ewk_tile_matrix_tile_put(Ewk_Tile_Matrix* tileMatrix, Ewk_Tile* tile, double lastUsed)
+Eina_Bool ewk_tile_matrix_tile_put(Ewk_Tile_Matrix* tileMatrix, Ewk_Tile* tile, double lastUsed)
 {
     EINA_SAFETY_ON_NULL_RETURN_VAL(tileMatrix, false);
     EINA_SAFETY_ON_NULL_RETURN_VAL(tile, false);
@@ -562,32 +579,32 @@ Eina_Bool ewk_tile_matrix_tile_update_full(Ewk_Tile_Matrix* tileMatrix, unsigned
 void ewk_tile_matrix_tile_updates_clear(Ewk_Tile_Matrix* tileMatrix, Ewk_Tile* tile)
 {
     EINA_SAFETY_ON_NULL_RETURN(tileMatrix);
-
     if (!tile->updates && !tile->stats.full_update)
         return;
-
     ewk_tile_updates_clear(tile);
     tileMatrix->updates = eina_list_remove(tileMatrix->updates, tile);
 }
 
-static bool _ewk_tile_matrix_slicer_setup(Ewk_Tile_Matrix* tileMatrix, const Eina_Rectangle* area, float zoom, Eina_Tile_Grid_Slicer* slicer)
+static Eina_Bool _ewk_tile_matrix_slicer_setup(Ewk_Tile_Matrix* tileMatrix, const Eina_Rectangle* area, float zoom, Eina_Tile_Grid_Slicer* slicer)
 {
-    UNUSED_PARAM(zoom);
+    unsigned long rows, cols;
+    Evas_Coord x, y, width, height, tileWidth, tileHeight;
+
     if (area->w <= 0 || area->h <= 0) {
-        WARN("invalid area region: %d,%d+%dx%d.", area->x, area->y, area->w, area->h);
+        WRN("invalid area region: %d,%d+%dx%d.",
+            area->x, area->y, area->w, area->h);
         return false;
     }
 
-    Evas_Coord x = area->x;
-    Evas_Coord y = area->y;
-    Evas_Coord width = area->w;
-    Evas_Coord height = area->h;
+    x = area->x;
+    y = area->y;
+    width = area->w;
+    height = area->h;
 
-    Evas_Coord tileWidth = tileMatrix->tile.width;
-    Evas_Coord tileHeight = tileMatrix->tile.height;
+    tileWidth = tileMatrix->tile.width;
+    tileHeight = tileMatrix->tile.height;
 
     // cropping area region to fit matrix
-    unsigned long rows, cols;
     eina_matrixsparse_size_get(tileMatrix->matrix, &rows, &cols);
     if (x < 0) {
         width += x;
@@ -598,34 +615,40 @@ static bool _ewk_tile_matrix_slicer_setup(Ewk_Tile_Matrix* tileMatrix, const Ein
         y = 0;
     }
 
-    if (y + height - 1 > static_cast<long>(rows * tileHeight))
+    if (y + height - 1 > (long)(rows * tileHeight))
         height = rows * tileHeight - y;
-    if (x + width - 1 > static_cast<long>(cols * tileWidth))
+    if (x + width - 1 > (long)(cols * tileWidth))
         width = cols * tileWidth - x;
 
     return eina_tile_grid_slicer_setup(slicer, x, y, width, height, tileWidth, tileHeight);
 }
 
 
-bool ewk_tile_matrix_update(Ewk_Tile_Matrix* tileMatrix, const Eina_Rectangle* update, float zoom)
+Eina_Bool ewk_tile_matrix_update(Ewk_Tile_Matrix* tileMatrix, const Eina_Rectangle* update, float zoom)
 {
+    const Eina_Tile_Grid_Info* info;
+    Eina_Tile_Grid_Slicer slicer;
     EINA_SAFETY_ON_NULL_RETURN_VAL(tileMatrix, false);
     EINA_SAFETY_ON_NULL_RETURN_VAL(update, false);
 
     if (update->w < 1 || update->h < 1) {
-        DBG("Why we get updates with empty areas? %d,%d+%dx%d at zoom %f", update->x, update->y, update->w, update->h, zoom);
+        DBG("Why we get updates with empty areas? %d,%d+%dx%d at zoom %f",
+            update->x, update->y, update->w, update->h, zoom);
         return true;
     }
 
-    Eina_Tile_Grid_Slicer slicer;
     if (!_ewk_tile_matrix_slicer_setup(tileMatrix, update, zoom, &slicer)) {
-        ERR("Could not setup slicer for update %d,%d+%dx%d at zoom %f", update->x, update->y, update->w, update->h, zoom);
+        ERR("Could not setup slicer for update %d,%d+%dx%d at zoom %f",
+            update->x, update->y, update->w, update->h, zoom);
         return false;
     }
 
-    const Eina_Tile_Grid_Info* info;
     while (eina_tile_grid_slicer_next(&slicer, &info)) {
-        Ewk_Tile* tile = static_cast<Ewk_Tile*>(eina_matrixsparse_data_idx_get(tileMatrix->matrix, info->row, info->col));
+        unsigned long col, row;
+        col = info->col;
+        row = info->row;
+
+        Ewk_Tile* tile = static_cast<Ewk_Tile*>(eina_matrixsparse_data_idx_get(tileMatrix->matrix, row, col));
         if (!tile)
             continue;
 
@@ -643,11 +666,11 @@ bool ewk_tile_matrix_update(Ewk_Tile_Matrix* tileMatrix, const Eina_Rectangle* u
 
 void ewk_tile_matrix_updates_process(Ewk_Tile_Matrix* tileMatrix)
 {
+    Eina_List* list, *listNext;
+    void* item;
     EINA_SAFETY_ON_NULL_RETURN(tileMatrix);
 
     // process updates, unflag tiles
-    Eina_List* list, *listNext;
-    void* item;
     EINA_LIST_FOREACH_SAFE(tileMatrix->updates, list, listNext, item) {
         Ewk_Tile* tile = static_cast<Ewk_Tile*>(item);
         ewk_tile_updates_process(tile, tileMatrix->render.callback, tileMatrix->render.data);
@@ -660,43 +683,46 @@ void ewk_tile_matrix_updates_process(Ewk_Tile_Matrix* tileMatrix)
 
 void ewk_tile_matrix_updates_clear(Ewk_Tile_Matrix* tileMatrix)
 {
+    void* item;
     EINA_SAFETY_ON_NULL_RETURN(tileMatrix);
 
-    void* item;
     EINA_LIST_FREE(tileMatrix->updates, item)
         ewk_tile_updates_clear(static_cast<Ewk_Tile*>(item));
     tileMatrix->updates = 0;
 }
 
-#ifdef DEBUG_MEM_LEAKS
 // remove me later!
 void ewk_tile_matrix_dbg(const Ewk_Tile_Matrix* tileMatrix)
 {
-    Eina_Iterator* it = eina_matrixsparse_iterator_complete_new(tileMatrix->matrix);
+    Eina_Iterator* iterator = eina_matrixsparse_iterator_complete_new(tileMatrix->matrix);
     Eina_Matrixsparse_Cell* cell;
-    bool wasPreviousEmpty = false;
+    Eina_Bool last_empty = false;
 
+#ifdef DEBUG_MEM_LEAKS
     printf("Ewk_Tile Matrix: tiles[+%" PRIu64 ",-%" PRIu64 ":%" PRIu64 "] "
            "bytes[+%" PRIu64 ",-%" PRIu64 ":%" PRIu64 "]\n",
            tileMatrix->stats.tiles.allocated, tileMatrix->stats.tiles.freed,
            tileMatrix->stats.tiles.allocated - tileMatrix->stats.tiles.freed,
            tileMatrix->stats.bytes.allocated, tileMatrix->stats.bytes.freed,
            tileMatrix->stats.bytes.allocated - tileMatrix->stats.bytes.freed);
+#else
+    printf("Ewk_Tile Matrix:\n");
+#endif
 
-    EINA_ITERATOR_FOREACH(it, cell) {
+    EINA_ITERATOR_FOREACH(iterator, cell) {
         unsigned long row, column;
         eina_matrixsparse_cell_position_get(cell, &row, &column);
 
         Ewk_Tile* tile = static_cast<Ewk_Tile*>(eina_matrixsparse_cell_data_get(cell));
         if (!tile) {
-            if (!wasPreviousEmpty) {
-                wasPreviousEmpty = true;
+            if (!last_empty) {
+                last_empty = true;
                 printf("Empty:");
             }
             printf(" [%lu,%lu]", column, row);
         } else {
-            if (wasPreviousEmpty) {
-                wasPreviousEmpty = false;
+            if (last_empty) {
+                last_empty = false;
                 printf("\n");
             }
             printf("%3lu,%3lu %10p:", column, row, tile);
@@ -704,13 +730,12 @@ void ewk_tile_matrix_dbg(const Ewk_Tile_Matrix* tileMatrix)
             printf("\n");
         }
     }
-    if (wasPreviousEmpty)
+    if (last_empty)
         printf("\n");
-    eina_iterator_free(it);
+    eina_iterator_free(iterator);
 
     ewk_tile_unused_cache_dbg(tileMatrix->tileUnusedCache);
 }
-#endif
 
 /**
  * Freeze matrix to not do maintenance tasks.
@@ -724,10 +749,9 @@ void ewk_tile_matrix_dbg(const Ewk_Tile_Matrix* tileMatrix)
 void ewk_tile_matrix_freeze(Ewk_Tile_Matrix* tileMatrix)
 {
     EINA_SAFETY_ON_NULL_RETURN(tileMatrix);
-
     if (!tileMatrix->frozen)
         ewk_tile_unused_cache_freeze(tileMatrix->tileUnusedCache);
-    ++tileMatrix->frozen;
+    tileMatrix->frozen++;
 }
 
 /**
@@ -739,13 +763,12 @@ void ewk_tile_matrix_freeze(Ewk_Tile_Matrix* tileMatrix)
 void ewk_tile_matrix_thaw(Ewk_Tile_Matrix* tileMatrix)
 {
     EINA_SAFETY_ON_NULL_RETURN(tileMatrix);
-
     if (!tileMatrix->frozen) {
         ERR("thawing more than freezing!");
         return;
     }
 
-    --tileMatrix->frozen;
+    tileMatrix->frozen--;
     if (!tileMatrix->frozen)
         ewk_tile_unused_cache_thaw(tileMatrix->tileUnusedCache);
 }
old mode 100755 (executable)
new mode 100644 (file)
index 91d54ef..b3793b5
 #include <Evas.h>
 
 /* matrix of tiles */
-Ewk_Tile_Matrix* ewk_tile_matrix_new(Ewk_Tile_Unused_Cache* tuc, unsigned long cols, unsigned long rows, float zoom_level, Evas_Colorspace color_space, void (*render_callback)(void* data, Ewk_Tile* t, const Eina_Rectangle* update), const void* render_data);
-void ewk_tile_matrix_entry_new(Ewk_Tile_Matrixtm, float zoom);
-void ewk_tile_matrix_free(Ewk_Tile_Matrixtm);
+Ewk_Tile_Matrix *ewk_tile_matrix_new(Ewk_Tile_Unused_Cache *tuc, unsigned long cols, unsigned long rows, float zoom_level, Evas_Colorspace color_space, void (*render_callback)(void *data, Ewk_Tile *t, const Eina_Rectangle *update), const void *render_data);
+void ewk_tile_matrix_entry_new(Ewk_Tile_Matrix *tm, float zoom);
+void ewk_tile_matrix_free(Ewk_Tile_Matrix *tm);
 
-void ewk_tile_matrix_resize(Ewk_Tile_Matrixtm, unsigned long cols, unsigned long rows);
-void ewk_tile_matrix_size_get(Ewk_Tile_Matrix* tm, unsigned long* cols, unsigned long* rows);
-bool ewk_tile_matrix_zoom_level_set(Ewk_Tile_Matrixtm, float zoom);
-void ewk_tile_matrix_invalidate(Ewk_Tile_Matrixtm);
+void ewk_tile_matrix_resize(Ewk_Tile_Matrix *tm, unsigned long cols, unsigned long rows);
+void ewk_tile_matrix_size_get(Ewk_Tile_Matrix *tm, unsigned long *cols, unsigned long *rows);
+bool ewk_tile_matrix_zoom_level_set(Ewk_Tile_Matrix *tm, float zoom);
+void ewk_tile_matrix_invalidate(Ewk_Tile_Matrix *tm);
 
-Ewk_Tile_Unused_Cache* ewk_tile_matrix_unused_cache_get(const Ewk_Tile_Matrix* tm);
+Ewk_Tile_Unused_Cache *ewk_tile_matrix_unused_cache_get(const Ewk_Tile_Matrix *tm);
 
-Ewk_Tile* ewk_tile_matrix_tile_exact_get(Ewk_Tile_Matrix* tm, unsigned long col, unsigned long row, float zoom);
-bool ewk_tile_matrix_tile_exact_exists(Ewk_Tile_Matrix* tm, unsigned long col, unsigned long row, float zoom);
-Ewk_Tile* ewk_tile_matrix_tile_nearest_get(Ewk_Tile_Matrix* tm, unsigned long col, unsigned long row, float zoom);
-Ewk_Tile* ewk_tile_matrix_tile_new(Ewk_Tile_Matrix* tm, Evas* evas, unsigned long col, unsigned long row, float zoom);
-bool ewk_tile_matrix_tile_put(Ewk_Tile_Matrix* tm, Ewk_Tile* t, double last_used);
+Ewk_Tile *ewk_tile_matrix_tile_exact_get(Ewk_Tile_Matrix *tm, unsigned long col, unsigned long row, float zoom);
+Eina_Bool ewk_tile_matrix_tile_exact_exists(Ewk_Tile_Matrix *tm, unsigned long col, unsigned long row, float zoom);
+Ewk_Tile *ewk_tile_matrix_tile_nearest_get(Ewk_Tile_Matrix *tm, unsigned long col, unsigned long row, float zoom);
+Ewk_Tile *ewk_tile_matrix_tile_new(Ewk_Tile_Matrix *tm, Evas *evas, unsigned long col, unsigned long row, float zoom);
+Eina_Bool ewk_tile_matrix_tile_put(Ewk_Tile_Matrix *tm, Ewk_Tile *t, double last_used);
 
 Eina_Bool ewk_tile_matrix_tile_update(Ewk_Tile_Matrix *tm, unsigned long col, unsigned long row, const Eina_Rectangle *update);
 Eina_Bool ewk_tile_matrix_tile_update_full(Ewk_Tile_Matrix *tm, unsigned long col, unsigned long row);
-void ewk_tile_matrix_tile_updates_clear(Ewk_Tile_Matrix* tm, Ewk_Tile* t);
+void ewk_tile_matrix_tile_updates_clear(Ewk_Tile_Matrix *tm, Ewk_Tile *t);
 
-bool ewk_tile_matrix_update(Ewk_Tile_Matrix* tm, const Eina_Rectangle* update, float zoom);
-void ewk_tile_matrix_updates_process(Ewk_Tile_Matrixtm);
-void ewk_tile_matrix_updates_clear(Ewk_Tile_Matrixtm);
-void ewk_tile_matrix_freeze(Ewk_Tile_Matrixtm);
-void ewk_tile_matrix_thaw(Ewk_Tile_Matrixtm);
+Eina_Bool ewk_tile_matrix_update(Ewk_Tile_Matrix *tm, const Eina_Rectangle *update, float zoom);
+void ewk_tile_matrix_updates_process(Ewk_Tile_Matrix *tm);
+void ewk_tile_matrix_updates_clear(Ewk_Tile_Matrix *tm);
+void ewk_tile_matrix_freeze(Ewk_Tile_Matrix *tm);
+void ewk_tile_matrix_thaw(Ewk_Tile_Matrix *tm);
 
 // remove me!
-void ewk_tile_matrix_dbg(const Ewk_Tile_Matrixtm);
-void ewk_tile_unused_cache_dbg(const Ewk_Tile_Unused_Cachetuc);
+void ewk_tile_matrix_dbg(const Ewk_Tile_Matrix *tm);
+void ewk_tile_unused_cache_dbg(const Ewk_Tile_Unused_Cache *tuc);
 void ewk_tile_accounting_dbg();
 
 #endif // ewk_tiled_matrix_private_h
diff --git a/Source/WebKit/efl/ewk/ewk_util.cpp b/Source/WebKit/efl/ewk/ewk_util.cpp
new file mode 100644 (file)
index 0000000..a1507cd
--- /dev/null
@@ -0,0 +1,105 @@
+/*
+    Copyright (C) 2009-2010 ProFUSION embedded systems
+    Copyright (C) 2009-2010 Samsung Electronics
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Library General Public
+    License as published by the Free Software Foundation; either
+    version 2 of the License, or (at your option) any later version.
+
+    This library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Library General Public License for more details.
+
+    You should have received a copy of the GNU Library General Public License
+    along with this library; see the file COPYING.LIB.  If not, write to
+    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+    Boston, MA 02110-1301, USA.
+*/
+
+#include "config.h"
+
+#include "ewk_private.h"
+#include "ewk_util_private.h"
+#include <eina_safety_checks.h>
+
+/**
+ * Converts an image from cairo_surface to the Evas_Object.
+ *
+ * @param canvas display canvas
+ * @param surface cairo representation of an image
+ * @return converted cairo_surface object to the Evas_Object
+ */
+Evas_Object* ewk_util_image_from_cairo_surface_add(Evas* canvas, cairo_surface_t* surface)
+{
+    cairo_status_t status;
+    cairo_surface_type_t type;
+    cairo_format_t format;
+    int w, h, stride;
+    Evas_Object* image;
+    const void* src;
+    void* dst;
+
+    EINA_SAFETY_ON_NULL_RETURN_VAL(canvas, 0);
+    EINA_SAFETY_ON_NULL_RETURN_VAL(surface, 0);
+
+    status = cairo_surface_status(surface);
+    if (status != CAIRO_STATUS_SUCCESS) {
+        ERR("cairo surface is invalid: %s", cairo_status_to_string(status));
+        return 0;
+    }
+
+    type = cairo_surface_get_type(surface);
+    if (type != CAIRO_SURFACE_TYPE_IMAGE) {
+        ERR("unknown surface type %d, required %d (CAIRO_SURFACE_TYPE_IMAGE).",
+            type, CAIRO_SURFACE_TYPE_IMAGE);
+        return 0;
+    }
+
+    format = cairo_image_surface_get_format(surface);
+    if (format != CAIRO_FORMAT_ARGB32 && format != CAIRO_FORMAT_RGB24) {
+        ERR("unknown surface format %d, expected %d or %d.",
+            format, CAIRO_FORMAT_ARGB32, CAIRO_FORMAT_RGB24);
+        return 0;
+    }
+
+    w = cairo_image_surface_get_width(surface);
+    h = cairo_image_surface_get_height(surface);
+    stride = cairo_image_surface_get_stride(surface);
+    if (w <= 0 || h <= 0 || stride <= 0) {
+        ERR("invalid image size %dx%d, stride=%d", w, h, stride);
+        return 0;
+    }
+
+    src = cairo_image_surface_get_data(surface);
+    if (!src) {
+        ERR("could not get source data.");
+        return 0;
+    }
+
+    image = evas_object_image_filled_add(canvas);
+    if (!image) {
+        ERR("could not add image to canvas.");
+        return 0;
+    }
+
+    evas_object_image_colorspace_set(image, EVAS_COLORSPACE_ARGB8888);
+    evas_object_image_size_set(image, w, h);
+    evas_object_image_alpha_set(image, format == CAIRO_FORMAT_ARGB32);
+
+    if (evas_object_image_stride_get(image) != stride) {
+        ERR("evas' stride %d diverges from cairo's %d.",
+            evas_object_image_stride_get(image), stride);
+        evas_object_del(image);
+        return 0;
+    }
+
+    dst = evas_object_image_data_get(image, true);
+    memcpy(dst, src, h * stride);
+    evas_object_image_data_set(image, dst);
+
+    evas_object_resize(image, w, h); // helpful but not really required
+
+    return image;
+}
old mode 100755 (executable)
new mode 100644 (file)
similarity index 72%
rename from Source/WebCore/platform/graphics/efl/CairoUtilitiesEfl.h
rename to Source/WebKit/efl/ewk/ewk_util_private.h
index 0a41197..bee2d0e
     Boston, MA 02110-1301, USA.
 */
 
-#ifndef CairoUtilitiesEfl_h
-#define CairoUtilitiesEfl_h
+#ifndef ewk_util_private_h
+#define ewk_util_private_h
 
-#include <Ecore_Evas.h>
 #include <Evas.h>
 #include <cairo.h>
-#include <wtf/PassRefPtr.h>
-#include <RefPtrEfl.h>
 
-namespace WebCore {
+Evas_Object *ewk_util_image_from_cairo_surface_add(Evas *canvas, cairo_surface_t *surface);
 
-PassRefPtr<Evas_Object> evasObjectFromCairoImageSurface(Evas* canvas, cairo_surface_t*);
-PassRefPtr<cairo_surface_t> createSurfaceForBackingStore(Ecore_Evas* ee);
-
-}
-
-#endif // CairoUtilitiesEfl_h
+#endif // ewk_util_private_h
index a19340f..5309181 100644 (file)
@@ -611,24 +611,24 @@ static Eina_Bool _ewk_view_smart_key_up(Ewk_View_Smart_Data* smartData, const Ev
 
 static void _ewk_view_smart_add_console_message(Ewk_View_Smart_Data* smartData, const char* message, unsigned int lineNumber, const char* sourceID)
 {
-    INFO("console message: %s @%d: %s\n", sourceID, lineNumber, message);
+    INF("console message: %s @%d: %s\n", sourceID, lineNumber, message);
 }
 
 static void _ewk_view_smart_run_javascript_alert(Ewk_View_Smart_Data* smartData, Evas_Object* frame, const char* message)
 {
-    INFO("javascript alert: %s\n", message);
+    INF("javascript alert: %s\n", message);
 }
 
 static Eina_Bool _ewk_view_smart_run_javascript_confirm(Ewk_View_Smart_Data* smartData, Evas_Object* frame, const char* message)
 {
-    INFO("javascript confirm: %s", message);
-    INFO("javascript confirm (HARD CODED)? YES");
+    INF("javascript confirm: %s", message);
+    INF("javascript confirm (HARD CODED)? YES");
     return true;
 }
 
 static Eina_Bool _ewk_view_smart_should_interrupt_javascript(Ewk_View_Smart_Data* smartData)
 {
-    INFO("should interrupt javascript?\n"
+    INF("should interrupt javascript?\n"
         "\t(HARD CODED) NO");
     return false;
 }
@@ -637,7 +637,7 @@ static Eina_Bool _ewk_view_smart_run_javascript_prompt(Ewk_View_Smart_Data* smar
 {
     *value = eina_stringshare_add("test");
     Eina_Bool result = true;
-    INFO("javascript prompt:\n"
+    INF("javascript prompt:\n"
         "\t      message: %s\n"
         "\tdefault value: %s\n"
         "\tgiving answer: %s\n"
@@ -1150,27 +1150,27 @@ static void _ewk_view_smart_flush(Ewk_View_Smart_Data* smartData)
 
 static Eina_Bool _ewk_view_smart_pre_render_region(Ewk_View_Smart_Data* smartData, Evas_Coord x, Evas_Coord y, Evas_Coord width, Evas_Coord height, float zoom)
 {
-    WARN("not supported by engine. smartData=%p area=%d,%d+%dx%d, zoom=%f",
+    WRN("not supported by engine. smartData=%p area=%d,%d+%dx%d, zoom=%f",
         smartData, x, y, width, height, zoom);
     return false;
 }
 
 static Eina_Bool _ewk_view_smart_pre_render_relative_radius(Ewk_View_Smart_Data* smartData, unsigned int number, float zoom)
 {
-    WARN("not supported by engine. smartData=%p, n=%u zoom=%f",
+    WRN("not supported by engine. smartData=%p, n=%u zoom=%f",
         smartData, number, zoom);
     return false;
 }
 
 static Eina_Bool _ewk_view_smart_pre_render_start(Ewk_View_Smart_Data* smartData)
 {
-    WARN("not supported by engine. smartData=%p", smartData);
+    WRN("not supported by engine. smartData=%p", smartData);
     return false;
 }
 
 static void _ewk_view_smart_pre_render_cancel(Ewk_View_Smart_Data* smartData)
 {
-    WARN("not supported by engine. smartData=%p", smartData);
+    WRN("not supported by engine. smartData=%p", smartData);
 }
 
 static void _ewk_view_zoom_animated_mark_stop(Ewk_View_Smart_Data* smartData)
@@ -1260,13 +1260,13 @@ static WebCore::ViewportAttributes _ewk_view_viewport_attributes_compute(const E
 
 static Eina_Bool _ewk_view_smart_disable_render(Ewk_View_Smart_Data* smartData)
 {
-    WARN("not supported by engine. smartData=%p", smartData);
+    WRN("not supported by engine. smartData=%p", smartData);
     return false;
 }
 
 static Eina_Bool _ewk_view_smart_enable_render(Ewk_View_Smart_Data* smartData)
 {
-    WARN("not supported by engine. smartData=%p", smartData);
+    WRN("not supported by engine. smartData=%p", smartData);
     return false;
 }
 
@@ -1448,19 +1448,19 @@ void ewk_view_bg_color_set(Evas_Object* ewkView, int red, int green, int blue, i
     EINA_SAFETY_ON_NULL_RETURN(smartData->api->bg_color_set);
 
     if (alpha < 0) {
-        WARN("Alpha less than zero (%d).", alpha);
+        WRN("Alpha less than zero (%d).", alpha);
         alpha = 0;
     } else if (alpha > 255) {
-        WARN("Alpha is larger than 255 (%d).", alpha);
+        WRN("Alpha is larger than 255 (%d).", alpha);
         alpha = 255;
     }
 
 #define CHECK_PREMUL_COLOR(color, alpha)                                        \
     if (color < 0) {                                                        \
-        WARN("Color component " #color " is less than zero (%d).", color);         \
+        WRN("Color component " #color " is less than zero (%d).", color);         \
         color = 0;                                                          \
     } else if (color > alpha) {                                                 \
-        WARN("Color component " #color " is greater than alpha (%d, alpha=%d).", \
+        WRN("Color component " #color " is greater than alpha (%d, alpha=%d).", \
             color, alpha);                                                      \
         color = alpha;                                                          \
     }
@@ -1758,16 +1758,16 @@ Eina_Bool ewk_view_zoom_set(Evas_Object* ewkView, float zoom, Evas_Coord centerX
     EINA_SAFETY_ON_NULL_RETURN_VAL(smartData->api->zoom_set, false);
 
     if (!priv->settings.zoomRange.userScalable) {
-        WARN("userScalable is false");
+        WRN("userScalable is false");
         return false;
     }
 
     if (zoom < priv->settings.zoomRange.minScale) {
-        WARN("zoom level is < %f : %f", priv->settings.zoomRange.minScale, zoom);
+        WRN("zoom level is < %f : %f", priv->settings.zoomRange.minScale, zoom);
         return false;
     }
     if (zoom > priv->settings.zoomRange.maxScale) {
-        WARN("zoom level is > %f : %f", priv->settings.zoomRange.maxScale, zoom);
+        WRN("zoom level is > %f : %f", priv->settings.zoomRange.maxScale, zoom);
         return false;
     }
 
@@ -1846,16 +1846,16 @@ Eina_Bool ewk_view_zoom_weak_set(Evas_Object* ewkView, float zoom, Evas_Coord ce
     EINA_SAFETY_ON_NULL_RETURN_VAL(smartData->api->zoom_weak_set, false);
 
     if (!priv->settings.zoomRange.userScalable) {
-        WARN("userScalable is false");
+        WRN("userScalable is false");
         return false;
     }
 
     if (zoom < priv->settings.zoomRange.minScale) {
-        WARN("zoom level is < %f : %f", priv->settings.zoomRange.minScale, zoom);
+        WRN("zoom level is < %f : %f", priv->settings.zoomRange.minScale, zoom);
         return false;
     }
     if (zoom > priv->settings.zoomRange.maxScale) {
-        WARN("zoom level is > %f : %f", priv->settings.zoomRange.maxScale, zoom);
+        WRN("zoom level is > %f : %f", priv->settings.zoomRange.maxScale, zoom);
         return false;
     }
 
@@ -1902,16 +1902,16 @@ Eina_Bool ewk_view_zoom_animated_set(Evas_Object* ewkView, float zoom, float dur
     EINA_SAFETY_ON_NULL_RETURN_VAL(smartData->api->zoom_weak_set, false);
 
     if (!priv->settings.zoomRange.userScalable) {
-        WARN("userScalable is false");
+        WRN("userScalable is false");
         return false;
     }
 
     if (zoom < priv->settings.zoomRange.minScale) {
-        WARN("zoom level is < %f : %f", priv->settings.zoomRange.minScale, zoom);
+        WRN("zoom level is < %f : %f", priv->settings.zoomRange.minScale, zoom);
         return false;
     }
     if (zoom > priv->settings.zoomRange.maxScale) {
-        WARN("zoom level is > %f : %f", priv->settings.zoomRange.maxScale, zoom);
+        WRN("zoom level is > %f : %f", priv->settings.zoomRange.maxScale, zoom);
         return false;
     }
 
@@ -3325,7 +3325,7 @@ void ewk_view_statusbar_visible_get(Evas_Object* ewkView, bool* visible)
 void ewk_view_statusbar_text_set(Evas_Object* ewkView, const char* text)
 {
     DBG("ewkView=%p (text=%s)", ewkView, text);
-    INFO("status bar text set: %s", text);
+    INF("status bar text set: %s", text);
     evas_object_smart_callback_call(ewkView, "statusbar,text,set", (void*)text);
 }
 
@@ -3536,7 +3536,7 @@ int64_t ewk_view_exceeded_application_cache_quota(Evas_Object* ewkView, Ewk_Secu
     if (!smartData->api->exceeded_application_cache_quota)
         return 0;
 
-    INFO("defaultOriginQuota=%" PRIu64 " totalSpaceNeeded=%" PRIu64, defaultOriginQuota, totalSpaceNeeded);
+    INF("defaultOriginQuota=%" PRIu64 " totalSpaceNeeded=%" PRIu64, defaultOriginQuota, totalSpaceNeeded);
     return smartData->api->exceeded_application_cache_quota(smartData, origin, defaultOriginQuota, totalSpaceNeeded);
 }
 
@@ -3562,7 +3562,7 @@ uint64_t ewk_view_exceeded_database_quota(Evas_Object* ewkView, Evas_Object* fra
     if (!smartData->api->exceeded_database_quota)
         return 0;
 
-    INFO("currentSize=%" PRIu64 " expectedSize=%" PRIu64, currentSize, expectedSize);
+    INF("currentSize=%" PRIu64 " expectedSize=%" PRIu64, currentSize, expectedSize);
     return smartData->api->exceeded_database_quota(smartData, frame, databaseName, currentSize, expectedSize);
 }
 
@@ -3611,7 +3611,7 @@ void ewk_view_scroll(Evas_Object* ewkView, Evas_Coord deltaX, Evas_Coord deltaY,
         ewkView, deltaX, deltaY, scrollX, scrollY, scrollWidth, scrollHeight, centerX, centerY, centerWidth, centerHeight);
 
     if ((scrollX != centerX) || (scrollY != centerY) || (scrollWidth != centerWidth) || (scrollHeight != centerHeight))
-        WARN("scroll region and clip are different! %d,%d+%dx%d and %d,%d+%dx%d",
+        WRN("scroll region and clip are different! %d,%d+%dx%d and %d,%d+%dx%d",
             scrollX, scrollY, scrollWidth, scrollHeight, centerX, centerY, centerWidth, centerHeight);
 
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
@@ -3687,7 +3687,7 @@ WTF::PassRefPtr<WebCore::Widget> ewk_view_plugin_create(Evas_Object* ewkView, Ev
  */
 void ewk_view_popup_new(Evas_Object* ewkView, WebCore::PopupMenuClient* client, int selected, const WebCore::IntRect& rect)
 {
-    INFO("ewkView=%p", ewkView);
+    INF("ewkView=%p", ewkView);
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
     EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
 
@@ -3720,7 +3720,7 @@ void ewk_view_popup_new(Evas_Object* ewkView, WebCore::PopupMenuClient* client,
 
 Eina_Bool ewk_view_popup_destroy(Evas_Object* ewkView)
 {
-    INFO("ewkView=%p", ewkView);
+    INF("ewkView=%p", ewkView);
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
     EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
 
@@ -3743,7 +3743,7 @@ Eina_Bool ewk_view_popup_destroy(Evas_Object* ewkView)
 
 void ewk_view_popup_selected_set(Evas_Object* ewkView, int index)
 {
-    INFO("ewkView=%p", ewkView);
+    INF("ewkView=%p", ewkView);
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
     EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
     EINA_SAFETY_ON_NULL_RETURN(priv->popup.menuClient);
@@ -3763,7 +3763,7 @@ void ewk_view_popup_selected_set(Evas_Object* ewkView, int index)
  */
 void ewk_view_color_chooser_new(Evas_Object* ewkView, WebCore::ColorChooserClient* client, const WebCore::Color& initialColor)
 {
-    INFO("ewkView=%p", ewkView);
+    INF("ewkView=%p", ewkView);
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
     EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
 
@@ -3783,7 +3783,7 @@ void ewk_view_color_chooser_new(Evas_Object* ewkView, WebCore::ColorChooserClien
 
 Eina_Bool ewk_view_color_chooser_destroy(Evas_Object* ewkView)
 {
-    INFO("ewkView=%p", ewkView);
+    INF("ewkView=%p", ewkView);
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
     EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
 
@@ -3800,7 +3800,7 @@ Eina_Bool ewk_view_color_chooser_destroy(Evas_Object* ewkView)
 
 void ewk_view_color_chooser_color_set(Evas_Object *ewkView, int r, int g, int b)
 {
-    INFO("ewkView=%p", ewkView);
+    INF("ewkView=%p", ewkView);
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
     EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
     EINA_SAFETY_ON_NULL_RETURN(priv->colorChooserClient);
@@ -3821,7 +3821,7 @@ void ewk_view_color_chooser_color_set(Evas_Object *ewkView, int r, int g, int b)
  */
 void ewk_view_color_chooser_changed(Evas_Object* ewkView, const WebCore::Color& newColor)
 {
-    INFO("ewkView=%p", ewkView);
+    INF("ewkView=%p", ewkView);
 
     Ewk_Color color;
     color.r = newColor.red();
@@ -3908,7 +3908,7 @@ Eina_Bool ewk_view_zoom_range_set(Evas_Object* ewkView, float minScale, float ma
     EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
 
     if (maxScale < minScale) {
-        WARN("minScale is larger than maxScale");
+        WRN("minScale is larger than maxScale");
         return false;
     }
 
index 2e365ce..a570d65 100644 (file)
@@ -735,7 +735,7 @@ EAPI void         ewk_view_fixed_layout_size_get(const Evas_Object *o, Evas_Coor
  * use this one.
  *
  * @param o view object to change theme
- * @param path theme path
+ * @param path theme path, may be @c NULL to reset to the default theme
  */
 EAPI void         ewk_view_theme_set(Evas_Object *o, const char *path);
 
index 631fa2c..daee677 100644 (file)
@@ -45,7 +45,7 @@ const char ewkViewSingleName[] = "Ewk_View_Single";
 // Define to prevent an application using different view type from calling the function.
 #define EWK_VIEW_TYPE_CHECK_OR_RETURN(ewkView, viewName, ...) \
     if (!evas_object_smart_type_check(ewkView, viewName)) { \
-        INFO("ewkView isn't an instance of %s", viewName); \
+        INF("ewkView isn't an instance of %s", viewName); \
         return __VA_ARGS__; \
     }
 
index f404b29..7615707 100644 (file)
@@ -29,7 +29,7 @@
 
 static Ewk_View_Smart_Class _parent_sc = EWK_VIEW_SMART_CLASS_INIT_NULL;
 
-static bool _ewk_view_tiled_render_cb(void* data, Ewk_Tile* tile, const Eina_Rectangle* area)
+static Eina_Bool _ewk_view_tiled_render_cb(void* data, Ewk_Tile* tile, const Eina_Rectangle* area)
 {
     Ewk_View_Private_Data* priv = static_cast<Ewk_View_Private_Data*>(data);
     Eina_Rectangle rect = {area->x + tile->x, area->y + tile->y, area->w, area->h};
@@ -38,7 +38,7 @@ static bool _ewk_view_tiled_render_cb(void* data, Ewk_Tile* tile, const Eina_Rec
     Ewk_Paint_Context* context = ewk_paint_context_from_image_data_new(pixels, tile->width, tile->height, tile->cspace);
 
     ewk_paint_context_translate(context, -tile->x, -tile->y);
-    bool result = ewk_view_paint_contents(priv, context, &rect);
+    Eina_Bool result = ewk_view_paint_contents(priv, context, &rect);
     ewk_paint_context_free(context);
 
     evas_object_image_data_set(tile->image, pixels);
@@ -56,7 +56,8 @@ static void* _ewk_view_tiled_updates_process_pre(void* data, Evas_Object* ewkVie
 static Evas_Object* _ewk_view_tiled_smart_backing_store_add(Ewk_View_Smart_Data* smartData)
 {
     Evas_Object* backingStore = ewk_tiled_backing_store_add(smartData->base.evas);
-    ewk_tiled_backing_store_render_cb_set(backingStore, _ewk_view_tiled_render_cb, smartData->_priv);
+    ewk_tiled_backing_store_render_cb_set
+        (backingStore, _ewk_view_tiled_render_cb, smartData->_priv);
     ewk_tiled_backing_store_updates_process_pre_set
         (backingStore, _ewk_view_tiled_updates_process_pre, smartData->_priv);
     return backingStore;
index 1c15a84..4b9d124 100644 (file)
@@ -21,7 +21,6 @@
 #include "config.h"
 #include "FrameNetworkingContextGtk.h"
 
-#include "NotImplemented.h"
 #include "ResourceHandle.h"
 
 using namespace WebCore;
@@ -33,10 +32,4 @@ SoupSession* FrameNetworkingContextGtk::soupSession() const
     return ResourceHandle::defaultSession();
 }
 
-uint64_t FrameNetworkingContextGtk::initiatingPageID() const
-{
-    notImplemented();
-    return 0;
-}
-
 }
index cada19b..a59a940 100644 (file)
@@ -33,7 +33,6 @@ public:
 
     WebCore::Frame* coreFrame() const { return frame(); }
     virtual SoupSession* soupSession() const;
-    virtual uint64_t initiatingPageID() const;
 
 private:
     FrameNetworkingContextGtk(WebCore::Frame* frame)
old mode 100755 (executable)
new mode 100644 (file)
index 963262b..cf51782
@@ -653,13 +653,13 @@ IF (ENABLE_ALLINONE)
 
         UIProcess/API/C/WKPluginSiteDataManager.cpp
         UIProcess/API/C/WKPage.cpp
-        UIProcess/API/efl/EwkViewImpl.cpp
         UIProcess/API/efl/PageClientImpl.cpp
         UIProcess/API/efl/tizen/ClipboardHelper.cpp
         UIProcess/API/efl/tizen/OfflinePageSave.cpp
         UIProcess/API/efl/tizen/SmartZoom.cpp
         UIProcess/API/efl/tizen/Zoom.cpp
         UIProcess/API/efl/ewk_util.cpp
+        UIProcess/API/efl/ewk_view_policy_client.cpp
         UIProcess/API/efl/ewk_context_download_client.cpp
         UIProcess/API/efl/ewk_view.cpp
         UIProcess/DrawingAreaProxyImpl.cpp
@@ -733,6 +733,14 @@ IF (ENABLE_PLUGIN_PROCESS)
 ENDIF ()
 
 SET_TARGET_PROPERTIES(${WebKit2_LIBRARY_NAME} PROPERTIES VERSION ${PROJECT_VERSION} SOVERSION ${PROJECT_VERSION_MAJOR})
+IF (WebKit2_LINK_FLAGS)
+    ADD_TARGET_PROPERTIES(${WebKit2_LIBRARY_NAME} LINK_FLAGS "${WebKit2_LINK_FLAGS}")
+    ADD_TARGET_PROPERTIES(${WebProcess_EXECUTABLE_NAME} LINK_FLAGS "${WebKit2_LINK_FLAGS}")
+
+    IF (ENABLE_PLUGIN_PROCESS)
+        ADD_TARGET_PROPERTIES(${PluginProcess_EXECUTABLE_NAME} LINK_FLAGS "${WebKit2_LINK_FLAGS}")
+    ENDIF ()
+ENDIF ()
 
 INSTALL(TARGETS ${WebKit2_LIBRARY_NAME} DESTINATION "${LIB_INSTALL_DIR}")
 INSTALL(TARGETS ${WebProcess_EXECUTABLE_NAME} DESTINATION "${EXEC_INSTALL_DIR}")
index fe4f205..eb69270 100644 (file)
@@ -103,7 +103,6 @@ webkit2gtk_h_api += \
        $(WebKit2)/UIProcess/API/gtk/WebKitDownload.h \
        $(WebKit2)/UIProcess/API/gtk/WebKitEditingCommands.h \
        $(WebKit2)/UIProcess/API/gtk/WebKitError.h \
-       $(WebKit2)/UIProcess/API/gtk/WebKitFaviconDatabase.h \
        $(WebKit2)/UIProcess/API/gtk/WebKitFileChooserRequest.h \
        $(WebKit2)/UIProcess/API/gtk/WebKitFindController.h \
        $(WebKit2)/UIProcess/API/gtk/WebKitFormSubmissionRequest.h \
@@ -643,9 +642,6 @@ webkit2_sources += \
        Source/WebKit2/UIProcess/API/gtk/WebKitEditingCommands.h \
        Source/WebKit2/UIProcess/API/gtk/WebKitError.h \
        Source/WebKit2/UIProcess/API/gtk/WebKitError.cpp \
-       Source/WebKit2/UIProcess/API/gtk/WebKitFaviconDatabase.h \
-       Source/WebKit2/UIProcess/API/gtk/WebKitFaviconDatabase.cpp \
-       Source/WebKit2/UIProcess/API/gtk/WebKitFaviconDatabasePrivate.h \
        Source/WebKit2/UIProcess/API/gtk/WebKitFileChooserRequest.cpp \
        Source/WebKit2/UIProcess/API/gtk/WebKitFileChooserRequest.h \
        Source/WebKit2/UIProcess/API/gtk/WebKitFileChooserRequestPrivate.h \
old mode 100755 (executable)
new mode 100644 (file)
index 0ae1297..ddca510
@@ -575,7 +575,7 @@ static String pluginsPage()
 
     // FIXME: Ewk_Context should be obtained from Ewk_View. This will be fixed after refactoring 'about:' implementation itself.
     Ewk_Context* context = ewk_context_default_get();
-    Vector<PluginModuleInfo> plugins = (toImpl(context->wkContext())->pluginInfoStore()).plugins();
+    Vector<PluginModuleInfo> plugins = (toImpl(context->context.get())->pluginInfoStore()).plugins();
 
     if (plugins.isEmpty()) {
         page.append(header("There is no plugin"));
index 902b7b4..f241e36 100755 (executable)
@@ -1,3 +1,12 @@
+LIST(APPEND WebKit2_LINK_FLAGS
+    ${CAIRO_LDFLAGS}
+    ${ECORE_X_LDFLAGS}
+    ${EDJE_LDFLAGS}
+    ${EFLDEPS_LDFLAGS}
+    ${EVAS_LDFLAGS}
+    ${LIBSOUP24_LDFLAGS}
+)
+
 LIST(APPEND WebKit2StaticForDebug_SOURCES
     Platform/efl/LoggingEfl.cpp
     Platform/efl/ModuleEfl.cpp
@@ -28,8 +37,6 @@ LIST(APPEND WebKit2StaticForDebug_SOURCES
     Shared/soup/WebCoreArgumentCodersSoup.cpp
 
     UIProcess/API/C/efl/WKView.cpp
-    
-    UIProcess/API/cpp/efl/WKEinaSharedString.cpp
 
     UIProcess/API/C/soup/WKContextSoup.cpp
     UIProcess/API/C/soup/WKSoupRequestManager.cpp
@@ -39,40 +46,32 @@ LIST(APPEND WebKit2StaticForDebug_SOURCES
     UIProcess/API/efl/NetworkInfoProvider.cpp
     UIProcess/API/efl/PageClientImpl.cpp
     UIProcess/API/efl/VibrationProvider.cpp
-    UIProcess/API/efl/ewk_back_forward_list.cpp
-    UIProcess/API/efl/ewk_back_forward_list_item.cpp
     UIProcess/API/efl/ewk_context.cpp
+    UIProcess/API/efl/ewk_context_download_client.cpp
+    UIProcess/API/efl/ewk_context_request_manager_client.cpp
     UIProcess/API/efl/ewk_cookie_manager.cpp
     UIProcess/API/efl/ewk_download_job.cpp
-    UIProcess/API/efl/ewk_error.cpp
-    UIProcess/API/efl/ewk_favicon_database.cpp
     UIProcess/API/efl/ewk_form_submission_request.cpp
     UIProcess/API/efl/ewk_intent.cpp
     UIProcess/API/efl/ewk_intent_service.cpp
     UIProcess/API/efl/ewk_main.cpp
-    UIProcess/API/efl/ewk_navigation_data.cpp
     UIProcess/API/efl/ewk_navigation_policy_decision.cpp
     UIProcess/API/efl/ewk_popup_menu_item.cpp
-    UIProcess/API/efl/ewk_resource.cpp
     UIProcess/API/efl/ewk_settings.cpp
     UIProcess/API/efl/ewk_text_checker.cpp
     UIProcess/API/efl/ewk_url_request.cpp
     UIProcess/API/efl/ewk_url_response.cpp
     UIProcess/API/efl/ewk_url_scheme_request.cpp
     UIProcess/API/efl/ewk_view.cpp
+    UIProcess/API/efl/ewk_view_form_client.cpp
+    UIProcess/API/efl/ewk_view_loader_client.cpp
+    UIProcess/API/efl/ewk_view_policy_client.cpp
+    UIProcess/API/efl/ewk_view_resource_load_client.cpp
+    UIProcess/API/efl/ewk_web_error.cpp
+    UIProcess/API/efl/ewk_web_resource.cpp
 
     UIProcess/cairo/BackingStoreCairo.cpp
 
-    UIProcess/efl/ContextHistoryClientEfl.cpp
-    UIProcess/efl/DownloadManagerEfl.cpp
-    UIProcess/efl/FindClientEfl.cpp
-    UIProcess/efl/FormClientEfl.cpp
-    UIProcess/efl/InputMethodContextEfl.cpp
-    UIProcess/efl/PageLoadClientEfl.cpp
-    UIProcess/efl/PagePolicyClientEfl.cpp
-    UIProcess/efl/PageUIClientEfl.cpp
-    UIProcess/efl/RequestManagerClientEfl.cpp
-    UIProcess/efl/ResourceLoadClientEfl.cpp
     UIProcess/efl/TextCheckerEfl.cpp
     UIProcess/efl/WebContextEfl.cpp
     UIProcess/efl/WebFullScreenManagerProxyEfl.cpp
@@ -135,55 +134,42 @@ LIST(APPEND WebKit2StaticForDebug_INCLUDE_DIRECTORIES
     "${WEBKIT2_DIR}/Shared/soup"
     "${WEBKIT2_DIR}/UIProcess/API/C/efl"
     "${WEBKIT2_DIR}/UIProcess/API/C/soup"
-    "${WEBKIT2_DIR}/UIProcess/API/cpp/efl"
     "${WEBKIT2_DIR}/UIProcess/API/efl"
-    "${WEBKIT2_DIR}/UIProcess/efl"
     "${WEBKIT2_DIR}/UIProcess/soup"
     "${WEBKIT2_DIR}/WebProcess/Downloads/soup"
     "${WEBKIT2_DIR}/WebProcess/efl"
     "${WEBKIT2_DIR}/WebProcess/soup"
     "${WEBKIT2_DIR}/WebProcess/WebCoreSupport/efl"
     "${WEBKIT2_DIR}/WebProcess/WebCoreSupport/soup"
-    "${WTF_DIR}/wtf/efl/"
     "${WTF_DIR}/wtf/gobject"
     ${CAIRO_INCLUDE_DIRS}
-    ${ECORE_INCLUDE_DIRS}
-    ${ECORE_EVAS_INCLUDE_DIRS}
+    ${ECORE_X_INCLUDE_DIRS}
     ${EDJE_INCLUDE_DIRS}
-    ${EFREET_INCLUDE_DIRS}
-    ${EINA_INCLUDE_DIRS}
+    ${EFLDEPS_INCLUDE_DIRS}
     ${EVAS_INCLUDE_DIRS}
     ${HARFBUZZ_INCLUDE_DIRS}
-    ${LIBSOUP_INCLUDE_DIRS}
     ${LIBXML2_INCLUDE_DIR}
     ${LIBXSLT_INCLUDE_DIRS}
     ${SQLITE_INCLUDE_DIRS}
-    ${GLIB_INCLUDE_DIRS}
-    ${LIBSOUP_INCLUDE_DIRS}
+    ${Glib_INCLUDE_DIRS}
+    ${LIBSOUP24_INCLUDE_DIRS}
     ${WTF_DIR}
     ${CAPI_INCLUDE_DIRS}
 )
 
 LIST(APPEND WebKit2_LIBRARIES
     ${CAIRO_LIBRARIES}
-    ${ECORE_LIBRARIES}
-    ${ECORE_EVAS_LIBRARIES}
-    ${EDJE_LIBRARIES}
-    ${EFREET_LIBRARIES}
-    ${EINA_LIBRARIES}
-    ${EVAS_LIBRARIES}
+    ${ECORE_X_LIBRARIES}
+    ${EFLDEPS_LIBRARIES}
     ${Freetype_LIBRARIES}
-    ${HARFBUZZ_LIBRARIES}
     ${LIBXML2_LIBRARIES}
     ${SQLITE_LIBRARIES}
     ${FONTCONFIG_LIBRARIES}
     ${PNG_LIBRARY}
     ${JPEG_LIBRARY}
     ${CMAKE_DL_LIBS}
-    ${GLIB_LIBRARIES}
-    ${GLIB_GIO_LIBRARIES}
-    ${GLIB_GOBJECT_LIBRARIES}
-    ${LIBSOUP_LIBRARIES}
+    ${Glib_LIBRARIES}
+    ${LIBSOUP24_LIBRARIES}
     ${CAPI_LIBRARIES}
 )
 
@@ -200,7 +186,6 @@ LIST (APPEND WebProcess_SOURCES
 
 LIST (APPEND WebProcess_LIBRARIES
     ${CAIRO_LIBRARIES}
-    ${ECORE_IMF_LIBRARIES}
     ${ECORE_X_LIBRARIES}
     ${EDJE_LIBRARIES}
     ${EFLDEPS_LIBRARIES}
@@ -210,6 +195,8 @@ LIST (APPEND WebProcess_LIBRARIES
     ${SQLITE_LIBRARIES}
 )
 
+ADD_DEFINITIONS(-DDEFAULT_THEME_PATH=\"${CMAKE_INSTALL_PREFIX}/${DATA_INSTALL_DIR}/themes\")
+
 ADD_CUSTOM_TARGET(forwarding-headerEfl
     COMMAND ${PERL_EXECUTABLE} ${WEBKIT2_DIR}/Scripts/generate-forwarding-headers.pl ${WEBKIT2_DIR} ${DERIVED_SOURCES_WEBKIT2_DIR}/include efl
 )
@@ -242,33 +229,28 @@ CONFIGURE_FILE(efl/ewebkit2.pc.in ${CMAKE_BINARY_DIR}/WebKit2/efl/ewebkit2.pc @O
 SET (EWebKit2_HEADERS
     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/EWebKit2.h"
     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_auth_challenge.h"
-    "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_back_forward_list.h"
-    "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_back_forward_list_item.h"
     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_certificate.h"
     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_context.h"
     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_cookie_manager.h"
     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_download_job.h"
-    "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_error.h"
-    "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_favicon_database.h"
     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_form_submission_request.h"
     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_intent.h"
     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_intent_service.h"
     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_main.h"
-    "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_navigation_data.h"
     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_navigation_policy_decision.h"
-    "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_popup_menu_item.h"
-    "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_resource.h"
-    "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_settings.h"
     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_text_checker.h"
     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_touch.h"
     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_url_request.h"
     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_url_response.h"
     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_url_scheme_request.h"
     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_view.h"
+    "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_web_error.h"
+    "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_web_resource.h"
 
     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_context_menu.h"
     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_custom_handlers.h"
     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_enums.h"
+    "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_error.h"
     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_form_data.h"
     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_frame.h"
     "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_history.h"
@@ -299,23 +281,19 @@ SET(EWK2UnitTests_LIBRARIES
     ${ECORE_LIBRARIES}
     ${ECORE_EVAS_LIBRARIES}
     ${EVAS_LIBRARIES}
-    ${GLIB_LIBRARIES}
-    ${GLIB_GIO_LIBRARIES}
-    ${GLIB_GOBJECT_LIBRARIES}
-    ${LIBSOUP_LIBRARIES}
+    ${LIBSOUP24_LIBRARIES}
     gtest
 )
 
 IF (ENABLE_GLIB_SUPPORT)
     LIST(APPEND EWK2UnitTests_LIBRARIES
-        ${GLIB_LIBRARIES}
-        ${GLIB_GTHREAD_LIBRARIES}
+        ${Glib_LIBRARIES}
+        ${Gthread_LIBRARIES}
     )
 ENDIF()
 
 SET(WEBKIT2_EFL_TEST_DIR "${WEBKIT2_DIR}/UIProcess/API/efl/tests")
 SET(TEST_RESOURCES_DIR ${WEBKIT2_EFL_TEST_DIR}/resources)
-SET(TEST_INJECTED_BUNDLE_DIR ${WEBKIT2_EFL_TEST_DIR}/InjectedBundle)
 
 ADD_DEFINITIONS(-DTEST_RESOURCES_DIR=\"${TEST_RESOURCES_DIR}\"
     -DTEST_THEME_DIR=\"${THEME_BINARY_DIR}\"
@@ -337,14 +315,9 @@ TARGET_LINK_LIBRARIES(ewk2UnitTestUtils ${EWK2UnitTests_LIBRARIES})
 # The "ewk" on the test name needs to be suffixed with "2", otherwise it
 # will clash with tests from the WebKit 1 test suite.
 SET(EWK2UnitTests_BINARIES
-    test_ewk2_back_forward_list
     test_ewk2_context
-    test_ewk2_context_history_callbacks
     test_ewk2_cookie_manager
     test_ewk2_download_job
-    test_ewk2_eina_shared_string
-    test_ewk2_favicon_database
-    test_ewk2_intents
     test_ewk2_settings
     test_ewk2_view
 )
@@ -356,9 +329,6 @@ IF (ENABLE_API_TESTS)
         SET_TESTS_PROPERTIES(${testName} PROPERTIES TIMEOUT 60)
         TARGET_LINK_LIBRARIES(${testName} ${EWK2UnitTests_LIBRARIES} ewk2UnitTestUtils)
     ENDFOREACH ()
-
-    ADD_LIBRARY(ewk2UnitTestInjectedBundleSample SHARED ${TEST_INJECTED_BUNDLE_DIR}/injected_bundle_sample.cpp)
-    SET_TARGET_PROPERTIES(ewk2UnitTestInjectedBundleSample PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${TEST_RESOURCES_DIR}")
 ENDIF ()
 
 IF (ENABLE_SPELLCHECK)
index 9cea7eb..0e07a16 100755 (executable)
@@ -74,6 +74,7 @@ LIST(APPEND WebKit2StaticForDebug_SOURCES
     UIProcess/API/efl/ewk_context_injected_bundle_client.cpp
     UIProcess/API/efl/ewk_context_menu.cpp
     UIProcess/API/efl/ewk_custom_handlers.cpp
+    UIProcess/API/efl/ewk_error.cpp
     UIProcess/API/efl/ewk_form_data.cpp
     UIProcess/API/efl/ewk_frame.cpp
     UIProcess/API/efl/ewk_geolocation.cpp
@@ -87,10 +88,12 @@ LIST(APPEND WebKit2StaticForDebug_SOURCES
     UIProcess/API/efl/ewk_user_media.cpp
     UIProcess/API/efl/ewk_util.cpp
     UIProcess/API/efl/ewk_view_context_menu_client.cpp
+    UIProcess/API/efl/ewk_view_find_client.cpp
     UIProcess/API/efl/ewk_view_geolocation_provider.cpp
     UIProcess/API/efl/ewk_view_icondatabase_client.cpp
     UIProcess/API/efl/ewk_view_notification_provider.cpp
     UIProcess/API/efl/ewk_view_tizen_client.cpp
+    UIProcess/API/efl/ewk_view_ui_client.cpp
     UIProcess/API/efl/ewk_web_application_icon_data.cpp
 
     UIProcess/API/efl/tizen/ClipboardHelper.cpp
index 2268413..dacd589 100644 (file)
@@ -59,13 +59,3 @@ WKStringRef WKURLCopyScheme(WKURLRef url)
 {
     return toCopiedAPI(toImpl(url)->protocol());
 }
-
-WK_EXPORT WKStringRef WKURLCopyPath(WKURLRef url)
-{
-    return toCopiedAPI(toImpl(url)->path());
-}
-
-WKStringRef WKURLCopyLastPathComponent(WKURLRef url)
-{
-    return toCopiedAPI(toImpl(url)->lastPathComponent());
-}
index 4e98672..f599f16 100644 (file)
@@ -39,8 +39,6 @@ WK_EXPORT WKURLRef WKURLCreateWithUTF8CString(const char* string);
 WK_EXPORT WKStringRef WKURLCopyString(WKURLRef url);
 WK_EXPORT WKStringRef WKURLCopyHostName(WKURLRef url);
 WK_EXPORT WKStringRef WKURLCopyScheme(WKURLRef url);
-WK_EXPORT WKStringRef WKURLCopyPath(WKURLRef url);
-WK_EXPORT WKStringRef WKURLCopyLastPathComponent(WKURLRef url);
 
 WK_EXPORT bool WKURLIsEqual(WKURLRef a, WKURLRef b);
 
index 114c741..776367b 100644 (file)
@@ -48,16 +48,6 @@ WKURLRef WKURLRequestCopyURL(WKURLRequestRef requestRef)
     return toCopiedURLAPI(toImpl(requestRef)->url());
 }
 
-WKURLRef WKURLRequestCopyFirstPartyForCookies(WKURLRequestRef requestRef)
-{
-    return toCopiedURLAPI(toImpl(requestRef)->resourceRequest().firstPartyForCookies());
-}
-
-WKStringRef WKURLRequestCopyHTTPMethod(WKURLRequestRef requestRef)
-{
-    return toCopiedAPI(toImpl(requestRef)->resourceRequest().httpMethod());
-}
-
 void WKURLRequestSetDefaultTimeoutInterval(double timeoutInterval)
 {
     WebURLRequest::setDefaultTimeoutInterval(timeoutInterval);
index 85df3d3..a53ce16 100644 (file)
@@ -38,10 +38,6 @@ WK_EXPORT WKURLRequestRef WKURLRequestCreateWithWKURL(WKURLRef);
 
 WK_EXPORT WKURLRef WKURLRequestCopyURL(WKURLRequestRef);
 
-WK_EXPORT WKURLRef WKURLRequestCopyFirstPartyForCookies(WKURLRequestRef);
-
-WK_EXPORT WKStringRef WKURLRequestCopyHTTPMethod(WKURLRequestRef);
-
 WK_EXPORT void WKURLRequestSetDefaultTimeoutInterval(double);
 
 #ifdef __cplusplus
index 2d25f28..7d8d68b 100644 (file)
@@ -28,7 +28,6 @@
 
 #include "WKAPICast.h"
 #include "WebURLResponse.h"
-#include <WebCore/KURL.h>
 
 using namespace WebKit;
 
@@ -37,17 +36,3 @@ WKTypeID WKURLResponseGetTypeID()
     return toAPI(WebURLResponse::APIType);
 }
 
-WKURLRef WKURLResponseCopyURL(WKURLResponseRef responseRef)
-{
-    return toCopiedURLAPI(toImpl(responseRef)->resourceResponse().url());
-}
-
-WKStringRef WKURLResponseCopyMIMEType(WKURLResponseRef responseRef)
-{
-    return toCopiedAPI(toImpl(responseRef)->resourceResponse().mimeType());
-}
-
-int32_t WKURLResponseHTTPStatusCode(WKURLResponseRef responseRef)
-{
-    return toImpl(responseRef)->resourceResponse().httpStatusCode();
-}
index d4c2693..62e51f4 100644 (file)
@@ -34,12 +34,6 @@ extern "C" {
 
 WK_EXPORT WKTypeID WKURLResponseGetTypeID();
 
-WK_EXPORT WKURLRef WKURLResponseCopyURL(WKURLResponseRef);
-
-WK_EXPORT WKStringRef WKURLResponseCopyMIMEType(WKURLResponseRef);
-
-WK_EXPORT int32_t WKURLResponseHTTPStatusCode(WKURLResponseRef);
-
 #ifdef __cplusplus
 }
 #endif
index 6e7a1a3..840237d 100644 (file)
@@ -76,9 +76,4 @@ const size_t APIClientTraits<WKContextInjectedBundleClient>::interfaceSizesByVer
     sizeof(WKContextInjectedBundleClient)
 };
 
-const size_t APIClientTraits<WKIconDatabaseClient>::interfaceSizesByVersion[] = {
-    offsetof(WKIconDatabaseClient, iconDataReadyForPageURL),
-    sizeof(WKIconDatabaseClient)
-};
-
 } // namespace WebKit
index 864e232..934d619 100644 (file)
@@ -28,7 +28,6 @@
 
 #include "WKBundlePage.h"
 #include "WKContext.h"
-#include "WKIconDatabase.h"
 #include "WKPage.h"
 
 namespace WebKit {
@@ -74,10 +73,6 @@ template<> struct APIClientTraits<WKContextInjectedBundleClient> {
     static const size_t interfaceSizesByVersion[2];
 };
 
-template<> struct APIClientTraits<WKIconDatabaseClient> {
-    static const size_t interfaceSizesByVersion[2];
-};
-
 } // namespace WebKit
 
 #endif // APIClientTraits_h
old mode 100755 (executable)
new mode 100644 (file)
index 18f4943..5208736
@@ -65,8 +65,10 @@ public:
 #elif PLATFORM(EFL)
 #if ENABLE(TIZEN_ISF_PORT)
     NativeWebKeyboardEvent();
+    NativeWebKeyboardEvent(const Evas_Event_Key_Down*, bool filtered);
+#else
+    NativeWebKeyboardEvent(const Evas_Event_Key_Down*);
 #endif
-    NativeWebKeyboardEvent(const Evas_Event_Key_Down*, bool);
     NativeWebKeyboardEvent(const Evas_Event_Key_Up*);
 #endif
 
@@ -87,7 +89,6 @@ public:
     static bool decode(CoreIPC::ArgumentDecoder*, NativeWebKeyboardEvent&);
 #else
     const void* nativeEvent() const { return m_nativeEvent; }
-    bool isFiltered() const { return m_isFiltered; }
 #endif
 #endif
 
@@ -106,7 +107,6 @@ private:
     bool m_filtered;
 #else
     const void* m_nativeEvent;
-    bool m_isFiltered;
 #endif
 #endif
 };
index b296127..14bd99f 100644 (file)
@@ -63,18 +63,6 @@ public:
         return m_parsedURL->isValid() ? m_parsedURL->protocol() : String();
     }
 
-    String path() const
-    {
-        parseURLIfNecessary();
-        return m_parsedURL->isValid() ? m_parsedURL->path() : String();
-    }
-
-    String lastPathComponent() const
-    {
-        parseURLIfNecessary();
-        return m_parsedURL->isValid() ? m_parsedURL->lastPathComponent() : String();
-    }
-
 private:
     WebURL(const String& string)
         : m_string(string)
index 344a37c..1ef02ba 100644 (file)
 
 namespace WebKit {
 
-NativeWebKeyboardEvent::NativeWebKeyboardEvent(const Evas_Event_Key_Down* event, bool isFiltered)
+NativeWebKeyboardEvent::NativeWebKeyboardEvent(const Evas_Event_Key_Down* event)
     : WebKeyboardEvent(WebEventFactory::createWebKeyboardEvent(event))
     , m_nativeEvent(event)
-    , m_isFiltered(isFiltered)
 {
 }
 
 NativeWebKeyboardEvent::NativeWebKeyboardEvent(const Evas_Event_Key_Up* event)
     : WebKeyboardEvent(WebEventFactory::createWebKeyboardEvent(event))
     , m_nativeEvent(event)
-    , m_isFiltered(false)
 {
 }
 
index eec4ab3..45ceec7 100644 (file)
@@ -35,22 +35,16 @@ extern "C" {
 // IconDatabase Client.
 typedef void (*WKIconDatabaseDidChangeIconForPageURLCallback)(WKIconDatabaseRef iconDatabase, WKURLRef pageURL, const void* clientInfo);
 typedef void (*WKIconDatabaseDidRemoveAllIconsCallback)(WKIconDatabaseRef iconDatabase, const void* clientInfo);
-typedef void (*WKIconDatabaseIconDataReadyForPageURLCallback)(WKIconDatabaseRef iconDatabase, WKURLRef pageURL, const void* clientInfo);
 
 struct WKIconDatabaseClient {
     int                                                                 version;
     const void *                                                        clientInfo;
-
-    // Version 0
     WKIconDatabaseDidChangeIconForPageURLCallback                       didChangeIconForPageURL;
     WKIconDatabaseDidRemoveAllIconsCallback                             didRemoveAllIcons;
-
-    // Version 1
-    WKIconDatabaseIconDataReadyForPageURLCallback                       iconDataReadyForPageURL;
 };
 typedef struct WKIconDatabaseClient WKIconDatabaseClient;
 
-enum { kWKIconDatabaseClientCurrentVersion = 1 };
+enum { kWKIconDatabaseClientCurrentVersion = 0 };
 
 WK_EXPORT WKTypeID WKIconDatabaseGetTypeID();
 
index a03d189..03f6930 100755 (executable)
@@ -20,7 +20,6 @@
 #include "config.h"
 #include "WKView.h"
 
-#include "EwkViewImpl.h"
 #include "WKAPICast.h"
 #include "ewk_view_private.h"
 
@@ -33,7 +32,5 @@ WKViewRef WKViewCreate(Evas* canvas, WKContextRef contextRef, WKPageGroupRef pag
 
 WKPageRef WKViewGetPage(WKViewRef viewRef)
 {
-    EwkViewImpl* viewImpl = EwkViewImpl::fromEvasObject(toImpl(viewRef));
-
-    return viewImpl->wkPage();
+    return toAPI(ewk_view_page_get(toImpl(viewRef)));
 }
index 4dba139..1c9c001 100644 (file)
@@ -33,7 +33,7 @@
 extern "C" {
 #endif
 
-typedef void (*WKSoupRequestManagerDidReceiveURIRequestCallback)(WKSoupRequestManagerRef soupRequestManagerRef, WKURLRef urlRef, WKPageRef pageRef, uint64_t requestID, const void* clientInfo);
+typedef void (*WKSoupRequestManagerDidReceiveURIRequestCallback)(WKSoupRequestManagerRef soupRequestManagerRef, WKURLRef urlRef, uint64_t requestID, const void* clientInfo);
 typedef void (*WKSoupRequestManagerDidFailToLoadURIRequestCallback)(WKSoupRequestManagerRef soupRequestManagerRef, uint64_t requestID, const void* clientInfo);
 
 struct WKSoupRequestManagerClient {
diff --git a/Source/WebKit2/UIProcess/API/cpp/efl/WKEinaSharedString.cpp b/Source/WebKit2/UIProcess/API/cpp/efl/WKEinaSharedString.cpp
deleted file mode 100644 (file)
index d31bfd4..0000000
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * Copyright (C) 2012 Intel Corporation. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "WKEinaSharedString.h"
-
-#include <WebKit2/WKAPICast.h>
-#include <WebKit2/WKString.h>
-#include <WebKit2/WKURL.h>
-#include <wtf/text/CString.h>
-
-using namespace WebKit;
-
-template <typename WKRefType>
-ALWAYS_INLINE const char* fromRefType(WKRefType strRef, bool adopt = false)
-{
-    const char* res = 0;
-    if (strRef) {
-        res = eina_stringshare_add(toImpl(strRef)->string().utf8().data());
-        ASSERT(res);
-        if (adopt)
-            WKRelease(strRef);
-    }
-
-    return res;
-}
-
-WKEinaSharedString::WKEinaSharedString(const WKEinaSharedString& other)
-    : m_string(eina_stringshare_ref(other.m_string))
-{
-}
-
-WKEinaSharedString::WKEinaSharedString(const char* str)
-    : m_string(eina_stringshare_add(str))
-{
-}
-
-WKEinaSharedString::WKEinaSharedString(WKAdoptTag adoptTag, WKStringRef stringRef)
-    : m_string(fromRefType(stringRef, /*adopt*/ true))
-{
-    ASSERT(adoptTag == AdoptWK); // Guard for future enum changes.
-}
-
-WKEinaSharedString::WKEinaSharedString(WKStringRef stringRef)
-    : m_string(fromRefType(stringRef))
-{
-}
-
-WKEinaSharedString::WKEinaSharedString(WKAdoptTag adoptTag, WKURLRef urlRef)
-    : m_string(fromRefType(urlRef, /*adopt*/ true))
-{
-    ASSERT(adoptTag == AdoptWK); // Guard for future enum changes.
-}
-
-WKEinaSharedString::WKEinaSharedString(WKURLRef urlRef)
-    : m_string(fromRefType(urlRef))
-{
-}
-
-WKEinaSharedString::~WKEinaSharedString()
-{
-    if (m_string)
-        eina_stringshare_del(m_string);
-}
-
-WKEinaSharedString& WKEinaSharedString::operator=(const WKEinaSharedString& other)
-{
-    if (this != &other) {
-        if (m_string)
-            eina_stringshare_del(m_string);
-        m_string = eina_stringshare_ref(other.m_string);
-    }
-    return *this;
-}
-
-WKEinaSharedString& WKEinaSharedString::operator=(const char* str)
-{
-    eina_stringshare_replace(&m_string, str);
-    return *this;
-}
-
-bool WKEinaSharedString::operator==(const char* str) const
-{
-    return (!str || !m_string) ? (str == m_string) : !strcmp(m_string, str);
-}
-
-WKEinaSharedString WKEinaSharedString::adopt(Eina_Stringshare* string)
-{
-    WKEinaSharedString sharedString;
-    sharedString.m_string = static_cast<const char*>(string);
-    return sharedString;
-}
diff --git a/Source/WebKit2/UIProcess/API/cpp/efl/WKEinaSharedString.h b/Source/WebKit2/UIProcess/API/cpp/efl/WKEinaSharedString.h
deleted file mode 100644 (file)
index 52cfffa..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Copyright (C) 2012 Intel Corporation. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef WKEinaSharedString_h
-#define WKEinaSharedString_h
-
-#include <Eina.h>
-#include <WebKit2/WKBase.h>
-#include <WebKit2/WKRetainPtr.h>
-
-namespace WebKit {
-
-class WK_EXPORT WKEinaSharedString {
-public:
-    ALWAYS_INLINE WKEinaSharedString() : m_string(0) { }
-    WKEinaSharedString(const WKEinaSharedString& other);
-    WKEinaSharedString(const char* str);
-
-    WKEinaSharedString(WKAdoptTag, WKStringRef);
-    WKEinaSharedString(WKStringRef);
-
-    WKEinaSharedString(WKAdoptTag, WKURLRef);
-    WKEinaSharedString(WKURLRef);
-
-    ~WKEinaSharedString();
-
-    WKEinaSharedString& operator=(const WKEinaSharedString& other);
-    WKEinaSharedString& operator=(const char* str);
-
-    ALWAYS_INLINE bool operator==(const WKEinaSharedString& other) const { return this->m_string == other.m_string; }
-    ALWAYS_INLINE bool operator!=(const WKEinaSharedString& other) const { return !(*this == other); }
-
-    bool operator==(const char* str) const;
-    ALWAYS_INLINE bool operator!=(const char* str) const { return !(*this == str); }
-
-    ALWAYS_INLINE operator const char* () const { return m_string; }
-
-    ALWAYS_INLINE bool isNull() const { return !m_string; }
-
-    ALWAYS_INLINE size_t length() const { return m_string ? static_cast<size_t>(eina_stringshare_strlen(m_string)) : 0; }
-
-    static WKEinaSharedString adopt(Eina_Stringshare*);
-
-private:
-    const char* m_string;
-};
-
-} // namespace WebKit
-
-using WebKit::WKEinaSharedString;
-
-#endif // WKEinaSharedString_h
index efc55fc..7b9dc89 100755 (executable)
 #define EWebKit2_h
 
 #include "ewk_auth_challenge.h"
-#include "ewk_back_forward_list.h"
-#include "ewk_back_forward_list_item.h"
 #include "ewk_certificate.h"
 #include "ewk_context.h"
 #include "ewk_cookie_manager.h"
 #include "ewk_download_job.h"
-#include "ewk_error.h"
-#include "ewk_favicon_database.h"
 #include "ewk_form_submission_request.h"
 #include "ewk_intent.h"
 #include "ewk_intent_service.h"
 #include "ewk_main.h"
-#include "ewk_navigation_data.h"
 #include "ewk_navigation_policy_decision.h"
-#include "ewk_popup_menu_item.h"
-#include "ewk_resource.h"
-#include "ewk_settings.h"
 #include "ewk_touch.h"
 #include "ewk_url_request.h"
 #include "ewk_url_response.h"
 #include "ewk_url_scheme_request.h"
 #include "ewk_view.h"
+#include "ewk_web_error.h"
+#include "ewk_web_resource.h"
 
 #include "ewk_context_menu.h"
 #include "ewk_custom_handlers.h"
 #include "ewk_enums.h"
+#include "ewk_error.h"
 #include "ewk_form_data.h"
 #include "ewk_frame.h"
 #include "ewk_history.h"
old mode 100755 (executable)
new mode 100644 (file)
index 0d91285..45f8742
 #include "config.h"
 #include "EwkViewImpl.h"
 
-#include "EflScreenUtilities.h"
-#include "FindClientEfl.h"
-#include "FormClientEfl.h"
-#include "InputMethodContextEfl.h"
-#include "PageClientImpl.h"
-#include "PageLoadClientEfl.h"
-#include "PagePolicyClientEfl.h"
-#include "PageUIClientEfl.h"
-#if ENABLE(WAIT_UPVERSION)
-#include "PageViewportController.h"
-#include "PageViewportControllerClientEfl.h"
-#endif
-#include "ResourceLoadClientEfl.h"
-#include "WKColorPickerResultListener.h"
-#include "WKString.h"
-#include "WebPageProxy.h"
-#include "WebPopupMenuProxyEfl.h"
-#include "ewk_back_forward_list_private.h"
 #include "ewk_context_private.h"
-#include "ewk_favicon_database_private.h"
-#include "ewk_popup_menu_item_private.h"
-#include "ewk_private.h"
-#include "ewk_settings_private.h"
-#include "ewk_view.h"
-#include "ewk_view_private.h"
-#include <Ecore_Evas.h>
-#include <Edje.h>
-#include <WebCore/Cursor.h>
-
-#if OS(TIZEN)
-#if ENABLE(TIZEN_GEOLOCATION)
-#include "ewk_geolocation_private.h"
-#endif
-#if ENABLE(TIZEN_MEDIA_STREAM)
-#include "ewk_user_media_private.h"
-#endif
-#if ENABLE(TIZEN_NOTIFICATIONS)
-#include "ewk_notification_private.h"
-#endif
-#if ENABLE(TIZEN_WEBKIT2_CREATE_VIEW_WITH_CREATED_PAGE_GROUP_WITH_IDENTIFIER)
-#include "WebPageGroup.h"
-#endif
-#if ENABLE(TIZEN_SUPPORT_WEBAPP_META_TAG)
-#include "ewk_web_application_icon_data_private.h"
-#endif
-#endif
 
-using namespace WebCore;
 using namespace WebKit;
 
-static const int defaultCursorSize = 16;
-
-EwkViewImpl::PageViewMap EwkViewImpl::pageViewMap;
-
-void EwkViewImpl::addToPageViewMap(const Evas_Object* ewkView)
-{
-    EwkViewImpl* viewImpl = EwkViewImpl::fromEvasObject(ewkView);
-
-    PageViewMap::AddResult result = pageViewMap.add(viewImpl->wkPage(), ewkView);
-    ASSERT_UNUSED(result, result.isNewEntry);
-}
-
-void EwkViewImpl::removeFromPageViewMap(const Evas_Object* ewkView)
-{
-    EwkViewImpl* viewImpl = EwkViewImpl::fromEvasObject(ewkView);
-
-    ASSERT(pageViewMap.contains(viewImpl->wkPage()));
-    pageViewMap.remove(viewImpl->wkPage());
-}
-
-const Evas_Object* EwkViewImpl::viewFromPageViewMap(const WKPageRef page)
-{
-    ASSERT(page);
-
-    return pageViewMap.get(page);
-}
-
-#if ENABLE(TIZEN_WEBKIT2_CREATE_VIEW_WITH_CREATED_PAGE_GROUP_WITH_IDENTIFIER)
-static uint64_t generatePageGroupIdentifierID()
-{
-    static uint64_t uniquePageGroupIdentifierID = 1;
-    return uniquePageGroupIdentifierID++;
-}
-#endif
-
 EwkViewImpl::EwkViewImpl(Evas_Object* view)
-    : popupMenuProxy(0)
-    , popupMenuItems(0)
-#if USE(ACCELERATED_COMPOSITING)
-    , evasGl(0)
-    , evasGlContext(0)
-    , evasGlSurface(0)
-#endif
-#if OS(TIZEN)
-#if ENABLE(TIZEN_ORIENTATION_EVENTS)
-    , orientation(0)
-#endif
-    , javascriptGlobalContext(0)
-#if ENABLE(TIZEN_SUPPORT_WEBAPP_META_TAG)
-    , webAppIconURLs(0)
-#endif
-    , isWaitingForJavaScriptPopupReply(false)
-    , authChallenge(0)
-    , policyDecision(0)
-    , openPanelListener(0)
-#if ENABLE(TIZEN_CERTIFICATE_HANDLING)
-    , certificatePolicyDecision(0)
-#endif
-#if ENABLE(TIZEN_MEDIA_STREAM)
-    , userMediaPermissionRequests(0)
-#endif
-#if ENABLE(TIZEN_GEOLOCATION)
-    , geolocation(0)
-    , geolocationPermissionRequests(0)
-#endif
-    , suspendRequested(false)
-    , suspendedPainting(false)
-    , suspendedResources(false)
-#if ENABLE(TIZEN_NOTIFICATIONS)
-    , notifications(0)
-    , notificationPermissionRequests(0)
-#endif
-#if ENABLE(TIZEN_SQL_DATABASE)
-    , exceededDatabaseQuota(0)
-#endif
-#if ENABLE(TIZEN_WEBKIT2_POPUP_INTERNAL)
-    , popupPicker(0)
-#endif
-    , isVerticalEdge(false)
-    , isHorizontalEdge(false)
-#if ENABLE(TIZEN_GESTURE)
-#if ENABLE(TOUCH_EVENTS)
-    , exceedTouchMoveThreshold(false)
-    , wasHandledTouchStart(false)
-    , wasHandledTouchMove(false)
-#endif
-    , holdHorizontalPanning(false)
-    , holdVerticalPanning(false)
-#endif // #if ENABLE(TIZEN_GESTURE)
-#if ENABLE(TIZEN_RUNTIME_BACKEND_SELECTION)
-    , compositionAnimator(0)
-#endif
-#if ENABLE(TIZEN_DATALIST_ELEMENT)
-    , dataList(0)
-#endif
-#endif // #if OS(TIZEN)
-    , m_view(view)
-    , m_settings(Ewk_Settings::create(this))
-    , m_mouseEventsEnabled(false)
-#if ENABLE(TOUCH_EVENTS)
-    , m_touchEventsEnabled(false)
-#endif
-    , m_displayTimer(this, &EwkViewImpl::displayTimerFired)
-    , m_inputMethodContext(InputMethodContextEfl::create(this, smartData()->base.evas))
-#if OS(TIZEN)
+    : m_view(view)
 #if USE(TILED_BACKING_STORE)
     , m_scaleFactor(1)
 #endif
-#endif // #if OS(TIZEN)
 {
-    ASSERT(view);
-
-    // Enable mouse events by default
-    setMouseEventsEnabled(true);
-
-#if OS(TIZEN)
-    javascriptPopup = adoptPtr<JavaScriptPopup>(new JavaScriptPopup(m_view));
-    openPanel = adoptPtr<OpenPanel>(new OpenPanel(m_view));
-
-#if ENABLE(TIZEN_INPUT_TAG_EXTENSION)
-    inputPicker = adoptPtr<InputPicker>(new InputPicker(m_view));
-#endif
-
-#if ENABLE(TIZEN_GESTURE)
-#if ENABLE(TOUCH_EVENTS)
-    touchDownPoint.x = 0;
-    touchDownPoint.y = 0;
-#endif
-#endif
-
-#if ENABLE(TIZEN_GESTURE)
-    gestureRecognizer = GestureRecognizer::create(m_view);
-    gestureClient = GestureClient::create(this);
-#endif
-
-#if ENABLE(TIZEN_WEBKIT2_TILED_SCROLLBAR)
-    const char* hideScrollbar = getenv("TIZEN_WEBKIT2_TILED_SCROLLBAR_HIDE");
-    if (hideScrollbar && atoi(hideScrollbar) == 1)
-        mainFrameScrollbarVisibility = false;
-    else
-        mainFrameScrollbarVisibility = true;
-#endif
-
-#if ENABLE(TIZEN_SCREEN_ORIENTATION_SUPPORT_INTERNAL)
-    orientationLock.callback = 0;
-    orientationLock.data = 0;
-#endif
-
-#if ENABLE(TIZEN_WEBKIT2_CREATE_VIEW_WITH_CREATED_PAGE_GROUP_WITH_IDENTIFIER)
-    String pageGroupIdentifierID = String::number(generatePageGroupIdentifierID());
-    String pageGroupIdentifier = String::format("PageGroup%s", pageGroupIdentifierID.utf8().data());
-
-    WKRetainPtr<WKStringRef> pageGroupIdentifierRef(AdoptWK, WKStringCreateWithUTF8CString(pageGroupIdentifier.utf8().data()));
-    pageGroup = WebPageGroup::create(toWTFString(pageGroupIdentifierRef.get()));
-#endif
-#endif // #if OS(TIZEN)
 }
 
 EwkViewImpl::~EwkViewImpl()
 {
-    void* item;
-    EINA_LIST_FREE(popupMenuItems, item)
-        delete static_cast<Ewk_Popup_Menu_Item*>(item);
-
-#if OS(TIZEN)
-    if (javascriptGlobalContext)
-        JSGlobalContextRelease(javascriptGlobalContext);
-
-#if ENABLE(TIZEN_SUPPORT_WEBAPP_META_TAG)
-    if (webAppIconURLs) {
-        void* data = 0;
-        EINA_LIST_FREE(webAppIconURLs, data)
-            ewkWebAppIconDataDelete(static_cast<Ewk_Web_App_Icon_Data*>(data));
-    }
-#endif
-
-    if (authChallenge)
-        ewkAuthChallengeDelete(authChallenge);
-    if (policyDecision)
-        ewkPolicyDecisionDelete(policyDecision);
-
-#if ENABLE(TIZEN_CERTIFICATE_HANDLING)
-    if (certificatePolicyDecision)
-        ewkCertificatePolicyDecisionDelete(certificatePolicyDecision);
-#endif
-
-#if ENABLE(TIZEN_MEDIA_STREAM)
-    if (userMediaPermissionRequests)
-        ewkUserMediaDeletePermissionRequestList(userMediaPermissionRequests);
-#endif
-
-#if ENABLE(TIZEN_DATALIST_ELEMENT)
-    deleteDataList();
-#endif
-
-#if ENABLE(TIZEN_GEOLOCATION)
-    if (geolocation)
-        ewkGeolocationDeleteGeolocation(geolocation);
-    if (geolocationPermissionRequests)
-        ewkGeolocationDeletePermissionRequestList(geolocationPermissionRequests);
-#endif
-
-#if ENABLE(TIZEN_NOTIFICATIONS)
-    if (notifications)
-        ewkNotificationDeleteNotificationList(notifications);
-    if (notificationPermissionRequests)
-        ewkNotificationDeletePermissionRequestList(notificationPermissionRequests);
-#endif
-
-#if ENABLE(TIZEN_SQL_DATABASE)
-    if (exceededDatabaseQuota)
-        ewkContextDeleteExceededQuota(exceededDatabaseQuota);
-#endif
-
-#if ENABLE(TIZEN_RUNTIME_BACKEND_SELECTION)
-    if (compositionAnimator)
-        ecore_animator_del(compositionAnimator);
-#endif
-#endif // #if OS(TIZEN)
 }
 
 Ewk_View_Smart_Data* EwkViewImpl::smartData() const
@@ -302,1002 +47,14 @@ EwkViewImpl* EwkViewImpl::fromEvasObject(const Evas_Object* view)
     ASSERT(view);
     Ewk_View_Smart_Data* sd = static_cast<Ewk_View_Smart_Data*>(evas_object_smart_data_get(view));
     ASSERT(sd);
-    ASSERT(sd->priv);
-    return sd->priv;
-}
-
-/**
- * @internal
- * Retrieves the internal WKPage for this view.
- */
-WKPageRef EwkViewImpl::wkPage()
-{
-    return toAPI(pageProxy.get());
+    // FIXME: We have both Ewk_View_Private_Data and EwkViewImpl unlike webkit opensource,
+    // so we have to return ewkViewImpl here.
+    //ASSERT(sd->priv);
+    //return sd->priv;
+    ASSERT(sd->ewkViewImpl);
+    return sd->ewkViewImpl;
 }
 
-void EwkViewImpl::setCursor(const Cursor& cursor)
-{
-    Ewk_View_Smart_Data* sd = smartData();
-
-    const char* group = cursor.platformCursor();
-    if (!group || group == m_cursorGroup)
-        return;
-
-    m_cursorGroup = group;
-    m_cursorObject = adoptRef(edje_object_add(sd->base.evas));
-
-    Ecore_Evas* ecoreEvas = ecore_evas_ecore_evas_get(sd->base.evas);
-    if (!m_theme || !edje_object_file_set(m_cursorObject.get(), m_theme, group)) {
-        m_cursorObject.clear();
-
-        ecore_evas_object_cursor_set(ecoreEvas, 0, 0, 0, 0);
-#ifdef HAVE_ECORE_X
-        if (WebCore::isUsingEcoreX(sd->base.evas))
-            WebCore::applyFallbackCursor(ecoreEvas, group);
-#endif
-        return;
-    }
-
-    Evas_Coord width, height;
-    edje_object_size_min_get(m_cursorObject.get(), &width, &height);
-    if (width <= 0 || height <= 0)
-        edje_object_size_min_calc(m_cursorObject.get(), &width, &height);
-    if (width <= 0 || height <= 0) {
-        width = defaultCursorSize;
-        height = defaultCursorSize;
-    }
-    evas_object_resize(m_cursorObject.get(), width, height);
-
-    const char* data;
-    int hotspotX = 0;
-    data = edje_object_data_get(m_cursorObject.get(), "hot.x");
-    if (data)
-        hotspotX = atoi(data);
-
-    int hotspotY = 0;
-    data = edje_object_data_get(m_cursorObject.get(), "hot.y");
-    if (data)
-        hotspotY = atoi(data);
-
-    ecore_evas_object_cursor_set(ecoreEvas, m_cursorObject.get(), EVAS_LAYER_MAX, hotspotX, hotspotY);
-}
-
-void EwkViewImpl::displayTimerFired(WebCore::Timer<EwkViewImpl>*)
-{
-    Ewk_View_Smart_Data* sd = smartData();
-
-    if (!sd->image)
-        return;
-
-#if USE(COORDINATED_GRAPHICS)
-    EWK_VIEW_IMPL_GET_OR_RETURN(sd, viewImpl);
-#endif
-
-    Region dirtyRegion;
-    for (Vector<IntRect>::iterator it = m_dirtyRects.begin(); it != m_dirtyRects.end(); ++it)
-        dirtyRegion.unite(*it);
-
-    m_dirtyRects.clear();
-
-    Vector<IntRect> rects = dirtyRegion.rects();
-    Vector<IntRect>::iterator end = rects.end();
-
-    for (Vector<IntRect>::iterator it = rects.begin(); it != end; ++it) {
-        IntRect rect = *it;
-#if USE(COORDINATED_GRAPHICS)
-        evas_gl_make_current(viewImpl->evasGl, viewImpl->evasGlSurface, viewImpl->evasGlContext);
-        viewImpl->pageViewportControllerClient->display(rect, IntPoint(sd->view.x, sd->view.y));
-#endif
-
-        evas_object_image_data_update_add(sd->image, rect.x(), rect.y(), rect.width(), rect.height());
-    }
-}
-
-void EwkViewImpl::redrawRegion(const IntRect& rect)
-{
-    if (!m_displayTimer.isActive())
-        m_displayTimer.startOneShot(0);
-    m_dirtyRects.append(rect);
-}
-
-/**
- * @internal
- * A download for that view was cancelled.
- *
- * Emits signal: "download,cancelled" with pointer to a Ewk_Download_Job.
- */
-void EwkViewImpl::informDownloadJobCancelled(Ewk_Download_Job* download)
-{
-    evas_object_smart_callback_call(m_view, "download,cancelled", download);
-}
-
-/**
- * @internal
- * A download for that view has failed.
- *
- * Emits signal: "download,failed" with pointer to a Ewk_Download_Job_Error.
- */
-void EwkViewImpl::informDownloadJobFailed(Ewk_Download_Job* download, Ewk_Error* error)
-{
-    Ewk_Download_Job_Error downloadError = { download, error };
-    evas_object_smart_callback_call(m_view, "download,failed", &downloadError);
-}
-
-/**
- * @internal
- * A download for that view finished successfully.
- *
- * Emits signal: "download,finished" with pointer to a Ewk_Download_Job.
- */
-void EwkViewImpl::informDownloadJobFinished(Ewk_Download_Job* download)
-{
-    evas_object_smart_callback_call(m_view, "download,finished", download);
-}
-
-/**
- * @internal
- * A new download has been requested for that view.
- *
- * Emits signal: "download,request" with pointer to a Ewk_Download_Job.
- */
-void EwkViewImpl::informDownloadJobRequested(Ewk_Download_Job* download)
-{
-    evas_object_smart_callback_call(m_view, "download,request", download);
-}
-
-/**
- * @internal
- * informs that a form request is about to be submitted.
- *
- * Emits signal: "form,submission,request" with pointer to Ewk_Form_Submission_Request.
- */
-void EwkViewImpl::informNewFormSubmissionRequest(Ewk_Form_Submission_Request* request)
-{
-    evas_object_smart_callback_call(m_view, "form,submission,request", request);
-}
-
-#if ENABLE(FULLSCREEN_API)
-/**
- * @internal
- * Calls fullscreen_enter callback or falls back to default behavior and enables fullscreen mode.
- */
-void EwkViewImpl::enterFullScreen()
-{
-    Ewk_View_Smart_Data* sd = smartData();
-
-    if (!sd->api->fullscreen_enter || !sd->api->fullscreen_enter(sd)) {
-        Ecore_Evas* ecoreEvas = ecore_evas_ecore_evas_get(sd->base.evas);
-        ecore_evas_fullscreen_set(ecoreEvas, true);
-    }
-
-#if OS(TIZEN)
-    ewk_view_main_frame_scrollbar_visible_set(m_view, false);
-    evas_object_smart_callback_call(m_view, "fullscreen,enterfullscreen", 0);
-#endif
-}
-
-/**
- * @internal
- * Calls fullscreen_exit callback or falls back to default behavior and disables fullscreen mode.
- */
-void EwkViewImpl::exitFullScreen()
-{
-    Ewk_View_Smart_Data* sd = smartData();
-
-    if (!sd->api->fullscreen_exit || !sd->api->fullscreen_exit(sd)) {
-        Ecore_Evas* ecoreEvas = ecore_evas_ecore_evas_get(sd->base.evas);
-        ecore_evas_fullscreen_set(ecoreEvas, false);
-    }
-
-#if OS(TIZEN)
-    ewk_view_main_frame_scrollbar_visible_set(m_view, true);
-    evas_object_smart_callback_call(m_view, "fullscreen,exitfullscreen", 0);
-#endif
-}
-#endif
-
-void EwkViewImpl::setImageData(void* imageData, const IntSize& size)
-{
-    Ewk_View_Smart_Data* sd = smartData();
-    if (!imageData || !sd->image)
-        return;
-
-    evas_object_resize(sd->image, size.width(), size.height());
-    evas_object_image_size_set(sd->image, size.width(), size.height());
-    evas_object_image_data_copy_set(sd->image, imageData);
-}
-
-#if ENABLE(INPUT_TYPE_COLOR)
-bool EwkViewImpl::setColorPickerColor(const WebCore::Color& color)
-{
-    if (!m_colorPickerResultListener)
-        return false;
-
-    WKRetainPtr<WKStringRef> colorString(AdoptWK, WKStringCreateWithUTF8CString(color.serialized().utf8().data()));
-    WKColorPickerResultListenerSetColor(m_colorPickerResultListener.get(), colorString.get());
-    m_colorPickerResultListener.clear();
-
-    return true;
-}
-#endif
-
-/**
- * @internal
- * informs load failed with error information.
- *
- * Emits signal: "load,error" with pointer to Ewk_Error.
- */
-void EwkViewImpl::informLoadError(Ewk_Error* error)
-{
-    evas_object_smart_callback_call(m_view, "load,error", error);
-}
-
-/**
- * @internal
- * informs load finished.
- *
- * Emits signal: "load,finished".
- */
-void EwkViewImpl::informLoadFinished()
-{
-    informURLChange();
-    evas_object_smart_callback_call(m_view, "load,finished", 0);
-
-#if OS(TIZEN)
-#if ENABLE(TIZEN_CSS_OVERFLOW_SCROLL_ACCELERATION)
-    pageProxy->setLoadingFinished(true);
-#endif
-
-#if ENABLE(TIZEN_WEBKIT2_FORM_DATABASE)
-    ewk_view_form_password_data_fill(m_view);
-#endif
-
-    if (!suspendRequested)
-        return;
-
-    suspendRequested = false;
-
-    if (!suspendedPainting) {
-        pageProxy->suspendPainting();
-        suspendedPainting = true;
-    }
-    if (!suspendedResources) {
-        pageProxy->suspendJavaScriptAndResource();
-        suspendedResources = true;
-    }
-#endif
-}
-
-/**
- * @internal
- * informs load progress changed.
- *
- * Emits signal: "load,progress" with pointer to a double from 0.0 to 1.0.
- */
-void EwkViewImpl::informLoadProgress(double progress)
-{
-    evas_object_smart_callback_call(m_view, "load,progress", &progress);
-}
-
-/**
- * @internal
- * informs view provisional load failed with error information.
- *
- * Emits signal: "load,provisional,failed" with pointer to Ewk_Error.
- */
-void EwkViewImpl::informProvisionalLoadFailed(Ewk_Error* error)
-{
-    evas_object_smart_callback_call(m_view, "load,provisional,failed", error);
-}
-
-#if ENABLE(WAIT_UPVERSION)
-#if USE(TILED_BACKING_STORE)
-void EwkViewImpl::informLoadCommitted()
-{
-    pageViewportController->didCommitLoad();
-}
-#endif
-#endif
-
-/**
- * @internal
- * informs view received redirect for provisional load.
- *
- * Emits signal: "load,provisional,redirect".
- */
-void EwkViewImpl::informProvisionalLoadRedirect()
-{
-    informURLChange();
-    evas_object_smart_callback_call(m_view, "load,provisional,redirect", 0);
-}
-
-/**
- * @internal
- * informs view provisional load started.
- *
- * Emits signal: "load,provisional,started".
- */
-void EwkViewImpl::informProvisionalLoadStarted()
-{
-#if OS(TIZEN)
-    evas_object_smart_callback_call(m_view, "load,started", 0);
-#endif
-
-#if ENABLE(TIZEN_DRAG_SUPPORT)
-    if (pageClient->isDragMode())
-        pageClient->setDragMode(false);
-#endif
-
-#if ENABLE(TIZEN_CSS_OVERFLOW_SCROLL_ACCELERATION)
-    pageProxy->setLoadingFinished(false);
-#endif
-
-    informURLChange();
-    evas_object_smart_callback_call(m_view, "load,provisional,started", 0);
-}
-
-/**
- * @internal
- * informs that a navigation policy decision should be taken.
- *
- * Emits signal: "policy,decision,navigation".
- */
-void EwkViewImpl::informNavigationPolicyDecision(Ewk_Navigation_Policy_Decision* decision)
-{
-    evas_object_smart_callback_call(m_view, "policy,decision,navigation", decision);
-}
-
-/**
- * @internal
- * informs that a new window policy decision should be taken.
- *
- * Emits signal: "policy,decision,new,window".
- */
-void EwkViewImpl::informNewWindowPolicyDecision(Ewk_Navigation_Policy_Decision* decision)
-{
-    evas_object_smart_callback_call(m_view, "policy,decision,new,window", decision);
-}
-
-/**
- * @internal
- * Load was initiated for a resource in the view.
- *
- * Emits signal: "resource,request,new" with pointer to resource request.
- */
-void EwkViewImpl::informResourceLoadStarted(Ewk_Resource* resource, Ewk_Url_Request* request)
-{
-    Ewk_Resource_Request resourceRequest = {resource, request, 0};
-
-    evas_object_smart_callback_call(m_view, "resource,request,new", &resourceRequest);
-}
-
-/**
- * @internal
- * Received a response to a resource load request in the view.
- *
- * Emits signal: "resource,request,response" with pointer to resource response.
- */
-void EwkViewImpl::informResourceLoadResponse(Ewk_Resource* resource, Ewk_Url_Response* response)
-{
-    Ewk_Resource_Load_Response resourceLoadResponse = {resource, response};
-    evas_object_smart_callback_call(m_view, "resource,request,response", &resourceLoadResponse);
-}
-
-/**
- * @internal
- * Failed loading a resource in the view.
- *
- * Emits signal: "resource,request,finished" with pointer to the resource load error.
- */
-void EwkViewImpl::informResourceLoadFailed(Ewk_Resource* resource, Ewk_Error* error)
-{
-    Ewk_Resource_Load_Error resourceLoadError = {resource, error};
-    evas_object_smart_callback_call(m_view, "resource,request,failed", &resourceLoadError);
-}
-
-/**
- * @internal
- * Finished loading a resource in the view.
- *
- * Emits signal: "resource,request,finished" with pointer to the resource.
- */
-void EwkViewImpl::informResourceLoadFinished(Ewk_Resource* resource)
-{
-    evas_object_smart_callback_call(m_view, "resource,request,finished", resource);
-}
-
-/**
- * @internal
- * Request was sent for a resource in the view.
- *
- * Emits signal: "resource,request,sent" with pointer to resource request and possible redirect response.
- */
-void EwkViewImpl::informResourceRequestSent(Ewk_Resource* resource, Ewk_Url_Request* request, Ewk_Url_Response* redirectResponse)
-{
-    Ewk_Resource_Request resourceRequest = {resource, request, redirectResponse};
-    evas_object_smart_callback_call(m_view, "resource,request,sent", &resourceRequest);
-}
-
-/**
- * @internal
- * The view title was changed by the frame loader.
- *
- * Emits signal: "title,changed" with pointer to new title string.
- */
-void EwkViewImpl::informTitleChange(const String& title)
-{
-    evas_object_smart_callback_call(m_view, "title,changed", const_cast<char*>(title.utf8().data()));
-}
-
-/**
- * @internal
- */
-void EwkViewImpl::informTooltipTextChange(const String& text)
-{
-    if (text.isEmpty())
-        evas_object_smart_callback_call(m_view, "tooltip,text,unset", 0);
-    else
-        evas_object_smart_callback_call(m_view, "tooltip,text,set", const_cast<char*>(text.utf8().data()));
-
-}
-
-/**
- * @internal
- * informs that the requested text was found.
- *
- * Emits signal: "text,found" with the number of matches.
- */
-void EwkViewImpl::informTextFound(unsigned matchCount)
-{
-    evas_object_smart_callback_call(m_view, "text,found", &matchCount);
-}
-
-IntSize EwkViewImpl::size() const
-{
-    int width, height;
-    evas_object_geometry_get(m_view, 0, 0, &width, &height);
-    return IntSize(width, height);
-}
-
-bool EwkViewImpl::isFocused() const
-{
-    return evas_object_focus_get(m_view);
-}
-
-bool EwkViewImpl::isVisible() const
-{
-    return evas_object_visible_get(m_view);
-}
-
-const char* EwkViewImpl::title() const
-{
-    m_title = pageProxy->pageTitle().utf8().data();
-
-    return m_title;
-}
-
-/**
- * @internal
- * This function may return @c NULL.
- */
-InputMethodContextEfl* EwkViewImpl::inputMethodContext()
-{
-    return m_inputMethodContext.get();
-}
-
-const char* EwkViewImpl::themePath() const
-{
-    return m_theme;
-}
-
-void EwkViewImpl::setThemePath(const char* theme)
-{
-    if (m_theme != theme) {
-        m_theme = theme;
-        pageProxy->setThemePath(theme);
-    }
-}
-
-const char* EwkViewImpl::customTextEncodingName() const
-{
-    String customEncoding = pageProxy->customTextEncodingName();
-    if (customEncoding.isEmpty())
-        return 0;
-
-    m_customEncoding = customEncoding.utf8().data();
-
-    return m_customEncoding;
-}
-
-void EwkViewImpl::setCustomTextEncodingName(const char* encoding)
-{
-    m_customEncoding = encoding;
-    pageProxy->setCustomTextEncodingName(encoding ? encoding : String());
-}
-
-void EwkViewImpl::setMouseEventsEnabled(bool enabled)
-{
-    if (m_mouseEventsEnabled == enabled)
-        return;
-
-    m_mouseEventsEnabled = enabled;
-    if (enabled) {
-        Ewk_View_Smart_Data* sd = smartData();
-        evas_object_event_callback_add(m_view, EVAS_CALLBACK_MOUSE_DOWN, onMouseDown, sd);
-        evas_object_event_callback_add(m_view, EVAS_CALLBACK_MOUSE_UP, onMouseUp, sd);
-        evas_object_event_callback_add(m_view, EVAS_CALLBACK_MOUSE_MOVE, onMouseMove, sd);
-    } else {
-        evas_object_event_callback_del(m_view, EVAS_CALLBACK_MOUSE_DOWN, onMouseDown);
-        evas_object_event_callback_del(m_view, EVAS_CALLBACK_MOUSE_UP, onMouseUp);
-        evas_object_event_callback_del(m_view, EVAS_CALLBACK_MOUSE_MOVE, onMouseMove);
-    }
-}
-
-#if ENABLE(TOUCH_EVENTS)
-void EwkViewImpl::setTouchEventsEnabled(bool enabled)
-{
-    if (m_touchEventsEnabled == enabled)
-        return;
-
-    m_touchEventsEnabled = enabled;
-
-    if (enabled) {
-        // FIXME: We have to connect touch callbacks with mouse and multi events
-        // because the Evas creates mouse events for first touch and multi events
-        // for second and third touches. Below codes should be fixed when the Evas
-        // supports the touch events.
-        // See https://bugs.webkit.org/show_bug.cgi?id=97785 for details.
-        Ewk_View_Smart_Data* sd = smartData();
-        evas_object_event_callback_add(m_view, EVAS_CALLBACK_MOUSE_DOWN, onTouchDown, sd);
-        evas_object_event_callback_add(m_view, EVAS_CALLBACK_MOUSE_UP, onTouchUp, sd);
-        evas_object_event_callback_add(m_view, EVAS_CALLBACK_MOUSE_MOVE, onTouchMove, sd);
-        evas_object_event_callback_add(m_view, EVAS_CALLBACK_MULTI_DOWN, onTouchDown, sd);
-        evas_object_event_callback_add(m_view, EVAS_CALLBACK_MULTI_UP, onTouchUp, sd);
-        evas_object_event_callback_add(m_view, EVAS_CALLBACK_MULTI_MOVE, onTouchMove, sd);
-    } else {
-        evas_object_event_callback_del(m_view, EVAS_CALLBACK_MOUSE_DOWN, onTouchDown);
-        evas_object_event_callback_del(m_view, EVAS_CALLBACK_MOUSE_UP, onTouchUp);
-        evas_object_event_callback_del(m_view, EVAS_CALLBACK_MOUSE_MOVE, onTouchMove);
-        evas_object_event_callback_del(m_view, EVAS_CALLBACK_MULTI_DOWN, onTouchDown);
-        evas_object_event_callback_del(m_view, EVAS_CALLBACK_MULTI_UP, onTouchUp);
-        evas_object_event_callback_del(m_view, EVAS_CALLBACK_MULTI_MOVE, onTouchMove);
-    }
-}
-#endif
-
-/**
- * @internal
- * Update the view's favicon and emits a "icon,changed" signal if it has
- * changed.
- *
- * This function is called whenever the URL has changed or when the icon for
- * the current page URL has changed.
- */
-void EwkViewImpl::informIconChange()
-{
-    Ewk_Favicon_Database* iconDatabase = context->faviconDatabase();
-    ASSERT(iconDatabase);
-
-    m_faviconURL = ewk_favicon_database_icon_url_get(iconDatabase, m_url);
-    evas_object_smart_callback_call(m_view, "icon,changed", 0);
-}
-
-#if ENABLE(WEB_INTENTS)
-/**
- * @internal
- * The view received a new intent request.
- *
- * Emits signal: "intent,request,new" with pointer to a Ewk_Intent.
- */
-void EwkViewImpl::informIntentRequest(Ewk_Intent* ewkIntent)
-{
-    evas_object_smart_callback_call(m_view, "intent,request,new", ewkIntent);
-}
-#endif
-
-#if ENABLE(WEB_INTENTS_TAG)
-/**
- * @internal
- * The view received a new intent service registration.
- *
- * Emits signal: "intent,service,register" with pointer to a Ewk_Intent_Service.
- */
-void EwkViewImpl::informIntentServiceRegistration(Ewk_Intent_Service* ewkIntentService)
-{
-    evas_object_smart_callback_call(m_view, "intent,service,register", ewkIntentService);
-}
-#endif // ENABLE(WEB_INTENTS_TAG)
-
-#if USE(ACCELERATED_COMPOSITING)
-bool EwkViewImpl::createGLSurface(const IntSize& viewSize)
-{
-    Ewk_View_Smart_Data* sd = smartData();
-
-    Evas_GL_Config evasGlConfig = {
-        EVAS_GL_RGBA_8888,
-        EVAS_GL_DEPTH_BIT_8,
-        EVAS_GL_STENCIL_NONE,
-        EVAS_GL_OPTIONS_NONE,
-        EVAS_GL_MULTISAMPLE_NONE
-    };
-
-    ASSERT(!evasGlSurface);
-    evasGlSurface = evas_gl_surface_create(evasGl, &evasGlConfig, viewSize.width(), viewSize.height());
-    if (!evasGlSurface)
-        return false;
-
-    Evas_Native_Surface nativeSurface;
-    evas_gl_native_surface_get(evasGl, evasGlSurface, &nativeSurface);
-    evas_object_image_native_surface_set(sd->image, &nativeSurface);
-
-    return true;
-}
-
-bool EwkViewImpl::enterAcceleratedCompositingMode()
-{
-    if (evasGl) {
-        EINA_LOG_DOM_WARN(_ewk_log_dom, "Accelerated compositing mode already entered.");
-        return false;
-    }
-
-    Evas* evas = evas_object_evas_get(m_view);
-    evasGl = evas_gl_new(evas);
-    if (!evasGl)
-        return false;
-
-    evasGlContext = evas_gl_context_create(evasGl, 0);
-    if (!evasGlContext) {
-        evas_gl_free(evasGl);
-        evasGl = 0;
-        return false;
-    }
-
-    if (!createGLSurface(size())) {
-        evas_gl_context_destroy(evasGl, evasGlContext);
-        evasGlContext = 0;
-
-        evas_gl_free(evasGl);
-        evasGl = 0;
-        return false;
-    }
-
-#if ENABLE(WAIT_UPVERSION)
-    pageViewportControllerClient->setRendererActive(true);
-#endif
-    return true;
-}
-
-bool EwkViewImpl::exitAcceleratedCompositingMode()
-{
-    EINA_SAFETY_ON_NULL_RETURN_VAL(evasGl, false);
-
-    if (evasGlSurface) {
-        evas_gl_surface_destroy(evasGl, evasGlSurface);
-        evasGlSurface = 0;
-    }
-
-    if (evasGlContext) {
-        evas_gl_context_destroy(evasGl, evasGlContext);
-        evasGlContext = 0;
-    }
-
-    evas_gl_free(evasGl);
-    evasGl = 0;
-
-    return true;
-}
-#endif
-
-#if ENABLE(INPUT_TYPE_COLOR)
-/**
- * @internal
- * Requests to show external color picker.
- */
-void EwkViewImpl::requestColorPicker(int r, int g, int b, int a, WKColorPickerResultListenerRef listener)
-{
-    Ewk_View_Smart_Data* sd = smartData();
-    EINA_SAFETY_ON_NULL_RETURN(sd->api->input_picker_color_request);
-
-    m_colorPickerResultListener = listener;
-
-    sd->api->input_picker_color_request(sd, r, g, b, a);
-}
-
-/**
- * @internal
- * Requests to hide external color picker.
- */
-void EwkViewImpl::dismissColorPicker()
-{
-    Ewk_View_Smart_Data* sd = smartData();
-    EINA_SAFETY_ON_NULL_RETURN(sd->api->input_picker_color_dismiss);
-
-    m_colorPickerResultListener.clear();
-
-    sd->api->input_picker_color_dismiss(sd);
-}
-#endif
-
-/**
- * @internal
- * informs that the view's back / forward list has changed.
- *
- * Emits signal: "back,forward,list,changed".
- */
-void EwkViewImpl::informBackForwardListChange()
-{
-    evas_object_smart_callback_call(m_view, "back,forward,list,changed", 0);
-}
-
-/**
- * @internal
- * Web process has crashed.
- *
- * Emits signal: "webprocess,crashed" with pointer to crash handling boolean.
- */
-void EwkViewImpl::informWebProcessCrashed()
-{
-    bool handled = false;
-    evas_object_smart_callback_call(m_view, "webprocess,crashed", &handled);
-
-    if (!handled) {
-        CString url = pageProxy->urlAtProcessExit().utf8();
-        WARN("WARNING: The web process experienced a crash on '%s'.\n", url.data());
-
-        // Display an error page
-        ewk_view_html_string_load(m_view, "The web process has crashed.", 0, url.data());
-    }
-}
-
-void EwkViewImpl::informContentsSizeChange(const IntSize& size)
-{
-#if USE(COORDINATED_GRAPHICS)
-    pageViewportControllerClient->didChangeContentsSize(size);
-#else
-    UNUSED_PARAM(size);
-#endif
-}
-
-COMPILE_ASSERT_MATCHING_ENUM(EWK_TEXT_DIRECTION_RIGHT_TO_LEFT, RTL);
-COMPILE_ASSERT_MATCHING_ENUM(EWK_TEXT_DIRECTION_LEFT_TO_RIGHT, LTR);
-
-#if ENABLE(TIZEN_MULTIPLE_SELECT)
-void EwkViewImpl::requestPopupMenu(WebPopupMenuProxyEfl* popupMenu, const IntRect& rect, TextDirection textDirection, double pageScaleFactor, const Vector<WebPopupItem>& items, int32_t selectedIndex, bool multiple)
-#else
-void EwkViewImpl::requestPopupMenu(WebPopupMenuProxyEfl* popupMenu, const IntRect& rect, TextDirection textDirection, double pageScaleFactor, const Vector<WebPopupItem>& items, int32_t selectedIndex)
-#endif
-{
-    Ewk_View_Smart_Data* sd = smartData();
-    ASSERT(sd->api);
-
-    ASSERT(popupMenu);
-
-#if ENABLE(TIZEN_MULTIPLE_SELECT)
-    if (multiple ? !sd->api->multiple_popup_menu_show : !sd->api->popup_menu_show)
-#else
-    if (!sd->api->popup_menu_show)
-#endif
-        return;
-
-    if (popupMenuProxy)
-        ewk_view_popup_menu_close(m_view);
-    popupMenuProxy = popupMenu;
-
-    Eina_List* popupItems = 0;
-    const size_t size = items.size();
-    for (size_t i = 0; i < size; ++i)
-        popupItems = eina_list_append(popupItems, Ewk_Popup_Menu_Item::create(items[i]).leakPtr());
-    popupMenuItems = popupItems;
-
-#if ENABLE(TIZEN_WEBKIT2_POPUP_INTERNAL)
-#if ENABLE(TIZEN_MULTIPLE_SELECT)
-    if (multiple ? sd->api->multiple_popup_menu_show(sd, rect, static_cast<Ewk_Text_Direction>(textDirection), pageScaleFactor, popupMenuItems)
-        : sd->api->popup_menu_show(sd, rect, static_cast<Ewk_Text_Direction>(textDirection), pageScaleFactor, popupMenuItems, selectedIndex)) {
-#else
-    if (sd->api->popup_menu_show(sd, rect, static_cast<Ewk_Text_Direction>(textDirection), pageScaleFactor, popupMenuItems, selectedIndex)) {
-#endif
-        /* maps.google.com generate mouse event in touch down without preventDefault.
-         * So, popup menu is opend in touch down event and closed via fake mouse down
-         * which generated by endTap.
-         * In order to fix select of maps.google.com (based on touch behavior),
-         * We should disable touch events when select popup is open.
-         */
-
-#if ENABLE(TIZEN_GESTURE)
-        gestureClient->reset();
-#endif
-        ewk_view_touch_events_enabled_set(m_view, false);
-    }
-#else
-    sd->api->popup_menu_show(sd, rect, static_cast<Ewk_Text_Direction>(textDirection), pageScaleFactor, popupItems, selectedIndex);
-#endif
-}
-
-/**
- * @internal
- * Calls a smart member function for javascript alert().
- */
-void EwkViewImpl::requestJSAlertPopup(const WKEinaSharedString& message)
-{
-    Ewk_View_Smart_Data* sd = smartData();
-    ASSERT(sd->api);
-
-    if (!sd->api->run_javascript_alert)
-        return;
-
-    sd->api->run_javascript_alert(sd, message);
-}
-
-/**
- * @internal
- * Calls a smart member function for javascript confirm() and returns a value from the function. Returns false by default.
- */
-bool EwkViewImpl::requestJSConfirmPopup(const WKEinaSharedString& message)
-{
-    Ewk_View_Smart_Data* sd = smartData();
-    ASSERT(sd->api);
-
-    if (!sd->api->run_javascript_confirm)
-        return false;
-
-    return sd->api->run_javascript_confirm(sd, message);
-}
-
-/**
- * @internal
- * Calls a smart member function for javascript prompt() and returns a value from the function. Returns null string by default.
- */
-WKEinaSharedString EwkViewImpl::requestJSPromptPopup(const WKEinaSharedString& message, const WKEinaSharedString& defaultValue)
-{
-    Ewk_View_Smart_Data* sd = smartData();
-    ASSERT(sd->api);
-
-    if (!sd->api->run_javascript_prompt)
-        return WKEinaSharedString();
-
-    return WKEinaSharedString::adopt(sd->api->run_javascript_prompt(sd, message, defaultValue));
-}
-
-#if ENABLE(SQL_DATABASE)
-/**
- * @internal
- * Calls exceeded_database_quota callback or falls back to default behavior returns default database quota.
- */
-unsigned long long EwkViewImpl::informDatabaseQuotaReached(const String& databaseName, const String& displayName, unsigned long long currentQuota, unsigned long long currentOriginUsage, unsigned long long currentDatabaseUsage, unsigned long long expectedUsage)
-{
-    Ewk_View_Smart_Data* sd = smartData();
-    ASSERT(sd->api);
-
-    static const unsigned long long defaultQuota = 5 * 1024 * 1204; // 5 MB
-    if (sd->api->exceeded_database_quota)
-        return sd->api->exceeded_database_quota(sd, databaseName.utf8().data(), displayName.utf8().data(), currentQuota, currentOriginUsage, currentDatabaseUsage, expectedUsage);
-
-    return defaultQuota;
-}
-#endif
-
-/**
- * @internal
- * The url of view was changed by the frame loader.
- *
- * Emits signal: "url,changed" with pointer to new url string.
- */
-void EwkViewImpl::informURLChange()
-{
-    String activeURL = pageProxy->activeURL();
-    if (activeURL.isEmpty())
-        return;
-
-    CString rawActiveURL = activeURL.utf8();
-    if (m_url == rawActiveURL.data())
-        return;
-
-    m_url = rawActiveURL.data();
-    const char* callbackArgument = static_cast<const char*>(m_url);
-    evas_object_smart_callback_call(m_view, "url,changed", const_cast<char*>(callbackArgument));
-#if OS(TIZEN)
-    evas_object_smart_callback_call(m_view, "uri,changed", const_cast<char*>(callbackArgument));
-#endif
-
-    // Update the view's favicon.
-    informIconChange();
-}
-
-WKPageRef EwkViewImpl::createNewPage()
-{
-    Evas_Object* newEwkView = 0;
-    evas_object_smart_callback_call(m_view, "create,window", &newEwkView);
-
-    if (!newEwkView)
-        return 0;
-
-    EwkViewImpl* newViewImpl = EwkViewImpl::fromEvasObject(newEwkView);
-    ASSERT(newViewImpl);
-
-    return static_cast<WKPageRef>(WKRetain(newViewImpl->page()));
-}
-
-void EwkViewImpl::closePage()
-{
-    evas_object_smart_callback_call(m_view, "close,window", 0);
-}
-
-void EwkViewImpl::onMouseDown(void* data, Evas*, Evas_Object*, void* eventInfo)
-{
-    Evas_Event_Mouse_Down* downEvent = static_cast<Evas_Event_Mouse_Down*>(eventInfo);
-    Ewk_View_Smart_Data* sd = static_cast<Ewk_View_Smart_Data*>(data);
-    EINA_SAFETY_ON_NULL_RETURN(sd->api);
-    EINA_SAFETY_ON_NULL_RETURN(sd->api->mouse_down);
-    sd->api->mouse_down(sd, downEvent);
-}
-
-void EwkViewImpl::onMouseUp(void* data, Evas*, Evas_Object*, void* eventInfo)
-{
-    Evas_Event_Mouse_Up* upEvent = static_cast<Evas_Event_Mouse_Up*>(eventInfo);
-    Ewk_View_Smart_Data* sd = static_cast<Ewk_View_Smart_Data*>(data);
-    EINA_SAFETY_ON_NULL_RETURN(sd->api);
-    EINA_SAFETY_ON_NULL_RETURN(sd->api->mouse_up);
-    sd->api->mouse_up(sd, upEvent);
-}
-
-void EwkViewImpl::onMouseMove(void* data, Evas*, Evas_Object*, void* eventInfo)
-{
-    Evas_Event_Mouse_Move* moveEvent = static_cast<Evas_Event_Mouse_Move*>(eventInfo);
-    Ewk_View_Smart_Data* sd = static_cast<Ewk_View_Smart_Data*>(data);
-    EINA_SAFETY_ON_NULL_RETURN(sd->api);
-    EINA_SAFETY_ON_NULL_RETURN(sd->api->mouse_move);
-    sd->api->mouse_move(sd, moveEvent);
-}
-
-#if ENABLE(TOUCH_EVENTS)
-void EwkViewImpl::feedTouchEvents(Ewk_Touch_Event_Type type)
-{
-    Ewk_View_Smart_Data* sd = smartData();
-
-    unsigned count = evas_touch_point_list_count(sd->base.evas);
-    if (!count)
-        return;
-
-    Eina_List* points = 0;
-    for (unsigned i = 0; i < count; ++i) {
-        Ewk_Touch_Point* point = new Ewk_Touch_Point;
-        point->id = evas_touch_point_list_nth_id_get(sd->base.evas, i);
-        evas_touch_point_list_nth_xy_get(sd->base.evas, i, &point->x, &point->y);
-        point->state = evas_touch_point_list_nth_state_get(sd->base.evas, i);
-#if ENABLE(TOUCH_EVENTS) && ENABLE(TIZEN_GESTURE)
-        if (type == EWK_TOUCH_CANCEL)
-            point->state = EVAS_TOUCH_POINT_CANCEL;
-#endif
-        points = eina_list_append(points, point);
-    }
-
-    ewk_view_feed_touch_event(m_view, type, points, evas_key_modifier_get(sd->base.evas));
-
-    void* data;
-    EINA_LIST_FREE(points, data)
-        delete static_cast<Ewk_Touch_Point*>(data);
-}
-
-void EwkViewImpl::onTouchDown(void* /* data */, Evas* /* canvas */, Evas_Object* ewkView, void* /* eventInfo */)
-{
-    EwkViewImpl* viewImpl = EwkViewImpl::fromEvasObject(ewkView);
-    viewImpl->feedTouchEvents(EWK_TOUCH_START);
-}
-
-void EwkViewImpl::onTouchUp(void* /* data */, Evas* /* canvas */, Evas_Object* ewkView, void* /* eventInfo */)
-{
-    EwkViewImpl* viewImpl = EwkViewImpl::fromEvasObject(ewkView);
-    viewImpl->feedTouchEvents(EWK_TOUCH_END);
-}
-
-void EwkViewImpl::onTouchMove(void* /* data */, Evas* /* canvas */, Evas_Object* ewkView, void* /* eventInfo */)
-{
-    EwkViewImpl* viewImpl = EwkViewImpl::fromEvasObject(ewkView);
-    viewImpl->feedTouchEvents(EWK_TOUCH_MOVE);
-}
-#endif
-
-#if OS(TIZEN)
 #if ENABLE(TIZEN_WEBKIT2_TILED_BACKING_STORE)
 AffineTransform EwkViewImpl::transformFromView() const
 {
@@ -1364,36 +121,3 @@ AffineTransform EwkViewImpl::transformToScreen() const
 
     return transform;
 }
-
-#if ENABLE(TIZEN_WEBKIT2_SEPERATE_LOAD_PROGRESS)
-void EwkViewImpl::informLoadProgressStarted()
-{
-    evas_object_smart_callback_call(m_view, "load,progress,started", 0);
-}
-
-void EwkViewImpl::informLoadProgressFinished()
-{
-    evas_object_smart_callback_call(m_view, "load,progress,finished", 0);
-}
-#endif
-
-#if ENABLE(TIZEN_DATALIST_ELEMENT)
-void EwkViewImpl::deleteDataList()
-{
-    EINA_SAFETY_ON_NULL_RETURN(dataList);
-
-    void* item;
-    EINA_LIST_FREE(dataList, item)
-        eina_stringshare_del(static_cast<char*>(item));
-
-    dataList = 0;
-}
-#endif
-
-#if ENABLE(TOUCH_EVENTS) && ENABLE(TIZEN_GESTURE)
-void EwkViewImpl::feedCancelTouchEvents()
-{
-    feedTouchEvents(EWK_TOUCH_CANCEL);
-}
-#endif
-#endif //#if OS(TIZEN)
old mode 100755 (executable)
new mode 100644 (file)
index 52fa3da..ac8b3ca
 #ifndef EwkViewImpl_h
 #define EwkViewImpl_h
 
-#include "RefPtrEfl.h"
-#include "WKEinaSharedString.h"
-#include "WKRetainPtr.h"
 #include <Evas.h>
-#include <WebCore/TextDirection.h>
-#include <WebCore/Timer.h>
-#include <WebKit2/WKBase.h>
-#include <wtf/HashMap.h>
-#include <wtf/OwnPtr.h>
-#include <wtf/RefPtr.h>
-#include <wtf/text/WTFString.h>
-
-#if ENABLE(TOUCH_EVENTS)
-#include "ewk_touch.h"
-#endif
-
-#if USE(ACCELERATED_COMPOSITING)
-#include <Evas_GL.h>
-#endif
-
-#if OS(TIZEN)
-#include "JavaScriptPopup.h"
-#include "OpenPanel.h"
-#include "ewk_auth_challenge_private.h"
-#include <JavaScriptCore/JSRetainPtr.h>
 #include <WebCore/IntPoint.h>
 
-#if ENABLE(TIZEN_GESTURE)
-#include "GestureRecognizer.h"
-#include "GestureClient.h"
-#endif
-
-#if ENABLE(TIZEN_INPUT_TAG_EXTENSION)
-#include "InputPicker.h"
-#endif
-
-#if ENABLE(TIZEN_WEBKIT2_FOCUS_RING)
-#include "FocusRing.h"
-#endif
-
-#if ENABLE(TIZEN_WEBKIT2_POPUP_INTERNAL)
-#include "ewk_popup_picker.h"
-#endif
-#endif
-
-#define EWK_VIEW_IMPL_GET(smartData, impl)                                     \
-    EwkViewImpl* impl = smartData->priv
-
-#define EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, ...)                      \
-    if (!smartData) {                                                          \
-        EINA_LOG_CRIT("smart data is null");                                   \
-        return __VA_ARGS__;                                                    \
-    }                                                                          \
-    EWK_VIEW_IMPL_GET(smartData, impl);                                        \
-    do {                                                                       \
-        if (!impl) {                                                           \
-            EINA_LOG_CRIT("no private data for object %p (%s)",                \
-                smartData->self, evas_object_type_get(smartData->self));       \
-            return __VA_ARGS__;                                                \
-        }                                                                      \
-    } while (0)
-
-namespace WebKit {
-class FindClientEfl;
-class FormClientEfl;
-class InputMethodContextEfl;
-class PageClientImpl;
-class PageLoadClientEfl;
-class PagePolicyClientEfl;
-class PageUIClientEfl;
-class PageViewportControllerClientEfl;
-class PageViewportController;
-class ResourceLoadClientEfl;
-class WebPageProxy;
-class WebPopupItem;
-class WebPopupMenuProxyEfl;
-}
-
-namespace WebCore {
-class Color;
-class Cursor;
-class IntRect;
-class IntSize;
-}
-
-class Ewk_Back_Forward_List;
-class Ewk_Context;
-class Ewk_Download_Job;
-class Ewk_Error;
-class Ewk_Form_Submission_Request;
-class Ewk_Intent;
-class Ewk_Intent_Service;
-class Ewk_Navigation_Policy_Decision;
-class Ewk_Resource;
-class Ewk_Settings;
-class Ewk_Url_Request;
-class Ewk_Url_Response;
-
-typedef struct Ewk_View_Smart_Data Ewk_View_Smart_Data;
-
-#if OS(TIZEN)
 namespace WebCore {
 class AffineTransform;
 }
@@ -132,153 +34,16 @@ class AffineTransform;
 //typedef struct Ewk_View_Smart_Data Ewk_View_Smart_Data;
 #include "ewk_view.h"
 
-struct Ewk_View_Callback_Context {
-    union {
-        Ewk_Web_App_Capable_Get_Callback webAppCapableCallback;
-        Ewk_Web_App_Icon_URL_Get_Callback webAppIconURLCallback;
-        Ewk_Web_App_Icon_URLs_Get_Callback webAppIconURLsCallback;
-#if ENABLE(TIZEN_WEB_STORAGE) && ENABLE(TIZEN_WEBKIT2_NUMBER_TYPE_SUPPORT)
-        Ewk_Web_Storage_Quota_Get_Callback webStorageQuotaCallback;
-#endif
-        Ewk_View_Script_Execute_Callback scriptExecuteCallback;
-        Ewk_View_Plain_Text_Get_Callback plainTextGetCallback;
-#if ENABLE(TIZEN_SUPPORT_MHTML)
-        Ewk_View_MHTML_Data_Get_Callback mhtmlDataGetCallback;
-#endif
-        Ewk_View_JavaScript_Alert_Callback javascriptAlertCallback;
-        Ewk_View_JavaScript_Confirm_Callback javascriptConfirmCallback;
-        Ewk_View_JavaScript_Prompt_Callback javascriptPromptCallback;
-#if ENABLE(TIZEN_SUPPORT_BEFORE_UNLOAD_CONFIRM_PANEL)
-        Ewk_View_Before_Unload_Confirm_Panel_Callback beforeUnloadConfirmPanelCallback;
-#endif
-        Ewk_View_Open_Panel_Callback openPanelCallback;
-    };
-
-    Evas_Object* ewkView;
-    void* userData;
-};
-typedef struct Ewk_View_Callback_Context Ewk_View_Callback_Context;
-#endif
-
 class EwkViewImpl {
 public:
+
     explicit EwkViewImpl(Evas_Object* view);
     ~EwkViewImpl();
 
     static EwkViewImpl* fromEvasObject(const Evas_Object* view);
 
-    inline Evas_Object* view() { return m_view; }
-    WKPageRef wkPage();
-    inline WebKit::WebPageProxy* page() { return pageProxy.get(); }
-    Ewk_Context* ewkContext() { return context.get(); }
-    Ewk_Settings* settings() { return m_settings.get(); }
+    Evas_Object* view() { return m_view; }
 
-    WebCore::IntSize size() const;
-    bool isFocused() const;
-    bool isVisible() const;
-
-    const char* url() const { return m_url; }
-    const char* faviconURL() const { return m_faviconURL; }
-    const char* title() const;
-    WebKit::InputMethodContextEfl* inputMethodContext();
-
-    const char* themePath() const;
-    void setThemePath(const char* theme);
-    const char* customTextEncodingName() const;
-    void setCustomTextEncodingName(const char* encoding);
-
-    bool mouseEventsEnabled() const { return m_mouseEventsEnabled; }
-    void setMouseEventsEnabled(bool enabled);
-#if ENABLE(TOUCH_EVENTS)
-    bool touchEventsEnabled() const { return m_touchEventsEnabled; }
-    void setTouchEventsEnabled(bool enabled);
-#endif
-
-    void setCursor(const WebCore::Cursor& cursor);
-    void redrawRegion(const WebCore::IntRect& rect);
-    void setImageData(void* imageData, const WebCore::IntSize& size);
-
-#if ENABLE(INPUT_TYPE_COLOR)
-    bool setColorPickerColor(const WebCore::Color& color);
-#endif
-
-    static void addToPageViewMap(const Evas_Object* ewkView);
-    static void removeFromPageViewMap(const Evas_Object* ewkView);
-    static const Evas_Object* viewFromPageViewMap(const WKPageRef);
-
-#if ENABLE(FULLSCREEN_API)
-    void enterFullScreen();
-    void exitFullScreen();
-#endif
-
-#if USE(ACCELERATED_COMPOSITING)
-    bool createGLSurface(const WebCore::IntSize& viewSize);
-    bool enterAcceleratedCompositingMode();
-    bool exitAcceleratedCompositingMode();
-#endif
-
-#if ENABLE(INPUT_TYPE_COLOR)
-    void requestColorPicker(int r, int g, int b, int a, WKColorPickerResultListenerRef listener);
-    void dismissColorPicker();
-#endif
-
-    WKPageRef createNewPage();
-    void closePage();
-
-#if ENABLE(TIZEN_MULTIPLE_SELECT)
-    void requestPopupMenu(WebKit::WebPopupMenuProxyEfl*, const WebCore::IntRect&, WebCore::TextDirection, double pageScaleFactor, const Vector<WebKit::WebPopupItem>& items, int32_t selectedIndex, bool);
-#else
-    void requestPopupMenu(WebKit::WebPopupMenuProxyEfl*, const WebCore::IntRect&, WebCore::TextDirection, double pageScaleFactor, const Vector<WebKit::WebPopupItem>& items, int32_t selectedIndex);
-#endif
-    void updateTextInputState();
-
-    void requestJSAlertPopup(const WKEinaSharedString& message);
-    bool requestJSConfirmPopup(const WKEinaSharedString& message);
-    WKEinaSharedString requestJSPromptPopup(const WKEinaSharedString& message, const WKEinaSharedString& defaultValue);
-
-    void informDownloadJobCancelled(Ewk_Download_Job* download);
-    void informDownloadJobFailed(Ewk_Download_Job* download, Ewk_Error* error);
-    void informDownloadJobFinished(Ewk_Download_Job* download);
-    void informDownloadJobRequested(Ewk_Download_Job* download);
-
-    void informNewFormSubmissionRequest(Ewk_Form_Submission_Request* request);
-    void informLoadError(Ewk_Error* error);
-    void informLoadFinished();
-    void informLoadProgress(double progress);
-    void informProvisionalLoadFailed(Ewk_Error* error);
-#if USE(TILED_BACKING_STORE)
-    void informLoadCommitted();
-#endif
-    void informProvisionalLoadRedirect();
-    void informProvisionalLoadStarted();
-
-    void informResourceLoadStarted(Ewk_Resource* resource, Ewk_Url_Request* request);
-    void informResourceLoadResponse(Ewk_Resource* resource, Ewk_Url_Response* response);
-    void informResourceLoadFailed(Ewk_Resource* resource, Ewk_Error* error);
-    void informResourceLoadFinished(Ewk_Resource* resource);
-    void informResourceRequestSent(Ewk_Resource* resource, Ewk_Url_Request* request, Ewk_Url_Response* redirectResponse);
-
-    void informNavigationPolicyDecision(Ewk_Navigation_Policy_Decision* decision);
-    void informNewWindowPolicyDecision(Ewk_Navigation_Policy_Decision* decision);
-    void informBackForwardListChange();
-
-    void informTitleChange(const String& title);
-    void informTooltipTextChange(const String& text);
-    void informTextFound(unsigned matchCount);
-    void informIconChange();
-    void informWebProcessCrashed();
-    void informContentsSizeChange(const WebCore::IntSize& size);
-    unsigned long long informDatabaseQuotaReached(const String& databaseName, const String& displayName, unsigned long long currentQuota, unsigned long long currentOriginUsage, unsigned long long currentDatabaseUsage, unsigned long long expectedUsage);
-    void informURLChange();
-
-#if ENABLE(WEB_INTENTS)
-    void informIntentRequest(Ewk_Intent* ewkIntent);
-#endif
-#if ENABLE(WEB_INTENTS_TAG)
-    void informIntentServiceRegistration(Ewk_Intent_Service* ewkIntentService);
-#endif
-
-#if OS(TIZEN)
 #if ENABLE(TIZEN_WEBKIT2_TILED_BACKING_STORE)
     WebCore::AffineTransform transformFromView() const;
     WebCore::AffineTransform transformToView() const;
@@ -287,15 +52,6 @@ public:
     WebCore::AffineTransform transformFromScene() const;
     WebCore::AffineTransform transformToScreen() const;
 
-#if ENABLE(TIZEN_WEBKIT2_SEPERATE_LOAD_PROGRESS)
-    void informLoadProgressStarted();
-    void informLoadProgressFinished();
-#endif
-
-#if ENABLE(TIZEN_DATALIST_ELEMENT)
-    void deleteDataList();
-#endif
-
 #if USE(TILED_BACKING_STORE)
     void setScaleFactor(float scaleFactor) { m_scaleFactor = scaleFactor; }
     float scaleFactor() const { return m_scaleFactor; }
@@ -304,194 +60,14 @@ public:
     const WebCore::IntPoint scrollPosition() const { return m_scrollPosition; }
 #endif
 
-#if ENABLE(TOUCH_EVENTS) && ENABLE(TIZEN_GESTURE)
-    void feedCancelTouchEvents();
-#endif
-#endif
-
-    // FIXME: Make members private for encapsulation.
-    OwnPtr<WebKit::PageClientImpl> pageClient;
-#if ENABLE(WAIT_UPVERSION)
-#if USE(TILED_BACKING_STORE)
-    OwnPtr<WebKit::PageViewportControllerClientEfl> pageViewportControllerClient;
-    OwnPtr<WebKit::PageViewportController> pageViewportController;
-#endif
-#endif
-    RefPtr<WebKit::WebPageProxy> pageProxy;
-    OwnPtr<WebKit::PageLoadClientEfl> pageLoadClient;
-    OwnPtr<WebKit::PagePolicyClientEfl> pagePolicyClient;
-    OwnPtr<WebKit::PageUIClientEfl> pageUIClient;
-    OwnPtr<WebKit::ResourceLoadClientEfl> resourceLoadClient;
-    OwnPtr<WebKit::FindClientEfl> findClient;
-    OwnPtr<WebKit::FormClientEfl> formClient;
-
-    OwnPtr<Ewk_Back_Forward_List> backForwardList;
-    RefPtr<Ewk_Context> context;
-
-    WebKit::WebPopupMenuProxyEfl* popupMenuProxy;
-    Eina_List* popupMenuItems;
-
-#if USE(ACCELERATED_COMPOSITING)
-    Evas_GL* evasGl;
-    Evas_GL_Context* evasGlContext;
-    Evas_GL_Surface* evasGlSurface;
-#endif
-
-#if OS(TIZEN)
-#if ENABLE(TIZEN_ORIENTATION_EVENTS)
-    int orientation;
-#endif
-
-    JSGlobalContextRef javascriptGlobalContext;
-
-    WKEinaSharedString userAgent;
-
-#if ENABLE(TIZEN_SUPPORT_WEBAPP_META_TAG)
-    WKEinaSharedString webAppIconURL;
-    Eina_List* webAppIconURLs;
-#endif
-
-    OwnPtr<Ewk_View_Callback_Context> alertContext;
-    OwnPtr<Ewk_View_Callback_Context> confirmContext;
-    OwnPtr<Ewk_View_Callback_Context> promptContext;
-
-#if ENABLE(TIZEN_SUPPORT_BEFORE_UNLOAD_CONFIRM_PANEL)
-    OwnPtr<Ewk_View_Callback_Context> beforeUnloadConfirmPanelContext;
-#endif
-
-    OwnPtr<Ewk_View_Callback_Context> openpanelContext;
-    OwnPtr<WebKit::JavaScriptPopup> javascriptPopup;
-    bool isWaitingForJavaScriptPopupReply;
-    OwnPtr<WebKit::OpenPanel> openPanel;
-
-#if ENABLE(TIZEN_INPUT_TAG_EXTENSION)
-    OwnPtr<WebKit::InputPicker> inputPicker;
-    WKEinaSharedString inputValue;
-#endif
-
-    Ewk_Auth_Challenge* authChallenge;
-    Ewk_Policy_Decision* policyDecision;
-    WKOpenPanelResultListenerRef openPanelListener;
-
-#if ENABLE(TIZEN_CERTIFICATE_HANDLING)
-    Ewk_Certificate_Policy_Decision* certificatePolicyDecision;
-#endif
-
-#if ENABLE(TIZEN_MEDIA_STREAM)
-    Eina_List* userMediaPermissionRequests;
-#endif
-
-#if ENABLE(TIZEN_GEOLOCATION)
-    Ewk_Geolocation* geolocation;
-    Eina_List* geolocationPermissionRequests;
-#endif
-
-    bool suspendRequested;
-    bool suspendedPainting;
-    bool suspendedResources;
-
-#if ENABLE(TIZEN_NOTIFICATIONS)
-    Eina_List* notifications;
-    Eina_List* notificationPermissionRequests;
-#endif
-
-#if ENABLE(TIZEN_SQL_DATABASE)
-    Ewk_Context_Exceeded_Quota* exceededDatabaseQuota;
-#endif
-
-#if ENABLE(TIZEN_WEBKIT2_POPUP_INTERNAL)
-    Ewk_Popup_Picker* popupPicker;
-#endif
-
-    bool isVerticalEdge;
-    bool isHorizontalEdge;
-
-#if ENABLE(TIZEN_WEBKIT2_FOCUS_RING)
-    OwnPtr<FocusRing> focusRing;
-#endif
-
-#if ENABLE(TIZEN_GESTURE)
-    OwnPtr<WebKit::GestureRecognizer> gestureRecognizer;
-    OwnPtr<WebKit::GestureClient> gestureClient;
-#if ENABLE(TOUCH_EVENTS)
-    Evas_Coord_Point touchDownPoint;
-    bool exceedTouchMoveThreshold;
-    bool wasHandledTouchStart;
-    bool wasHandledTouchMove;
-#endif
-    bool holdHorizontalPanning;
-    bool holdVerticalPanning;
-#endif // #if ENABLE(TIZEN_GESTURE)
-
-#if ENABLE(TIZEN_WEBKIT2_TILED_SCROLLBAR)
-    bool mainFrameScrollbarVisibility;
-#endif
-
-#if ENABLE(TIZEN_RUNTIME_BACKEND_SELECTION)
-    Ecore_Animator* compositionAnimator;
-#endif
-
-#if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION)
-    WKEinaSharedString selectedText;
-#endif
-
-#if ENABLE(TIZEN_DATALIST_ELEMENT)
-    Eina_List* dataList;
-#endif
-
-#if ENABLE(TIZEN_SCREEN_ORIENTATION_SUPPORT_INTERNAL)
-    struct {
-        Ewk_Orientation_Lock_Cb callback;
-        void* data;
-    } orientationLock;
-#endif
-
-#if ENABLE(TIZEN_WEBKIT2_CREATE_VIEW_WITH_CREATED_PAGE_GROUP_WITH_IDENTIFIER)
-    RefPtr<WebKit::WebPageGroup> pageGroup;
-#endif
-#endif // #if OS(TIZEN)
-
 private:
     inline Ewk_View_Smart_Data* smartData() const;
-    void displayTimerFired(WebCore::Timer<EwkViewImpl>*);
-
-    static void onMouseDown(void* data, Evas*, Evas_Object*, void* eventInfo);
-    static void onMouseUp(void* data, Evas*, Evas_Object*, void* eventInfo);
-    static void onMouseMove(void* data, Evas*, Evas_Object*, void* eventInfo);
-#if ENABLE(TOUCH_EVENTS)
-    void feedTouchEvents(Ewk_Touch_Event_Type type);
-    static void onTouchDown(void* /* data */, Evas* /* canvas */, Evas_Object* ewkView, void* /* eventInfo */);
-    static void onTouchUp(void* /* data */, Evas* /* canvas */, Evas_Object* ewkView, void* /* eventInfo */);
-    static void onTouchMove(void* /* data */, Evas* /* canvas */, Evas_Object* ewkView, void* /* eventInfo */);
-#endif
 
     Evas_Object* m_view;
-    OwnPtr<Ewk_Settings> m_settings;
-    RefPtr<Evas_Object> m_cursorObject;
-    WKEinaSharedString m_cursorGroup;
-    WKEinaSharedString m_faviconURL;
-    WKEinaSharedString m_url;
-    mutable WKEinaSharedString m_title;
-    WKEinaSharedString m_theme;
-    mutable WKEinaSharedString m_customEncoding;
-    bool m_mouseEventsEnabled;
-#if ENABLE(TOUCH_EVENTS)
-    bool m_touchEventsEnabled;
-#endif
-    WKRetainPtr<WKColorPickerResultListenerRef> m_colorPickerResultListener;
-    WebCore::Timer<EwkViewImpl> m_displayTimer;
-    WTF::Vector <WebCore::IntRect> m_dirtyRects;
-    OwnPtr<WebKit::InputMethodContextEfl> m_inputMethodContext;
-
-    typedef HashMap<WKPageRef, const Evas_Object*> PageViewMap;
-    static PageViewMap pageViewMap;
-
-#if OS(TIZEN)
 #if USE(TILED_BACKING_STORE)
     float m_scaleFactor;
     WebCore::IntPoint m_scrollPosition;
 #endif
-#endif
 };
 
 #endif // EwkViewImpl_h
old mode 100755 (executable)
new mode 100644 (file)
index 5e7477a..94e2890
 #include "PageClientImpl.h"
 
 #include "EwkViewImpl.h"
-#include "InputMethodContextEfl.h"
 #include "NativeWebKeyboardEvent.h"
 #include "NotImplemented.h"
 #include "TransformationMatrix.h"
 #include "WebContext.h"
 #include "WebContextMenuProxy.h"
 #include "WebPageProxy.h"
-#include "WebPopupMenuProxyEfl.h"
 #include "ewk_context.h"
 #include "ewk_context_private.h"
 #include "ewk_download_job.h"
 #include "ewk_download_job_private.h"
-#include "ewk_view.h"
+#include "ewk_view_private.h"
 
 #if OS(TIZEN)
 #include "DrawingAreaProxyImpl.h"
@@ -83,8 +81,8 @@ using namespace std;
 
 namespace WebKit {
 
-PageClientImpl::PageClientImpl(EwkViewImpl* viewImpl)
-    : m_viewImpl(viewImpl)
+PageClientImpl::PageClientImpl(WebContext* context, WebPageGroup* pageGroup, Evas_Object* viewWidget)
+    : m_viewWidget(viewWidget)
 #if OS(TIZEN)
     , m_viewportConstraints()
     , m_viewFocused(false)
@@ -114,31 +112,66 @@ PageClientImpl::PageClientImpl(EwkViewImpl* viewImpl)
     setenv("CAIRO_GL_COMPOSITOR", "msaa", 1);
     setenv("CAIRO_GL_LAZY_FLUSHING", "yes", 1);
 #endif
+    m_page = context->createWebPage(this, pageGroup);
+
+#if OS(TIZEN)
+    m_page->pageGroup()->preferences()->setAcceleratedCompositingEnabled(true);
+    m_page->pageGroup()->preferences()->setForceCompositingMode(true);
+    m_page->pageGroup()->preferences()->setFrameFlatteningEnabled(true);
+    m_page->pageGroup()->preferences()->setAllowUniversalAccessFromFileURLs(true);
+
+    if (m_viewWidget) {
+        int deviceWidth, deviceHeight;
+        ecore_evas_screen_geometry_get(ecore_evas_ecore_evas_get(evas_object_evas_get(m_viewWidget)), 0, 0, &deviceWidth, &deviceHeight);
+        m_page->pageGroup()->preferences()->setDeviceWidth(deviceWidth);
+        m_page->pageGroup()->preferences()->setDeviceHeight(deviceHeight);
+    }
+
+#endif
+
+    m_page->initializeWebPage();
+
+#if ENABLE(TIZEN_VIEWPORT_META_TAG)
+    m_page->setCustomDeviceScaleFactor((float)getMobileDPI() / 160);
+#else
+    m_page->setCustomDeviceScaleFactor((float)getDPI() / 160);
+#endif
 
 #if OS(TIZEN)
 #if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION)
-    m_textSelection = TextSelection::create(m_viewImpl);
+    m_textSelection = TextSelection::create(viewWidget, m_page.get(), this);
 #endif
 #if ENABLE(TIZEN_OFFLINE_PAGE_SAVE)
-    m_offlinePageSave = OfflinePageSave::create(m_viewImpl);
+    m_offlinePageSave = OfflinePageSave::create(viewWidget, m_page.get());
 #endif
 #if ENABLE(TIZEN_WEBKIT2_CLIPBOARD_HELPER)
-    m_clipboardHelper = ClipboardHelper::create(m_viewImpl);
+    m_clipboardHelper = ClipboardHelper::create(viewWidget, this);
 #endif
 #if ENABLE(TIZEN_DRAG_SUPPORT)
-    m_drag = Drag::create(m_viewImpl);
+    m_drag = Drag::create(m_page.get());
 #endif
 #if ENABLE(TIZEN_WEBKIT2_FORM_DATABASE)
-    m_formDataCandidate = FormDataCandidate::create(m_viewImpl);
+    m_formDataCandidate = FormDataCandidate::create(m_page.get());
 #endif
 #endif
 
+#if ENABLE(TIZEN_WEBKIT2_TILED_BACKING_STORE) && !ENABLE(TIZEN_WEBKIT2_EFL_WTR)
+    m_page->setUseFixedLayout(true);
+#endif
+#if ENABLE(FULLSCREEN_API)
+    m_page->fullScreenManager()->setWebView(viewWidget);
+#endif
+
     setBackgroundColor(1, 1, 1, 1);
+
+#if OS(TIZEN)
+    m_viewImpl = EwkViewImpl::fromEvasObject(m_viewWidget);
+#endif
 }
 
 PageClientImpl::~PageClientImpl()
 {
-    m_viewImpl->page()->close();
+    m_page->close();
 }
 
 #if OS(TIZEN)
@@ -151,14 +184,14 @@ PageClientImpl::ViewportConstraints PageClientImpl::computeViewportConstraints(c
     constraints.layoutSize = attributes.layoutSize;
     constraints.contentsDefinedInitialScale = (ViewportArguments::ValueAuto != attributes.initialScale);
 
-    double defaultViewLevel = m_viewImpl->page()->pageGroup()->preferences()->defaultViewLevel();
+    double defaultViewLevel = m_page->pageGroup()->preferences()->defaultViewLevel();
     // If defaultViewLevel is 1, "Default View" is set as "Readable"
     // if not, "Default View" is set as "Fit to width"
     if (defaultViewLevel) {
         // if content doesn't set initial scale value, set readable scale factor
         // if not, set initial scale factor of viewport attribute
         if (attributes.initialScale == ViewportArguments::ValueAuto)
-            constraints.initialScale = m_viewImpl->page()->deviceScaleFactor();
+            constraints.initialScale = m_page->deviceScaleFactor();
         else
             constraints.initialScale = attributes.initialScale * attributes.devicePixelRatio;
     } else {
@@ -183,31 +216,31 @@ void PageClientImpl::updateViewportSize(const IntSize& viewportSize)
     // update device width & height
     int deviceWidth = WebCore::getDefaultScreenResolution().width();
     int deviceHeight = WebCore::getDefaultScreenResolution().height();
-    Ecore_Evas* ee = ecore_evas_ecore_evas_get(evas_object_evas_get(m_viewImpl->view()));
+    Ecore_Evas* ee = ecore_evas_ecore_evas_get(evas_object_evas_get(m_viewWidget));
     int angle = ecore_evas_rotation_get(ee);
     if (angle == 90 || angle == 270) {
         int tempWidth = deviceWidth;
         deviceWidth = deviceHeight;
         deviceHeight = tempWidth;
     }
-    m_viewImpl->page()->pageGroup()->preferences()->setDeviceWidth(deviceWidth);
-    m_viewImpl->page()->pageGroup()->preferences()->setDeviceHeight(deviceHeight);
+    m_page->pageGroup()->preferences()->setDeviceWidth(deviceWidth);
+    m_page->pageGroup()->preferences()->setDeviceHeight(deviceHeight);
 
     // update viewport size of webkit
     m_visibleContentRect.setSize(viewportSize);
 
     // Update visible content rect before resize viewport
     // setVisibleContentRect() should be called once at here or ewk_view_focused_node_adjust()
-    if (!ewk_view_focused_node_adjust(m_viewImpl->view()) && m_pageDidRendered)
+    if (!ewk_view_focused_node_adjust(m_viewWidget) && m_pageDidRendered)
         setVisibleContentRect(m_visibleContentRect, scaleFactor());
 
-    m_viewImpl->page()->setViewportSize(viewportSize);
+    m_page->setViewportSize(viewportSize);
 }
 #endif
 
 void PageClientImpl::initializeVisibleContentRect()
 {
-    _ewk_view_resume_painting(m_viewImpl->view());
+    _ewk_view_resume_painting(m_viewWidget);
 
 #if ENABLE(TIZEN_WEBKIT2_TILED_BACKING_STORE)
     IntPoint initialScrollPosition;
@@ -223,7 +256,7 @@ void PageClientImpl::initializeVisibleContentRect()
     setVisibleContentRect(IntRect(initialScrollPosition, m_visibleContentRect.size()), initialScaleFactor);
 #else
     // Set initial scale.
-    m_viewImpl->page()->scalePage(m_viewportConstraints.initialScale, IntPoint(0, 0));
+    m_page->scalePage(m_viewportConstraints.initialScale, IntPoint(0, 0));
 #endif
 }
 
@@ -241,7 +274,7 @@ bool PageClientImpl::scrollBy(IntSize scrollOffset)
     // in the actual scale.
     IntSize scaledScrollOffset = m_viewImpl->transformFromScene().mapSize(scrollOffset);
     if ((m_isScrollableLayerFocused || m_isScrollableNodeFocused)
-        && m_viewImpl->page()->scrollOverflow(FloatPoint(scaledScrollOffset.width(), scaledScrollOffset.height()))) {
+        && page()->scrollOverflow(FloatPoint(scaledScrollOffset.width(), scaledScrollOffset.height()))) {
         displayViewport();
         return false;
     }
@@ -261,28 +294,19 @@ void PageClientImpl::scrollTo(IntPoint requestedScrollPosition)
 
 #endif // #if OS(TIZEN)
 
-EwkViewImpl* PageClientImpl::viewImpl() const
-{
-    return m_viewImpl;
-}
-
 // PageClient
 PassOwnPtr<DrawingAreaProxy> PageClientImpl::createDrawingAreaProxy()
 {
-    return DrawingAreaProxyImpl::create(m_viewImpl->page());
+    return DrawingAreaProxyImpl::create(m_page.get());
 }
 
 void PageClientImpl::setViewNeedsDisplay(const WebCore::IntRect& rect)
 {
-#if OS(TIZEN)
-    ewk_view_mark_for_sync(m_viewImpl->view());
-#else
-    m_viewImpl->redrawRegion(rect);
-#endif
+    ewk_view_mark_for_sync(m_viewWidget);
 
 #if ENABLE(TIZEN_SCREEN_READER)
-    if (rect.intersects(ewkViewGetFocusRing(m_viewImpl->view())->rect()))
-        m_viewImpl->page()->recalcScreenReaderFocusRect();
+    if (rect.intersects(ewkViewGetFocusRing(m_viewWidget)->rect()))
+        m_page->recalcScreenReaderFocusRect();
 #endif
 }
 
@@ -298,16 +322,12 @@ void PageClientImpl::scrollView(const WebCore::IntRect& scrollRect, const WebCor
 
 WebCore::IntSize PageClientImpl::viewSize()
 {
-    return m_viewImpl->size();
+    return ewk_view_size_get(m_viewWidget);
 }
 
 bool PageClientImpl::isViewVisible()
 {
-#if OS(TIZEN)
     return m_isVisible;
-#else
-    return m_viewImpl->isVisible();
-#endif
 }
 
 bool PageClientImpl::isViewInWindow()
@@ -318,19 +338,14 @@ bool PageClientImpl::isViewInWindow()
 
 void PageClientImpl::processDidCrash()
 {
-    // Check if loading was ongoing, when web process crashed.
-    double loadProgress = ewk_view_load_progress_get(m_viewImpl->view());
-    if (loadProgress >= 0 && loadProgress < 1)
-        m_viewImpl->informLoadProgress(1);
-
-    m_viewImpl->informWebProcessCrashed();
+    notImplemented();
 }
 
 void PageClientImpl::didRelaunchProcess()
 {
-    const char* themePath = m_viewImpl->themePath();
+    const char* themePath = ewk_view_theme_get(m_viewWidget);
     if (themePath)
-        m_viewImpl->page()->setThemePath(themePath);
+        ewk_view_page_get(m_viewWidget)->setThemePath(themePath);
 }
 
 void PageClientImpl::pageClosed()
@@ -338,14 +353,14 @@ void PageClientImpl::pageClosed()
     notImplemented();
 }
 
-void PageClientImpl::toolTipChanged(const String&, const String& newToolTip)
+void PageClientImpl::toolTipChanged(const String&, const String&)
 {
-    m_viewImpl->informTooltipTextChange(newToolTip);
+    notImplemented();
 }
 
 void PageClientImpl::setCursor(const Cursor& cursor)
 {
-    m_viewImpl->setCursor(cursor);
+    ewk_view_cursor_set(m_viewWidget, cursor);
 }
 
 void PageClientImpl::setCursorHiddenUntilMouseMoves(bool hiddenUntilMouseMoves)
@@ -362,8 +377,8 @@ void PageClientImpl::didChangeViewportProperties(const WebCore::ViewportAttribut
     // 1. page is not rendered yet
     // 2. viewport attributes are changed by WebCore's empty document(progress == 0.1)
     // 3. there's no input field zoom(device rotation without IME)
-    if (m_pageDidRendered && m_viewImpl->page()->estimatedProgress() > 0.1 && !ewk_view_focused_node_adjust(m_viewImpl->view())) {
-        IntSize contentsSize = m_viewImpl->page()->contentsSize();
+    if (m_pageDidRendered && page()->estimatedProgress() > 0.1 && !ewk_view_focused_node_adjust(m_viewWidget)) {
+        IntSize contentsSize = m_page->contentsSize();
         double minimumScaleByContentWidth = max(((double)viewSize().width() / contentsSize.width()), 0.25);
         float newScale = scaleFactor();
 
@@ -377,12 +392,12 @@ void PageClientImpl::didChangeViewportProperties(const WebCore::ViewportAttribut
 #if ENABLE(TIZEN_WEBKIT2_TILED_BACKING_STORE)
         setVisibleContentRect(m_visibleContentRect, newScale);
 #else
-        m_viewImpl->page()->scalePage(newScale, m_visibleContentRect.location());
+        m_page->scalePage(newScale, m_visibleContentRect.location());
 #endif
     }
 
 #if ENABLE(TIZEN_WEBKIT2_FORM_DATABASE)
-    Ewk_View_Smart_Data* smartData = static_cast<Ewk_View_Smart_Data*>(evas_object_smart_data_get(m_viewImpl->view()));
+    Ewk_View_Smart_Data* smartData = static_cast<Ewk_View_Smart_Data*>(evas_object_smart_data_get(m_viewWidget));
     if (smartData->api->formdata_candidate_is_showing(smartData))
         smartData->api->formdata_candidate_hide(smartData);
 #endif
@@ -395,13 +410,13 @@ void PageClientImpl::registerEditCommand(PassRefPtr<WebEditCommandProxy> command
         m_undoCommands.append(command);
 
         int undoSize = m_undoCommands.size();
-        evas_object_smart_callback_call(m_viewImpl->view(), "undo,size", &undoSize);
+        evas_object_smart_callback_call(m_viewWidget, "undo,size", &undoSize);
     }
     else {
         m_redoCommands.append(command);
 
         int redoSize = m_redoCommands.size();
-        evas_object_smart_callback_call(m_viewImpl->view(), "redo,size", &redoSize);
+        evas_object_smart_callback_call(m_viewWidget, "redo,size", &redoSize);
     }
 }
 
@@ -411,10 +426,10 @@ void PageClientImpl::clearAllEditCommands()
     m_redoCommands.clear();
 
     int undoSize = m_undoCommands.size();
-    evas_object_smart_callback_call(m_viewImpl->view(), "undo,size", &undoSize);
+    evas_object_smart_callback_call(m_viewWidget, "undo,size", &undoSize);
 
     int redoSize = m_redoCommands.size();
-    evas_object_smart_callback_call(m_viewImpl->view(), "redo,size", &redoSize);
+    evas_object_smart_callback_call(m_viewWidget, "redo,size", &redoSize);
 }
 
 bool PageClientImpl::canUndoRedo(WebPageProxy::UndoOrRedo undoOrRedo)
@@ -432,13 +447,13 @@ void PageClientImpl::executeUndoRedo(WebPageProxy::UndoOrRedo undoOrRedo)
         m_undoCommands.removeLast();
 
         int undoSize = m_undoCommands.size();
-        evas_object_smart_callback_call(m_viewImpl->view(), "undo,size", &undoSize);
+        evas_object_smart_callback_call(m_viewWidget, "undo,size", &undoSize);
     } else {
         m_redoCommands.last()->reapply();
         m_redoCommands.removeLast();
 
         int redoSize = m_redoCommands.size();
-        evas_object_smart_callback_call(m_viewImpl->view(), "redo,size", &redoSize);
+        evas_object_smart_callback_call(m_viewWidget, "redo,size", &redoSize);
     }
 }
 #else
@@ -504,7 +519,7 @@ void PageClientImpl::doneWithGestureEvent(const WebGestureEvent& event, bool was
 void PageClientImpl::doneWithTouchEvent(const NativeWebTouchEvent& event, bool wasEventHandled)
 {
 #if OS(TIZEN)
-    ewk_view_touch_event_handler_result_set(m_viewImpl->view(), event.type(), wasEventHandled);
+    ewk_view_touch_event_handler_result_set(m_viewWidget, event.type(), wasEventHandled);
 #else
     notImplemented();
 #endif // #if OS(TIZEN)
@@ -513,13 +528,13 @@ void PageClientImpl::doneWithTouchEvent(const NativeWebTouchEvent& event, bool w
 
 PassRefPtr<WebPopupMenuProxy> PageClientImpl::createPopupMenuProxy(WebPageProxy* page)
 {
-    return WebPopupMenuProxyEfl::create(m_viewImpl, page);
+    return WebPopupMenuProxyEfl::create(m_viewWidget, page);
 }
 
 PassRefPtr<WebContextMenuProxy> PageClientImpl::createContextMenuProxy(WebPageProxy* page)
 {
 #if ENABLE(TIZEN_CONTEXT_MENU_WEBKIT_2)
-    return WebContextMenuProxyTizen::create(m_viewImpl->view(), page, this);
+    return WebContextMenuProxyTizen::create(m_viewWidget, page, this);
 #else
     notImplemented();
     return 0;
@@ -543,12 +558,12 @@ void PageClientImpl::setFindIndicator(PassRefPtr<FindIndicator>, bool, bool)
 #if USE(ACCELERATED_COMPOSITING)
 void PageClientImpl::enterAcceleratedCompositingMode(const LayerTreeContext&)
 {
-    m_viewImpl->enterAcceleratedCompositingMode();
+    ewk_view_accelerated_compositing_mode_enter(m_viewWidget);
 }
 
 void PageClientImpl::exitAcceleratedCompositingMode()
 {
-    m_viewImpl->exitAcceleratedCompositingMode();
+    ewk_view_accelerated_compositing_mode_exit(m_viewWidget);
 }
 
 void PageClientImpl::updateAcceleratedCompositingMode(const LayerTreeContext&)
@@ -590,7 +605,6 @@ void PageClientImpl::didFirstVisuallyNonEmptyLayoutForMainFrame()
 
 void PageClientImpl::didChangeContentsSize(const WebCore::IntSize size)
 {
-#if USE(TILED_BACKING_STORE)
     if (size.isEmpty())
         return;
 
@@ -622,17 +636,14 @@ void PageClientImpl::didChangeContentsSize(const WebCore::IntSize size)
 #if ENABLE(TIZEN_WEBKIT2_TILED_BACKING_STORE)
         setVisibleContentRect(m_visibleContentRect, newMinimumScale);
 #else
-        m_viewImpl->page()->scalePage(newMinimumScale, m_visibleContentRect.location());
+        m_page->scalePage(newMinimumScale, m_visibleContentRect.location());
 #endif
     }
-#else
-    m_viewImpl->informContentsSizeChange(size);
-#endif
 }
 
 void PageClientImpl::pageScaleFactorDidChange()
 {
-    ewk_view_focused_node_adjust(m_viewImpl->view());
+    ewk_view_focused_node_adjust(m_viewWidget);
 }
 #endif // #if OS(TIZEN)
 
@@ -679,28 +690,21 @@ void PageClientImpl::countStringMatchesInCustomRepresentation(const String&, Fin
     notImplemented();
 }
 
-void PageClientImpl::updateTextInputState()
-{
-    InputMethodContextEfl* inputMethodContext = m_viewImpl->inputMethodContext();
-    if (inputMethodContext)
-        inputMethodContext->updateTextInputState();
-
-#if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION)
-    m_textSelection->update();
-#endif
-}
-
 void PageClientImpl::handleDownloadRequest(DownloadProxy* download)
 {
-    Ewk_Context* context = m_viewImpl->ewkContext();
-    context->downloadManager()->registerDownload(download, m_viewImpl);
+    Ewk_Download_Job* ewkDownload = ewk_download_job_new(download, m_viewWidget);
+    // For now we only support one default context, but once we support
+    // multiple contexts, we will need to retrieve the context from the
+    // view.
+    ewk_context_download_job_add(ewk_context_default_get(), ewkDownload);
+    ewk_download_job_unref(ewkDownload);
 }
 
 #if USE(TILED_BACKING_STORE)
 void PageClientImpl::pageDidRequestScroll(const IntPoint& point)
 {
 #if ENABLE(TIZEN_WEBKIT2_FORM_DATABASE)
-    Ewk_View_Smart_Data* smartData = static_cast<Ewk_View_Smart_Data*>(evas_object_smart_data_get(m_viewImpl->view()));
+    Ewk_View_Smart_Data* smartData = static_cast<Ewk_View_Smart_Data*>(evas_object_smart_data_get(m_viewWidget));
     if (smartData->api->formdata_candidate_is_showing(smartData))
         return;
 #endif
@@ -734,7 +738,7 @@ void PageClientImpl::textChangeInTextField(const String& name, const String& val
     }
 
     m_formDataCandidate->updateCandidateValue(value);
-    ewk_view_text_change_in_textfield(m_viewImpl->view(), name, value);
+    ewk_view_text_change_in_textfield(m_viewWidget, name, value);
 }
 #endif
 
@@ -742,14 +746,12 @@ void PageClientImpl::textChangeInTextField(const String& name, const String& val
 void PageClientImpl::setInputMethodState(bool active, const String& type, const String& value)
 {
     if (!active) {
-        InputMethodContextEfl* inputMethodContext = m_viewImpl->inputMethodContext();
-        if (inputMethodContext)
-            inputMethodContext->hideIMFContext();
+        ewk_view_imf_context_hide(m_viewWidget);
         LOG(ISF, "- Keypad status : hide\n");
         return;
     }
 
-    Ewk_Settings* settings = ewk_view_settings_get(m_viewImpl->view());
+    Ewk_Settings* settings = ewk_view_settings_get(m_viewWidget);
     bool defaultKeypadEnabled = ewk_settings_default_keypad_enabled_get(settings);
 
 #if ENABLE(TIZEN_WEBKIT2_CONTEXT_MENU_CLIPBOARD)
@@ -763,73 +765,104 @@ void PageClientImpl::setInputMethodState(bool active, const String& type, const
 
 #if ENABLE(TIZEN_INPUT_TAG_EXTENSION)
     if (type == "date") {
-        ewkViewInputPickerRequest(m_viewImpl->view(), EWK_INPUT_TYPE_DATE, value);
+        ewkViewInputPickerRequest(m_viewWidget, EWK_INPUT_TYPE_DATE, value);
         return;
     } else if (type == "datetime") {
-        ewkViewInputPickerRequest(m_viewImpl->view(), EWK_INPUT_TYPE_DATETIME, value);
+        ewkViewInputPickerRequest(m_viewWidget, EWK_INPUT_TYPE_DATETIME, value);
         return;
     } else if (type == "datetime-local") {
-        ewkViewInputPickerRequest(m_viewImpl->view(), EWK_INPUT_TYPE_DATETIMELOCAL, value);
+        ewkViewInputPickerRequest(m_viewWidget, EWK_INPUT_TYPE_DATETIMELOCAL, value);
         return;
     } else if (type == "month") {
-        ewkViewInputPickerRequest(m_viewImpl->view(), EWK_INPUT_TYPE_MONTH, value);
+        ewkViewInputPickerRequest(m_viewWidget, EWK_INPUT_TYPE_MONTH, value);
         return;
     } else if (type == "time") {
-        ewkViewInputPickerRequest(m_viewImpl->view(), EWK_INPUT_TYPE_TIME, value);
+        ewkViewInputPickerRequest(m_viewWidget, EWK_INPUT_TYPE_TIME, value);
         return;
     } else if (type == "week") {
-        ewkViewInputPickerRequest(m_viewImpl->view(), EWK_INPUT_TYPE_WEEK, value);
+        ewkViewInputPickerRequest(m_viewWidget, EWK_INPUT_TYPE_WEEK, value);
         return;
     }
 
 #if ENABLE(TIZEN_DATALIST_ELEMENT)
-    Vector<String> optionList = m_viewImpl->page()->getFocusedInputElementDataList();
+    Vector<String> optionList = page()->getFocusedInputElementDataList();
     if (optionList.size() > 0) {
         if (type == "tel")
-            ewkViewDataListShowRequest(m_viewImpl->view(), EWK_INPUT_TYPE_TELEPHONE, optionList);
+            ewkViewDataListShowRequest(m_viewWidget, EWK_INPUT_TYPE_TELEPHONE, optionList);
         else if (type == "number")
-            ewkViewDataListShowRequest(m_viewImpl->view(), EWK_INPUT_TYPE_NUMBER, optionList);
+            ewkViewDataListShowRequest(m_viewWidget, EWK_INPUT_TYPE_NUMBER, optionList);
         else if (type == "email")
-            ewkViewDataListShowRequest(m_viewImpl->view(), EWK_INPUT_TYPE_EMAIL, optionList);
+            ewkViewDataListShowRequest(m_viewWidget, EWK_INPUT_TYPE_EMAIL, optionList);
         else if (type == "url")
-            ewkViewDataListShowRequest(m_viewImpl->view(), EWK_INPUT_TYPE_URL, optionList);
+            ewkViewDataListShowRequest(m_viewWidget, EWK_INPUT_TYPE_URL, optionList);
         else
-            ewkViewDataListShowRequest(m_viewImpl->view(), EWK_INPUT_TYPE_TEXT, optionList);
+            ewkViewDataListShowRequest(m_viewWidget, EWK_INPUT_TYPE_TEXT, optionList);
 
         return;
     }
 #endif // ENABLE(TIZEN_DATALIST_ELEMENT)
 #endif // ENABLE(TIZEN_INPUT_TAG_EXTENSION)
 
-    bool hasFocus = evas_object_focus_get(m_viewImpl->view());
+    bool hasFocus = evas_object_focus_get(m_viewWidget);
 
     if (!defaultKeypadEnabled) {
+        ewk_view_imf_context_destroy(m_viewWidget);
         if (hasFocus) {
             Eina_Rectangle dummyRectForCustomKeypadCallback;
             memset(&dummyRectForCustomKeypadCallback, 0, sizeof(Eina_Rectangle));
-            evas_object_smart_callback_call(m_viewImpl->view(), "inputmethod,changed", &dummyRectForCustomKeypadCallback);
+            evas_object_smart_callback_call(m_viewWidget, "inputmethod,changed", &dummyRectForCustomKeypadCallback);
         }
         return;
     }
 
-    InputMethodContextEfl* inputMethodContext = m_viewImpl->inputMethodContext();
-    if (!inputMethodContext)
+    Ecore_IMF_Input_Panel_Layout layout;
+    if (type == "number")
+        layout = ECORE_IMF_INPUT_PANEL_LAYOUT_NUMBER;
+    else if (type == "email")
+        layout = ECORE_IMF_INPUT_PANEL_LAYOUT_EMAIL;
+    else if (type == "url")
+        layout = ECORE_IMF_INPUT_PANEL_LAYOUT_URL;
+    else if (type == "tel")
+        layout = ECORE_IMF_INPUT_PANEL_LAYOUT_PHONENUMBER;
+    else if (type == "password")
+        layout = ECORE_IMF_INPUT_PANEL_LAYOUT_PASSWORD;
+    else
+        layout = ECORE_IMF_INPUT_PANEL_LAYOUT_NORMAL;
+
+    Ecore_IMF_Context* imfContext = ewk_view_imf_context_set(m_viewWidget, layout);
+    if (!imfContext)
         return;
 
-    inputMethodContext->setType(type);
+    if (type == "password")
+        ecore_imf_context_prediction_allow_set(imfContext, false);
+    else
+        ecore_imf_context_prediction_allow_set(imfContext, true);
+
+    if (type.isEmpty() || type == "textarea")
+        ecore_imf_context_autocapital_type_set(imfContext, ECORE_IMF_AUTOCAPITAL_TYPE_SENTENCE);
+    else
+        ecore_imf_context_autocapital_type_set(imfContext, ECORE_IMF_AUTOCAPITAL_TYPE_NONE);
+
+    Evas* evas = evas_object_evas_get(m_viewWidget);
+    ecore_imf_context_client_window_set(imfContext, (void*)ecore_evas_window_get(ecore_evas_ecore_evas_get(evas)));
+    ecore_imf_context_client_canvas_set(imfContext, evas);
 
 #if ENABLE(TIZEN_SUPPORT_EMOJI)
-    if (type.isEmpty() && !value.isEmpty())
-        inputMethodContext->setIMData(value);
+    if (type.isEmpty() && !value.isEmpty()) {
+        CString emojiSetting = value.utf8();
+        ecore_imf_context_input_panel_imdata_set(imfContext, emojiSetting.data(), emojiSetting.length());
+    }
 #endif
 
     if (!hasFocus)
         return;
 
-    inputMethodContext->showIMFContext();
+    ecore_imf_context_focus_in(imfContext);
+    ecore_imf_context_input_panel_show(imfContext);
+    ecore_imf_context_cursor_position_set(imfContext, page()->getCursorOffset());
 
     // input field zoom for external keyboard
-    ewk_view_focused_node_adjust(m_viewImpl->view(), EINA_TRUE);
+    ewk_view_focused_node_adjust(m_viewWidget, EINA_TRUE);
 
     LOG(ISF, "- Keypad status : show\n");
 }
@@ -838,26 +871,33 @@ void PageClientImpl::setInputMethodState(bool) { }
 #endif // #if ENABLE(TIZEN_ISF_PORT)
 
 #if ENABLE(TIZEN_ISF_PORT)
+void PageClientImpl::updateTextInputState()
+{
+#if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION)
+    m_textSelection->update();
+#endif
+}
+
 void PageClientImpl::updateCursorOffset(int offset)
 {
-    InputMethodContextEfl* inputMethodContext = m_viewImpl->inputMethodContext();
-    if (!inputMethodContext)
+    Ecore_IMF_Context* imfContext = ewk_view_imf_context_get(m_viewWidget);
+    if (!imfContext)
         return;
 
-    inputMethodContext->setIMFContextCursorPosition(offset);
+    ecore_imf_context_cursor_position_set(imfContext, offset);
 }
 
 void PageClientImpl::imContextCommitted(Ecore_IMF_Context* context, char* string)
 {
-    if (!m_viewImpl->page()->focusedFrame())
+    if (!page()->focusedFrame())
         return;
 
-    m_viewImpl->page()->confirmComposition(String::fromUTF8(string));
+    page()->confirmComposition(String::fromUTF8(string));
 }
 
 void PageClientImpl::imContextPreeditChanged(Ecore_IMF_Context* context)
 {
-    if (!m_viewImpl->page()->focusedFrame())
+    if (!page()->focusedFrame())
         return;
 
     char* preeditStr = 0;
@@ -875,11 +915,11 @@ void PageClientImpl::imContextPreeditChanged(Ecore_IMF_Context* context)
     }
 
     IntRect caretRect;
-    m_viewImpl->page()->getCaretPosition(caretRect);
+    page()->getCaretPosition(caretRect);
     caretRect.scale(scaleFactor());
 
     int viewX, viewY;
-    evas_object_geometry_get(m_viewImpl->view(), &viewX, &viewY, 0, 0);
+    evas_object_geometry_get(m_viewWidget, &viewX, &viewY, 0, 0);
 
     int x = caretRect.x() - scrollPosition().x() + viewX;
     int y = caretRect.y() - scrollPosition().y() + viewY;
@@ -931,7 +971,7 @@ void PageClientImpl::imContextPreeditChanged(Ecore_IMF_Context* context)
     underlines.append(CompositionUnderline(0, preeditString.length(), Color(0, 0, 0), false));
 #endif
 
-    m_viewImpl->page()->setComposition(preeditString, underlines, cursorPosition);
+    page()->setComposition(preeditString, underlines, cursorPosition);
 }
 #endif // #if ENABLE(TIZEN_ISF_PORT)
 
@@ -941,13 +981,6 @@ void PageClientImpl::updateFormNavigation(int length, int offset)
 }
 
 #if ENABLE(TIZEN_WEBKIT2_TILED_BACKING_STORE)
-#if ENABLE(TIZEN_WEBKIT2_TILED_AC)
-DrawingAreaProxy* PageClientImpl::drawingArea() const
-{
-    return m_viewImpl->page()->drawingArea();
-}
-#endif
-
 // Before rendering, scale factor and scroll position is different from m_viewImpl.
 float PageClientImpl::scaleFactor()
 {
@@ -961,7 +994,7 @@ const IntPoint PageClientImpl::scrollPosition()
 
 IntRect PageClientImpl::adjustVisibleContentRect(IntRect visibleContentRect, float targetScale)
 {
-    IntSize contentsSize = m_viewImpl->page()->contentsSize();
+    IntSize contentsSize = page()->contentsSize();
     contentsSize.scale(targetScale);
     if (contentsSize.width() < visibleContentRect.width())
         visibleContentRect.setX(0);
@@ -1018,7 +1051,7 @@ void PageClientImpl::setVisibleContentRect(const IntRect& newRect, float newScal
 #if ENABLE(TIZEN_SCREEN_READER)
     if (ScreenReaderProxy::screenReader().isEnabled()
         && (scrollPosition() != previousScrollPosition || m_scaleFactor != previousScale))
-        ewkViewGetFocusRing(m_viewImpl->view())->updateScrollAndScale(previousScrollPosition, previousScale);
+        ewkViewGetFocusRing(m_viewWidget)->updateScrollAndScale(previousScrollPosition, previousScale);
 #endif
 
 #if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION)
@@ -1036,7 +1069,7 @@ void PageClientImpl::displayViewport()
 #endif
 
 #if ENABLE(TIZEN_SCREEN_READER)
-    m_viewImpl->page()->recalcScreenReaderFocusRect();
+    m_page->recalcScreenReaderFocusRect();
 #endif
 }
 
@@ -1064,7 +1097,7 @@ void PageClientImpl::scaleImage(double scaleFactor, IntPoint scrollPosition)
 {
 #if OS(TIZEN) && ENABLE(FULLSCREEN_API)
     // We don't want to process scaling in the FullScreen mode.
-    if (m_viewImpl->page()->fullScreenManager()->isFullScreen())
+    if (page()->fullScreenManager()->isFullScreen())
         return;
 #endif
 
@@ -1074,7 +1107,7 @@ void PageClientImpl::scaleImage(double scaleFactor, IntPoint scrollPosition)
 
     // Adjust scaleFactor.
 #if ENABLE(TIZEN_WEBKIT2_TEXT_ZOOM)
-    if (!m_viewImpl->page()->pageGroup()->preferences()->textZoomEnabled())
+    if (!page()->pageGroup()->preferences()->textZoomEnabled())
         scaleFactor = adjustScaleWithViewport(scaleFactor);
 #else
     scaleFactor = adjustScaleWithViewport(scaleFactor);
@@ -1087,7 +1120,7 @@ void PageClientImpl::scaleContents(double scaleFactor, const IntPoint& origin)
 {
 #if OS(TIZEN) && ENABLE(FULLSCREEN_API)
     // We don't want to process scaling in the FullScreen mode.
-    if (m_viewImpl->page()->fullScreenManager()->isFullScreen())
+    if (page()->fullScreenManager()->isFullScreen())
         return;
 #endif
     scaleFactor = adjustScaleWithViewport(scaleFactor);
@@ -1124,7 +1157,7 @@ FloatPoint PageClientImpl::boundContentsPositionAtScale(const FloatPoint& frameP
     // We need to floor the viewport here as to allow aligning the content in device units. If not,
     // it might not be possible to scroll the last pixel and that affects fixed position elements.
     FloatRect bounds;
-    const IntSize& contentsSize = m_viewImpl->page()->contentsSize();
+    const IntSize& contentsSize = m_page->contentsSize();
     bounds.setWidth(std::max(0.f, contentsSize.width() - floorf(viewSize().width() / scale)));
     bounds.setHeight(std::max(0.f, contentsSize.height() - floorf(viewSize().height() / scale)));
 
@@ -1141,14 +1174,14 @@ void PageClientImpl::createScrollbarIfNeeded(bool horizontalBar, bool verticalBa
 {
     // create if needed.
     if (horizontalBar && !m_horizontalScrollbar) {
-        m_horizontalScrollbar = MainFrameScrollbarTizen::createNativeScrollbar(m_viewImpl->view(), HorizontalScrollbar);
+        m_horizontalScrollbar = MainFrameScrollbarTizen::createNativeScrollbar(m_viewWidget, HorizontalScrollbar);
         IntRect hBarRect(0, viewSize().height(), viewSize().width(), 0);
         m_horizontalScrollbar->setFrameRect(hBarRect);
     } else if (!horizontalBar && m_horizontalScrollbar)
         m_horizontalScrollbar = 0;
 
     if (verticalBar && !m_verticalScrollbar) {
-        m_verticalScrollbar = MainFrameScrollbarTizen::createNativeScrollbar(m_viewImpl->view(), VerticalScrollbar);
+        m_verticalScrollbar = MainFrameScrollbarTizen::createNativeScrollbar(m_viewWidget, VerticalScrollbar);
         IntRect vBarRect(viewSize().width(), 0, 0, viewSize().height());
         m_verticalScrollbar->setFrameRect(vBarRect);
     } else if (!verticalBar && m_verticalScrollbar)
@@ -1157,7 +1190,7 @@ void PageClientImpl::createScrollbarIfNeeded(bool horizontalBar, bool verticalBa
 
 void PageClientImpl::updateScrollbar()
 {
-    IntSize scaledContentsSize = m_viewImpl->page()->contentsSize();
+    IntSize scaledContentsSize = m_page->contentsSize();
     scaledContentsSize.scale(scaleFactor());
 
     bool newHasHorizontalScrollbar = false;
@@ -1218,18 +1251,18 @@ void PageClientImpl::setIsTextSelectionMode(bool isTextSelectionMode)
 
 void PageClientImpl::updateTextSelectionHandlesAndContextMenu(bool isShow, bool isScrolling)
 {
-    if (m_textSelection->isTextSelectionMode() && evas_object_focus_get(m_viewImpl->view()))
+    if (m_textSelection->isTextSelectionMode() && evas_object_focus_get(m_viewWidget))
         m_textSelection->updateHandlesAndContextMenu(isShow, isScrolling);
 }
 
 bool PageClientImpl::textSelectionDown(const WebCore::IntPoint& point, bool isStartedTextSelectionFromOutside)
 {
-    if (!evas_object_focus_get(m_viewImpl->view())) {
-        InputMethodContextEfl* inputMethodContext = m_viewImpl->inputMethodContext();
-        if (inputMethodContext && !inputMethodContext->isShow())
-            inputMethodContext->hideIMFContext();
+    if (!evas_object_focus_get(m_viewWidget)) {
+        Ecore_IMF_Context* imfContext = ewk_view_imf_context_get(m_viewWidget);
+        if (imfContext && (ecore_imf_context_input_panel_state_get(imfContext) == ECORE_IMF_INPUT_PANEL_STATE_HIDE))
+            ewk_view_imf_context_hide(m_viewWidget);
 
-        evas_object_focus_set(m_viewImpl->view(), true);
+        evas_object_focus_set(m_viewWidget, true);
     }
 
     return m_textSelection->textSelectionDown(point, isStartedTextSelectionFromOutside);
@@ -1295,7 +1328,7 @@ void PageClientImpl::startOfflinePageSave(String& path, String& url, String& tit
 #if ENABLE(TIZEN_WEBKIT2_CLIPBOARD_HELPER)
 void PageClientImpl::pasteContextMenuSelected()
 {
-    m_clipboardHelper->pasteClipboardLastItem(m_viewImpl->page()->editorState().isContentRichlyEditable);
+    m_clipboardHelper->pasteClipboardLastItem(page()->editorState().isContentRichlyEditable);
 }
 #endif
 
@@ -1310,7 +1343,7 @@ void PageClientImpl::setClipboardData(const String& data, const String& type)
 #if ENABLE(TIZEN_WEBKIT2_CONTEXT_MENU_CLIPBOARD)
 void PageClientImpl::clipboardContextMenuSelected()
 {
-    m_clipboardHelper->openClipboardWindow(m_viewImpl->page()->editorState().isContentRichlyEditable);
+    m_clipboardHelper->openClipboardWindow(page()->editorState().isContentRichlyEditable);
 }
 
 bool PageClientImpl::isClipboardWindowOpened()
@@ -1336,9 +1369,9 @@ void PageClientImpl::clearClipboardData()
 void PageClientImpl::setIsVisible(bool isVisible)
 {
 #if ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE_BACKUP_IMAGE)
-    if (m_isVisible != isVisible && m_viewImpl->view() && m_pageDidRendered) {
+    if (m_isVisible != isVisible && m_viewWidget && m_pageDidRendered) {
         if (!isVisible && (drawingArea() && drawingArea()->layerTreeCoordinatorProxy()) && !m_shouldShowBackupTexture) {
-            Ecore_Evas* ee = ecore_evas_ecore_evas_get(evas_object_evas_get(m_viewImpl->view()));
+            Ecore_Evas* ee = ecore_evas_ecore_evas_get(evas_object_evas_get(m_viewWidget));
             int angle = ecore_evas_rotation_get(ee);
             if (angle == 0 || angle == 180) {
                 m_shouldMakeBackupTexture = true;
@@ -1351,13 +1384,12 @@ void PageClientImpl::setIsVisible(bool isVisible)
 
     m_isVisible = isVisible;
 
-    WebPageProxy* pageProxy = m_viewImpl->page();
-    if (pageProxy)
-        pageProxy->viewStateDidChange(WebPageProxy::ViewIsVisible);
+    if (m_page)
+        m_page->viewStateDidChange(WebPageProxy::ViewIsVisible);
 
 #if ENABLE(TIZEN_CACHE_MEMORY_OPTIMIZATION)
     if (!m_isVisible)
-        ewk_view_context_get(m_viewImpl->view())->clearAllDecodedData();
+        ewk_context_decoded_data_clear_all(ewk_view_context_get(m_viewWidget));
 #endif
 }
 #endif
@@ -1381,7 +1413,7 @@ void PageClientImpl::startDrag(const DragData& dragData, PassRefPtr<ShareableBit
         m_drag->getDragPoint(), dragData.draggingSourceOperationMask(), dragData.flags());
 
     String dragStorageName("Drag");
-    m_viewImpl->page()->dragEntered(dragInfo, dragStorageName);
+    m_page->dragEntered(dragInfo, dragStorageName);
     setDragMode(true);
     m_drag->setDragData(dragInfo);
     m_drag->Show();
@@ -1413,67 +1445,67 @@ void PageClientImpl::showFormDataCandidate(const WebCore::IntRect& rect)
 #if ENABLE(TIZEN_REGISTER_PROTOCOL_HANDLER)
 void PageClientImpl::registerProtocolHandler(const String& scheme, const String& baseURL, const String& url, const String& title)
 {
-    ewkViewRegisterProtocolHandlers(m_viewImpl->view(), scheme.utf8().data(), baseURL.utf8().data(), url.utf8().data(), title.utf8().data());
+    ewkViewRegisterProtocolHandlers(m_viewWidget, scheme.utf8().data(), baseURL.utf8().data(), url.utf8().data(), title.utf8().data());
 }
 #endif
 
 #if ENABLE(TIZEN_CUSTOM_SCHEME_HANDLER)
 unsigned int PageClientImpl::isProtocolHandlerRegistered(const String& scheme, const String& baseURL, const String& url)
 {
-    return ewkViewIsProtocolHandlerRegistered(m_viewImpl->view(), scheme.utf8().data(), baseURL.utf8().data(), url.utf8().data());
+    return ewkViewIsProtocolHandlerRegistered(m_viewWidget, scheme.utf8().data(), baseURL.utf8().data(), url.utf8().data());
 }
 
 void PageClientImpl::unregisterProtocolHandler(const String& scheme, const String& baseURL, const String& url)
 {
-    ewkViewUnregisterProtocolHandlers(m_viewImpl->view(), scheme.utf8().data(), baseURL.utf8().data(), url.utf8().data());
+    ewkViewUnregisterProtocolHandlers(m_viewWidget, scheme.utf8().data(), baseURL.utf8().data(), url.utf8().data());
 }
 #endif
 
 #if ENABLE(TIZEN_REGISTER_CONTENT_HANDLER)
 void PageClientImpl::registerContentHandler(const String& mimeType, const String& baseURL, const String& url, const String& title)
 {
-    ewkViewRegisterContentHandlers(m_viewImpl->view(), mimeType.utf8().data(), baseURL.utf8().data(), url.utf8().data(), title.utf8().data());
+    ewkViewRegisterContentHandlers(m_viewWidget, mimeType.utf8().data(), baseURL.utf8().data(), url.utf8().data(), title.utf8().data());
 }
 
 unsigned int PageClientImpl::isContentHandlerRegistered(const String& mimeType, const String& baseURL, const String& url)
 {
-    return ewkViewIsContentHandlerRegistered(m_viewImpl->view(), mimeType.utf8().data(), baseURL.utf8().data(), url.utf8().data());
+    return ewkViewIsContentHandlerRegistered(m_viewWidget, mimeType.utf8().data(), baseURL.utf8().data(), url.utf8().data());
 }
 
 void PageClientImpl::unregisterContentHandler(const String& mimeType, const String& baseURL, const String& url)
 {
-    ewkViewUnregisterContentHandlers(m_viewImpl->view(), mimeType.utf8().data(), baseURL.utf8().data(), url.utf8().data());
+    ewkViewUnregisterContentHandlers(m_viewWidget, mimeType.utf8().data(), baseURL.utf8().data(), url.utf8().data());
 }
 #endif
 
 #if ENABLE(TIZEN_SEARCH_PROVIDER)
 void PageClientImpl::addSearchProvider(const String& baseURL, const String& engineURL)
 {
-    ewkViewAddSearchProvider(m_viewImpl->view(), baseURL.utf8().data(), engineURL.utf8().data());
+    ewkViewAddSearchProvider(m_viewWidget, baseURL.utf8().data(), engineURL.utf8().data());
 }
 
 unsigned long PageClientImpl::isSearchProviderInstalled(const String& baseURL, const String& engineURL)
 {
-    return ewkViewIsSearchProviderInstalled(m_viewImpl->view(), baseURL.utf8().data(), engineURL.utf8().data());
+    return ewkViewIsSearchProviderInstalled(m_viewWidget, baseURL.utf8().data(), engineURL.utf8().data());
 }
 #endif
 
 #if ENABLE(TIZEN_SUPPORT_WEBAPP_META_TAG)
 bool PageClientImpl::getStandaloneStatus()
 {
-    return ewkViewGetStandaloneStatus(m_viewImpl->view());
+    return ewkViewGetStandaloneStatus(m_viewWidget);
 }
 #endif
 
 #if ENABLE(SCREEN_ORIENTATION_SUPPORT) && ENABLE(TIZEN_SCREEN_ORIENTATION_SUPPORT)
 bool PageClientImpl::lockOrientation(int willLockOrientation)
 {
-    return ewk_view_orientation_lock(m_viewImpl->view(), willLockOrientation);
+    return ewk_view_orientation_lock(m_viewWidget, willLockOrientation);
 }
 
 void PageClientImpl::unlockOrientation()
 {
-    ewk_view_orientation_unlock(m_viewImpl->view());
+    ewk_view_orientation_unlock(m_viewWidget);
 }
 #endif
 
@@ -1498,7 +1530,7 @@ void PageClientImpl::setOverflowResult(bool pressed, WebLayerID webLayerID)
     if (pressed) {
         if (webLayerID) {
             setIsScrollableLayerFocused(true);
-            m_viewImpl->page()->drawingArea()->layerTreeCoordinatorProxy()->layerTreeRenderer()->setFocusedLayerID(webLayerID);
+            m_page->drawingArea()->layerTreeCoordinatorProxy()->layerTreeRenderer()->setFocusedLayerID(webLayerID);
         } else {
             setIsScrollableNodeFocused(true);
         }
@@ -1507,16 +1539,15 @@ void PageClientImpl::setOverflowResult(bool pressed, WebLayerID webLayerID)
 
 void PageClientImpl::findScrollableNode(const IntPoint& point)
 {
-    WebPageProxy* pageProxy = m_viewImpl->page();
-    if (pageProxy && pageProxy->isLoadingFinished() && pageProxy->askOverflow()) {
+    if (m_page && m_page->isLoadingFinished() && m_page->askOverflow()) {
         IntPoint pointForPress(m_viewImpl->transformFromScene().mapPoint(point));
         WebLayerID webLayerID = 0;
         bool checkOverflowLayer = false;
 #if ENABLE(TIZEN_CSS_OVERFLOW_SCROLL_ACCELERATION_ON_UI_SIDE)
-        DrawingAreaProxy* drawingArea = pageProxy->drawingArea();
+        DrawingAreaProxy* drawingArea = m_page->drawingArea();
         checkOverflowLayer = drawingArea && drawingArea->layerTreeCoordinatorProxy() && drawingArea->layerTreeCoordinatorProxy()->hasOverflowLayer();
 #endif
-        setOverflowResult(pageProxy->setPressedNodeAtPoint(pointForPress, checkOverflowLayer, webLayerID), webLayerID);
+        setOverflowResult(m_page->setPressedNodeAtPoint(pointForPress, checkOverflowLayer, webLayerID), webLayerID);
     }
 }
 #endif
@@ -1528,7 +1559,7 @@ void PageClientImpl::didGetTextStyleStateForSelection(int underlineState, int it
     WebCore::IntRect leftRect, rightRect;
 
     WebCore::IntRect caretRect;
-    m_viewImpl->page()->getCaretPosition(caretRect);
+    page()->getCaretPosition(caretRect);
     if (!caretRect.isEmpty()) {
         startPoint.setX(caretRect.x());
         startPoint.setY(caretRect.y() + caretRect.height());
@@ -1537,7 +1568,7 @@ void PageClientImpl::didGetTextStyleStateForSelection(int underlineState, int it
         endPoint.setY(caretRect.y() + caretRect.height());
     }
 #if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION)
-    else if (m_viewImpl->page()->getSelectionHandlers(leftRect, rightRect)) {
+    else if (page()->getSelectionHandlers(leftRect, rightRect)) {
         startPoint.setX(leftRect.x());
         startPoint.setY(leftRect.y() + leftRect.height());
 
@@ -1550,7 +1581,7 @@ void PageClientImpl::didGetTextStyleStateForSelection(int underlineState, int it
     endPoint.scale(scaleFactor(), scaleFactor());
 
     int viewPositionX, viewPositionY;
-    evas_object_geometry_get(m_viewImpl->view(), &viewPositionX, &viewPositionY, NULL, NULL);
+    evas_object_geometry_get(m_viewWidget, &viewPositionX, &viewPositionY, NULL, NULL);
 
     startPoint.move(-scrollPosition().x(),  -scrollPosition().y());
     startPoint.move(viewPositionX, viewPositionY);
@@ -1558,34 +1589,34 @@ void PageClientImpl::didGetTextStyleStateForSelection(int underlineState, int it
     endPoint.move(-scrollPosition().x(),  -scrollPosition().y());
     endPoint.move(viewPositionX, viewPositionY);
 
-    ewkViewDidGetTextStyleStateForSelection(m_viewImpl->view(), underlineState, italicState, boldState, startPoint, endPoint);
+    ewkViewDidGetTextStyleStateForSelection(m_viewWidget, underlineState, italicState, boldState, startPoint, endPoint);
 }
 #endif
 
 void PageClientImpl::didFindZoomableArea(const IntPoint& target, const IntRect& area)
 {
-    ewk_view_zoomable_area_set(m_viewImpl->view(), target, area);
+    ewk_view_zoomable_area_set(m_viewWidget, target, area);
 }
 
 #if ENABLE(TIZEN_ICON_DATABASE)
 void PageClientImpl::didReceiveIcon()
 {
-    ewkViewIconReceived(m_viewImpl->view());
+    ewkViewIconReceived(viewWidget());
 }
 #endif
 
 #if ENABLE(TIZEN_WEBKIT2_FOCUS_RING)
 void PageClientImpl::hideFocusRing()
 {
-    ewkViewFocusRingHide(m_viewImpl->view());
+    ewkViewFocusRingHide(viewWidget());
 }
 #endif
 #endif // #if OS(TIZEN)
 
 
 #if ENABLE(TIZEN_WEBKIT2_TILED_AC) && ENABLE(TIZEN_RUNTIME_BACKEND_SELECTION)
-PageClientEvasGL::PageClientEvasGL(EwkViewImpl* viewImpl)
-    : PageClientImpl(viewImpl)
+PageClientEvasGL::PageClientEvasGL(WebContext* context, WebPageGroup* pageGroup, Evas_Object* viewWidget)
+    : PageClientImpl(context, pageGroup, viewWidget)
     , m_evasGL(0)
     , m_evasGlApi(0)
     , m_context(0)
@@ -1601,7 +1632,7 @@ PageClientEvasGL::PageClientEvasGL(EwkViewImpl* viewImpl)
 
 PageClientEvasGL::~PageClientEvasGL()
 {
-    m_viewImpl->page()->close();
+    m_page->close();
 }
 
 void PageClientEvasGL::updateViewportSize(const WebCore::IntSize& viewportSize)
@@ -1620,11 +1651,11 @@ void PageClientEvasGL::setViewNeedsDisplay(const WebCore::IntRect& rect)
 #if !ENABLE(TIZEN_WEBKIT2_DIRECT_RENDERING)
     drawContents();
 #endif
-    m_viewImpl->redrawRegion(rect);
+    ewk_view_display(viewWidget(), rect);
 
 #if ENABLE(TIZEN_SCREEN_READER)
-    if (rect.intersects(ewkViewGetFocusRing(m_viewImpl->view())->rect()))
-        m_viewImpl->page()->recalcScreenReaderFocusRect();
+    if (rect.intersects(ewkViewGetFocusRing(m_viewWidget)->rect()))
+        m_page->recalcScreenReaderFocusRect();
 #endif
 }
 
@@ -1633,7 +1664,7 @@ void PageClientEvasGL::displayViewport()
 #if ENABLE(TIZEN_WEBKIT2_DIRECT_RENDERING)
     // We should not draw here when Direct Rendering is enabled.
     // Because we will draw directly when evas is updated - on_pixels_for_accelerated_compositing().
-    ewk_view_mark_for_sync(m_viewImpl->view());
+    ewk_view_mark_for_sync(m_viewWidget);
 #else
     setViewNeedsDisplay(IntRect(IntPoint(), viewSize()));
 #endif
@@ -1643,7 +1674,7 @@ void PageClientEvasGL::displayViewport()
 #endif
 
 #if ENABLE(TIZEN_SCREEN_READER)
-    m_viewImpl->page()->recalcScreenReaderFocusRect();
+    m_page->recalcScreenReaderFocusRect();
 #endif
 }
 
@@ -1657,7 +1688,7 @@ void PageClientEvasGL::drawContents()
     IntSize ewkViewSize = viewSize();
 
 #if ENABLE(TIZEN_WEBKIT2_DIRECT_RENDERING)
-    Ecore_Evas* ee = ecore_evas_ecore_evas_get(evas_object_evas_get(m_viewImpl->view()));
+    Ecore_Evas* ee = ecore_evas_ecore_evas_get(evas_object_evas_get(m_viewWidget));
     m_angle = ecore_evas_rotation_get(ee);
     if (drawingArea())
         drawingArea()->setAngle(m_angle);
@@ -1705,7 +1736,7 @@ void PageClientEvasGL::drawContents()
 
 void PageClientEvasGL::didRenderFrame()
 {
-    ewkViewFrameRendered(m_viewImpl->view());
+    ewkViewFrameRendered(m_viewWidget);
     PageClientImpl::didRenderFrame();
 }
 
@@ -1716,7 +1747,7 @@ bool PageClientEvasGL::makeContextCurrent()
 
 void PageClientEvasGL::initializeAcceleratedCompositingMode()
 {
-    Evas* evas = evas_object_evas_get(m_viewImpl->view());
+    Evas* evas = evas_object_evas_get(viewWidget());
 
     m_config = evas_gl_config_new();
 #if ENABLE(TIZEN_WEBKIT2_DIRECT_RENDERING)
@@ -1803,7 +1834,7 @@ void PageClientEvasGL::setTargetSurface()
         return;
 
     int width, height;
-    evas_object_geometry_get(m_viewImpl->view(), 0, 0, &width, &height);
+    evas_object_geometry_get(viewWidget(), 0, 0, &width, &height);
     if (width == 0 || height == 0)
         return;
 
@@ -1826,7 +1857,7 @@ void PageClientEvasGL::setTargetSurface()
 
     Evas_Native_Surface nativeSurface;
     if (evas_gl_native_surface_get(m_evasGL, m_surface, &nativeSurface))
-        ewk_view_image_native_surface_set(m_viewImpl->view(), &nativeSurface);
+        ewk_view_image_native_surface_set(viewWidget(), &nativeSurface);
 }
 #endif
 
old mode 100755 (executable)
new mode 100644 (file)
index b280a5c..b1ec5bd
@@ -79,13 +79,15 @@ class FormDataCandidate;
 
 class PageClientImpl : public PageClient {
 public:
-    static PassOwnPtr<PageClientImpl> create(EwkViewImpl* viewImpl)
+    static PassOwnPtr<PageClientImpl> create(WebContext* context, WebPageGroup* pageGroup, Evas_Object* viewWidget)
     {
-        return adoptPtr(new PageClientImpl(viewImpl));
+        return adoptPtr(new PageClientImpl(context, pageGroup, viewWidget));
     }
     virtual ~PageClientImpl();
 
-    EwkViewImpl* viewImpl() const;
+    Evas_Object* viewWidget() const { return m_viewWidget; }
+
+    WebPageProxy* page() const { return m_page.get(); }
 
 #if OS(TIZEN)
     struct ViewportConstraints {
@@ -127,6 +129,7 @@ public:
     void setInputMethodState(bool active);
 #endif
 #if ENABLE(TIZEN_ISF_PORT)
+    void updateTextInputState();
     void updateCursorOffset(int);
     void imContextPreeditChanged(Ecore_IMF_Context* context);
     void imContextCommitted(Ecore_IMF_Context* context, char*);
@@ -138,7 +141,7 @@ public:
 
 #if ENABLE(TIZEN_WEBKIT2_TILED_BACKING_STORE)
 #if ENABLE(TIZEN_WEBKIT2_TILED_AC)
-    DrawingAreaProxy* drawingArea() const;
+    DrawingAreaProxy* drawingArea() const { return m_page->drawingArea(); }
 #endif
     float scaleFactor();
     const WebCore::IntPoint scrollPosition();
@@ -268,6 +271,10 @@ public:
 #endif // #if OS(TIZEN)
 
 private:
+#if ENABLE(TIZEN_WEBKIT2_TILED_SCROLLBAR)
+    void createScrollbarIfNeeded(bool horizontalBar, bool verticalBar);
+#endif
+
     // PageClient
     virtual PassOwnPtr<DrawingAreaProxy> createDrawingAreaProxy();
     virtual void setViewNeedsDisplay(const WebCore::IntRect&);
@@ -297,7 +304,6 @@ private:
     virtual WebCore::IntPoint screenToWindow(const WebCore::IntPoint&);
     virtual WebCore::IntRect windowToScreen(const WebCore::IntRect&);
 
-    void updateTextInputState();
     virtual void handleDownloadRequest(DownloadProxy*);
 
     virtual void doneWithKeyEvent(const NativeWebKeyboardEvent&, bool);
@@ -328,10 +334,6 @@ private:
     virtual void didChangeScrollbarsForMainFrame() const;
 
 #if OS(TIZEN)
-#if ENABLE(TIZEN_WEBKIT2_TILED_SCROLLBAR)
-    void createScrollbarIfNeeded(bool horizontalBar, bool verticalBar);
-#endif
-
     virtual void didFirstVisuallyNonEmptyLayoutForMainFrame();
     virtual void didChangeContentsSize(const WebCore::IntSize);
     virtual void pageScaleFactorDidChange();
@@ -385,12 +387,12 @@ private:
 #endif
 
 protected:
-    explicit PageClientImpl(EwkViewImpl*);
+    PageClientImpl(WebContext*, WebPageGroup*, Evas_Object*);
 
     virtual WebCore::IntSize viewSize();
 
-    EwkViewImpl* m_viewImpl;
-
+    RefPtr<WebPageProxy> m_page;
+    Evas_Object* m_viewWidget;
 #if OS(TIZEN)
     ViewportConstraints m_viewportConstraints;
 
@@ -457,6 +459,10 @@ protected:
 
     Vector<RefPtr<WebKit::WebEditCommandProxy> > m_undoCommands;
     Vector<RefPtr<WebKit::WebEditCommandProxy> > m_redoCommands;
+
+    // FIXME: In the open source, m_viewImpl is in the PageClientBase.h file,
+    // but we have m_viewImpl here because we don't have PageClientBase.h yet.
+    EwkViewImpl* m_viewImpl;
 #endif // #if OS(TIZEN)
 };
 
@@ -464,9 +470,9 @@ protected:
 #if ENABLE(TIZEN_WEBKIT2_TILED_AC) && ENABLE(TIZEN_RUNTIME_BACKEND_SELECTION)
 class PageClientEvasGL : public PageClientImpl {
 public:
-    static PassOwnPtr<PageClientEvasGL> create(EwkViewImpl* viewImpl)
+    static PassOwnPtr<PageClientEvasGL> create(WebContext* context, WebPageGroup* pageGroup, Evas_Object* viewWidget)
     {
-        return adoptPtr(new PageClientEvasGL(viewImpl));
+        return adoptPtr(new PageClientEvasGL(context, pageGroup, viewWidget));
     }
     ~PageClientEvasGL();
 
@@ -478,7 +484,7 @@ public:
     virtual bool makeContextCurrent();
 
 private:
-    explicit PageClientEvasGL(EwkViewImpl* viewImpl);
+    PageClientEvasGL(WebContext* context, WebPageGroup* pageGroup, Evas_Object* viewWidget);
 
     virtual void initializeAcceleratedCompositingMode();
     virtual void finalizeAcceleratedCompositingMode();
index 8452aeb..8ef1e8b 100644 (file)
 using namespace WebCore;
 
 /**
- * \struct  Ewk_Vibration_Client
+ * \struct  _Ewk_Vibration_Client
  * @brief   Contains the vibration client callbacks.
  */
-struct Ewk_Vibration_Client {
+struct _Ewk_Vibration_Client {
     Ewk_Vibration_Client_Vibrate_Cb vibrate;
     Ewk_Vibration_Client_Vibration_Cancel_Cb cancelVibration;
     void* userData;
 
-    Ewk_Vibration_Client(Ewk_Vibration_Client_Vibrate_Cb vibrate, Ewk_Vibration_Client_Vibration_Cancel_Cb cancelVibration, void* userData)
+    _Ewk_Vibration_Client(Ewk_Vibration_Client_Vibrate_Cb vibrate, Ewk_Vibration_Client_Vibration_Cancel_Cb cancelVibration, void* userData)
         : vibrate(vibrate)
         , cancelVibration(cancelVibration)
         , userData(userData)
index fadd58a..6b2db4e 100644 (file)
@@ -33,7 +33,7 @@
 #include <wtf/PassRefPtr.h>
 #include <wtf/RefCounted.h>
 
-typedef struct Ewk_Vibration_Client Ewk_Vibration_Client;
+typedef struct _Ewk_Vibration_Client Ewk_Vibration_Client;
 
 class VibrationProvider : public RefCounted<VibrationProvider> {
 public:
diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_back_forward_list.cpp b/Source/WebKit2/UIProcess/API/efl/ewk_back_forward_list.cpp
deleted file mode 100755 (executable)
index 12dbb8f..0000000
+++ /dev/null
@@ -1,186 +0,0 @@
-/*
- * Copyright (C) 2012 Intel Corporation. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "ewk_back_forward_list.h"
-
-#include "WKAPICast.h"
-#include "WKArray.h"
-#include "WKBackForwardList.h"
-#include "ewk_back_forward_list_private.h"
-#include <wtf/text/CString.h>
-
-using namespace WebKit;
-
-Ewk_Back_Forward_List::Ewk_Back_Forward_List(WKBackForwardListRef listRef)
-    : m_wkList(listRef)
-{ }
-
-Ewk_Back_Forward_List_Item* Ewk_Back_Forward_List::nextItem() const
-{
-    return getFromCacheOrCreate(WKBackForwardListGetForwardItem(m_wkList.get()));
-}
-
-Ewk_Back_Forward_List_Item* Ewk_Back_Forward_List::previousItem() const
-{
-    return getFromCacheOrCreate(WKBackForwardListGetBackItem(m_wkList.get()));
-}
-
-Ewk_Back_Forward_List_Item* Ewk_Back_Forward_List::currentItem() const
-{
-    return getFromCacheOrCreate(WKBackForwardListGetCurrentItem(m_wkList.get()));
-}
-
-Ewk_Back_Forward_List_Item* Ewk_Back_Forward_List::itemAt(int index) const
-{
-    return getFromCacheOrCreate(WKBackForwardListGetItemAtIndex(m_wkList.get(), index));
-}
-
-unsigned Ewk_Back_Forward_List::size() const
-{
-    const unsigned currentItem = WKBackForwardListGetCurrentItem(m_wkList.get()) ? 1 : 0;
-
-    return WKBackForwardListGetBackListCount(m_wkList.get()) + WKBackForwardListGetForwardListCount(m_wkList.get()) + currentItem;
-}
-
-WKRetainPtr<WKArrayRef> Ewk_Back_Forward_List::backList(int limit) const
-{
-    if (limit == -1)
-        limit = WKBackForwardListGetBackListCount(m_wkList.get());
-    ASSERT(limit >= 0);
-
-    return adoptWK(WKBackForwardListCopyBackListWithLimit(m_wkList.get(), limit));
-}
-
-WKRetainPtr<WKArrayRef> Ewk_Back_Forward_List::forwardList(int limit) const
-{
-    if (limit == -1)
-        limit = WKBackForwardListGetForwardListCount(m_wkList.get());
-    ASSERT(limit >= 0);
-
-    return adoptWK(WKBackForwardListCopyForwardListWithLimit(m_wkList.get(), limit));
-}
-
-Ewk_Back_Forward_List_Item* Ewk_Back_Forward_List::getFromCacheOrCreate(WKBackForwardListItemRef wkItem) const
-{
-    if (!wkItem)
-        return 0;
-
-    RefPtr<Ewk_Back_Forward_List_Item> item = m_wrapperCache.get(wkItem);
-    if (!item) {
-        item = Ewk_Back_Forward_List_Item::create(wkItem);
-        m_wrapperCache.set(wkItem, item);
-    }
-
-    return item.get();
-}
-
-Eina_List* Ewk_Back_Forward_List::createEinaList(WKArrayRef wkList) const
-{
-    if (!wkList)
-        return 0;
-
-    Eina_List* result = 0;
-
-    const size_t count = WKArrayGetSize(wkList);
-    for (size_t i = 0; i < count; ++i) {
-        WKBackForwardListItemRef wkItem = static_cast<WKBackForwardListItemRef>(WKArrayGetItemAtIndex(wkList, i));
-        Ewk_Back_Forward_List_Item* item = getFromCacheOrCreate(wkItem);
-        result = eina_list_append(result, ewk_back_forward_list_item_ref(item));
-    }
-
-    return result;
-}
-
-/**
- * @internal
- * Updates items cache.
- */
-void Ewk_Back_Forward_List::update(WKBackForwardListItemRef wkAddedItem, WKArrayRef wkRemovedItems)
-{
-    if (wkAddedItem) // Checking also here to avoid EINA_SAFETY_ON_NULL_RETURN_VAL warnings.
-        getFromCacheOrCreate(wkAddedItem); // Puts new item to the cache.
-
-    const size_t removedItemsSize = wkRemovedItems ? WKArrayGetSize(wkRemovedItems) : 0;
-    for (size_t i = 0; i < removedItemsSize; ++i) {
-        WKBackForwardListItemRef wkItem = static_cast<WKBackForwardListItemRef>(WKArrayGetItemAtIndex(wkRemovedItems, i));
-        m_wrapperCache.remove(wkItem);
-    }
-}
-
-Ewk_Back_Forward_List_Item* ewk_back_forward_list_current_item_get(const Ewk_Back_Forward_List* list)
-{
-    EINA_SAFETY_ON_NULL_RETURN_VAL(list, 0);
-
-    return list->currentItem();
-}
-
-Ewk_Back_Forward_List_Item* ewk_back_forward_list_previous_item_get(const Ewk_Back_Forward_List* list)
-{
-    EINA_SAFETY_ON_NULL_RETURN_VAL(list, 0);
-
-    return list->previousItem();
-}
-
-Ewk_Back_Forward_List_Item* ewk_back_forward_list_next_item_get(const Ewk_Back_Forward_List* list)
-{
-    EINA_SAFETY_ON_NULL_RETURN_VAL(list, 0);
-
-    return list->nextItem();
-}
-
-Ewk_Back_Forward_List_Item* ewk_back_forward_list_item_at_index_get(const Ewk_Back_Forward_List* list, int index)
-{
-    EINA_SAFETY_ON_NULL_RETURN_VAL(list, 0);
-
-    return list->itemAt(index);
-}
-
-unsigned ewk_back_forward_list_count(Ewk_Back_Forward_List* list)
-{
-    EINA_SAFETY_ON_NULL_RETURN_VAL(list, 0);
-
-    return list->size();
-}
-
-Eina_List* ewk_back_forward_list_n_back_items_copy(const Ewk_Back_Forward_List* list, int limit)
-{
-    EINA_SAFETY_ON_NULL_RETURN_VAL(list, 0);
-    EINA_SAFETY_ON_FALSE_RETURN_VAL(limit == -1 || limit > 0, 0);
-
-    WKRetainPtr<WKArrayRef> backList = list->backList(limit);
-
-    return list->createEinaList(backList.get());
-}
-
-Eina_List* ewk_back_forward_list_n_forward_items_copy(const Ewk_Back_Forward_List* list, int limit)
-{
-    EINA_SAFETY_ON_NULL_RETURN_VAL(list, 0);
-    EINA_SAFETY_ON_FALSE_RETURN_VAL(limit == -1 || limit > 0, 0);
-
-    WKRetainPtr<WKArrayRef> forwardList = list->forwardList(limit);
-
-    return list->createEinaList(forwardList.get());
-}
diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_back_forward_list.h b/Source/WebKit2/UIProcess/API/efl/ewk_back_forward_list.h
deleted file mode 100644 (file)
index 09dbc5a..0000000
+++ /dev/null
@@ -1,154 +0,0 @@
-/*
- * Copyright (C) 2012 Intel Corporation. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/**
- * @file    ewk_back_forward_list.h
- * @brief   Describes the Ewk Back Forward List API.
- */
-
-#ifndef ewk_back_forward_list_h
-#define ewk_back_forward_list_h
-
-#include "ewk_back_forward_list_item.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/** Creates a type name for Ewk_Back_Forward_List */
-typedef struct Ewk_Back_Forward_List Ewk_Back_Forward_List;
-
-/**
- * Returns the current item in the @a list.
- *
- * @param list the back-forward list instance
- *
- * @return the current item in the @a list or @c NULL in case of error
- */
-EAPI Ewk_Back_Forward_List_Item *ewk_back_forward_list_current_item_get(const Ewk_Back_Forward_List *list);
-
-/**
- * Returns the item that precedes the current item in the @a list.
- *
- * @param list the back-forward list instance
- *
- * @return the item that precedes the current item the @a list or @c NULL in case of error
- */
-EAPI Ewk_Back_Forward_List_Item *ewk_back_forward_list_previous_item_get(const Ewk_Back_Forward_List *list);
-
-/**
- * Returns the item that follows the current item in the @a list.
- *
- * @param list the back-forward list instance
- *
- * @return the item that follows the current item in the @a list or @c NULL in case of error
- */
-EAPI Ewk_Back_Forward_List_Item *ewk_back_forward_list_next_item_get(const Ewk_Back_Forward_List *list);
-
-/**
- * Returns the item at a given @a index relative to the current item.
- *
- * @param list the back-forward list instance
- * @param index the index of the item
- *
- * @return the item at a given @a index relative to the current item or @c NULL in case of error
- */
-EAPI Ewk_Back_Forward_List_Item *ewk_back_forward_list_item_at_index_get(const Ewk_Back_Forward_List *list, int index);
-
-/**
- * Returns the length of the back-forward list including current item.
- *
- * @param list the back-forward list instance
- *
- * @return the length of the back-forward list including current item or @c 0 in case of error
- */
-EAPI unsigned ewk_back_forward_list_count(Ewk_Back_Forward_List *list);
-
-/**
- * Creates the list containing the items preceding the current item limited by @a limit.
- *
- * The @c Ewk_Back_Forward_List_Item elements are located in the result list starting with the oldest one.
- * if @a limit is equal to @c -1 all the items preceding the current item are returned.
- *
- * @param list the back-forward list instance
- * @param limit the number of items to retrieve
- *
- * @return @c Eina_List containing @c Ewk_Back_Forward_List_Item elements or @c NULL in case of error,
- *            the Eina_List and its items should be freed after use. Use ewk_back_forward_list_item_unref()
- *            to free the items
- */
-EAPI Eina_List *ewk_back_forward_list_n_back_items_copy(const Ewk_Back_Forward_List *list, int limit);
-
-/**
- * Creates the list containing the items following the current item limited by @a limit.
- *
- * The @c Ewk_Back_Forward_List_Item elements are located in the result list starting with the oldest one.
- * if @a limit is equal to @c -1 all the items preceding the current item are returned.
- *
- * @param list the back-forward list instance
- * @param limit the number of items to retrieve
- *
- * @return @c Eina_List containing @c Ewk_Back_Forward_List_Item elements or @c NULL in case of error,
- *            the Eina_List and its items should be freed after use. Use ewk_back_forward_list_item_unref()
- *            to free the items
- */
-EAPI Eina_List *ewk_back_forward_list_n_forward_items_copy(const Ewk_Back_Forward_List *list, int limit);
-
-/**
- * Creates the list containing the items preceding the current item.
- *
- * The @c Ewk_Back_Forward_List_Item elements are located in the result list starting with the oldest one.
- *
- * @param list the back-forward list instance
- *
- * @return @c Eina_List containing @c Ewk_Back_Forward_List_Item elements or @c NULL in case of error,
- *            the Eina_List and its items should be freed after use. Use ewk_back_forward_list_item_unref()
- *            to free the items
- *
- * @see ewk_back_forward_list_n_back_items_copy
- */
-#define ewk_back_forward_list_back_items_copy(list) \
-    ewk_back_forward_list_n_back_items_copy(list, -1)
-
-/**
- * Creates the list containing the items following the current item.
- *
- * The @c Ewk_Back_Forward_List_Item elements are located in the result list starting with the oldest one.
- *
- * @param list the back-forward list instance
- *
- * @return @c Eina_List containing @c Ewk_Back_Forward_List_Item elements or @c NULL in case of error,
- *            the Eina_List and its items should be freed after use. Use ewk_back_forward_list_item_unref()
- *            to free the items
- *
- * @see ewk_back_forward_list_n_forward_items_copy
- */
-#define ewk_back_forward_list_forward_items_copy(list) \
-    ewk_back_forward_list_n_forward_items_copy(list, -1)
-
-#ifdef __cplusplus
-}
-#endif
-#endif // ewk_back_forward_list_h
diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_back_forward_list_item.cpp b/Source/WebKit2/UIProcess/API/efl/ewk_back_forward_list_item.cpp
deleted file mode 100644 (file)
index 5ec2360..0000000
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Copyright (C) 2012 Intel Corporation. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this item of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this item of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "ewk_back_forward_list_item.h"
-
-#include "WKAPICast.h"
-#include "WKBackForwardListItem.h"
-#include "ewk_back_forward_list_item_private.h"
-
-using namespace WebKit;
-
-Ewk_Back_Forward_List_Item::Ewk_Back_Forward_List_Item(WKBackForwardListItemRef itemRef)
-    : m_wkItem(itemRef)
-{ }
-
-const char* Ewk_Back_Forward_List_Item::url() const
-{
-    m_url = WKEinaSharedString(AdoptWK, WKBackForwardListItemCopyURL(m_wkItem.get()));
-
-    return m_url;
-}
-
-const char* Ewk_Back_Forward_List_Item::title() const
-{
-    m_title = WKEinaSharedString(AdoptWK, WKBackForwardListItemCopyTitle(m_wkItem.get()));
-
-    return m_title;
-}
-
-const char* Ewk_Back_Forward_List_Item::originalURL() const
-{
-    m_originalURL = WKEinaSharedString(AdoptWK, WKBackForwardListItemCopyOriginalURL(m_wkItem.get()));
-
-    return m_originalURL;
-}
-
-Ewk_Back_Forward_List_Item* ewk_back_forward_list_item_ref(Ewk_Back_Forward_List_Item* item)
-{
-    EINA_SAFETY_ON_NULL_RETURN_VAL(item, 0);
-    item->ref();
-
-    return item;
-}
-
-void ewk_back_forward_list_item_unref(Ewk_Back_Forward_List_Item* item)
-{
-    EINA_SAFETY_ON_NULL_RETURN(item);
-
-    item->deref();
-}
-
-const char* ewk_back_forward_list_item_url_get(const Ewk_Back_Forward_List_Item* item)
-{
-    EINA_SAFETY_ON_NULL_RETURN_VAL(item, 0);
-
-    return item->url();
-}
-
-const char* ewk_back_forward_list_item_title_get(const Ewk_Back_Forward_List_Item* item)
-{
-    EINA_SAFETY_ON_NULL_RETURN_VAL(item, 0);
-
-    return item->title();
-}
-
-const char* ewk_back_forward_list_item_original_url_get(const Ewk_Back_Forward_List_Item* item)
-{
-    EINA_SAFETY_ON_NULL_RETURN_VAL(item, 0);
-
-    return item->originalURL();
-}
diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_back_forward_list_item_private.h b/Source/WebKit2/UIProcess/API/efl/ewk_back_forward_list_item_private.h
deleted file mode 100644 (file)
index 50718bc..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (C) 2012 Intel Corporation. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this item of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this item of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef ewk_back_forward_list_item_private_h
-#define ewk_back_forward_list_item_private_h
-
-#include "WKEinaSharedString.h"
-#include <WebKit2/WKBase.h>
-#include <wtf/PassRefPtr.h>
-#include <wtf/RefCounted.h>
-
-/**
- * \struct  Ewk_Back_Forward_List
- * @brief   Contains the Back Forward List data.
- */
-class Ewk_Back_Forward_List_Item : public RefCounted<Ewk_Back_Forward_List_Item> {
-public:
-    static PassRefPtr<Ewk_Back_Forward_List_Item> create(WKBackForwardListItemRef itemRef)
-    {
-        return adoptRef(new Ewk_Back_Forward_List_Item(itemRef));
-    }
-
-    const char* url() const;
-    const char* title() const;
-    const char* originalURL() const;
-
-private:
-    explicit Ewk_Back_Forward_List_Item(WKBackForwardListItemRef itemRef);
-
-    WKRetainPtr<WKBackForwardListItemRef> m_wkItem;
-    mutable WKEinaSharedString m_url;
-    mutable WKEinaSharedString m_title;
-    mutable WKEinaSharedString m_originalURL;
-};
-
-#endif // ewk_back_forward_list_private_h
diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_back_forward_list_private.h b/Source/WebKit2/UIProcess/API/efl/ewk_back_forward_list_private.h
deleted file mode 100644 (file)
index 7aad467..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright (C) 2012 Intel Corporation. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef ewk_back_forward_list_private_h
-#define ewk_back_forward_list_private_h
-
-#include "WKRetainPtr.h"
-#include "ewk_back_forward_list_item_private.h"
-#include <WebKit2/WKBase.h>
-#include <wtf/HashMap.h>
-#include <wtf/PassOwnPtr.h>
-
-typedef HashMap<WKBackForwardListItemRef, RefPtr<Ewk_Back_Forward_List_Item> > ItemsMap;
-
-class Ewk_Back_Forward_List {
-public:
-    static PassOwnPtr<Ewk_Back_Forward_List> create(WKBackForwardListRef listRef)
-    {
-        return adoptPtr(new Ewk_Back_Forward_List(listRef));
-    }
-
-    Ewk_Back_Forward_List_Item* previousItem() const;
-    Ewk_Back_Forward_List_Item* currentItem() const;
-    Ewk_Back_Forward_List_Item* nextItem() const;
-    Ewk_Back_Forward_List_Item* itemAt(int index) const;
-
-    WKRetainPtr<WKArrayRef> backList(int limit = -1) const;
-    WKRetainPtr<WKArrayRef> forwardList(int limit = -1) const;
-    unsigned size() const;
-
-    void update(WKBackForwardListItemRef wkAddedItem, WKArrayRef wkRemovedItems);
-    Eina_List* createEinaList(WKArrayRef wkList) const;
-
-private:
-    explicit Ewk_Back_Forward_List(WKBackForwardListRef listRef);
-
-    Ewk_Back_Forward_List_Item* getFromCacheOrCreate(WKBackForwardListItemRef wkItem) const;
-
-    WKRetainPtr<WKBackForwardListRef> m_wkList;
-    mutable ItemsMap m_wrapperCache;
-};
-
-#endif // ewk_back_forward_list_private_h
index 9dd674e..30ac9c2 100755 (executable)
 #include "ewk_context.h"
 
 #include "BatteryProvider.h"
-#include "ContextHistoryClientEfl.h"
 #include "NetworkInfoProvider.h"
-#include "RequestManagerClientEfl.h"
 #include "VibrationProvider.h"
 #include "WKAPICast.h"
 #include "WKContextSoup.h"
 #include "WKRetainPtr.h"
 #include "WKString.h"
-#include "WebContext.h"
-#include "WebSoupRequestManagerProxy.h"
+#include "ewk_context_download_client_private.h"
 #include "ewk_context_private.h"
+#include "ewk_context_request_manager_client_private.h"
 #include "ewk_cookie_manager_private.h"
-#include "ewk_favicon_database_private.h"
-#include "ewk_url_scheme_request_private.h"
-#include <WebCore/FileSystem.h>
-#include <WebCore/IconDatabase.h>
+#include "ewk_download_job.h"
+#include "ewk_download_job_private.h"
 #include <wtf/HashMap.h>
 #include <wtf/text/WTFString.h>
 
 #endif
 #include "WKNumber.h"
 #include "WKSecurityOrigin.h"
+#include "WKString.h"
 #include "WKURL.h"
+#include "WebContext.h"
 #include "ewk_context_injected_bundle_client.h"
 #include "ewk_security_origin.h"
-#include "ewk_private.h"
 #include <Eina.h>
+#include <WebCore/FileSystem.h>
+#include <wtf/text/WTFString.h>
 
 #if ENABLE(TIZEN_WRT_LAUNCHING_PERFORMANCE)
 #include "ProcessLauncher.h"
 #include <EGL/egl.h>
 #endif
 
-using namespace WebCore;
 using namespace WebKit;
 
-typedef HashMap<WKContextRef, Ewk_Context*> ContextMap;
+struct _Ewk_Url_Scheme_Handler {
+    Ewk_Url_Scheme_Request_Cb callback;
+    void* userData;
 
-static inline ContextMap& contextMap()
-{
-    DEFINE_STATIC_LOCAL(ContextMap, map, ());
-    return map;
-}
+    _Ewk_Url_Scheme_Handler()
+        : callback(0)
+        , userData(0)
+    { }
 
-Ewk_Context::Ewk_Context(WKContextRef context)
-    : m_context(context)
-    , m_historyClient(ContextHistoryClientEfl::create(context))
-{
-    ContextMap::AddResult result = contextMap().add(context, this);
-    ASSERT_UNUSED(result, result.isNewEntry);
+    _Ewk_Url_Scheme_Handler(Ewk_Url_Scheme_Request_Cb callback, void* userData)
+        : callback(callback)
+        , userData(userData)
+    { }
+};
+
+typedef HashMap<String, _Ewk_Url_Scheme_Handler> URLSchemeHandlerMap;
 
+struct _Ewk_Context {
+    WKRetainPtr<WKContextRef> context;
+
+    Ewk_Cookie_Manager* cookieManager;
 #if ENABLE(BATTERY_STATUS)
-    m_batteryProvider = BatteryProvider::create(context);
+    RefPtr<BatteryProvider> batteryProvider;
 #endif
-
 #if ENABLE(NETWORK_INFO)
-    m_networkInfoProvider = NetworkInfoProvider::create(context);
+    RefPtr<NetworkInfoProvider> networkInfoProvider;
 #endif
-
 #if ENABLE(VIBRATION)
-    m_vibrationProvider = VibrationProvider::create(context);
+    RefPtr<VibrationProvider> vibrationProvider;
 #endif
+    HashMap<uint64_t, Ewk_Download_Job*> downloadJobs;
 
-#if ENABLE(MEMORY_SAMPLER)
-    static bool initializeMemorySampler = false;
-    static const char environmentVariable[] = "SAMPLE_MEMORY";
-
-    if (!initializeMemorySampler && getenv(environmentVariable)) {
-        WKRetainPtr<WKDoubleRef> interval(AdoptWK, WKDoubleCreate(0.0));
-        WKContextStartMemorySampler(context, interval.get());
-        initializeMemorySampler = true;
-    }
-#endif
-
-#if ENABLE(SPELLCHECK)
-    Ewk_Text_Checker::initialize();
-    if (ewk_settings_continuous_spell_checking_enabled_get()) {
-        // Load the default language.
-        ewk_settings_spell_checking_languages_set(0);
-    }
-#endif
-
-    // Initialize WKContext clients.
-    m_downloadManager = DownloadManagerEfl::create(this);
-    m_requestManagerClient = RequestManagerClientEfl::create(this);
+    WKRetainPtr<WKSoupRequestManagerRef> requestManager;
+    URLSchemeHandlerMap urlSchemeHandlers;
 
 #if OS(TIZEN)
+    const char* proxyAddress;
+#if ENABLE(TIZEN_CERTIFICATE_HANDLING)
+    const char* certificateFile;
+#endif
 #if ENABLE(TIZEN_SQL_DATABASE)
-    m_defaultDatabaseQuota = 5 * 1024 * 1024;
+    uint64_t defaultDatabaseQuota;
+#endif
+    struct {
+        Ewk_Context_Message_From_Injected_Bundle_Callback callback;
+        void* userData;
+    } messageFromInjectedBundle;
+    struct {
+        Ewk_Context_Did_Start_Download_Callback callback;
+        void* userData;
+    } didStartDownload;
+#if ENABLE(TIZEN_WEBKIT2_CONTEXT_X_WINDOW)
+    Ecore_X_Window xWindow;
 #endif
-    m_messageFromInjectedBundle.callback = 0;
-    m_messageFromInjectedBundle.userData = 0;
-    m_didStartDownload.callback = 0;
-    m_didStartDownload.userData = 0;
 #if ENABLE(TIZEN_WEBKIT2_FORM_DATABASE)
-    m_formDatabase = FormDatabase::create();
-    m_formDatabase->open(FormDatabase::defaultDatabaseDirectoryPath(), FormDatabase::defaultDatabaseFilename());
+    RefPtr<FormDatabase> formDatabase;
 #endif
 #endif
-}
 
-Ewk_Context::~Ewk_Context()
-{
-    ASSERT(contextMap().get(m_context.get()) == this);
-    contextMap().remove(m_context.get());
-#if ENABLE(TIZEN_CACHE_DUMP_SYNC)
-    dumpCache();
+    _Ewk_Context(WKRetainPtr<WKContextRef> contextRef)
+        : context(contextRef)
+        , cookieManager(0)
+        , requestManager(WKContextGetSoupRequestManager(contextRef.get()))
+    {
+#if ENABLE(BATTERY_STATUS)
+        batteryProvider = BatteryProvider::create(context.get());
 #endif
-}
-
-PassRefPtr<Ewk_Context> Ewk_Context::create(WKContextRef context)
-{
-    if (contextMap().contains(context))
-        return contextMap().get(context); // Will be ref-ed automatically.
 
-    return adoptRef(new Ewk_Context(context));
-}
-
-PassRefPtr<Ewk_Context> Ewk_Context::create()
-{
-    return create(adoptWK(WKContextCreate()).get());
-}
-
-PassRefPtr<Ewk_Context> Ewk_Context::create(const String& injectedBundlePath)
-{   
-    if (!fileExists(injectedBundlePath))
-        return 0;
-
-    WKRetainPtr<WKStringRef> injectedBundlePathWK = adoptWK(toCopiedAPI(injectedBundlePath));
-    WKRetainPtr<WKContextRef> contextWK = adoptWK(WKContextCreateWithInjectedBundlePath(injectedBundlePathWK.get()));
-
-    return create(contextWK.get());
-}
-
-PassRefPtr<Ewk_Context> Ewk_Context::defaultContext()
-{
-    static RefPtr<Ewk_Context> defaultInstance = create(adoptWK(WKContextCreate()).get());
-
-    return defaultInstance;
-}
-
-Ewk_Cookie_Manager* Ewk_Context::cookieManager()
-{
-    if (!m_cookieManager)
-        m_cookieManager = Ewk_Cookie_Manager::create(WKContextGetCookieManager(m_context.get()));
-
-    return m_cookieManager.get();
-}
-
-Ewk_Favicon_Database* Ewk_Context::faviconDatabase()
-{
-    if (!m_faviconDatabase) {
-        WKRetainPtr<WKIconDatabaseRef> iconDatabase = WKContextGetIconDatabase(m_context.get());
-        // Set the database path if it is not open yet.
-        if (!toImpl(iconDatabase.get())->isOpen()) {
-            WebContext* webContext = toImpl(m_context.get());
-            String databasePath = webContext->iconDatabasePath() + "/" + WebCore::IconDatabase::defaultDatabaseFilename();
-            webContext->setIconDatabasePath(databasePath);
-        }
-        m_faviconDatabase = Ewk_Favicon_Database::create(iconDatabase.get());
-    }
-
-    return m_faviconDatabase.get();
-}
-
-RequestManagerClientEfl* Ewk_Context::requestManager()
-{
-    return m_requestManagerClient.get();
-}
+#if ENABLE(NETWORK_INFO)
+        networkInfoProvider = NetworkInfoProvider::create(context.get());
+#endif
 
 #if ENABLE(VIBRATION)
-PassRefPtr<VibrationProvider> Ewk_Context::vibrationProvider()
-{
-    return m_vibrationProvider;
-}
+        vibrationProvider = VibrationProvider::create(context.get());
 #endif
 
-void Ewk_Context::addVisitedLink(const String& visitedURL)
-{
-    toImpl(m_context.get())->addVisitedLink(visitedURL);
-}
-
-void Ewk_Context::setCacheModel(Ewk_Cache_Model cacheModel)
-{
-    WKContextSetCacheModel(m_context.get(), static_cast<Ewk_Cache_Model>(cacheModel));
-}
-
-Ewk_Cache_Model Ewk_Context::cacheModel() const
-{
-    return static_cast<Ewk_Cache_Model>(WKContextGetCacheModel(m_context.get()));
-}
-
-Ewk_Context* ewk_context_ref(Ewk_Context* ewkContext)
-{
-    EINA_SAFETY_ON_NULL_RETURN_VAL(ewkContext, 0);
+        ewk_context_request_manager_client_attach(this);
+        ewk_context_download_client_attach(this);
+#if ENABLE(SPELLCHECK)
+        Ewk_Text_Checker::initialize();
+        if (ewk_settings_continuous_spell_checking_enabled_get()) {
+            // Load the default language.
+            ewk_settings_spell_checking_languages_set(0);
+        }
+#endif
 
-    ewkContext->ref();
+#if OS(TIZEN)
+        this->proxyAddress = 0;
+#if ENABLE(TIZEN_CERTIFICATE_HANDLING)
+        this->certificateFile = 0;
+#endif
+#if ENABLE(TIZEN_SQL_DATABASE)
+        this->defaultDatabaseQuota = 5 * 1024 * 1024;
+#endif
+        this->messageFromInjectedBundle.callback = 0;
+        this->messageFromInjectedBundle.userData = 0;
+        this->didStartDownload.callback = 0;
+        this->didStartDownload.userData = 0;
+#if ENABLE(TIZEN_WEBKIT2_FORM_DATABASE)
+        this->formDatabase = FormDatabase::create();
+        this->formDatabase->open(FormDatabase::defaultDatabaseDirectoryPath(), FormDatabase::defaultDatabaseFilename());
+#endif
+#endif
+    }
 
-    return ewkContext;
-}
+    ~_Ewk_Context()
+    {
+        if (cookieManager)
+            ewk_cookie_manager_free(cookieManager);
 
-void ewk_context_unref(Ewk_Context* ewkContext)
-{
-    EINA_SAFETY_ON_NULL_RETURN(ewkContext);
+#if ENABLE(TIZEN_CACHE_DUMP_SYNC)
+        ewk_context_cache_dump(this);
+#endif
 
-    ewkContext->deref();
-}
+        HashMap<uint64_t, Ewk_Download_Job*>::iterator it = downloadJobs.begin();
+        HashMap<uint64_t, Ewk_Download_Job*>::iterator end = downloadJobs.end();
+        for ( ; it != end; ++it)
+            ewk_download_job_unref(it->second);
+    }
+};
 
 Ewk_Cookie_Manager* ewk_context_cookie_manager_get(const Ewk_Context* ewkContext)
 {
     EINA_SAFETY_ON_NULL_RETURN_VAL(ewkContext, 0);
 
-    return const_cast<Ewk_Context*>(ewkContext)->cookieManager();
-}
-
-Ewk_Favicon_Database* ewk_context_favicon_database_get(const Ewk_Context* ewkContext)
-{
-    EINA_SAFETY_ON_NULL_RETURN_VAL(ewkContext, 0);
+    if (!ewkContext->cookieManager)
+        const_cast<Ewk_Context*>(ewkContext)->cookieManager = ewk_cookie_manager_new(WKContextGetCookieManager(ewkContext->context.get()));
 
-    return const_cast<Ewk_Context*>(ewkContext)->faviconDatabase();
+    return ewkContext->cookieManager;
 }
 
-WKContextRef Ewk_Context::wkContext()
+WKContextRef ewk_context_WKContext_get(const Ewk_Context* ewkContext)
 {
-    return m_context.get();
-}
-
-DownloadManagerEfl* Ewk_Context::downloadManager() const
-{
-    return m_downloadManager.get();
-}
-
-ContextHistoryClientEfl* Ewk_Context::historyClient()
-{
-    return m_historyClient.get();
-}
-
-#if OS(TIZEN)
-bool Ewk_Context::setProxyAddress(const char* proxyAddress)
-{
-    if (m_proxyAddress == proxyAddress)
-        return false;
-
-    m_proxyAddress = proxyAddress;
-    return true;
+    return ewkContext->context.get();
 }
 
-#if ENABLE(TIZEN_CERTIFICATE_HANDLING)
-bool Ewk_Context::setCertificateFile(const char* certificateFile)
-{
-    if (m_certificateFile == certificateFile)
-        return false;
-
-    m_certificateFile = certificateFile;
-    return true;
-}
-#endif
-
-void Ewk_Context::setDefaultDatabaseQuota(uint64_t defaultDatabaseQuota)
-{
-    m_defaultDatabaseQuota = defaultDatabaseQuota;
-}
-
-void Ewk_Context::setMessageFromInjectedBundleCallback(Ewk_Context_Message_From_Injected_Bundle_Callback callback, void* userData)
+/**
+ * @internal
+ * Registers that a new download has been requested.
+ */
+void ewk_context_download_job_add(Ewk_Context* ewkContext, Ewk_Download_Job* ewkDownload)
 {
-    m_messageFromInjectedBundle.callback = callback;
-    m_messageFromInjectedBundle.userData = userData;
-}
+    EINA_SAFETY_ON_NULL_RETURN(ewkContext);
+    EINA_SAFETY_ON_NULL_RETURN(ewkDownload);
 
-void Ewk_Context::didReceiveMessageFromInjectedBundle(WKStringRef messageName, WKTypeRef messageBody, WKTypeRef* returnData)
-{
-    if (!m_messageFromInjectedBundle.callback)
+    uint64_t downloadId = ewk_download_job_id_get(ewkDownload);
+    if (ewkContext->downloadJobs.contains(downloadId))
         return;
 
-    CString name = toImpl(messageName)->string().utf8();
-    CString body;
-    if (messageBody && WKStringGetTypeID() == WKGetTypeID(messageBody))
-        body = toImpl(static_cast<WKStringRef>(messageBody))->string().utf8();
-
-    if (returnData) {
-        char* returnString = 0;
-        m_messageFromInjectedBundle.callback(name.data(), body.data(), &returnString,
-                                                       m_messageFromInjectedBundle.userData);
-        if (returnString) {
-            *returnData = WKStringCreateWithUTF8CString(returnString);
-            free(returnString);
-        } else
-            *returnData = WKStringCreateWithUTF8CString("");
-    } else
-        m_messageFromInjectedBundle.callback(name.data(), body.data(), 0, m_messageFromInjectedBundle.userData);
+    ewk_download_job_ref(ewkDownload);
+    ewkContext->downloadJobs.add(downloadId, ewkDownload);
 }
 
-void Ewk_Context::setDidStartDownloadCallback(Ewk_Context_Did_Start_Download_Callback callback, void* userData)
-{
-    m_didStartDownload.callback = callback;
-    m_didStartDownload.userData = userData;
-}
-
-void Ewk_Context::didStartDownload(WKStringRef downloadURL)
+/**
+ * @internal
+ * Returns the #Ewk_Download_Job with the given @a downloadId, or
+ * @c 0 in case of failure.
+ */
+Ewk_Download_Job* ewk_context_download_job_get(const Ewk_Context* ewkContext, uint64_t downloadId)
 {
-    EINA_SAFETY_ON_NULL_RETURN(m_didStartDownload.callback);
+    EINA_SAFETY_ON_NULL_RETURN_VAL(ewkContext, 0);
 
-    m_didStartDownload.callback(toImpl(downloadURL)->string().utf8().data(), m_didStartDownload.userData);
+    return ewkContext->downloadJobs.get(downloadId);
 }
 
-#if ENABLE(TIZEN_CACHE_MEMORY_OPTIMIZATION)
-void Ewk_Context::clearAllDecodedData()
-{
-    WKResourceCacheManagerRef cacheManager = WKContextGetResourceCacheManager(wkContext());
-    WKResourceCacheManagerClearCacheForAllOrigins(cacheManager, WKResourceCachesToClearInDecodedDataOnly);
-}
-#endif
-
-#if ENABLE(TIZEN_WEBKIT2_CONTEXT_X_WINDOW)
-Ecore_X_Window Ewk_Context::xWindow()
+/**
+ * @internal
+ * Removes the #Ewk_Download_Job with the given @a downloadId from the internal
+ * HashMap.
+ */
+void ewk_context_download_job_remove(Ewk_Context* ewkContext, uint64_t downloadId)
 {
-    return m_xWindow;
+    EINA_SAFETY_ON_NULL_RETURN(ewkContext);
+    Ewk_Download_Job* download = ewkContext->downloadJobs.take(downloadId);
+    if (download)
+        ewk_download_job_unref(download);
 }
 
-void Ewk_Context::setXWindow(Ecore_X_Window xWindow)
+/**
+ * Retrieve the request manager for @a ewkContext.
+ *
+ * @param ewkContext a #Ewk_Context object.
+ */
+WKSoupRequestManagerRef ewk_context_request_manager_get(const Ewk_Context* ewkContext)
 {
-    toImpl(wkContext())->setXWindow(xWindow);
+    return ewkContext->requestManager.get();
 }
-#endif
-
-#if ENABLE(TIZEN_WEBKIT2_FORM_DATABASE)
-void Ewk_Context::addFormData(const char* url, WKDictionaryRef& formData, bool isPasswordForm)
-{
-    EINA_SAFETY_ON_NULL_RETURN(url);
-    if (!m_formDatabase->isOpen())
-        return;
 
-    Vector<std::pair<String, String> > formDataVector;
-    WKRetainPtr<WKArrayRef> wkKeys(AdoptWK, WKDictionaryCopyKeys(formData));
-    size_t numKeys = WKArrayGetSize(wkKeys.get());
-    for (size_t i = 0; i < numKeys; ++i) {
-        WKStringRef wkKey = static_cast<WKStringRef>(WKArrayGetItemAtIndex(wkKeys.get(), i));
-        WKStringRef wkValue = static_cast<WKStringRef>(WKDictionaryGetItemForKey(formData, wkKey));
-
-        int length = WKStringGetMaximumUTF8CStringSize(wkKey);
-        if (length <= 0)
-            continue;
-        OwnArrayPtr<char> keyBuffer = adoptArrayPtr(new char[length]);
-        WKStringGetUTF8CString(wkKey, keyBuffer.get(), length);
-
-        length = WKStringGetMaximumUTF8CStringSize(wkValue);
-        if (length <= 0)
-            continue;
-        OwnArrayPtr<char> valueBuffer = adoptArrayPtr(new char[length]);
-        WKStringGetUTF8CString(wkValue, valueBuffer.get(), length);
-        formDataVector.append(pair<String, String>(keyBuffer.get(), valueBuffer.get()));
-    }
-
-    m_formDatabase->addFormDataForURL(String::fromUTF8(url), formDataVector, isPasswordForm);
-}
-
-void Ewk_Context::passwordFormData(const char* url, Vector<std::pair<String, String> >& passwordFormData)
+/**
+ * @internal
+ * A new URL request was received.
+ *
+ * @param ewkContext a #Ewk_Context object.
+ * @param schemeRequest a #Ewk_Url_Scheme_Request object.
+ */
+void ewk_context_url_scheme_request_received(Ewk_Context* ewkContext, Ewk_Url_Scheme_Request* schemeRequest)
 {
-    EINA_SAFETY_ON_NULL_RETURN(url);
-    if (!m_formDatabase->isOpen())
-        return;
-    m_formDatabase->getPasswordFormDataForURL(String::fromUTF8(url), passwordFormData);
-}
+    EINA_SAFETY_ON_NULL_RETURN(ewkContext);
+    EINA_SAFETY_ON_NULL_RETURN(schemeRequest);
 
-void Ewk_Context::candidateFormData(const String& name, Vector<String>& candidates)
-{
-    if (!m_formDatabase->isOpen())
+    _Ewk_Url_Scheme_Handler handler = ewkContext->urlSchemeHandlers.get(ewk_url_scheme_request_scheme_get(schemeRequest));
+    if (!handler.callback)
         return;
-    m_formDatabase->getCandidateFormDataForName(name, candidates);
-}
 
-void Ewk_Context::clearPasswordFormData()
-{
-    m_formDatabase->clearPasswordFormData();
+    handler.callback(schemeRequest, handler.userData);
 }
 
-void Ewk_Context::clearCandidateFormData()
+static inline Ewk_Context* createDefaultEwkContext()
 {
-    m_formDatabase->clearCandidateFormData();
+    return new Ewk_Context(WKContextGetSharedProcessContext());
 }
 
-#endif
-
-#if ENABLE(TIZEN_CACHE_DUMP_SYNC)
-/**
- * @internal
- * Request WebProcess to dump cache.
- *
- * This sends sync message to WebProcess to dump memory cache, that is, soup cache.
- *
- * @param context context object
- *
- * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
- *
- * @note This can effect UIProcess's performance because it calls to sync IPC message eventually.
- */
-void Ewk_Context::dumpCache()
-{
-    WKResourceCacheManagerRef cacheManager = WKContextGetResourceCacheManager(wkContext());
-    toImpl(cacheManager)->dumpCache();
-}
-#endif
-#endif
-
 Ewk_Context* ewk_context_default_get()
 {
-    return Ewk_Context::defaultContext().get();
+#if OS(TIZEN)
+    static Ewk_Context* defaultContext = ewk_context_new();
+    return defaultContext;
+#else // #if OS(TIZEN)
+    DEFINE_STATIC_LOCAL(Ewk_Context, defaultContext, (WKContextGetSharedProcessContext()));
+    return &defaultContext;
+#endif // #if OS(TIZEN)
 }
 
 #if OS(TIZEN)
-typedef struct Ewk_Context_Callback_Context
+typedef struct _Ewk_Context_Callback_Context
 {
     union {
 #if ENABLE(TIZEN_FILE_SYSTEM)
@@ -480,7 +328,7 @@ typedef struct Ewk_Context_Callback_Context
 } Ewk_Context_Callback_Context;
 
 #if ENABLE(TIZEN_SQL_DATABASE)
-struct Ewk_Context_Exceeded_Quota
+struct _Ewk_Context_Exceeded_Quota
 {
     Ewk_Security_Origin* origin;
     const char* databaseName;
@@ -493,6 +341,17 @@ struct Ewk_Context_Exceeded_Quota
 };
 #endif
 
+/**
+ * @internal
+ * Create Ewk_Context with WKContext.
+ */
+Ewk_Context* ewk_context_new_from_WKContext(WKContextRef contextRef)
+{
+    EINA_SAFETY_ON_NULL_RETURN_VAL(contextRef, 0);
+
+    return new Ewk_Context(contextRef);
+}
+
 #if ENABLE(TIZEN_SQL_DATABASE)
 Ewk_Context_Exceeded_Quota* ewkContextCreateExceededQuota(WKSecurityOriginRef origin, WKStringRef databaseName, WKStringRef displayName, unsigned long long currentQuota, unsigned long long currentOriginUsage, unsigned long long currentDatabaseUsage, unsigned long long expectedUsage)
 {
@@ -533,24 +392,23 @@ unsigned long long ewkContextGetNewQuotaForExceededQuota(Ewk_Context* ewkContext
     if (exceededQuota->currentQuota)
         return exceededQuota->currentQuota;
 
-    return ewkContext->defaultDatabaseQuota();
+    return ewkContext->defaultDatabaseQuota;
 }
 
 uint64_t ewkContextGetDatabaseQuota(Ewk_Context* ewkContext)
 {
-    return ewkContext->defaultDatabaseQuota();
+    return ewkContext->defaultDatabaseQuota;
 }
 #endif
 
 /* public */
 Ewk_Context* ewk_context_new()
 {
-#if OS(TIZEN)
-    Ewk_Context* ewk_context = Ewk_Context::create().leakRef();
+    Ewk_Context* ewk_context = new Ewk_Context(adoptWK(WKContextCreate()));
+
     ewkContextInjectedBundleClientAttachClient(ewk_context);
+
     return ewk_context;
-#endif
-    return Ewk_Context::create().leakRef();
 }
 
 Ewk_Context* ewk_context_new_with_injected_bundle_path(const char* path)
@@ -581,7 +439,7 @@ Ewk_Context* ewk_context_new_with_injected_bundle_path(const char* path)
 
             if (ProcessLauncher::isParentProcess()) {
                 Ewk_Context* ewkContext = ewk_context_new_with_injected_bundle_path(path);
-                WKContextRef contextRef = ewkContext->wkContext();
+                WKContextRef contextRef = ewk_context_WKContext_get(ewkContext);
                 toImpl(contextRef)->ensureWebProcess();
                 return ewkContext;
             }
@@ -596,29 +454,33 @@ Ewk_Context* ewk_context_new_with_injected_bundle_path(const char* path)
     }
 #endif
 
-#if OS(TIZEN)
-    Ewk_Context* ewk_context = Ewk_Context::create(String::fromUTF8(path)).leakRef();
+    WKRetainPtr<WKStringRef> pathRef(AdoptWK, WKStringCreateWithUTF8CString(path));
+    Ewk_Context* ewk_context = new Ewk_Context(adoptWK(WKContextCreateWithInjectedBundlePath(pathRef.get())));
+
     ewkContextInjectedBundleClientAttachClient(ewk_context);
+
     return ewk_context;
-#endif
-    return Ewk_Context::create(String::fromUTF8(path)).leakRef();
 }
 
 void ewk_context_delete(Ewk_Context* ewkContext)
 {
     EINA_SAFETY_ON_NULL_RETURN(ewkContext);
-    if (ewkContext == ewk_context_default_get() && ewkContext->hasOneRef())
+    if (ewkContext == ewk_context_default_get())
         return;
 
+    eina_stringshare_del(ewkContext->proxyAddress);
+#if ENABLE(TIZEN_CERTIFICATE_HANDLING)
+    eina_stringshare_del(ewkContext->certificateFile);
+#endif
     delete ewkContext;
 }
 
 void ewk_context_proxy_uri_set(Ewk_Context* ewkContext, const char* proxy)
 {
-    if (ewkContext && ewkContext->setProxyAddress(proxy)) {
+    if (ewkContext && eina_stringshare_replace(&ewkContext->proxyAddress, proxy)) {
         WKRetainPtr<WKURLRef> proxyAddress(AdoptWK, WKURLCreateWithUTF8CString(proxy));
 
-        WKContextRef contextRef = ewkContext->wkContext();
+        WKContextRef contextRef = ewk_context_WKContext_get(ewkContext);
         toImpl(contextRef)->setProxy(toWTFString(proxyAddress.get()));
     }
 }
@@ -628,14 +490,14 @@ const char* ewk_context_proxy_uri_get(Ewk_Context* ewkContext)
 #if ENABLE(TIZEN_WEBKIT2_PATCH_FOR_TC)
     EINA_SAFETY_ON_NULL_RETURN_VAL(ewkContext, 0);
 #endif
-    return ewkContext->proxyAddress();
+    return ewkContext->proxyAddress;
 }
 
 void ewk_context_network_session_requests_cancel(Ewk_Context* ewkContext)
 {
     EINA_SAFETY_ON_NULL_RETURN(ewkContext);
 
-    WKContextRef contextRef = ewkContext->wkContext();
+    WKContextRef contextRef = ewk_context_WKContext_get(ewkContext);
     toImpl(contextRef)->abortSession();
 }
 
@@ -643,7 +505,7 @@ Eina_Bool ewk_context_notify_low_memory(Ewk_Context* ewkContext)
 {
     EINA_SAFETY_ON_NULL_RETURN_VAL(ewkContext, false);
 
-    WKContextRef contextRef = ewkContext->wkContext();
+    WKContextRef contextRef = ewk_context_WKContext_get(ewkContext);
     toImpl(contextRef)->notifyLowMemory();
     return true;
 }
@@ -822,7 +684,7 @@ Eina_Bool ewk_context_application_cache_delete_all(Ewk_Context* ewkContext)
     EINA_SAFETY_ON_NULL_RETURN_VAL(ewkContext, false);
 
     TIZEN_LOGI("ewkContext (%p)", ewkContext);
-    WKApplicationCacheManagerRef applicationCache = WKContextGetApplicationCacheManager(ewkContext->wkContext());
+    WKApplicationCacheManagerRef applicationCache = WKContextGetApplicationCacheManager(ewk_context_WKContext_get(ewkContext));
     WKApplicationCacheManagerDeleteAllEntries(applicationCache);
 
     return true;
@@ -841,7 +703,7 @@ Eina_Bool ewk_context_application_cache_delete(Ewk_Context* ewkContext, Ewk_Secu
     WKRetainPtr<WKStringRef> protocolRef(AdoptWK, WKStringCreateWithUTF8CString(ewk_security_origin_protocol_get(origin)));
     WKRetainPtr<WKStringRef> hostRef(AdoptWK, WKStringCreateWithUTF8CString(ewk_security_origin_host_get(origin)));
     WKRetainPtr<WKSecurityOriginRef> securityOriginRef(AdoptWK, WKSecurityOriginCreate(protocolRef.get(), hostRef.get(), ewk_security_origin_port_get(origin)));
-    WKApplicationCacheManagerRef applicationCacheRef = WKContextGetApplicationCacheManager(ewkContext->wkContext());
+    WKApplicationCacheManagerRef applicationCacheRef = WKContextGetApplicationCacheManager(ewk_context_WKContext_get(ewkContext));
     WKApplicationCacheManagerDeleteEntriesForOrigin(applicationCacheRef, securityOriginRef.get());
 
     return true;
@@ -861,7 +723,7 @@ Eina_Bool ewk_context_application_cache_origins_get(Ewk_Context* ewkContext, Ewk
     context->webApplicationCacheOriginsCallback = callback;
     context->userData = userData;
 
-    WKApplicationCacheManagerRef applicationCacheRef = WKContextGetApplicationCacheManager(ewkContext->wkContext());
+    WKApplicationCacheManagerRef applicationCacheRef = WKContextGetApplicationCacheManager(ewk_context_WKContext_get(ewkContext));
     WKApplicationCacheManagerGetApplicationCacheOrigins(applicationCacheRef, context, didGetWebApplicationOrigins);
 
     return true;
@@ -883,7 +745,7 @@ Eina_Bool ewk_context_application_cache_path_set(Ewk_Context* ewkContext, const
 
     TIZEN_LOGI("path (%s)", path);
     WKRetainPtr<WKStringRef> applicationCachePathRef(AdoptWK, WKStringCreateWithUTF8CString(path));
-    WKContextSetApplicationCacheDirectory(ewkContext->wkContext(), applicationCachePathRef.get());
+    WKContextSetApplicationCacheDirectory(ewk_context_WKContext_get(ewkContext), applicationCachePathRef.get());
 
     return true;
 #else
@@ -902,7 +764,7 @@ Eina_Bool ewk_context_application_cache_path_get(Ewk_Context* ewkContext, Ewk_We
     context->webApplicationCachePathCallback= callback;
     context->userData = userData;
 
-    WKApplicationCacheManagerRef applicationCacheRef = WKContextGetApplicationCacheManager(ewkContext->wkContext());
+    WKApplicationCacheManagerRef applicationCacheRef = WKContextGetApplicationCacheManager(ewk_context_WKContext_get(ewkContext));
     WKApplicationCacheManagerGetApplicationCachePath(applicationCacheRef, context, didGetWebApplicationPath);
     return true;
 #else
@@ -921,7 +783,7 @@ Eina_Bool ewk_context_application_cache_quota_get(Ewk_Context* ewkContext, Ewk_W
     context->webApplicationCacheQuotaCallback = callback;
     context->userData = userData;
 
-    WKApplicationCacheManagerRef applicationCacheRef = WKContextGetApplicationCacheManager(ewkContext->wkContext());
+    WKApplicationCacheManagerRef applicationCacheRef = WKContextGetApplicationCacheManager(ewk_context_WKContext_get(ewkContext));
     WKApplicationCacheManagerGetApplicationCacheQuota(applicationCacheRef, context, didGetWebApplicationQuota);
 
     return true;
@@ -945,7 +807,7 @@ Eina_Bool ewk_context_application_cache_usage_for_origin_get(Ewk_Context* ewkCon
     WKRetainPtr<WKStringRef> hostRef(AdoptWK, WKStringCreateWithUTF8CString(ewk_security_origin_host_get(origin)));
     WKRetainPtr<WKSecurityOriginRef> originRef(AdoptWK, WKSecurityOriginCreate(protocolRef.get(), hostRef.get(), ewk_security_origin_port_get(origin)));
 
-    WKApplicationCacheManagerRef applicationCache = WKContextGetApplicationCacheManager(ewkContext->wkContext());
+    WKApplicationCacheManagerRef applicationCache = WKContextGetApplicationCacheManager(ewk_context_WKContext_get(ewkContext));
     WKApplicationCacheManagerGetApplicationCacheUsageForOrigin(applicationCache, context, originRef.get(), didGetWebApplicationUsageForOrigin);
 
     return true;
@@ -964,7 +826,7 @@ Eina_Bool ewk_context_application_cache_quota_set(Ewk_Context* ewkContext, int64
     }
 
     TIZEN_LOGI("quota (%d)", quota);
-    WKApplicationCacheManagerRef applicationCacheRef = WKContextGetApplicationCacheManager(ewkContext->wkContext());
+    WKApplicationCacheManagerRef applicationCacheRef = WKContextGetApplicationCacheManager(ewk_context_WKContext_get(ewkContext));
     WKApplicationCacheManagerSetApplicationCacheQuota(applicationCacheRef, quota);
 
     return true;
@@ -988,7 +850,7 @@ Eina_Bool ewk_context_application_cache_quota_for_origin_set(Ewk_Context* ewkCon
     WKRetainPtr<WKStringRef> hostRef(AdoptWK, WKStringCreateWithUTF8CString(ewk_security_origin_host_get(origin)));
     WKRetainPtr<WKSecurityOriginRef> originRef(AdoptWK, WKSecurityOriginCreate(protocolRef.get(), hostRef.get(), ewk_security_origin_port_get(origin)));
 
-    WKApplicationCacheManagerRef applicationCache = WKContextGetApplicationCacheManager(ewkContext->wkContext());
+    WKApplicationCacheManagerRef applicationCache = WKContextGetApplicationCacheManager(ewk_context_WKContext_get(ewkContext));
     WKApplicationCacheManagerSetApplicationCacheQuotaForOrigin(applicationCache, originRef.get(), quota);
 
     return true;
@@ -1004,7 +866,7 @@ Eina_Bool ewk_context_icon_database_path_set(Ewk_Context* ewkContext, const char
     EINA_SAFETY_ON_NULL_RETURN_VAL(path, false);
 
     WKRetainPtr<WKStringRef> databasePath(AdoptWK, WKStringCreateWithUTF8CString(path));
-    WKContextSetIconDatabasePath(ewkContext->wkContext(), databasePath.get());
+    WKContextSetIconDatabasePath(ewk_context_WKContext_get(ewkContext), databasePath.get());
 
     return true;
 }
@@ -1015,7 +877,7 @@ Evas_Object* ewk_context_icon_database_icon_object_add(Ewk_Context* ewkContext,
     EINA_SAFETY_ON_NULL_RETURN_VAL(uri, 0);
     EINA_SAFETY_ON_NULL_RETURN_VAL(canvas, 0);
 
-    WKIconDatabaseRef iconDatabase = WKContextGetIconDatabase(ewkContext->wkContext());
+    WKIconDatabaseRef iconDatabase = WKContextGetIconDatabase(ewk_context_WKContext_get(ewkContext));
     WKRetainPtr<WKURLRef> urlString(AdoptWK, WKURLCreateWithUTF8CString(uri));
 
     return WKIconDatabaseTryGetImageForURL(iconDatabase, canvas, urlString.get());
@@ -1025,7 +887,7 @@ void ewk_context_icon_database_delete_all(Ewk_Context* ewkContext)
 {
     EINA_SAFETY_ON_NULL_RETURN(ewkContext);
 
-    WKIconDatabaseRef iconDatabase = WKContextGetIconDatabase(ewkContext->wkContext());
+    WKIconDatabaseRef iconDatabase = WKContextGetIconDatabase(ewk_context_WKContext_get(ewkContext));
     WKIconDatabaseRemoveAllIcons(iconDatabase);
 }
 
@@ -1037,7 +899,7 @@ Eina_Bool ewk_context_local_file_system_path_set(Ewk_Context* ewkContext, const
 
     TIZEN_LOGI("path (%s)", path);
     WKRetainPtr<WKStringRef> localFileSystemPathRef(AdoptWK, WKStringCreateWithUTF8CString(path));
-    WKContextSetLocalFileSystemDirectory(ewkContext->wkContext(), localFileSystemPathRef.get());
+    WKContextSetLocalFileSystemDirectory(ewk_context_WKContext_get(ewkContext), localFileSystemPathRef.get());
 
     return true;
 #else
@@ -1051,7 +913,7 @@ Eina_Bool ewk_context_local_file_system_all_delete(Ewk_Context* ewkContext)
     EINA_SAFETY_ON_NULL_RETURN_VAL(ewkContext, false);
 
     TIZEN_LOGI("ewkContex (%p)", ewkContext);
-    WKLocalFileSystemManagerRef localFileSystemManager = WKContextGetLocalFileSystemManager(ewkContext->wkContext());
+    WKLocalFileSystemManagerRef localFileSystemManager = WKContextGetLocalFileSystemManager(ewk_context_WKContext_get(ewkContext));
     WKLocalFileSystemManagerDeleteAllLocalFileSystem(localFileSystemManager);
 
     return true;
@@ -1072,7 +934,7 @@ Eina_Bool ewk_context_local_file_system_delete(Ewk_Context* ewkContext, Ewk_Secu
     WKRetainPtr<WKStringRef> hostRef(AdoptWK, WKStringCreateWithUTF8CString(ewk_security_origin_host_get(origin)));
     WKRetainPtr<WKStringRef> protocolRef(AdoptWK, WKStringCreateWithUTF8CString(ewk_security_origin_protocol_get(origin)));
     WKRetainPtr<WKSecurityOriginRef> originRef(AdoptWK, WKSecurityOriginCreate(protocolRef.get(), hostRef.get(), ewk_security_origin_port_get(origin)));
-    WKLocalFileSystemManagerRef localFileSystemManager = WKContextGetLocalFileSystemManager(ewkContext->wkContext());
+    WKLocalFileSystemManagerRef localFileSystemManager = WKContextGetLocalFileSystemManager(ewk_context_WKContext_get(ewkContext));
 
     WKLocalFileSystemManagerDeleteLocalFileSystem(localFileSystemManager, originRef.get());
 
@@ -1095,7 +957,7 @@ Eina_Bool ewk_context_local_file_system_origins_get(const Ewk_Context* ewkContex
     Ewk_Context_Callback_Context* context = new Ewk_Context_Callback_Context;
     context->localFileSystemOriginsCallback= callback;
     context->userData = userData;
-    WKLocalFileSystemManagerRef localFileSystemManager = WKContextGetLocalFileSystemManager(const_cast<Ewk_Context*>(ewkContext)->wkContext());
+    WKLocalFileSystemManagerRef localFileSystemManager = WKContextGetLocalFileSystemManager(ewk_context_WKContext_get(ewkContext));
 
     WKLocalFileSystemManagerGetLocalFileSystemOrigins(localFileSystemManager, context, didGetLocalFileSystemOrigins);
 
@@ -1209,7 +1071,7 @@ Eina_Bool ewk_context_web_database_delete_all(Ewk_Context* ewkContext)
     EINA_SAFETY_ON_NULL_RETURN_VAL(ewkContext, false);
 
     TIZEN_LOGI("ewkContext (%p)", ewkContext);
-    WKDatabaseManagerRef databaseManager = WKContextGetDatabaseManager(ewkContext->wkContext());
+    WKDatabaseManagerRef databaseManager = WKContextGetDatabaseManager(ewk_context_WKContext_get(ewkContext));
     WKDatabaseManagerDeleteAllDatabases(databaseManager);
 
     return true;
@@ -1228,7 +1090,7 @@ Eina_Bool ewk_context_web_database_delete(Ewk_Context* ewkContext, Ewk_Security_
     WKRetainPtr<WKStringRef> hostRef(AdoptWK, WKStringCreateWithUTF8CString(ewk_security_origin_host_get(origin)));
     WKRetainPtr<WKStringRef> protocolRef(AdoptWK, WKStringCreateWithUTF8CString(ewk_security_origin_protocol_get(origin)));
     WKRetainPtr<WKSecurityOriginRef> originRef(AdoptWK, WKSecurityOriginCreate(protocolRef.get(), hostRef.get(), ewk_security_origin_port_get(origin)));
-    WKDatabaseManagerRef databaseManager = WKContextGetDatabaseManager(ewkContext->wkContext());
+    WKDatabaseManagerRef databaseManager = WKContextGetDatabaseManager(ewk_context_WKContext_get(ewkContext));
     WKDatabaseManagerDeleteDatabasesForOrigin(databaseManager, originRef.get());
 
     return true;
@@ -1248,7 +1110,7 @@ Eina_Bool ewk_context_web_database_origins_get(Ewk_Context* ewkContext, Ewk_Web_
     context->webDatabaseOriginsCallback = callback;
     context->userData = userData;
 
-    WKDatabaseManagerRef databaseManager = WKContextGetDatabaseManager(ewkContext->wkContext());
+    WKDatabaseManagerRef databaseManager = WKContextGetDatabaseManager(ewk_context_WKContext_get(ewkContext));
     WKDatabaseManagerGetDatabaseOrigins(databaseManager, context, didGetWebDatabaseOrigins);
 
     return true;
@@ -1265,7 +1127,7 @@ Eina_Bool ewk_context_web_database_path_set(Ewk_Context* ewkContext, const char*
 
     TIZEN_LOGI("path (%s)", path);
     WKRetainPtr<WKStringRef> databasePath(AdoptWK, WKStringCreateWithUTF8CString(path));
-    WKContextSetDatabaseDirectory(ewkContext->wkContext(), databasePath.get());
+    WKContextSetDatabaseDirectory(ewk_context_WKContext_get(ewkContext), databasePath.get());
 
     return true;
 #else
@@ -1284,7 +1146,7 @@ Eina_Bool ewk_context_web_database_path_get(Ewk_Context* ewkContext, Ewk_Web_Dat
     context->webDatabasePathCallback= callback;
     context->userData = userData;
 
-    WKDatabaseManagerRef databaseManager = WKContextGetDatabaseManager(ewkContext->wkContext());
+    WKDatabaseManagerRef databaseManager = WKContextGetDatabaseManager(ewk_context_WKContext_get(ewkContext));
     WKDatabaseManagerGetDatabasePath(databaseManager, context, didGetWebDatabasePath);
     return true;
 #else
@@ -1306,7 +1168,7 @@ Eina_Bool ewk_context_web_database_quota_for_origin_get(Ewk_Context* ewkContext,
     WKRetainPtr<WKStringRef> hostRef(AdoptWK, WKStringCreateWithUTF8CString(ewk_security_origin_host_get(origin)));
     WKRetainPtr<WKStringRef> protocolRef(AdoptWK, WKStringCreateWithUTF8CString(ewk_security_origin_protocol_get(origin)));
     WKRetainPtr<WKSecurityOriginRef> originRef(AdoptWK, WKSecurityOriginCreate(protocolRef.get(), hostRef.get(), ewk_security_origin_port_get(origin)));
-    WKDatabaseManagerRef databaseManager = WKContextGetDatabaseManager(ewkContext->wkContext());
+    WKDatabaseManagerRef databaseManager = WKContextGetDatabaseManager(ewk_context_WKContext_get(ewkContext));
     WKDatabaseManagerGetQuotaForOrigin(databaseManager, context, didGetWebDatabaseQuota, originRef.get());
 
     return true;
@@ -1321,7 +1183,7 @@ Eina_Bool ewk_context_web_database_default_quota_set(Ewk_Context* ewkContext, ui
     EINA_SAFETY_ON_NULL_RETURN_VAL(ewkContext, false);
 
     TIZEN_LOGI("quota (%d)", quota);
-    ewkContext->setDefaultDatabaseQuota(quota);
+    ewkContext->defaultDatabaseQuota = quota;
 
     return true;
 #else
@@ -1339,7 +1201,7 @@ Eina_Bool ewk_context_web_database_quota_for_origin_set(Ewk_Context* ewkContext,
     WKRetainPtr<WKStringRef> hostRef(AdoptWK, WKStringCreateWithUTF8CString(ewk_security_origin_host_get(origin)));
     WKRetainPtr<WKStringRef> protocolRef(AdoptWK, WKStringCreateWithUTF8CString(ewk_security_origin_protocol_get(origin)));
     WKRetainPtr<WKSecurityOriginRef> originRef(AdoptWK, WKSecurityOriginCreate(protocolRef.get(), hostRef.get(), ewk_security_origin_port_get(origin)));
-    WKDatabaseManagerRef databaseManager = WKContextGetDatabaseManager(ewkContext->wkContext());
+    WKDatabaseManagerRef databaseManager = WKContextGetDatabaseManager(ewk_context_WKContext_get(ewkContext));
     WKDatabaseManagerSetQuotaForOrigin(databaseManager, originRef.get(), quota);
 
     return true;
@@ -1363,7 +1225,7 @@ Eina_Bool ewk_context_web_database_usage_for_origin_get(Ewk_Context* ewkContext,
     WKRetainPtr<WKStringRef> protocolRef(AdoptWK, WKStringCreateWithUTF8CString(ewk_security_origin_protocol_get(origin)));
     WKRetainPtr<WKStringRef> hostRef(AdoptWK, WKStringCreateWithUTF8CString(ewk_security_origin_host_get(origin)));
     WKRetainPtr<WKSecurityOriginRef> originRef(AdoptWK, WKSecurityOriginCreate(protocolRef.get(), hostRef.get(), ewk_security_origin_port_get(origin)));
-    WKDatabaseManagerRef databaseManager = WKContextGetDatabaseManager(ewkContext->wkContext());
+    WKDatabaseManagerRef databaseManager = WKContextGetDatabaseManager(ewk_context_WKContext_get(ewkContext));
     WKDatabaseManagerGetUsageForOrigin(databaseManager, context, didGetWebDatabaseUsage, originRef.get());
 
     return true;
@@ -1402,7 +1264,7 @@ Eina_Bool ewk_context_web_storage_delete_all(Ewk_Context* ewkContext)
     EINA_SAFETY_ON_NULL_RETURN_VAL(ewkContext, false);
 
     TIZEN_LOGI("ewkContext (%p)", ewkContext);
-    WKKeyValueStorageManagerRef storageManager = WKContextGetKeyValueStorageManager(ewkContext->wkContext());
+    WKKeyValueStorageManagerRef storageManager = WKContextGetKeyValueStorageManager(ewk_context_WKContext_get(ewkContext));
     WKKeyValueStorageManagerDeleteAllEntries(storageManager);
 
     return true;
@@ -1421,7 +1283,7 @@ Eina_Bool ewk_context_web_storage_origin_delete(Ewk_Context* ewkContext, Ewk_Sec
     WKRetainPtr<WKStringRef> hostRef(AdoptWK, WKStringCreateWithUTF8CString(ewk_security_origin_host_get(origin)));
     WKRetainPtr<WKStringRef> protocolRef(AdoptWK, WKStringCreateWithUTF8CString(ewk_security_origin_protocol_get(origin)));
     WKRetainPtr<WKSecurityOriginRef> securityOriginRef(AdoptWK, WKSecurityOriginCreate(protocolRef.get(), hostRef.get(), ewk_security_origin_port_get(origin)));
-    WKKeyValueStorageManagerRef storageManager = WKContextGetKeyValueStorageManager(ewkContext->wkContext());
+    WKKeyValueStorageManagerRef storageManager = WKContextGetKeyValueStorageManager(ewk_context_WKContext_get(ewkContext));
     WKKeyValueStorageManagerDeleteEntriesForOrigin(storageManager, securityOriginRef.get());
 
     return true;
@@ -1441,7 +1303,7 @@ Eina_Bool ewk_context_web_storage_origins_get(Ewk_Context* ewkContext, Ewk_Web_S
     context->webStorageOriginsCallback = callback;
     context->userData = userData;
 
-    WKKeyValueStorageManagerRef storageManager = WKContextGetKeyValueStorageManager(ewkContext->wkContext());
+    WKKeyValueStorageManagerRef storageManager = WKContextGetKeyValueStorageManager(ewk_context_WKContext_get(ewkContext));
     WKKeyValueStorageManagerGetKeyValueStorageOrigins(storageManager, context, didGetWebStorageOrigins);
 
     return true;
@@ -1458,7 +1320,7 @@ Eina_Bool ewk_context_web_storage_path_set(Ewk_Context* ewkContext, const char*
 
     TIZEN_LOGI("path (%s)", path);
     WKRetainPtr<WKStringRef> webStoragePath(AdoptWK, WKStringCreateWithUTF8CString(path));
-    WKContextSetLocalStorageDirectory(ewkContext->wkContext(), webStoragePath.get());
+    WKContextSetLocalStorageDirectory(ewk_context_WKContext_get(ewkContext), webStoragePath.get());
 
     return true;
 #else
@@ -1477,7 +1339,7 @@ Eina_Bool ewk_context_web_storage_path_get(Ewk_Context* ewkContext, Ewk_Web_Stor
     context->webStoragePathCallback= callback;
     context->userData = userData;
 
-    WKKeyValueStorageManagerRef storageManager = WKContextGetKeyValueStorageManager(ewkContext->wkContext());
+    WKKeyValueStorageManagerRef storageManager = WKContextGetKeyValueStorageManager(ewk_context_WKContext_get(ewkContext));
     WKKeyValueStorageManagerGetKeyValueStoragePath(storageManager, context, didGetWebStoragePath);
     return true;
 #else
@@ -1499,7 +1361,7 @@ Eina_Bool ewk_context_web_storage_usage_for_origin_get(Ewk_Context* ewkContext,
     WKRetainPtr<WKStringRef> hostRef(AdoptWK, WKStringCreateWithUTF8CString(ewk_security_origin_host_get(origin)));
     WKRetainPtr<WKSecurityOriginRef> originRef(AdoptWK, WKSecurityOriginCreate(protocolRef.get(), hostRef.get(), ewk_security_origin_port_get(origin)));
 
-    WKKeyValueStorageManagerRef storageManager = WKContextGetKeyValueStorageManager(ewkContext->wkContext());
+    WKKeyValueStorageManagerRef storageManager = WKContextGetKeyValueStorageManager(ewk_context_WKContext_get(ewkContext));
     WKKeyValueStorageManagerGetKeyValueStorageUsageForOrigin(storageManager, context, didGetWebStorageUsage, originRef.get());
 
     return true;
@@ -1515,20 +1377,20 @@ Eina_Bool ewk_context_soup_data_directory_set(Ewk_Context* ewkContext, const cha
     EINA_SAFETY_ON_NULL_RETURN_VAL(path, false);
 
     WKRetainPtr<WKStringRef> soupDataDirectory(AdoptWK, WKStringCreateWithUTF8CString(path));
-    WKContextSetSoupDataDirectory(ewkContext->wkContext(), soupDataDirectory.get());
+    WKContextSetSoupDataDirectory(ewk_context_WKContext_get(ewkContext), soupDataDirectory.get());
     return true;
 }
 //#endif
 
-COMPILE_ASSERT_MATCHING_ENUM(EWK_CACHE_MODEL_DOCUMENT_VIEWER, kWKCacheModelDocumentViewer);
-COMPILE_ASSERT_MATCHING_ENUM(EWK_CACHE_MODEL_DOCUMENT_BROWSER, kWKCacheModelDocumentBrowser);
-COMPILE_ASSERT_MATCHING_ENUM(EWK_CACHE_MODEL_PRIMARY_WEBBROWSER, kWKCacheModelPrimaryWebBrowser);
-
-Eina_Bool ewk_context_cache_model_set(Ewk_Context* ewkContext, Ewk_Cache_Model cacheModel)
+Eina_Bool ewk_context_cache_model_set(Ewk_Context* ewkContext, Ewk_Cache_Model model)
 {
     EINA_SAFETY_ON_NULL_RETURN_VAL(ewkContext, false);
-
-    ewkContext->setCacheModel(cacheModel);
+    if (model == EWK_CACHE_MODEL_DOCUMENT_VIEWER)
+        WKContextSetCacheModel(ewk_context_WKContext_get(ewkContext), kWKCacheModelDocumentViewer);
+    else if (model == EWK_CACHE_MODEL_DOCUMENT_BROWSER)
+        WKContextSetCacheModel(ewk_context_WKContext_get(ewkContext), kWKCacheModelDocumentBrowser);
+    else
+        WKContextSetCacheModel(ewk_context_WKContext_get(ewkContext), kWKCacheModelPrimaryWebBrowser);
 
     return true;
 }
@@ -1536,15 +1398,21 @@ Eina_Bool ewk_context_cache_model_set(Ewk_Context* ewkContext, Ewk_Cache_Model c
 Ewk_Cache_Model ewk_context_cache_model_get(Ewk_Context* ewkContext)
 {
     EINA_SAFETY_ON_NULL_RETURN_VAL(ewkContext, EWK_CACHE_MODEL_DOCUMENT_VIEWER);
+    WKCacheModel cacheModel = WKContextGetCacheModel(ewk_context_WKContext_get(ewkContext));
 
-    return ewkContext->cacheModel();
+    if (cacheModel == kWKCacheModelDocumentViewer)
+        return EWK_CACHE_MODEL_DOCUMENT_VIEWER;
+    else if (cacheModel == kWKCacheModelDocumentBrowser)
+        return EWK_CACHE_MODEL_DOCUMENT_BROWSER;
+    else
+        return EWK_CACHE_MODEL_PRIMARY_WEBBROWSER;
 }
 
 Eina_Bool ewk_context_cache_disabled_set(Ewk_Context* ewkContext, Eina_Bool cacheDisabled)
 {
 #if ENABLE(TIZEN_CACHE_CONTROL)
     EINA_SAFETY_ON_NULL_RETURN_VAL(ewkContext, false);
-    WKContextSetCacheDisabled(ewkContext->wkContext(), cacheDisabled);
+    WKContextSetCacheDisabled(ewk_context_WKContext_get(ewkContext), cacheDisabled);
 #endif
 
     return true;
@@ -1554,7 +1422,7 @@ Eina_Bool ewk_context_cache_disabled_get(Ewk_Context* ewkContext)
 {
 #if ENABLE(TIZEN_CACHE_CONTROL)
     EINA_SAFETY_ON_NULL_RETURN_VAL(ewkContext, false);
-    return WKContextGetCacheDisabled(ewkContext->wkContext());
+    return WKContextGetCacheDisabled(ewk_context_WKContext_get(ewkContext));
 #else
     return false;
 #endif
@@ -1565,14 +1433,13 @@ Eina_Bool ewk_context_certificate_file_set(Ewk_Context* context, const char* cer
     EINA_SAFETY_ON_NULL_RETURN_VAL(context, false);
     EINA_SAFETY_ON_NULL_RETURN_VAL(certificateFile, false);
 #if ENABLE(TIZEN_CERTIFICATE_HANDLING)
-    if (!context->setCertificateFile(certificateFile))
-        return true;
+    eina_stringshare_replace(&context->certificateFile, certificateFile);
 
     if (!fileExists(WTF::String::fromUTF8(certificateFile)))
         LOG_ERROR("[Network] ewk_context_certificate_file_set certificateFile does not exist!\n");
 
     WKRetainPtr<WKStringRef> certificateFileRef(AdoptWK, WKStringCreateWithUTF8CString(certificateFile));
-    WKContextSetCertificateFile(context->wkContext(), certificateFileRef.get());
+    WKContextSetCertificateFile(ewk_context_WKContext_get(context), certificateFileRef.get());
     return true;
 #else
     UNUSED_PARAM(context);
@@ -1585,7 +1452,7 @@ const char* ewk_context_certificate_file_get(const Ewk_Context* context)
 {
     EINA_SAFETY_ON_NULL_RETURN_VAL(context, 0);
 #if ENABLE(TIZEN_CERTIFICATE_HANDLING)
-    return context->certificateFile();
+    return context->certificateFile;
 #else
     UNUSED_PARAM(context);
     return 0;
@@ -1595,7 +1462,7 @@ const char* ewk_context_certificate_file_get(const Ewk_Context* context)
 Eina_Bool ewk_context_cache_clear(Ewk_Context* ewkContext)
 {
     EINA_SAFETY_ON_NULL_RETURN_VAL(ewkContext, false);
-    WKResourceCacheManagerRef cacheManager = WKContextGetResourceCacheManager(ewkContext->wkContext());
+    WKResourceCacheManagerRef cacheManager = WKContextGetResourceCacheManager(ewk_context_WKContext_get(ewkContext));
 #if ENABLE(TIZEN_EWK_CONTEXT_CACHE_MANAGER_NULL_CHECK_WORKAROUND)
     if (!cacheManager)
         return false;
@@ -1605,6 +1472,27 @@ Eina_Bool ewk_context_cache_clear(Ewk_Context* ewkContext)
     return true;
 }
 
+#if ENABLE(TIZEN_CACHE_DUMP_SYNC)
+/**
+ * @internal
+ * Request WebProcess to dump cache.
+ *
+ * This sends sync message to WebProcess to dump memory cache, that is, soup cache.
+ *
+ * @param context context object
+ *
+ * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
+ *
+ * @note This can effect UIProcess's performance because it calls to sync IPC message eventually.
+ */
+void ewk_context_cache_dump(Ewk_Context* ewkContext)
+{
+    EINA_SAFETY_ON_NULL_RETURN(ewkContext);
+    WKResourceCacheManagerRef cacheManager = WKContextGetResourceCacheManager(ewk_context_WKContext_get(ewkContext));
+    toImpl(cacheManager)->dumpCache();
+}
+#endif
+
 void ewk_context_message_post_to_injected_bundle(Ewk_Context* ewkContext, const char* name, const char* body)
 {
     EINA_SAFETY_ON_NULL_RETURN(ewkContext);
@@ -1613,21 +1501,59 @@ void ewk_context_message_post_to_injected_bundle(Ewk_Context* ewkContext, const
 
     WKRetainPtr<WKStringRef> messageName(AdoptWK, WKStringCreateWithUTF8CString(name));
     WKRetainPtr<WKStringRef> messageBody(AdoptWK, WKStringCreateWithUTF8CString(body));
-    WKContextPostMessageToInjectedBundle(ewkContext->wkContext(), messageName.get(), messageBody.get());
+    WKContextPostMessageToInjectedBundle(ewk_context_WKContext_get(ewkContext), messageName.get(), messageBody.get());
 }
 
 void ewk_context_message_from_injected_bundle_callback_set(Ewk_Context* ewkContext, Ewk_Context_Message_From_Injected_Bundle_Callback callback, void* userData)
 {
     EINA_SAFETY_ON_NULL_RETURN(ewkContext);
 
-    ewkContext->setMessageFromInjectedBundleCallback(callback, userData);
+    ewkContext->messageFromInjectedBundle.callback = callback;
+    ewkContext->messageFromInjectedBundle.userData = userData;
+}
+
+void ewkContextDidReceiveMessageFromInjectedBundle(Ewk_Context* ewkContext, WKStringRef messageName, WKTypeRef messageBody, WKTypeRef* returnData)
+{
+    EINA_SAFETY_ON_NULL_RETURN(ewkContext);
+
+    if (!ewkContext->messageFromInjectedBundle.callback)
+        return;
+
+    CString name = toImpl(messageName)->string().utf8();
+    CString body;
+    if (messageBody && WKStringGetTypeID() == WKGetTypeID(messageBody))
+        body = toImpl(static_cast<WKStringRef>(messageBody))->string().utf8();
+
+    if (returnData) {
+        char* returnString = 0;
+        ewkContext->messageFromInjectedBundle.callback(name.data(), body.data(), &returnString,
+                                                       ewkContext->messageFromInjectedBundle.userData);
+        if (returnString) {
+            *returnData = WKStringCreateWithUTF8CString(returnString);
+            free(returnString);
+        } else {
+            *returnData = WKStringCreateWithUTF8CString("");
+        }
+    } else {
+        ewkContext->messageFromInjectedBundle.callback(name.data(), body.data(), 0,
+                                                       ewkContext->messageFromInjectedBundle.userData);
+    }
 }
 
 void ewk_context_did_start_download_callback_set(Ewk_Context* ewkContext, Ewk_Context_Did_Start_Download_Callback callback, void* userData)
 {
     EINA_SAFETY_ON_NULL_RETURN(ewkContext);
 
-    ewkContext->setDidStartDownloadCallback(callback, userData);
+    ewkContext->didStartDownload.callback = callback;
+    ewkContext->didStartDownload.userData = userData;
+}
+
+void ewkContextDidStartDownload(Ewk_Context* ewkContext, WKStringRef downloadURL)
+{
+    EINA_SAFETY_ON_NULL_RETURN(ewkContext);
+    EINA_SAFETY_ON_NULL_RETURN(ewkContext->didStartDownload.callback);
+
+    ewkContext->didStartDownload.callback(toImpl(downloadURL)->string().utf8().data(), ewkContext->didStartDownload.userData);
 }
 
 #if ENABLE(MEMORY_SAMPLER)
@@ -1635,13 +1561,24 @@ void ewk_context_memory_sampler_start(Ewk_Context* ewkContext, double timerInter
 {
     EINA_SAFETY_ON_NULL_RETURN(ewkContext);
     WKRetainPtr<WKDoubleRef> interval(AdoptWK, WKDoubleCreate(timerInterval));
-    WKContextStartMemorySampler(ewkContext->wkContext(), interval.get());
+    WKContextStartMemorySampler(ewk_context_WKContext_get(ewkContext), interval.get());
 }
 
 void ewk_context_memory_sampler_stop(Ewk_Context* ewkContext)
 {
     EINA_SAFETY_ON_NULL_RETURN(ewkContext);
-    WKContextStopMemorySampler(ewkContext->wkContext());
+    WKContextStopMemorySampler(ewk_context_WKContext_get(ewkContext));
+}
+#endif
+
+#if ENABLE(TIZEN_CACHE_MEMORY_OPTIMIZATION)
+Eina_Bool ewk_context_decoded_data_clear_all(Ewk_Context* ewkContext)
+{
+    EINA_SAFETY_ON_NULL_RETURN_VAL(ewkContext, false);
+    WKResourceCacheManagerRef cacheManager = WKContextGetResourceCacheManager(ewk_context_WKContext_get(ewkContext));
+    WKResourceCacheManagerClearCacheForAllOrigins(cacheManager, WKResourceCachesToClearInDecodedDataOnly);
+
+    return true;
 }
 #endif
 
@@ -1652,7 +1589,7 @@ Eina_Bool ewk_context_additional_plugin_path_set(Ewk_Context* ewkContext, const
     EINA_SAFETY_ON_NULL_RETURN_VAL(path, false);
 
     WKRetainPtr<WKStringRef> pluginPath(AdoptWK, WKStringCreateWithUTF8CString(path));
-    WKContextSetAdditionalPluginsDirectory(ewkContext->wkContext(), pluginPath.get());
+    WKContextSetAdditionalPluginsDirectory(ewk_context_WKContext_get(ewkContext), pluginPath.get());
 
     return true;
 #else
@@ -1665,22 +1602,85 @@ void ewk_context_memory_saving_mode_set(Ewk_Context* ewkContext, Eina_Bool mode)
 {
     EINA_SAFETY_ON_NULL_RETURN(ewkContext);
 
-    WKContextRef contextRef = ewkContext->wkContext();
+    WKContextRef contextRef = ewk_context_WKContext_get(ewkContext);
     toImpl(contextRef)->setMemorySavingMode(mode);
 }
 #endif
 
+#if ENABLE(TIZEN_WEBKIT2_CONTEXT_X_WINDOW)
+Ecore_X_Window ewk_context_x_window_get(Ewk_Context* ewkContext)
+{
+    EINA_SAFETY_ON_NULL_RETURN_VAL(ewkContext, 0);
+    return ewkContext->xWindow;
+}
+
+void ewk_context_x_window_set(Ewk_Context* ewkContext, Ecore_X_Window xWindow)
+{
+    EINA_SAFETY_ON_NULL_RETURN(ewkContext);
+    WKContextRef contextRef = ewk_context_WKContext_get(ewkContext);
+    toImpl(contextRef)->setXWindow(xWindow);
+}
+#endif
+
 #if ENABLE(TIZEN_WEBKIT2_FORM_DATABASE)
+void ewk_context_form_data_add(Ewk_Context* ewkContext, const char* url, WKDictionaryRef& formData, bool isPasswordForm)
+{
+    EINA_SAFETY_ON_NULL_RETURN(ewkContext);
+    EINA_SAFETY_ON_NULL_RETURN(url);
+    if (!ewkContext->formDatabase->isOpen())
+        return;
+
+    Vector<std::pair<String, String> > formDataVector;
+    WKRetainPtr<WKArrayRef> wkKeys(AdoptWK, WKDictionaryCopyKeys(formData));
+    size_t numKeys = WKArrayGetSize(wkKeys.get());
+    for (size_t i = 0; i < numKeys; ++i) {
+        WKStringRef wkKey = static_cast<WKStringRef>(WKArrayGetItemAtIndex(wkKeys.get(), i));
+        WKStringRef wkValue = static_cast<WKStringRef>(WKDictionaryGetItemForKey(formData, wkKey));
+
+        int length = WKStringGetMaximumUTF8CStringSize(wkKey);
+        if (length <= 0)
+            continue;
+        OwnArrayPtr<char> keyBuffer = adoptArrayPtr(new char[length]);
+        WKStringGetUTF8CString(wkKey, keyBuffer.get(), length);
+
+        length = WKStringGetMaximumUTF8CStringSize(wkValue);
+        if (length <= 0)
+            continue;
+        OwnArrayPtr<char> valueBuffer = adoptArrayPtr(new char[length]);
+        WKStringGetUTF8CString(wkValue, valueBuffer.get(), length);
+        formDataVector.append(pair<String, String>(keyBuffer.get(), valueBuffer.get()));
+    }
+
+    ewkContext->formDatabase->addFormDataForURL(String::fromUTF8(url), formDataVector, isPasswordForm);
+}
+
+void ewk_context_form_password_data_get(Ewk_Context* ewkContext, const char* url, Vector<std::pair<String, String> >& passwordFormData)
+{
+    EINA_SAFETY_ON_NULL_RETURN(ewkContext);
+    EINA_SAFETY_ON_NULL_RETURN(url);
+    if (!ewkContext->formDatabase->isOpen())
+        return;
+    ewkContext->formDatabase->getPasswordFormDataForURL(String::fromUTF8(url), passwordFormData);
+}
+
+void ewk_context_form_candidate_data_get(Ewk_Context* ewkContext, const String& name, Vector<String>& candidates)
+{
+    EINA_SAFETY_ON_NULL_RETURN(ewkContext);
+    if (!ewkContext->formDatabase->isOpen())
+        return;
+    ewkContext->formDatabase->getCandidateFormDataForName(name, candidates);
+}
+
 void ewk_context_form_password_data_clear(Ewk_Context* ewkContext)
 {
     EINA_SAFETY_ON_NULL_RETURN(ewkContext);
-    ewkContext->clearPasswordFormData();
+    ewkContext->formDatabase->clearPasswordFormData();
 }
 
 void ewk_context_form_candidate_data_clear(Ewk_Context* ewkContext)
 {
     EINA_SAFETY_ON_NULL_RETURN(ewkContext);
-    ewkContext->clearCandidateFormData();
+    ewkContext->formDatabase->clearCandidateFormData();
 }
 #endif
 #endif // #if OS(TIZEN)
@@ -1691,7 +1691,9 @@ Eina_Bool ewk_context_url_scheme_register(Ewk_Context* ewkContext, const char* s
     EINA_SAFETY_ON_NULL_RETURN_VAL(scheme, false);
     EINA_SAFETY_ON_NULL_RETURN_VAL(callback, false);
 
-    ewkContext->requestManager()->registerURLSchemeHandler(String::fromUTF8(scheme), callback, userData);
+    ewkContext->urlSchemeHandlers.set(String::fromUTF8(scheme), _Ewk_Url_Scheme_Handler(callback, userData));
+    WKRetainPtr<WKStringRef> wkScheme(AdoptWK, WKStringCreateWithUTF8CString(scheme));
+    WKSoupRequestManagerRegisterURIScheme(ewkContext->requestManager.get(), wkScheme.get());
 
     return true;
 }
@@ -1702,7 +1704,7 @@ void ewk_context_vibration_client_callbacks_set(Ewk_Context* ewkContext, Ewk_Vib
 
     TIZEN_LOGI("vibrate (%p)", vibrate);
 #if ENABLE(VIBRATION)
-    ewkContext->vibrationProvider()->setVibrationClientCallbacks(vibrate, cancel, data);
+    ewkContext->vibrationProvider->setVibrationClientCallbacks(vibrate, cancel, data);
 #endif
 }
 
@@ -1712,7 +1714,7 @@ Eina_Bool ewk_context_tizen_extensible_api_set(Ewk_Context* ewkContext,  Ewk_Ext
     EINA_SAFETY_ON_NULL_RETURN_VAL(ewkContext, false);
 
     TIZEN_LOGI("extensibleAPI (%d) enable (%d)", extensibleAPI, enable);
-    WKContextSetTizenExtensibleAPI(ewkContext->wkContext(), static_cast<WKTizenExtensibleAPI>(extensibleAPI), enable);
+    WKContextSetTizenExtensibleAPI(ewk_context_WKContext_get(ewkContext), static_cast<WKTizenExtensibleAPI>(extensibleAPI), enable);
 
     return true;
 #else
@@ -1730,23 +1732,8 @@ void ewk_context_storage_path_reset(Ewk_Context* ewkContext)
     EINA_SAFETY_ON_NULL_RETURN(ewkContext);
 
     TIZEN_LOGI("ewkContext (%p)", ewkContext);
-    WKContextResetStoragePath(ewkContext->wkContext());
+    WKContextResetStoragePath(ewk_context_WKContext_get(ewkContext));
 #else
     UNUSED_PARAM(ewkContext);
 #endif
 }
-
-void ewk_context_history_callbacks_set(Ewk_Context* ewkContext, Ewk_History_Navigation_Cb navigate, Ewk_History_Client_Redirection_Cb clientRedirect, Ewk_History_Server_Redirection_Cb serverRedirect, Ewk_History_Title_Update_Cb titleUpdate, Ewk_History_Populate_Visited_Links_Cb populateVisitedLinks, void* data)
-{
-    EINA_SAFETY_ON_NULL_RETURN(ewkContext);
-
-    ewkContext->historyClient()->setCallbacks(navigate, clientRedirect, serverRedirect, titleUpdate, populateVisitedLinks, data);
-}
-
-void ewk_context_visited_link_add(Ewk_Context* ewkContext, const char* visitedURL)
-{
-    EINA_SAFETY_ON_NULL_RETURN(ewkContext);
-    EINA_SAFETY_ON_NULL_RETURN(visitedURL);
-
-    ewkContext->addVisitedLink(visitedURL);
-}
index 403a8b2..989dfd8 100755 (executable)
  * @brief   Describes the context API.
  *
  * @note ewk_context encapsulates all pages related to specific use of WebKit.
- *
- * Applications have the option of creating a context different than the default one
- * and use it for a group of pages. All pages in the same context share the same
- * preferences, visited link set, local storage, etc.
- *
- * A process model can be specified per context. The default one is the shared model
- * where the web-engine process is shared among the pages in the context. The second
- * model allows each page to use a separate web-engine process. This latter model is
- * currently not supported by WebKit2/EFL.
- *
+ * All pages in this context share the same visited link set,
+ * local storage set, and preferences.
  */
 
 #ifndef ewk_context_h
 #define ewk_context_h
 
 #include "ewk_cookie_manager.h"
-#include "ewk_favicon_database.h"
-#include "ewk_navigation_data.h"
 #include "ewk_url_scheme_request.h"
 #include <Evas.h>
 
@@ -51,7 +41,7 @@ extern "C" {
 #endif
 
 /// Defines extensible api
-enum Ewk_Extensible_API {
+enum _Ewk_Extensible_API {
     EWK_EXTENSIBLE_API_BACKGROUND_MUSIC,
     EWK_EXTENSIBLE_API_CSP,
     EWK_EXTENSIBLE_API_ENCRYPTION_DATABASE,
@@ -59,11 +49,32 @@ enum Ewk_Extensible_API {
     EWK_EXTENSIBLE_API_MEDIA_STREAM_RECORD
 };
 /// Creates a type name for @a _Ewk_Extensible_API.
-typedef enum Ewk_Extensible_API Ewk_Extensible_API;
+typedef enum _Ewk_Extensible_API Ewk_Extensible_API;
 
-/** Creates a type name for @a Ewk_Context. */
-typedef struct Ewk_Context Ewk_Context;
-typedef struct Ewk_Context_Exceeded_Quota Ewk_Context_Exceeded_Quota;
+typedef struct _Ewk_Context Ewk_Context;
+typedef struct _Ewk_Context_Exceeded_Quota Ewk_Context_Exceeded_Quota;
+
+/**
+ * Creates a new Ewk_Context.
+ * The returned Ewk_Context object @b should be deleted after use.
+ *
+ * @return Ewk_Context object on success or @c 0 on failure
+ *
+ * @see ewk_context_delete
+ */
+EAPI Ewk_Context* ewk_context_new();
+
+/**
+ * Creates a new Ewk_Context.
+ * The returned Ewk_Context object @b should be deleted after use.
+ *
+ * @param path path of injected bundle library
+ *
+ * @return Ewk_Context object on success or @c 0 on failure
+ *
+ * @see ewk_context_delete
+ */
+EAPI Ewk_Context* ewk_context_new_with_injected_bundle_path(const char* path);
 
 /**
  * Deletes Ewk_Context.
@@ -671,21 +682,16 @@ EAPI Eina_Bool ewk_context_soup_data_directory_set(Ewk_Context* context, const c
 //#endif
 
 /**
- * \enum    Ewk_Cache_Model
+ * \enum    _Ewk_Cache_Model
  *
  * @brief   Contains option for cache model
  */
-enum Ewk_Cache_Model {
-    /// Use the smallest cache capacity.
-    EWK_CACHE_MODEL_DOCUMENT_VIEWER,
-    /// Use bigger cache capacity than EWK_CACHE_MODEL_DOCUMENT_VIEWER.
-    EWK_CACHE_MODEL_DOCUMENT_BROWSER,
-    /// Use the biggest cache capacity.
-    EWK_CACHE_MODEL_PRIMARY_WEBBROWSER
+enum _Ewk_Cache_Model {
+    EWK_CACHE_MODEL_DOCUMENT_VIEWER = 0,
+    EWK_CACHE_MODEL_DOCUMENT_BROWSER = 1,
+    EWK_CACHE_MODEL_PRIMARY_WEBBROWSER = 2
 };
-
-/// Creates a type name for the Ewk_Cache_Model.
-typedef enum Ewk_Cache_Model Ewk_Cache_Model;
+typedef enum _Ewk_Cache_Model Ewk_Cache_Model;
 
 /**
 * Requests to set the cache model
@@ -818,90 +824,11 @@ typedef void (*Ewk_Vibration_Client_Vibrate_Cb)(uint64_t vibration_time, void *u
 typedef void (*Ewk_Vibration_Client_Vibration_Cancel_Cb)(void *user_data);
 
 /**
- * @typedef Ewk_History_Navigation_Cb Ewk_History_Navigation_Cb
- * @brief Type definition for a function that will be called back when @a view did navigation (loaded new URL).
- */
-typedef void (*Ewk_History_Navigation_Cb)(const Evas_Object *view, Ewk_Navigation_Data *navigation_data, void *user_data);
-
-/**
- * @typedef Ewk_History_Client_Redirection_Cb Ewk_History_Client_Redirection_Cb
- * @brief Type definition for a function that will be called back when @a view performed a client redirect.
- */
-typedef void (*Ewk_History_Client_Redirection_Cb)(const Evas_Object *view, const char *source_url, const char *destination_url, void *user_data);
-
-/**
- * @typedef Ewk_History_Server_Redirection_Cb Ewk_History_Server_Redirection_Cb
- * @brief Type definition for a function that will be called back when @a view performed a server redirect.
- */
-typedef void (*Ewk_History_Server_Redirection_Cb)(const Evas_Object *view, const char *source_url, const char *destination_url, void *user_data);
-
-/**
- * @typedef Ewk_History_Title_Update_Cb Ewk_History_Title_Update_Cb
- * @brief Type definition for a function that will be called back when history title is updated.
- */
-typedef void (*Ewk_History_Title_Update_Cb)(const Evas_Object *view, const char *title, const char *url, void *user_data);
-
-/**
- * @typedef Ewk_Context_History_Client_Visited_Links_Populate_Cb Ewk_Context_History_Client_Visited_Links_Populate_Cb
- * @brief Type definition for a function that will be called back when client is asked to provide visited links from a client-managed storage.
- *
- * @see ewk_context_visited_link_add
- */
-typedef void (*Ewk_History_Populate_Visited_Links_Cb)(void *user_data);
-
-/**
- * Increases the reference count of the given object.
- *
- * @param context context object to increase the reference count
- *
- * @return Ewk_Context object on success or @c NULL on failure
- */
-EAPI Ewk_Context *ewk_context_ref(Ewk_Context *context);
-
-/**
- * Decreases the reference count of the given object, possibly freeing it.
- *
- * When the reference count it's reached 0, the Ewk_Context is freed.
- *
- * @param context context object to decrease the reference count
- */
-EAPI void ewk_context_unref(Ewk_Context *context);
-
-/**
  * Gets default Ewk_Context instance.
  *
- * The returned Ewk_Context object @b should not be unref'ed if application
- * does not call ewk_context_ref() for that.
- *
  * @return Ewk_Context object.
  */
-EAPI Ewk_Context *ewk_context_default_get(void);
-
-/**
- * Creates a new Ewk_Context.
- *
- * The returned Ewk_Context object @b should be unref'ed after use.
- *
- * @return Ewk_Context object on success or @c NULL on failure
- *
- * @see ewk_context_unref
- * @see ewk_context_new_with_injected_bundle_path
- */
-EAPI Ewk_Context *ewk_context_new(void);
-
-/**
- * Creates a new Ewk_Context.
- *
- * The returned Ewk_Context object @b should be unref'ed after use.
- *
- * @param path path of injected bundle library
- *
- * @return Ewk_Context object on success or @c NULL on failure
- *
- * @see ewk_context_unref
- * @see ewk_context_new
- */
-EAPI Ewk_Context *ewk_context_new_with_injected_bundle_path(const char *path);
+EAPI Ewk_Context *ewk_context_default_get();
 
 /**
  * Gets the cookie manager instance for this @a context.
@@ -913,15 +840,6 @@ EAPI Ewk_Context *ewk_context_new_with_injected_bundle_path(const char *path);
 EAPI Ewk_Cookie_Manager *ewk_context_cookie_manager_get(const Ewk_Context *context);
 
 /**
- * Gets the favicon database instance for this @a context.
- *
- * @param context context object to query.
- *
- * @return Ewk_Favicon_Database object instance or @c NULL in case of failure.
- */
-EAPI Ewk_Favicon_Database *ewk_context_favicon_database_get(const Ewk_Context *context);
-
-/**
  * Register @a scheme in @a context.
  *
  * When an URL request with @a scheme is made in the #Ewk_Context, the callback
@@ -937,7 +855,7 @@ EAPI Ewk_Favicon_Database *ewk_context_favicon_database_get(const Ewk_Context *c
  * @param user_data data to pass to callback function
  *
  * @code
- * static void about_url_scheme_request_cb(Ewk_Url_Scheme_Request *request, void *user_data)
+ * static void about_uri_scheme_request_cb(Ewk_Url_Scheme_Request *request, void *user_data)
  * {
  *     const char *path;
  *     char *contents_data = NULL;
@@ -992,41 +910,6 @@ EAPI Eina_Bool ewk_context_additional_plugin_path_set(Ewk_Context *context, cons
  */
 EAPI void ewk_context_vibration_client_callbacks_set(Ewk_Context *context, Ewk_Vibration_Client_Vibrate_Cb vibrate, Ewk_Vibration_Client_Vibration_Cancel_Cb cancel, void *data);
 
-/**
- * Sets history callbacks for the given @a context.
- *
- * To stop listening for history events, you may call this function with @c
- * NULL for the callbacks.
- *
- * @param context context object to set history callbacks
- * @param navigate_func The function to call when @c ewk_view did navigation (may be @c NULL).
- * @param client_redirect_func The function to call when @c ewk_view performed a client redirect (may be @c NULL).
- * @param server_redirect_func The function to call when @c ewk_view performed a server redirect (may be @c NULL).
- * @param title_update_func The function to call when history title is updated (may be @c NULL).
- * @param populate_visited_links_func The function is called when client is asked to provide visited links from a
- *        client-managed storage (may be @c NULL).
- * @param data User data (may be @c NULL).
- */
-EAPI void ewk_context_history_callbacks_set(Ewk_Context *context,
-                                            Ewk_History_Navigation_Cb navigate_func,
-                                            Ewk_History_Client_Redirection_Cb client_redirect_func,
-                                            Ewk_History_Server_Redirection_Cb server_redirect_func,
-                                            Ewk_History_Title_Update_Cb title_update_func,
-                                            Ewk_History_Populate_Visited_Links_Cb populate_visited_links_func,
-                                            void *data);
-
-/**
- * Registers the given @a visited_url as visited link in @a context visited link cache.
- *
- * This function shall be invoked as a response to @c populateVisitedLinks callback of the history cient.
- *
- * @param context context object to add visited link data
- * @param visited_url visited url
- *
- * @see Ewk_Context_History_Client
- */
-EAPI void ewk_context_visited_link_add(Ewk_Context *context, const char *visited_url);
-
 //#if ENABLE(TIZEN_WEBKIT2_MEMORY_SAVING_MODE)
 /**
  * Sets memory saving mode.
@@ -1056,6 +939,7 @@ EAPI void ewk_context_form_password_data_clear(Ewk_Context* context);
 EAPI void ewk_context_form_candidate_data_clear(Ewk_Context* context);
 //#endif
 
+
 //#if ENABLE(TIZEN_EXTENSIBLE_API)
  /**
  * Toggles tizen extensible api enable and disable
diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_context_download_client.cpp b/Source/WebKit2/UIProcess/API/efl/ewk_context_download_client.cpp
new file mode 100644 (file)
index 0000000..f4fa05f
--- /dev/null
@@ -0,0 +1,170 @@
+/*
+ * Copyright (C) 2012 Intel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+
+#include "DownloadProxy.h"
+#include "WKAPICast.h"
+#include "WKContext.h"
+#include "WKString.h"
+#include "ewk_context_download_client_private.h"
+#include "ewk_context_private.h"
+#include "ewk_download_job.h"
+#include "ewk_download_job_private.h"
+#include "ewk_url_response.h"
+#include "ewk_url_response_private.h"
+#include "ewk_view_private.h"
+#include "ewk_web_error.h"
+#include "ewk_web_error_private.h"
+#include <string.h>
+#include <wtf/text/CString.h>
+
+#if OS(TIZEN) && ENABLE(TIZEN_USING_EXTERNAL_DOWNLOAD_CLIENT)
+#include "WKDownload.h"
+#include "WKRetainPtr.h"
+#endif
+
+using namespace WebKit;
+
+static inline Ewk_Context* toEwkContext(const void* clientInfo)
+{
+    return static_cast<Ewk_Context*>(const_cast<void*>(clientInfo));
+}
+
+#if OS(TIZEN) && ENABLE(TIZEN_USING_EXTERNAL_DOWNLOAD_CLIENT)
+// FIMXE : This macro should be unified or modified according to Tizen macro policy.
+// WebKit opensource does not have any concept for external download module, but, Tizen needs it.
+// So, localizing this patch is helpless situation unless WebKit supports the concept or we contribute it.
+// If policy for Tizen macro and ewk local API are determined, this patch should be took care of according to them.
+static void didStart(WKContextRef, WKDownloadRef wkDownload, const void* clientInfo)
+{
+    WebCore::ResourceRequest request = toImpl(wkDownload)->request();
+    WKRetainPtr<WKStringRef> downloadUrlString = adoptWK(WKStringCreateWithUTF8CString(request.url().string().utf8().data()));
+
+    WKDownloadCancel(wkDownload);
+
+    ewkContextDidStartDownload(toEwkContext(clientInfo), downloadUrlString.get());
+}
+#else
+static WKStringRef decideDestinationWithSuggestedFilename(WKContextRef, WKDownloadRef wkDownload, WKStringRef filename, bool* allowOverwrite, const void* clientInfo)
+{
+    Ewk_Download_Job* download = ewk_context_download_job_get(toEwkContext(clientInfo), toImpl(wkDownload)->downloadID());
+    ASSERT(download);
+
+    ewk_download_job_suggested_filename_set(download, toImpl(filename)->string().utf8().data());
+
+    // We send the new download signal on the Ewk_View only once we have received the response
+    // and the suggested file name.
+    ewk_view_download_job_requested(ewk_download_job_view_get(download), download);
+
+    // DownloadSoup expects the destination to be a URI.
+    String destination = String("file://") + String::fromUTF8(ewk_download_job_destination_get(download));
+
+    return WKStringCreateWithUTF8CString(destination.utf8().data());
+}
+
+static void didReceiveResponse(WKContextRef, WKDownloadRef wkDownload, WKURLResponseRef wkResponse, const void* clientInfo)
+{
+    Ewk_Download_Job* download = ewk_context_download_job_get(toEwkContext(clientInfo), toImpl(wkDownload)->downloadID());
+    ASSERT(download);
+    Ewk_Url_Response* response = ewk_url_response_new(toImpl(wkResponse)->resourceResponse());
+    ewk_download_job_response_set(download, response);
+    ewk_url_response_unref(response);
+}
+
+static void didCreateDestination(WKContextRef, WKDownloadRef wkDownload, WKStringRef path, const void* clientInfo)
+{
+    Ewk_Download_Job* download = ewk_context_download_job_get(toEwkContext(clientInfo), toImpl(wkDownload)->downloadID());
+    ASSERT(download);
+
+    ewk_download_job_state_set(download, EWK_DOWNLOAD_JOB_STATE_DOWNLOADING);
+}
+
+static void didReceiveData(WKContextRef, WKDownloadRef wkDownload, uint64_t length, const void* clientInfo)
+{
+    Ewk_Download_Job* download = ewk_context_download_job_get(toEwkContext(clientInfo), toImpl(wkDownload)->downloadID());
+    ASSERT(download);
+    ewk_download_job_received_data(download, length);
+}
+
+static void didFail(WKContextRef, WKDownloadRef wkDownload, WKErrorRef error, const void *clientInfo)
+{
+    uint64_t downloadId = toImpl(wkDownload)->downloadID();
+    Ewk_Download_Job* download = ewk_context_download_job_get(toEwkContext(clientInfo), downloadId);
+    ASSERT(download);
+
+    Ewk_Web_Error* ewkError = ewk_web_error_new(error);
+    ewk_download_job_state_set(download, EWK_DOWNLOAD_JOB_STATE_FAILED);
+    ewk_view_download_job_failed(ewk_download_job_view_get(download), download, ewkError);
+    ewk_web_error_free(ewkError);
+    ewk_context_download_job_remove(toEwkContext(clientInfo), downloadId);
+}
+
+static void didCancel(WKContextRef, WKDownloadRef wkDownload, const void *clientInfo)
+{
+    uint64_t downloadId = toImpl(wkDownload)->downloadID();
+    Ewk_Download_Job* download = ewk_context_download_job_get(toEwkContext(clientInfo), downloadId);
+    ASSERT(download);
+
+    ewk_download_job_state_set(download, EWK_DOWNLOAD_JOB_STATE_CANCELLED);
+    ewk_view_download_job_cancelled(ewk_download_job_view_get(download), download);
+    ewk_context_download_job_remove(toEwkContext(clientInfo), downloadId);
+}
+
+static void didFinish(WKContextRef, WKDownloadRef wkDownload, const void *clientInfo)
+{
+    uint64_t downloadId = toImpl(wkDownload)->downloadID();
+    Ewk_Download_Job* download = ewk_context_download_job_get(toEwkContext(clientInfo), downloadId);
+    ASSERT(download);
+
+    ewk_download_job_state_set(download, EWK_DOWNLOAD_JOB_STATE_FINISHED);
+    ewk_view_download_job_finished(ewk_download_job_view_get(download), download);
+    ewk_context_download_job_remove(toEwkContext(clientInfo), downloadId);
+}
+#endif // OS(TIZEN) && ENABLE(TIZEN_USING_EXTERNAL_DOWNLOAD_CLIENT)
+
+void ewk_context_download_client_attach(Ewk_Context* ewkContext)
+{
+    WKContextDownloadClient wkDownloadClient;
+    memset(&wkDownloadClient, 0, sizeof(WKContextDownloadClient));
+
+    wkDownloadClient.version = kWKContextDownloadClientCurrentVersion;
+    wkDownloadClient.clientInfo = ewkContext;
+#if OS(TIZEN) && ENABLE(TIZEN_USING_EXTERNAL_DOWNLOAD_CLIENT)
+    wkDownloadClient.didStart = didStart;
+#else
+    wkDownloadClient.didCancel = didCancel;
+    wkDownloadClient.decideDestinationWithSuggestedFilename = decideDestinationWithSuggestedFilename;
+    wkDownloadClient.didCreateDestination = didCreateDestination;
+    wkDownloadClient.didReceiveResponse = didReceiveResponse;
+    wkDownloadClient.didReceiveData = didReceiveData;
+    wkDownloadClient.didFail = didFail;
+    wkDownloadClient.didFinish = didFinish;
+#endif
+
+    WKContextSetDownloadClient(ewk_context_WKContext_get(ewkContext), &wkDownloadClient);
+}
+
+
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2012 Samsung Electronics
+ * Copyright (C) 2012 Intel Corporation. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include <WebKit2/WKBundleInitialize.h>
+#ifndef ewk_context_download_client_private_h
+#define ewk_context_download_client_private_h
 
-#ifdef __cplusplus
-extern "C" {
-#endif
+typedef struct _Ewk_Context Ewk_Context;
 
-void WKBundleInitialize(WKBundleRef bundle, WKTypeRef initializationUserData)
-{
-}
+void ewk_context_download_client_attach(Ewk_Context*);
 
-#ifdef __cplusplus
-}
-#endif
+#endif // ewk_context_download_client_private_h
old mode 100755 (executable)
new mode 100644 (file)
index 477fe90..94ac475
 void didReceiveMessageFromInjectedBundle(WKContextRef page, WKStringRef messageName, WKTypeRef messageBody, const void* clientInfo)
 {
     Ewk_Context* ewkContext = static_cast<Ewk_Context*>(const_cast<void*>(clientInfo));
-    ewkContext->didReceiveMessageFromInjectedBundle(messageName, messageBody, 0);
+    ewkContextDidReceiveMessageFromInjectedBundle(ewkContext, messageName, messageBody, 0);
 }
 
 void didReceiveSynchronousMessageFromInjectedBundle(WKContextRef page, WKStringRef messageName, WKTypeRef messageBody, WKTypeRef* returnData, const void* clientInfo)
 {
     Ewk_Context* ewkContext = static_cast<Ewk_Context*>(const_cast<void*>(clientInfo));
-    ewkContext->didReceiveMessageFromInjectedBundle(messageName, messageBody, returnData);
+    ewkContextDidReceiveMessageFromInjectedBundle(ewkContext, messageName, messageBody, returnData);
 }
 
 void ewkContextInjectedBundleClientAttachClient(Ewk_Context* ewkContext)
@@ -48,5 +48,5 @@ void ewkContextInjectedBundleClientAttachClient(Ewk_Context* ewkContext)
         0 /* WKContextGetInjectedBundleInitializationUserDataCallback */
     };
 
-    WKContextSetInjectedBundleClient(ewkContext->wkContext(), &injectedBundleClient);
+    WKContextSetInjectedBundleClient(ewk_context_WKContext_get(ewkContext), &injectedBundleClient);
 }
old mode 100755 (executable)
new mode 100644 (file)
index 6fde297..0947326
 #ifndef ewk_context_private_h
 #define ewk_context_private_h
 
-#include "DownloadManagerEfl.h"
-#include "WKAPICast.h"
-#include "WKRetainPtr.h"
-#include "ewk_context.h"
+#include <WebKit2/WKBase.h>
 
 #if OS(TIZEN)
-#include "WKEinaSharedString.h"
 #include "WKString.h"
 #include "ewk_context.h"
 #if ENABLE(TIZEN_SUPPORT)
 #include <Ecore_X.h>
 #endif
 #endif
-
-#if ENABLE(TIZEN_WEBKIT2_FORM_DATABASE)
-#include "FormDatabase.h"
-#endif
 #endif // #if OS(TIZEN)
 
-class Ewk_Url_Scheme_Request;
-class Ewk_Cookie_Manager;
-class Ewk_Favicon_Database;
-#if ENABLE(BATTERY_STATUS)
-class BatteryProvider;
-#endif
-#if ENABLE(NETWORK_INFO)
-class NetworkInfoProvider;
-#endif
-#if ENABLE(VIBRATION)
-class VibrationProvider;
-#endif
-
-namespace WebKit {
-class ContextHistoryClientEfl;
-class RequestManagerClientEfl;
-}
-
-class Ewk_Context : public RefCounted<Ewk_Context> {
-public:
-    static PassRefPtr<Ewk_Context> create(WKContextRef context);
-    static PassRefPtr<Ewk_Context> create();
-    static PassRefPtr<Ewk_Context> create(const String& injectedBundlePath);
-
-    static PassRefPtr<Ewk_Context> defaultContext();
-
-    ~Ewk_Context();
-
-    Ewk_Cookie_Manager* cookieManager();
-
-    Ewk_Favicon_Database* faviconDatabase();
+typedef struct _Ewk_Context Ewk_Context;
+typedef struct _Ewk_Download_Job Ewk_Download_Job;
+typedef struct _Ewk_Url_Scheme_Request Ewk_Url_Scheme_Request;
 
-    WebKit::RequestManagerClientEfl* requestManager();
-
-#if ENABLE(VIBRATION)
-    PassRefPtr<VibrationProvider> vibrationProvider();
-#endif
-
-    void addVisitedLink(const String& visitedURL);
-
-    void setCacheModel(Ewk_Cache_Model);
-
-    Ewk_Cache_Model cacheModel() const;
-
-    WKContextRef wkContext();
-
-    void urlSchemeRequestReceived(Ewk_Url_Scheme_Request*);
-
-    WebKit::DownloadManagerEfl* downloadManager() const;
-
-    WebKit::ContextHistoryClientEfl* historyClient();
+WKContextRef ewk_context_WKContext_get(const Ewk_Context*);
 
+Ewk_Context* ewk_context_new_from_WKContext(WKContextRef);
 #if OS(TIZEN)
-    const char* proxyAddress() const { return m_proxyAddress; }
-    bool setProxyAddress(const char*);
-
-#if ENABLE(TIZEN_CERTIFICATE_HANDLING)
-    const char* certificateFile() const { return m_certificateFile; }
-    bool setCertificateFile(const char*);
-#endif
-
-#if ENABLE(TIZEN_SQL_DATABASE)
-    uint64_t defaultDatabaseQuota() const { return m_defaultDatabaseQuota; }
-    void setDefaultDatabaseQuota(uint64_t);
-#endif
+Ewk_Context* ewk_context_new_with_WKContext(WKContextRef);
 
-    void setMessageFromInjectedBundleCallback(Ewk_Context_Message_From_Injected_Bundle_Callback, void*);
-    void didReceiveMessageFromInjectedBundle(WKStringRef, WKTypeRef, WKTypeRef*);
+void ewkContextDidReceiveMessageFromInjectedBundle(Ewk_Context* ewkContext, WKStringRef messageName, WKTypeRef messageBody, WKTypeRef* returnData);
+void ewkContextDidStartDownload(Ewk_Context* ewkContext, WKStringRef downloadURL);
 
-    void setDidStartDownloadCallback(Ewk_Context_Did_Start_Download_Callback, void*);
-    void didStartDownload(WKStringRef);
+Ewk_Security_Origin* createSecurityOrigin(WKSecurityOriginRef securityOrigin);
+void deleteSecurityOrigin(Ewk_Security_Origin* origin);
 
 #if ENABLE(TIZEN_CACHE_MEMORY_OPTIMIZATION)
-    void clearAllDecodedData();
+Eina_Bool ewk_context_decoded_data_clear_all(Ewk_Context* ewkContext);
 #endif
 
 #if ENABLE(TIZEN_WEBKIT2_CONTEXT_X_WINDOW)
-    Ecore_X_Window xWindow();
-    void setXWindow(Ecore_X_Window);
+Ecore_X_Window ewk_context_x_window_get(Ewk_Context* ewkContext);
+void ewk_context_x_window_set(Ewk_Context* ewkContext, Ecore_X_Window xWindow);
 #endif
-
 #if ENABLE(TIZEN_WEBKIT2_FORM_DATABASE)
-    void addFormData(const char*, WKDictionaryRef&, bool);
-    void passwordFormData(const char*, Vector<std::pair<String, String> >&);
-    void candidateFormData(const String&, Vector<String>&);
-    void clearPasswordFormData();
-    void clearCandidateFormData();
-#endif
-
-#if ENABLE(TIZEN_CACHE_DUMP_SYNC)
-    void dumpCache();
+void ewk_context_form_data_add(Ewk_Context* ewkContext, const char* url, WKDictionaryRef& formData, bool isPasswordForm);
+void ewk_context_form_password_data_get(Ewk_Context* ewkContext, const char* url, Vector<std::pair<String, String> >& passwordFormData);
+void ewk_context_form_candidate_data_get(Ewk_Context* ewkContext, const String& name, Vector<String>& candidates);
 #endif
 #endif // #if OS(TIZEN)
 
-private:
-    explicit Ewk_Context(WKContextRef);
+WKSoupRequestManagerRef ewk_context_request_manager_get(const Ewk_Context*);
+void ewk_context_url_scheme_request_received(Ewk_Context*, Ewk_Url_Scheme_Request*);
 
-    WKRetainPtr<WKContextRef> m_context;
+void ewk_context_download_job_add(Ewk_Context*, Ewk_Download_Job*);
+Ewk_Download_Job* ewk_context_download_job_get(const Ewk_Context*, uint64_t downloadId);
+void ewk_context_download_job_remove(Ewk_Context*, uint64_t downloadId);
 
-    OwnPtr<Ewk_Cookie_Manager> m_cookieManager;
-    OwnPtr<Ewk_Favicon_Database> m_faviconDatabase;
-#if ENABLE(BATTERY_STATUS)
-    RefPtr<BatteryProvider> m_batteryProvider;
-#endif
-#if ENABLE(NETWORK_INFO)
-    RefPtr<NetworkInfoProvider> m_networkInfoProvider;
-#endif
-#if ENABLE(VIBRATION)
-    RefPtr<VibrationProvider> m_vibrationProvider;
-#endif
-    OwnPtr<WebKit::DownloadManagerEfl> m_downloadManager;
-    OwnPtr<WebKit::RequestManagerClientEfl> m_requestManagerClient;
-
-    OwnPtr<WebKit::ContextHistoryClientEfl> m_historyClient;
-
-#if OS(TIZEN)
-    WKEinaSharedString m_proxyAddress;
-#if ENABLE(TIZEN_CERTIFICATE_HANDLING)
-    WKEinaSharedString m_certificateFile;
-#endif
-#if ENABLE(TIZEN_SQL_DATABASE)
-    uint64_t m_defaultDatabaseQuota;
-#endif
-    struct {
-        Ewk_Context_Message_From_Injected_Bundle_Callback callback;
-        void* userData;
-    } m_messageFromInjectedBundle;
-    struct {
-        Ewk_Context_Did_Start_Download_Callback callback;
-        void* userData;
-    } m_didStartDownload;
-#if ENABLE(TIZEN_WEBKIT2_CONTEXT_X_WINDOW)
-    Ecore_X_Window m_xWindow;
-#endif
-#if ENABLE(TIZEN_WEBKIT2_FORM_DATABASE)
-    RefPtr<WebKit::FormDatabase> m_formDatabase;
-#endif
-#endif
-};
-
-#if OS(TIZEN)
-Ewk_Security_Origin* createSecurityOrigin(WKSecurityOriginRef securityOrigin);
-void deleteSecurityOrigin(Ewk_Security_Origin* origin);
+#if ENABLE(TIZEN_CACHE_DUMP_SYNC)
+void ewk_context_cache_dump(Ewk_Context*);
 #endif
 
 #endif // ewk_context_private_h
  */
 
 #include "config.h"
-#include "ewk_navigation_data.h"
 
-#include "ewk_navigation_data_private.h"
+#include "WKBase.h"
+#include "WKSoupRequestManager.h"
+#include "ewk_context_private.h"
+#include "ewk_context_request_manager_client_private.h"
+#include "ewk_url_scheme_request.h"
+#include "ewk_url_scheme_request_private.h"
 
-using namespace WebKit;
-
-Ewk_Navigation_Data* ewk_navigation_data_ref(Ewk_Navigation_Data* data)
+static inline Ewk_Context* toEwkContext(const void* clientInfo)
 {
-    EINA_SAFETY_ON_NULL_RETURN_VAL(data, 0);
-
-    data->ref();
-
-    return data;
+    return static_cast<Ewk_Context*>(const_cast<void*>(clientInfo));
 }
 
-void ewk_navigation_data_unref(Ewk_Navigation_Data* data)
+static void didReceiveURIRequest(WKSoupRequestManagerRef soupRequestManagerRef, WKURLRef urlRef, uint64_t requestID, const void* clientInfo)
 {
-    EINA_SAFETY_ON_NULL_RETURN(data);
-
-    data->deref();
+    Ewk_Url_Scheme_Request* schemeRequest = ewk_url_scheme_request_new(soupRequestManagerRef, urlRef, requestID);
+    ewk_context_url_scheme_request_received(toEwkContext(clientInfo), schemeRequest);
+    ewk_url_scheme_request_unref(schemeRequest);
 }
 
-const char* ewk_navigation_data_title_get(const Ewk_Navigation_Data* data)
+void ewk_context_request_manager_client_attach(Ewk_Context* context)
 {
-    EINA_SAFETY_ON_NULL_RETURN_VAL(data, 0);
-
-    return data->title;
-}
+    WKSoupRequestManagerClient wkRequestManagerClient;
+    memset(&wkRequestManagerClient, 0, sizeof(WKSoupRequestManagerClient));
 
-Ewk_Url_Request* ewk_navigation_data_original_request_get(const Ewk_Navigation_Data* data)
-{
-    EINA_SAFETY_ON_NULL_RETURN_VAL(data, 0);
-
-    return data->request.get();
-}
-
-const char* ewk_navigation_data_url_get(const Ewk_Navigation_Data* data)
-{
-    EINA_SAFETY_ON_NULL_RETURN_VAL(data, 0);
+    wkRequestManagerClient.version = kWKSoupRequestManagerClientCurrentVersion;
+    wkRequestManagerClient.clientInfo = context;
+    wkRequestManagerClient.didReceiveURIRequest = didReceiveURIRequest;
 
-    return data->url;
+    WKSoupRequestManagerSetClient(ewk_context_request_manager_get(context), &wkRequestManagerClient);
 }
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef ewk_resource_private_h
-#define ewk_resource_private_h
+#ifndef ewk_context_request_manager_client_private_h
+#define ewk_context_request_manager_client_private_h
 
-#include "WKEinaSharedString.h"
-#include "WKURL.h"
-#include <wtf/PassRefPtr.h>
-#include <wtf/RefCounted.h>
-#include <wtf/text/CString.h>
-#include <wtf/text/WTFString.h>
+typedef struct _Ewk_Context Ewk_Context;
 
-class Ewk_Resource : public RefCounted<Ewk_Resource> {
-public:
-    WKEinaSharedString url;
-    bool isMainResource;
+void ewk_context_request_manager_client_attach(Ewk_Context* context);
 
-    static PassRefPtr<Ewk_Resource> create(WKURLRef url, bool isMainResource)
-    {
-        return adoptRef(new Ewk_Resource(url, isMainResource));
-    }
-
-private:
-    Ewk_Resource(WKURLRef url, bool isMainResource)
-        : url(url)
-        , isMainResource(isMainResource)
-    { }
-};
-
-#endif // ewk_resource_private_h
+#endif // ewk_context_request_manager_client_private_h
index 3cbf7fe..45dd75e 100644 (file)
 #include "SoupCookiePersistentStorageType.h"
 #include "WKAPICast.h"
 #include "WKArray.h"
+#include "WKCookieManager.h"
+#include "WKRetainPtr.h"
 #include "WKString.h"
 #include "WebCookieManagerProxy.h"
-#include "ewk_cookie_manager_private.h"
-#include "ewk_error_private.h"
 #include "ewk_private.h"
-#include <wtf/OwnPtr.h>
+#include "ewk_web_error_private.h"
 #include <wtf/text/CString.h>
 #include <wtf/text/WTFString.h>
 
 using namespace WebKit;
 
+struct Cookie_Change_Handler {
+    Ewk_Cookie_Manager_Changes_Watch_Cb callback;
+    void* userData;
+
+    Cookie_Change_Handler()
+        : callback(0)
+        , userData(0)
+    { }
+
+    Cookie_Change_Handler(Ewk_Cookie_Manager_Changes_Watch_Cb _callback, void* _userData)
+        : callback(_callback)
+        , userData(_userData)
+    { }
+};
+
 static void cookiesDidChange(WKCookieManagerRef, const void* clientInfo);
 
-Ewk_Cookie_Manager::Ewk_Cookie_Manager(WKCookieManagerRef cookieManagerRef)
-    : wkCookieManager(cookieManagerRef)
-{
-    WKCookieManagerClient wkCookieManagerClient = {
-        kWKCookieManagerClientCurrentVersion,
-        this, // clientInfo
-        cookiesDidChange
-    };
-    WKCookieManagerSetClient(wkCookieManager.get(), &wkCookieManagerClient);
-}
+/**
+ * \struct  _Ewk_Cookie_Manager
+ * @brief   Contains the cookie manager data.
+ */
+struct _Ewk_Cookie_Manager {
+    WKRetainPtr<WKCookieManagerRef> wkCookieManager;
+    Cookie_Change_Handler changeHandler;
+
+    _Ewk_Cookie_Manager(WKCookieManagerRef cookieManagerRef)
+        : wkCookieManager(cookieManagerRef)
+    {
+        WKCookieManagerClient wkCookieManagerClient = {
+            kWKCookieManagerClientCurrentVersion,
+            this, // clientInfo
+            cookiesDidChange
+        };
+        WKCookieManagerSetClient(wkCookieManager.get(), &wkCookieManagerClient);
+    }
 
-Ewk_Cookie_Manager::~Ewk_Cookie_Manager()
-{
-    if (changeHandler.callback)
-        WKCookieManagerStopObservingCookieChanges(wkCookieManager.get());
-}
+    ~_Ewk_Cookie_Manager()
+    {
+        if (changeHandler.callback)
+            WKCookieManagerStopObservingCookieChanges(wkCookieManager.get());
+    }
+};
 
 #define EWK_COOKIE_MANAGER_WK_GET_OR_RETURN(manager, wkManager_, ...)    \
     if (!(manager)) {                                                    \
@@ -118,10 +142,12 @@ struct Get_Policy_Async_Data {
 static void getAcceptPolicyCallback(WKHTTPCookieAcceptPolicy policy, WKErrorRef wkError, void* data)
 {
     Get_Policy_Async_Data* callbackData = static_cast<Get_Policy_Async_Data*>(data);
-    OwnPtr<Ewk_Error> ewkError = Ewk_Error::create(wkError);
+    Ewk_Web_Error* ewkError = wkError ? ewk_web_error_new(wkError) : 0;
 
-    callbackData->callback(static_cast<Ewk_Cookie_Accept_Policy>(policy), ewkError.get(), callbackData->userData);
+    callbackData->callback(static_cast<Ewk_Cookie_Accept_Policy>(policy), ewkError, callbackData->userData);
 
+    if (ewkError)
+        ewk_web_error_free(ewkError);
     delete callbackData;
 }
 
@@ -146,7 +172,7 @@ static void getHostnamesWithCookiesCallback(WKArrayRef wkHostnames, WKErrorRef w
 {
     Eina_List* hostnames = 0;
     Get_Hostnames_Async_Data* callbackData = static_cast<Get_Hostnames_Async_Data*>(context);
-    OwnPtr<Ewk_Error> ewkError = Ewk_Error::create(wkError);
+    Ewk_Web_Error* ewkError = wkError ? ewk_web_error_new(wkError) : 0;
 
     const size_t hostnameCount = WKArrayGetSize(wkHostnames);
     for (size_t i = 0; i < hostnameCount; ++i) {
@@ -157,12 +183,13 @@ static void getHostnamesWithCookiesCallback(WKArrayRef wkHostnames, WKErrorRef w
         hostnames = eina_list_append(hostnames, eina_stringshare_add(hostname.utf8().data()));
     }
 
-    callbackData->callback(hostnames, ewkError.get(), callbackData->userData);
+    callbackData->callback(hostnames, ewkError, callbackData->userData);
 
     void* item;
     EINA_LIST_FREE(hostnames, item)
       eina_stringshare_del(static_cast<Eina_Stringshare*>(item));
-
+    if (ewkError)
+        ewk_web_error_free(ewkError);
     delete callbackData;
 }
 
@@ -205,3 +232,25 @@ void ewk_cookie_manager_changes_watch(Ewk_Cookie_Manager* manager, Ewk_Cookie_Ma
     else
         WKCookieManagerStopObservingCookieChanges(wkManager);
 }
+
+/**
+ * @internal
+ * Frees a Ewk_Cookie_Manager object.
+ */
+void ewk_cookie_manager_free(Ewk_Cookie_Manager* manager)
+{
+    EINA_SAFETY_ON_NULL_RETURN(manager);
+
+    delete manager;
+}
+
+/**
+ * @internal
+ * Constructs a Ewk_Cookie_Manager from a WKCookieManagerRef.
+ */
+Ewk_Cookie_Manager* ewk_cookie_manager_new(WKCookieManagerRef wkCookieManager)
+{
+    EINA_SAFETY_ON_NULL_RETURN_VAL(wkCookieManager, 0);
+
+    return new Ewk_Cookie_Manager(wkCookieManager);
+}
index 0d2a4c6..e377808 100644 (file)
 #ifndef ewk_cookie_manager_h
 #define ewk_cookie_manager_h
 
-#include "ewk_error.h"
+#include "ewk_web_error.h"
 #include <Eina.h>
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
-/** Creates a type name for Ewk_Cookie_Manager */
-typedef struct Ewk_Cookie_Manager Ewk_Cookie_Manager;
+/** Creates a type name for _Ewk_Cookie_Manager */
+typedef struct _Ewk_Cookie_Manager Ewk_Cookie_Manager;
 
 /**
- * \enum    Ewk_Cookie_Accept_Policy
+ * \enum    _Ewk_Cookie_Accept_Policy
  *
  * @brief   Contains accept policies for the cookies.
  */
-enum Ewk_Cookie_Accept_Policy {
+enum _Ewk_Cookie_Accept_Policy {
     /// Accepts every cookie sent from any page.
     EWK_COOKIE_ACCEPT_POLICY_ALWAYS,
     /// Rejects all cookies.
@@ -55,29 +55,29 @@ enum Ewk_Cookie_Accept_Policy {
     EWK_COOKIE_ACCEPT_POLICY_NO_THIRD_PARTY
 };
 
-/// Creates a type name for the Ewk_Cookie_Accept_Policy.
-typedef enum Ewk_Cookie_Accept_Policy Ewk_Cookie_Accept_Policy;
+/// Creates a type name for the _Ewk_Cookie_Accept_Policy.
+typedef enum _Ewk_Cookie_Accept_Policy Ewk_Cookie_Accept_Policy;
 
 /**
- * \enum    Ewk_Cookie_Persistent_Storage
+ * \enum    _Ewk_Cookie_Persistent_Storage
  *
  * @brief   Enum values to denote cookies persistent storage type.
  */
-enum Ewk_Cookie_Persistent_Storage {
+enum _Ewk_Cookie_Persistent_Storage {
     /// Cookies are stored in a text file in the Mozilla "cookies.txt" format.
     EWK_COOKIE_PERSISTENT_STORAGE_TEXT,
     /// Cookies are stored in a SQLite file in the current Mozilla format.
     EWK_COOKIE_PERSISTENT_STORAGE_SQLITE
 };
 
-/// Creates a type name for the Ewk_Cookie_Persistent_Storage.
-typedef enum Ewk_Cookie_Persistent_Storage Ewk_Cookie_Persistent_Storage;
+/// Creates a type name for the _Ewk_Cookie_Persistent_Storage.
+typedef enum _Ewk_Cookie_Persistent_Storage Ewk_Cookie_Persistent_Storage;
 
 /**
  * @typedef Ewk_Cookie_Manager_Async_Policy_Get_Cb Ewk_Cookie_Manager_Async_Policy_Get_Cb
  * @brief Callback type for use with ewk_cookie_manager_async_accept_policy_get
  */
-typedef void (*Ewk_Cookie_Manager_Async_Policy_Get_Cb)(Ewk_Cookie_Accept_Policy policy, Ewk_Error *error, void *event_info);
+typedef void (*Ewk_Cookie_Manager_Async_Policy_Get_Cb)(Ewk_Cookie_Accept_Policy policy, Ewk_Web_Error *error, void *event_info);
 
 /**
  * @typedef Ewk_Cookie_Manager_Async_Hostnames_Get_Cb Ewk_Cookie_Manager_Async_Hostnames_Get_Cb
@@ -87,7 +87,7 @@ typedef void (*Ewk_Cookie_Manager_Async_Policy_Get_Cb)(Ewk_Cookie_Accept_Policy
  * save yourself some cpu cycles and use eina_stringshare_ref() instead of eina_stringshare_add()
  * or strdup().
  */
-typedef void (*Ewk_Cookie_Manager_Async_Hostnames_Get_Cb)(Eina_List *hostnames, Ewk_Error *error, void *event_info);
+typedef void (*Ewk_Cookie_Manager_Async_Hostnames_Get_Cb)(Eina_List* hostnames, Ewk_Web_Error *error, void *event_info);
 
 /**
  * @typedef Ewk_Cookie_Manager_Changes_Watch_Cb Ewk_Cookie_Manager_Changes_Watch_Cb
index b7579aa..64285c9 100644 (file)
 #ifndef ewk_cookie_manager_private_h
 #define ewk_cookie_manager_private_h
 
-#include "WKCookieManager.h"
-#include "WKRetainPtr.h"
-#include "ewk_cookie_manager.h"
 #include <WebKit2/WKBase.h>
-#include <wtf/PassOwnPtr.h>
 
-struct Cookie_Change_Handler {
-    Ewk_Cookie_Manager_Changes_Watch_Cb callback;
-    void* userData;
+typedef struct _Ewk_Cookie_Manager Ewk_Cookie_Manager;
 
-    Cookie_Change_Handler()
-        : callback(0)
-        , userData(0)
-    { }
-
-    Cookie_Change_Handler(Ewk_Cookie_Manager_Changes_Watch_Cb _callback, void* _userData)
-        : callback(_callback)
-        , userData(_userData)
-    { }
-};
-
-class Ewk_Cookie_Manager {
-public:
-    WKRetainPtr<WKCookieManagerRef> wkCookieManager;
-    Cookie_Change_Handler changeHandler;
-
-    static PassOwnPtr<Ewk_Cookie_Manager> create(WKCookieManagerRef cookieManagerRef)
-    {
-        return adoptPtr(new Ewk_Cookie_Manager(cookieManagerRef));
-    }
-
-    ~Ewk_Cookie_Manager();
-
-private:
-    explicit Ewk_Cookie_Manager(WKCookieManagerRef cookieManagerRef);
-};
+Ewk_Cookie_Manager* ewk_cookie_manager_new(WKCookieManagerRef wkCookieManager);
+void ewk_cookie_manager_free(Ewk_Cookie_Manager* manager);
 
 #endif // ewk_cookie_manager_private_h
old mode 100755 (executable)
new mode 100644 (file)
index cfe6bb8..c416810
 #include "WKRetainPtr.h"
 #include "WebURLRequest.h"
 #include "ewk_download_job_private.h"
-#include "ewk_url_response_private.h"
+#include "ewk_url_request_private.h"
 #include <Ecore.h>
 
 using namespace WebKit;
 
-Ewk_Download_Job::Ewk_Download_Job(WebKit::DownloadProxy* download, EwkViewImpl* viewImpl)
-    : m_downloadProxy(download)
-    , m_viewImpl(viewImpl)
-    , m_state(EWK_DOWNLOAD_JOB_STATE_NOT_STARTED)
-    , m_startTime(-1)
-    , m_endTime(-1)
-    , m_downloaded(0)
-{ }
+/**
+ * \struct  _Ewk_Download_Job
+ * @brief   Contains the download data.
+ */
+struct _Ewk_Download_Job {
+    unsigned int __ref; /**< the reference count of the object */
+    DownloadProxy* downloadProxy;
+    Evas_Object* view;
+    Ewk_Download_Job_State state;
+    Ewk_Url_Request* request;
+    Ewk_Url_Response* response;
+    double startTime;
+    double endTime;
+    uint64_t downloaded; /**< length already downloaded */
+    const char* destination;
+    const char* suggestedFilename;
+
+    _Ewk_Download_Job(DownloadProxy* download, Evas_Object* ewkView)
+        : __ref(1)
+        , downloadProxy(download)
+        , view(ewkView)
+        , state(EWK_DOWNLOAD_JOB_STATE_NOT_STARTED)
+        , request(0)
+        , response(0)
+        , startTime(-1)
+        , endTime(-1)
+        , downloaded(0)
+        , destination(0)
+        , suggestedFilename(0)
+    { }
+
+    ~_Ewk_Download_Job()
+    {
+        ASSERT(!__ref);
+        if (request)
+            ewk_url_request_unref(request);
+        if (response)
+            ewk_url_response_unref(response);
+        eina_stringshare_del(destination);
+        eina_stringshare_del(suggestedFilename);
+    }
+};
 
-Ewk_Download_Job* ewk_download_job_ref(Ewk_Download_Job* download)
+void ewk_download_job_ref(Ewk_Download_Job* download)
 {
-    EINA_SAFETY_ON_NULL_RETURN_VAL(download, 0);
-
-    download->ref();
+    EINA_SAFETY_ON_NULL_RETURN(download);
 
-    return download;
+    ++download->__ref;
 }
 
 void ewk_download_job_unref(Ewk_Download_Job* download)
 {
     EINA_SAFETY_ON_NULL_RETURN(download);
 
-    download->deref();
+    if (--download->__ref)
+        return;
+
+    delete download;
 }
 
 /**
  * @internal
  * Queries the identifier for this download
  */
-uint64_t Ewk_Download_Job::id() const
+uint64_t ewk_download_job_id_get(const Ewk_Download_Job* download)
 {
-    return m_downloadProxy->downloadID();
+    EINA_SAFETY_ON_NULL_RETURN_VAL(download, 0);
+    EINA_SAFETY_ON_NULL_RETURN_VAL(download->downloadProxy, 0);
+
+    return download->downloadProxy->downloadID();
 }
 
 /**
@@ -75,62 +113,45 @@ uint64_t Ewk_Download_Job::id() const
  * Returns the view this download is attached to.
  * The view is needed to send notification signals.
  */
-EwkViewImpl* Ewk_Download_Job::viewImpl() const
+Evas_Object* ewk_download_job_view_get(const Ewk_Download_Job* download)
 {
-    return m_viewImpl;
+    EINA_SAFETY_ON_NULL_RETURN_VAL(download, 0);
+
+    return download->view;
 }
 
 Ewk_Download_Job_State ewk_download_job_state_get(const Ewk_Download_Job* download)
 {
     EINA_SAFETY_ON_NULL_RETURN_VAL(download, EWK_DOWNLOAD_JOB_STATE_UNKNOWN);
 
-    return download->state();
-}
-
-Ewk_Download_Job_State Ewk_Download_Job::state() const
-{
-    return m_state;
+    return download->state;
 }
 
 Ewk_Url_Request* ewk_download_job_request_get(const Ewk_Download_Job* download)
 {
     EINA_SAFETY_ON_NULL_RETURN_VAL(download, 0);
 
-    return download->request();
-}
-
-Ewk_Url_Request* Ewk_Download_Job::request() const
-{
-    if (!m_request) {
-        WKRetainPtr<WKURLRequestRef> wkURLRequest(AdoptWK, toAPI(WebURLRequest::create(m_downloadProxy->request()).leakRef()));
-        m_request = Ewk_Url_Request::create(wkURLRequest.get());
+    if (!download->request) {
+        EINA_SAFETY_ON_NULL_RETURN_VAL(download->downloadProxy, 0);
+        WKRetainPtr<WKURLRequestRef> wkURLRequest(AdoptWK, toAPI(WebURLRequest::create(download->downloadProxy->request()).leakRef()));
+        const_cast<Ewk_Download_Job*>(download)->request = ewk_url_request_new(wkURLRequest.get());
     }
 
-    return m_request.get();
+    return download->request;
 }
 
 Ewk_Url_Response* ewk_download_job_response_get(const Ewk_Download_Job* download)
 {
     EINA_SAFETY_ON_NULL_RETURN_VAL(download, 0);
 
-    return download->response();
-}
-
-Ewk_Url_Response* Ewk_Download_Job::response() const
-{
-    return m_response.get();
+    return download->response;
 }
 
 const char* ewk_download_job_destination_get(const Ewk_Download_Job* download)
 {
     EINA_SAFETY_ON_NULL_RETURN_VAL(download, 0);
 
-    return download->destination();
-}
-
-const char* Ewk_Download_Job::destination() const
-{
-    return m_destination;
+    return download->destination;
 }
 
 Eina_Bool ewk_download_job_destination_set(Ewk_Download_Job* download, const char* destination)
@@ -138,42 +159,28 @@ Eina_Bool ewk_download_job_destination_set(Ewk_Download_Job* download, const cha
     EINA_SAFETY_ON_NULL_RETURN_VAL(download, false);
     EINA_SAFETY_ON_NULL_RETURN_VAL(destination, false);
 
-    download->setDestination(destination);
+    eina_stringshare_replace(&download->destination, destination);
 
     return true;
 }
 
-void Ewk_Download_Job::setDestination(const char* destination)
-{
-    m_destination = destination;
-}
-
-const char* ewk_download_job_suggested_filename_get(const Ewk_Download_Job* download)
+const char *ewk_download_job_suggested_filename_get(const Ewk_Download_Job* download)
 {
     EINA_SAFETY_ON_NULL_RETURN_VAL(download, 0);
 
-    return download->suggestedFileName();
-}
-
-const char* Ewk_Download_Job::suggestedFileName() const
-{
-    return m_suggestedFilename;
+    return download->suggestedFilename;
 }
 
 Eina_Bool ewk_download_job_cancel(Ewk_Download_Job* download)
 {
     EINA_SAFETY_ON_NULL_RETURN_VAL(download, false);
+    EINA_SAFETY_ON_NULL_RETURN_VAL(download->downloadProxy, false);
 
-    return download->cancel();
-}
-
-bool Ewk_Download_Job::cancel()
-{
-    if (m_state != EWK_DOWNLOAD_JOB_STATE_DOWNLOADING)
+    if (download->state != EWK_DOWNLOAD_JOB_STATE_DOWNLOADING)
         return false;
 
-    m_state = EWK_DOWNLOAD_JOB_STATE_CANCELLING;
-    m_downloadProxy->cancel();
+    download->state = EWK_DOWNLOAD_JOB_STATE_CANCELLING;
+    download->downloadProxy->cancel();
     return true;
 }
 
@@ -181,90 +188,95 @@ double ewk_download_job_estimated_progress_get(const Ewk_Download_Job* download)
 {
     EINA_SAFETY_ON_NULL_RETURN_VAL(download, 0);
 
-    return download->estimatedProgress();
-}
-
-double Ewk_Download_Job::estimatedProgress() const
-{
-    if (!m_response)
+    if (!download->response)
         return 0;
 
-    const unsigned long contentLength = m_response->contentLength();
+    const unsigned long contentLength = ewk_url_response_content_length_get(download->response);
     if (!contentLength)
         return 0;
 
-    return static_cast<double>(m_downloaded) / contentLength;
+    return static_cast<double>(download->downloaded) / contentLength;
 }
 
 double ewk_download_job_elapsed_time_get(const Ewk_Download_Job* download)
 {
     EINA_SAFETY_ON_NULL_RETURN_VAL(download, 0);
 
-    return download->elapsedTime();
-}
-
-double Ewk_Download_Job::elapsedTime() const
-{
     // Download has not started yet.
-    if (m_startTime < 0)
+    if (download->startTime < 0)
         return 0;
 
     // Download had ended, return the time elapsed between the
     // download start and the end event.
-    if (m_endTime >= 0)
-        return m_endTime - m_startTime;
+    if (download->endTime >= 0)
+        return download->endTime - download->startTime;
 
     // Download is still going.
-    return ecore_time_get() - m_startTime;
+    return ecore_time_get() - download->startTime;
 }
 
 /**
  * @internal
  * Sets the URL @a response for this @a download.
  */
-void Ewk_Download_Job::setResponse(PassRefPtr<Ewk_Url_Response> response)
+void ewk_download_job_response_set(Ewk_Download_Job* download, Ewk_Url_Response* response)
 {
-    ASSERT(response);
+    EINA_SAFETY_ON_NULL_RETURN(download);
+    EINA_SAFETY_ON_NULL_RETURN(response);
 
-    m_response = response;
+    ewk_url_response_ref(response);
+    download->response = response;
 }
 
 /**
  * @internal
  * Sets the suggested file name for this @a download.
  */
-void Ewk_Download_Job::setSuggestedFileName(const char* suggestedFilename)
+void ewk_download_job_suggested_filename_set(Ewk_Download_Job* download, const char* suggestedFilename)
 {
-    m_suggestedFilename = suggestedFilename;
+    EINA_SAFETY_ON_NULL_RETURN(download);
+
+    eina_stringshare_replace(&download->suggestedFilename, suggestedFilename);
 }
 
 /**
  * @internal
  * Report a given amount of data was received.
  */
-void Ewk_Download_Job::incrementReceivedData(uint64_t length)
+void ewk_download_job_received_data(Ewk_Download_Job* download, uint64_t length)
 {
-    m_downloaded += length;
+    EINA_SAFETY_ON_NULL_RETURN(download);
+
+    download->downloaded += length;
 }
 
 /**
  * @internal
  * Sets the state of the download.
  */
-void Ewk_Download_Job::setState(Ewk_Download_Job_State state)
+void ewk_download_job_state_set(Ewk_Download_Job* download, Ewk_Download_Job_State state)
 {
-    m_state = state;
-
-    switch (state) {
-    case EWK_DOWNLOAD_JOB_STATE_DOWNLOADING:
-        m_startTime = ecore_time_get();
-        break;
-    case EWK_DOWNLOAD_JOB_STATE_FAILED:
-    case EWK_DOWNLOAD_JOB_STATE_CANCELLED:
-    case EWK_DOWNLOAD_JOB_STATE_FINISHED:
-        m_endTime = ecore_time_get();
-        break;
-    default:
-        break;
-    }
+    download->state = state;
+
+    // Update start time if the download has started
+    if (state == EWK_DOWNLOAD_JOB_STATE_DOWNLOADING)
+        download->startTime = ecore_time_get();
+
+    // Update end time if the download has finished (successfully or not)
+    if (state == EWK_DOWNLOAD_JOB_STATE_FAILED
+        || state == EWK_DOWNLOAD_JOB_STATE_CANCELLED
+        || state == EWK_DOWNLOAD_JOB_STATE_FINISHED)
+        download->endTime = ecore_time_get();
+}
+
+/**
+ * @internal
+ * Constructs a Ewk_Download_Job from a DownloadProxy.
+ */
+Ewk_Download_Job* ewk_download_job_new(DownloadProxy* download, Evas_Object* ewkView)
+{
+    EINA_SAFETY_ON_NULL_RETURN_VAL(download, 0);
+    EINA_SAFETY_ON_NULL_RETURN_VAL(ewkView, 0);
+
+    return new _Ewk_Download_Job(download, ewkView);
 }
index 156f29a..68f03fc 100644 (file)
 extern "C" {
 #endif
 
-/** Creates a type name for Ewk_Download_Job */
-typedef struct Ewk_Download_Job Ewk_Download_Job;
+/** Creates a type name for _Ewk_Download_Job_Job */
+typedef struct _Ewk_Download_Job Ewk_Download_Job;
 
 /// Defines the possible states of a download.
-enum Ewk_Download_Job_State {
+enum _Ewk_Download_Job_State {
     /// The download state is unknown
     EWK_DOWNLOAD_JOB_STATE_UNKNOWN = -1,
     /// The download has not started yet
@@ -63,17 +63,15 @@ enum Ewk_Download_Job_State {
     /// The download completed successfully.
     EWK_DOWNLOAD_JOB_STATE_FINISHED
 };
-/// Creates a type name for @a Ewk_Download_Job_State.
-typedef enum Ewk_Download_Job_State Ewk_Download_Job_State;
+/// Creates a type name for @a _Ewk_Download_Job_State.
+typedef enum _Ewk_Download_Job_State Ewk_Download_Job_State;
 
 /**
  * Increases the reference count of the given object.
  *
  * @param download the download object to increase the reference count
- *
- * @return a pointer to the object on success, @c NULL otherwise.
  */
-EAPI Ewk_Download_Job *ewk_download_job_ref(Ewk_Download_Job *download);
+EAPI void ewk_download_job_ref(Ewk_Download_Job *download);
 
 /**
  * Decreases the reference count of the given object, possibly freeing it.
@@ -112,7 +110,7 @@ EAPI Ewk_Url_Request *ewk_download_job_request_get(const Ewk_Download_Job *downl
 EAPI Ewk_Url_Response *ewk_download_job_response_get(const Ewk_Download_Job *download);
 
 /**
- * Query the URL to which the downloaded file will be written.
+ * Query the URI to which the downloaded file will be written.
  *
  * @param download a #Ewk_Download_Job to query.
  *
old mode 100755 (executable)
new mode 100644 (file)
index 00fc76f..d043494
 #define ewk_download_job_private_h
 
 #include "WKBase.h"
-#include "WKEinaSharedString.h"
-#include "ewk_download_job.h"
-#include "ewk_url_request_private.h"
-#include "ewk_url_response_private.h"
 #include <Evas.h>
-#include <wtf/PassRefPtr.h>
+
+typedef struct _Ewk_Download_Job Ewk_Download_Job;
+typedef struct _Ewk_Url_Response Ewk_Url_Response;
+typedef struct _Ewk_Web_Error Ewk_Web_Error;
 
 namespace WebKit {
 class DownloadProxy;
 }
 
-class EwkViewImpl;
-
-class Ewk_Download_Job : public RefCounted<Ewk_Download_Job> {
-public:
-    static PassRefPtr<Ewk_Download_Job> create(WebKit::DownloadProxy* download, EwkViewImpl* viewImpl)
-    {
-        return adoptRef(new Ewk_Download_Job(download, viewImpl));
-    }
-
-    uint64_t id() const;
-    EwkViewImpl* viewImpl() const;
-
-    Ewk_Download_Job_State state() const;
-    void setState(Ewk_Download_Job_State);
-
-    Ewk_Url_Request* request() const;
-    Ewk_Url_Response* response() const;
-    void setResponse(PassRefPtr<Ewk_Url_Response>);
-
-    const char* destination() const;
-    void setDestination(const char* destination);
-
-    const char* suggestedFileName() const;
-    void setSuggestedFileName(const char* fileName);
-
-    bool cancel();
-
-    double estimatedProgress() const;
-    double elapsedTime() const;
-    void incrementReceivedData(uint64_t length);
+Ewk_Download_Job* ewk_download_job_new(WebKit::DownloadProxy*, Evas_Object* ewkView);
+uint64_t ewk_download_job_id_get(const Ewk_Download_Job*);
+Evas_Object* ewk_download_job_view_get(const Ewk_Download_Job*);
 
-private:
-    Ewk_Download_Job(WebKit::DownloadProxy* download, EwkViewImpl* viewImpl);
+void ewk_download_job_state_set(Ewk_Download_Job*, Ewk_Download_Job_State);
+void ewk_download_job_cancelled(Ewk_Download_Job*);
+void ewk_download_job_failed(Ewk_Download_Job*);
+void ewk_download_job_finished(Ewk_Download_Job*);
+void ewk_download_job_started(Ewk_Download_Job*);
 
-    WebKit::DownloadProxy* m_downloadProxy;
-    EwkViewImpl* m_viewImpl;
-    Ewk_Download_Job_State m_state;
-    mutable RefPtr<Ewk_Url_Request> m_request;
-    RefPtr<Ewk_Url_Response> m_response;
-    double m_startTime;
-    double m_endTime;
-    uint64_t m_downloaded; // length already downloaded
-    WKEinaSharedString m_destination;
-    WKEinaSharedString m_suggestedFilename;
-};
+void ewk_download_job_received_data(Ewk_Download_Job*, uint64_t length);
+void ewk_download_job_response_set(Ewk_Download_Job*, Ewk_Url_Response*);
+void ewk_download_job_suggested_filename_set(Ewk_Download_Job*, const char* suggestedFilename);
 
 #endif // ewk_download_job_private_h
old mode 100755 (executable)
new mode 100644 (file)
index c6834ac..2201a5b
 /*
- * Copyright (C) 2012 Intel Corporation. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
+   Copyright (C) 2012 Samsung Electronics
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Library General Public
+    License as published by the Free Software Foundation; either
+    version 2 of the License, or (at your option) any later version.
+
+    This library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Library General Public License for more details.
+
+    You should have received a copy of the GNU Library General Public License
+    along with this library; see the file COPYING.LIB.  If not, write to
+    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+    Boston, MA 02110-1301, USA.
+*/
 
 #include "config.h"
 #include "ewk_error.h"
 
-#include "ErrorsEfl.h"
+#if OS(TIZEN)
+#include "FileSystem.h"
+#include "WebError.h"
+#include "WKAPICast.h"
+#include "WKRetainPtr.h"
 #include "WKString.h"
 #include "WKURL.h"
-#include "ewk_error_private.h"
-#include <WKAPICast.h>
-#include <wtf/text/CString.h>
-
-#if ENABLE(TIZEN_WEBKIT2_TEXT_TRANSLATION)
+#include <glib.h>
 #include <libintl.h>
-#endif
+#include <libsoup/soup.h>
+#include <wtf/OwnArrayPtr.h>
+#include <wtf/text/CString.h>
 
 using namespace WebCore;
 using namespace WebKit;
 
-Ewk_Error::Ewk_Error(WKErrorRef errorRef)
-    : wkError(errorRef)
-    , url(AdoptWK, WKErrorCopyFailingURL(errorRef))
-    , description(AdoptWK, WKErrorCopyLocalizedDescription(errorRef))
-#if OS(TIZEN)
-    , domain(AdoptWK, WKErrorCopyDomain(errorRef))
-#endif
-{ }
-
-#define EWK_ERROR_WK_GET_OR_RETURN(error, wkError_, ...)    \
-    if (!(error)) {                                           \
-        EINA_LOG_CRIT("error is NULL.");                      \
-        return __VA_ARGS__;                                    \
-    }                                                          \
-    if (!(error)->wkError) {                                 \
-        EINA_LOG_CRIT("error->wkError is NULL.");            \
-        return __VA_ARGS__;                                    \
-    }                                                          \
-    WKErrorRef wkError_ = (error)->wkError.get()
-
-Ewk_Error_Type ewk_error_type_get(const Ewk_Error* error)
-{
-    EWK_ERROR_WK_GET_OR_RETURN(error, wkError, EWK_ERROR_TYPE_NONE);
-
-    WKRetainPtr<WKStringRef> wkDomain(AdoptWK, WKErrorCopyDomain(wkError));
-    WTF::String errorDomain = toWTFString(wkDomain.get());
-
-    if (errorDomain == errorDomainNetwork)
-        return EWK_ERROR_TYPE_NETWORK;
-    if (errorDomain == errorDomainPolicy)
-        return EWK_ERROR_TYPE_POLICY;
-    if (errorDomain == errorDomainPlugin)
-        return EWK_ERROR_TYPE_PLUGIN;
-    if (errorDomain == errorDomainDownload)
-        return EWK_ERROR_TYPE_DOWNLOAD;
-    if (errorDomain == errorDomainPrint)
-        return EWK_ERROR_TYPE_PRINT;
-    return EWK_ERROR_TYPE_INTERNAL;
-}
-
-const char* ewk_error_url_get(const Ewk_Error* error)
-{
-    EINA_SAFETY_ON_NULL_RETURN_VAL(error, 0);
-
-    return error->url;
-}
-
-int ewk_error_code_get(const Ewk_Error* error)
-{
-    EWK_ERROR_WK_GET_OR_RETURN(error, wkError, 0);
+struct _Ewk_Error {
+    const char* domain;
+    const char* url;
+    const char* description;
+    int errorCode;
+};
 
-    return WKErrorGetErrorCode(wkError);
-}
-
-const char* ewk_error_description_get(const Ewk_Error* error)
+Ewk_Error* ewkErrorCreate(WKErrorRef error)
 {
-    EINA_SAFETY_ON_NULL_RETURN_VAL(error, 0);
+    Ewk_Error* ewkError = new Ewk_Error;
+    ewkError->domain = eina_stringshare_add(toImpl(error)->domain().utf8().data());
+    ewkError->url = eina_stringshare_add(toImpl(error)->failingURL().utf8().data());
+    ewkError->description = eina_stringshare_add(toImpl(error)->localizedDescription().utf8().data());
+    ewkError->errorCode = toImpl(error)->errorCode();
 
-    return error->description;
+    return ewkError;
 }
 
-Eina_Bool ewk_error_cancellation_get(const Ewk_Error* error)
+void ewkErrorDelete(Ewk_Error* error)
 {
-    EWK_ERROR_WK_GET_OR_RETURN(error, wkError, false);
+    EINA_SAFETY_ON_NULL_RETURN(error);
 
-    return toImpl(wkError)->platformError().isCancellation();
-}
-
-const char* ewk_error_domain_get(const Ewk_Error* error)
-{
-#if OS(TIZEN)
-    EINA_SAFETY_ON_NULL_RETURN_VAL(error, 0);
+    eina_stringshare_del(error->domain);
+    eina_stringshare_del(error->url);
+    eina_stringshare_del(error->description);
 
-    return error->domain;
-#else
-    UNUSED_PARAM(error);
-    return 0;
-#endif
+    delete error;
 }
 
-#if OS(TIZEN)
-void ewk_error_load_error_page(Ewk_Error* error, WKPageRef page)
+void ewkErrorLoadErrorPage(Ewk_Error* error, WKPageRef page)
 {
-    EWK_ERROR_WK_GET_OR_RETURN(error, wkError);
-
     // if error domain is null, it is not a error.
     EINA_SAFETY_ON_NULL_RETURN(error->domain);
 
-    int errorCode = WKErrorGetErrorCode(wkError);
     // error_code == 0  is ok, error_code == -999 is request cancelled
     if (!strcmp(error->domain, g_quark_to_string(SOUP_HTTP_ERROR))
-        && (!errorCode || errorCode == EWK_ERROR_NETWORK_STATUS_CANCELLED))
+        && (!error->errorCode || error->errorCode == EWK_ERROR_NETWORK_STATUS_CANCELLED))
             return;
 
     // webDEV error code but not a error
     if (!strcmp(error->domain, WebError::webKitErrorDomain().utf8().data())) {
-        if (errorCode == EWK_ERROR_CODE_CANNOTSHOWMIMETYPE || errorCode == EWK_ERROR_CODE_FRAMELOADINTERRUPTEDBYPOLICYCHANGE || errorCode == EWK_ERROR_CODE_PLUGINWILLHANDLELOAD)
+        if (error->errorCode == EWK_ERROR_CODE_CANNOTSHOWMIMETYPE || error->errorCode == EWK_ERROR_CODE_FRAMELOADINTERRUPTEDBYPOLICYCHANGE || error->errorCode == EWK_ERROR_CODE_PLUGINWILLHANDLELOAD)
             return;
     }
 
@@ -161,7 +102,7 @@ void ewk_error_load_error_page(Ewk_Error* error, WKPageRef page)
 
     String htmlSource(arrayHtmlSource.get(), fileSize);
 
-    gboolean isWebKitCannotShowUrlError = !strcmp(error->domain, WebError::webKitErrorDomain().utf8().data()) && (errorCode == EWK_ERROR_CODE_CANNOTSHOWURL);
+    gboolean isWebKitCannotShowUrlError = !strcmp(error->domain, WebError::webKitErrorDomain().utf8().data()) && (error->errorCode == EWK_ERROR_CODE_CANNOTSHOWURL);
     if (isWebKitCannotShowUrlError) {
         int startIndex = htmlSource.find("<!--errorMessage-->");
         int endIndex = htmlSource.reverseFind("<!--errorSuggestions-->");
@@ -170,8 +111,8 @@ void ewk_error_load_error_page(Ewk_Error* error, WKPageRef page)
     }
 
     if (!strcmp(error->domain, g_quark_to_string(SOUP_HTTP_ERROR))
-        && errorCode >= SOUP_STATUS_CANT_RESOLVE
-        && errorCode <= SOUP_STATUS_SSL_FAILED)
+        && error->errorCode >= SOUP_STATUS_CANT_RESOLVE
+        && error->errorCode <= SOUP_STATUS_SSL_FAILED)
 #if ENABLE(TIZEN_WEBKIT2_TEXT_TRANSLATION)
         htmlSource = htmlSource.replace("%errorMessageTitle%", String::fromUTF8(dgettext("WebKit", "IDS_WEBVIEW_BODY_WEB_PAGE_NOT_AVAILABLE")));
     else if (isWebKitCannotShowUrlError)
@@ -186,7 +127,7 @@ void ewk_error_load_error_page(Ewk_Error* error, WKPageRef page)
         htmlSource = htmlSource.replace("%errorMessageTitle%", "Web page temporarily not available");
 #endif
 
-    String urlLink = String::format("<a href=%s>%s</a>", static_cast<const char*>(error->url), static_cast<const char*>(error->url));
+    String urlLink = String::format("<a href=%s>%s</a>", error->url, error->url);
     char errorMessage[1280] = {0x00, };
 
 #if ENABLE(TIZEN_WEBKIT2_TEXT_TRANSLATION)
@@ -214,4 +155,29 @@ void ewk_error_load_error_page(Ewk_Error* error, WKPageRef page)
     WKRetainPtr<WKURLRef> unreachableURL(AdoptWK, WKURLCreateWithUTF8CString(error->url));
     WKPageLoadAlternateHTMLString(page, htmlString.get(), baseURL.get(), unreachableURL.get());
 }
-#endif
+
+const char* ewk_error_domain_get(Ewk_Error* error)
+{
+    EINA_SAFETY_ON_NULL_RETURN_VAL(error, 0);
+    return error->domain;
+}
+
+int ewk_error_code_get(Ewk_Error* error)
+{
+    EINA_SAFETY_ON_NULL_RETURN_VAL(error, 0);
+    return error->errorCode;
+}
+
+const char* ewk_error_url_get(Ewk_Error* error)
+{
+    EINA_SAFETY_ON_NULL_RETURN_VAL(error, 0);
+    return error->url;
+}
+
+const char* ewk_error_description_get(Ewk_Error* error)
+{
+    EINA_SAFETY_ON_NULL_RETURN_VAL(error, 0);
+    return error->description;
+}
+
+#endif // #if OS(TIZEN)
old mode 100755 (executable)
new mode 100644 (file)
index 58ce112..be6d175
@@ -1,32 +1,21 @@
 /*
- * Copyright (C) 2012 Intel Corporation. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
+   Copyright (C) 2012 Samsung Electronics
 
-/**
- * @file    ewk_error.h
- * @brief   Describes the Web Error API.
- */
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Library General Public
+    License as published by the Free Software Foundation; either
+    version 2 of the License, or (at your option) any later version.
+
+    This library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Library General Public License for more details.
+
+    You should have received a copy of the GNU Library General Public License
+    along with this library; see the file COPYING.LIB.  If not, write to
+    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+    Boston, MA 02110-1301, USA.
+*/
 
 #ifndef ewk_error_h
 #define ewk_error_h
 extern "C" {
 #endif
 
-/** Creates a type name for @a Ewk_Error. */
-typedef struct Ewk_Error Ewk_Error;
+typedef struct _Ewk_Error Ewk_Error;
 
-/// Creates a type name for Ewk_Error_Type.
-typedef enum {
-    EWK_ERROR_TYPE_NONE,
-    EWK_ERROR_TYPE_INTERNAL,
-    EWK_ERROR_TYPE_NETWORK,
-    EWK_ERROR_TYPE_POLICY,
-    EWK_ERROR_TYPE_PLUGIN,
-    EWK_ERROR_TYPE_DOWNLOAD,
-    EWK_ERROR_TYPE_PRINT
-} Ewk_Error_Type;
-
-//#if OS(TIZEN)
 typedef enum {
     EWK_ERROR_CODE_CANNOTSHOWMIMETYPE = 100,
     EWK_ERROR_CODE_CANNOTSHOWURL,
@@ -184,86 +160,48 @@ typedef enum {
     EWK_ERROR_IO_CODE_PROXY_NEED_AUTH,
     EWK_ERROR_IO_CODE_PROXY_NOT_ALLOWED
 } Ewk_Error_Io_Code;
-//#endif
-
-/**
- * Query type for this error.
- *
- * @param error error object to query.
- *
- * @return the error type, that may be @c NULL. This pointer is
- *         guaranteed to be eina_stringshare, so whenever possible
- *         save yourself some cpu cycles and use
- *         eina_stringshare_ref() instead of eina_stringshare_add() or
- *         strdup().
- */
-EAPI Ewk_Error_Type ewk_error_type_get(const Ewk_Error *error);
 
 /**
- * Query failing URL for this error.
- *
- * URL that failed loading.
+ * Returns domain from Ewk_Error.
  *
- * @param error error object to query.
+ * @param error Ewk_Error object received from "load,error" evas object smart callback
  *
- * @return the URL pointer, that may be @c NULL. This pointer is
- *         guaranteed to be eina_stringshare, so whenever possible
- *         save yourself some cpu cycles and use
- *         eina_stringshare_ref() instead of eina_stringshare_add() or
- *         strdup().
+ * @return @c domain string on success or empty string on failure
  */
-EAPI const char *ewk_error_url_get(const Ewk_Error *error);
+EAPI const char* ewk_error_domain_get(Ewk_Error* error);
 
 /**
- * Query HTTP error code.
+ * Returns error code from Ewk_Error.
  *
- * @param error error object to query.
+ * @param error Ewk_Error object received from "load,error" evas object smart callback
  *
- * #if OS(TIZEN)
  * @note If ewk_error_domain_get returns "WebKitErrorDomain", the error code represents Ewk_Error_Code.
  *       If "soup_http_error_quark", it represents Ewk_Error_Network_Status.
  *       If "g-io-error-quark", it represents Ewk_Error_Io_Code.
- * #endif
  *
- * @return the HTTP error code.
+ * @return @c error code
  */
-EAPI int ewk_error_code_get(const Ewk_Error *error);
+EAPI int ewk_error_code_get(Ewk_Error* error);
 
 /**
- * Query description for this error.
- *
- * @param error error object to query.
+ * Returns url from Ewk_Error.
  *
- * @return the description pointer, that may be @c NULL. This pointer is
- *         guaranteed to be eina_stringshare, so whenever possible
- *         save yourself some cpu cycles and use
- *         eina_stringshare_ref() instead of eina_stringshare_add() or
- *         strdup().
- */
-EAPI const char *ewk_error_description_get(const Ewk_Error *error);
-
-/**
- * Query if error should be treated as a cancellation.
- *
- * @param error error object to query.
+ * @param error Ewk_Error object received from "load,error" evas object smart callback
  *
- * @return @c EINA_TRUE if this error should be treated as a cancellation, @c EINA_FALSE otherwise
+ * @return @c url string on success or empty string on failure
  */
-EAPI Eina_Bool ewk_error_cancellation_get(const Ewk_Error *error);
+EAPI const char* ewk_error_url_get(Ewk_Error* error);
 
-//#if OS(TIZEN)
 /**
- * Returns domain from Ewk_Error.
+ * Returns description from Ewk_Error.
  *
  * @param error Ewk_Error object received from "load,error" evas object smart callback
  *
  * @return @c domain string on success or empty string on failure
  */
-EAPI const char* ewk_error_domain_get(const Ewk_Error* error);
-//#endif
+EAPI const char* ewk_error_description_get(Ewk_Error* error);
 
 #ifdef __cplusplus
 }
 #endif
-
 #endif // ewk_error_h
old mode 100755 (executable)
new mode 100644 (file)
index 902d4f9..f8fdf63
@@ -1,59 +1,31 @@
 /*
- * Copyright (C) 2012 Intel Corporation. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
+   Copyright (C) 2012 Samsung Electronics
 
-#ifndef ewk_error_private_h
-#define ewk_error_private_h
-
-#include "WKEinaSharedString.h"
-#include <WKError.h>
-#include <WKRetainPtr.h>
-#include <wtf/PassOwnPtr.h>
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Library General Public
+    License as published by the Free Software Foundation; either
+    version 2 of the License, or (at your option) any later version.
 
-class Ewk_Error {
-public:
-    WKRetainPtr<WKErrorRef> wkError;
-    WKEinaSharedString url;
-    WKEinaSharedString description;
-#if OS(TIZEN)
-    WKEinaSharedString domain;
-#endif
+    This library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Library General Public License for more details.
 
-    static PassOwnPtr<Ewk_Error> create(WKErrorRef errorRef)
-    {
-        if (!errorRef)
-            return nullptr;
+    You should have received a copy of the GNU Library General Public License
+    along with this library; see the file COPYING.LIB.  If not, write to
+    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+    Boston, MA 02110-1301, USA.
+*/
 
-        return adoptPtr(new Ewk_Error(errorRef));
-    }
+#ifndef ewk_error_private_h
+#define ewk_error_private_h
 
-private:
-    explicit Ewk_Error(WKErrorRef errorRef);
-};
+#include "WKError.h"
+#include "WKPage.h"
+#include "ewk_error.h"
 
-#if OS(TIZEN)
-void ewk_error_load_error_page(Ewk_Error* error, WKPageRef page);
-#endif
+Ewk_Error* ewkErrorCreate(WKErrorRef error);
+void ewkErrorDelete(Ewk_Error* error);
+void ewkErrorLoadErrorPage(Ewk_Error* error, WKPageRef page);
 
 #endif // ewk_error_private_h
diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_favicon_database.cpp b/Source/WebKit2/UIProcess/API/efl/ewk_favicon_database.cpp
deleted file mode 100755 (executable)
index ea15044..0000000
+++ /dev/null
@@ -1,212 +0,0 @@
-/*
- * Copyright (C) 2012 Intel Corporation. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "ewk_favicon_database.h"
-
-#include "WKAPICast.h"
-#include "WKURL.h"
-#include "WebIconDatabase.h"
-#include "WebURL.h"
-#include "ewk_favicon_database_private.h"
-#include <WebCore/CairoUtilitiesEfl.h>
-#include <WebCore/RefPtrCairo.h>
-#include <wtf/text/CString.h>
-#include <wtf/text/WTFString.h>
-
-using namespace WebKit;
-
-Ewk_Favicon_Database::Ewk_Favicon_Database(WKIconDatabaseRef iconDatabaseRef)
-    :  m_wkIconDatabase(iconDatabaseRef)
-{
-    WKIconDatabaseClient iconDatabaseClient;
-    memset(&iconDatabaseClient, 0, sizeof(WKIconDatabaseClient));
-    iconDatabaseClient.version = kWKIconDatabaseClientCurrentVersion;
-    iconDatabaseClient.clientInfo = this;
-    iconDatabaseClient.didChangeIconForPageURL = didChangeIconForPageURL;
-    iconDatabaseClient.iconDataReadyForPageURL = iconDataReadyForPageURL;
-    WKIconDatabaseSetIconDatabaseClient(m_wkIconDatabase.get(), &iconDatabaseClient);
-}
-
-String Ewk_Favicon_Database::iconURLForPageURL(const String& pageURL) const
-{
-    String iconURL;
-    toImpl(m_wkIconDatabase.get())->synchronousIconURLForPageURL(pageURL, iconURL);
-
-    return iconURL;
-}
-
-void Ewk_Favicon_Database::watchChanges(const IconChangeCallbackData& callbackData)
-{
-    ASSERT(callbackData.callback);
-    if (m_changeListeners.contains(callbackData.callback))
-        return;
-
-    m_changeListeners.add(callbackData.callback, callbackData);
-}
-
-void Ewk_Favicon_Database::unwatchChanges(Ewk_Favicon_Database_Icon_Change_Cb callback)
-{
-    ASSERT(callback);
-    m_changeListeners.remove(callback);
-}
-
-struct AsyncIconRequestResponse {
-    String pageURL;
-    RefPtr<cairo_surface_t> surface;
-    IconRequestCallbackData callbackData;
-
-    AsyncIconRequestResponse(const String& pageURL, PassRefPtr<cairo_surface_t> surface, const IconRequestCallbackData& callbackData)
-        : pageURL(pageURL)
-        , surface(surface)
-        , callbackData(callbackData)
-    { }
-};
-
-static Eina_Bool respond_icon_request_idle(void* data)
-{
-    AsyncIconRequestResponse* response = static_cast<AsyncIconRequestResponse*>(data);
-
-    RefPtr<Evas_Object> icon = response->surface ? WebCore::evasObjectFromCairoImageSurface(response->callbackData.evas, response->surface.get()) : 0;
-    response->callbackData.callback(response->pageURL.utf8().data(), icon.get(), response->callbackData.userData);
-
-    delete response;
-
-    return ECORE_CALLBACK_DONE;
-}
-
-void Ewk_Favicon_Database::iconForPageURL(const String& pageURL, const IconRequestCallbackData& callbackData)
-{
-    WebIconDatabase* webIconDatabase = toImpl(m_wkIconDatabase.get());
-
-    // We ask for the icon directly. If we don't get the icon data now,
-    // we'll be notified later (even if the database is still importing icons).
-    RefPtr<cairo_surface_t> surface = getIconSurfaceSynchronously(pageURL);
-
-    // If there's no valid icon, but there's an iconURL registered,
-    // or it's still not registered but the import process hasn't
-    // finished yet, we need to wait for iconDataReadyForPageURL to be
-    // called before making and informed decision.
-    String iconURL = iconURLForPageURL(pageURL);
-    if (!surface && (!iconURL.isEmpty() || !webIconDatabase->isUrlImportCompleted())) {
-        PendingIconRequestVector requests = m_iconRequests.get(pageURL);
-        requests.append(callbackData);
-        m_iconRequests.set(pageURL, requests);
-        return;
-    }
-
-    // Respond when idle.
-    AsyncIconRequestResponse* response = new AsyncIconRequestResponse(pageURL, surface.release(), callbackData);
-    ecore_idler_add(respond_icon_request_idle, response);
-}
-
-void Ewk_Favicon_Database::didChangeIconForPageURL(WKIconDatabaseRef, WKURLRef pageURLRef, const void* clientInfo)
-{
-    const Ewk_Favicon_Database* ewkIconDatabase = static_cast<const Ewk_Favicon_Database*>(clientInfo);
-
-    if (ewkIconDatabase->m_changeListeners.isEmpty())
-        return;
-
-    CString pageURL = toImpl(pageURLRef)->string().utf8();
-
-    ChangeListenerMap::const_iterator it = ewkIconDatabase->m_changeListeners.begin();
-    ChangeListenerMap::const_iterator end = ewkIconDatabase->m_changeListeners.end();
-    for (; it != end; ++it)
-        it->second.callback(pageURL.data(), it->second.userData);
-}
-
-PassRefPtr<cairo_surface_t> Ewk_Favicon_Database::getIconSurfaceSynchronously(const String& pageURL) const
-{
-    WebIconDatabase* webIconDatabase = toImpl(m_wkIconDatabase.get());
-
-    webIconDatabase->retainIconForPageURL(pageURL);
-
-    WebCore::NativeImagePtr icon = webIconDatabase->nativeImageForPageURL(pageURL);
-    if (!icon) {
-        webIconDatabase->releaseIconForPageURL(pageURL);
-        return 0;
-    }
-
-    RefPtr<cairo_surface_t> surface = icon->surface();
-
-    return surface.release();
-}
-
-void Ewk_Favicon_Database::iconDataReadyForPageURL(WKIconDatabaseRef, WKURLRef pageURL, const void* clientInfo)
-{
-    Ewk_Favicon_Database* ewkIconDatabase = const_cast<Ewk_Favicon_Database*>(static_cast<const Ewk_Favicon_Database*>(clientInfo));
-
-    String urlString = toImpl(pageURL)->string();
-    if (!ewkIconDatabase->m_iconRequests.contains(urlString))
-        return;
-
-    RefPtr<cairo_surface_t> surface = ewkIconDatabase->getIconSurfaceSynchronously(urlString);
-
-    PendingIconRequestVector requestsForURL = ewkIconDatabase->m_iconRequests.take(urlString);
-    size_t requestCount = requestsForURL.size();
-    for (size_t i = 0; i < requestCount; ++i) {
-        const IconRequestCallbackData& callbackData = requestsForURL[i];
-        RefPtr<Evas_Object> icon = surface ? WebCore::evasObjectFromCairoImageSurface(callbackData.evas, surface.get()) : 0;
-        callbackData.callback(urlString.utf8().data(), icon.get(), callbackData.userData);
-    }
-}
-
-const char* ewk_favicon_database_icon_url_get(Ewk_Favicon_Database* ewkIconDatabase, const char* pageURL)
-{
-    EINA_SAFETY_ON_NULL_RETURN_VAL(ewkIconDatabase, 0);
-    EINA_SAFETY_ON_NULL_RETURN_VAL(pageURL, 0);
-
-    String iconURL = ewkIconDatabase->iconURLForPageURL(String::fromUTF8(pageURL));
-
-    return eina_stringshare_add(iconURL.utf8().data());
-}
-
-Eina_Bool ewk_favicon_database_async_icon_get(Ewk_Favicon_Database* ewkIconDatabase, const char* page_url, Evas* evas, Ewk_Favicon_Database_Async_Icon_Get_Cb callback, void* userData)
-{
-    EINA_SAFETY_ON_NULL_RETURN_VAL(ewkIconDatabase, false);
-    EINA_SAFETY_ON_NULL_RETURN_VAL(page_url, false);
-    EINA_SAFETY_ON_NULL_RETURN_VAL(evas, false);
-    EINA_SAFETY_ON_NULL_RETURN_VAL(callback, false);
-
-    ewkIconDatabase->iconForPageURL(String::fromUTF8(page_url), IconRequestCallbackData(callback, userData, evas));
-
-    return true;
-}
-
-void ewk_favicon_database_icon_change_callback_add(Ewk_Favicon_Database* ewkIconDatabase, Ewk_Favicon_Database_Icon_Change_Cb callback, void* userData)
-{
-    EINA_SAFETY_ON_NULL_RETURN(ewkIconDatabase);
-    EINA_SAFETY_ON_NULL_RETURN(callback);
-
-    ewkIconDatabase->watchChanges(IconChangeCallbackData(callback, userData));
-}
-
-void ewk_favicon_database_icon_change_callback_del(Ewk_Favicon_Database* ewkIconDatabase, Ewk_Favicon_Database_Icon_Change_Cb callback)
-{
-    EINA_SAFETY_ON_NULL_RETURN(ewkIconDatabase);
-    EINA_SAFETY_ON_NULL_RETURN(callback);
-
-    ewkIconDatabase->unwatchChanges(callback);
-}
diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_favicon_database.h b/Source/WebKit2/UIProcess/API/efl/ewk_favicon_database.h
deleted file mode 100644 (file)
index 89cc31f..0000000
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * Copyright (C) 2012 Intel Corporation. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/**
- * @file    ewk_favicon_database.h
- * @brief   Describes the Ewk Favicon Database API.
- */
-
-#ifndef ewk_favicon_database_h
-#define ewk_favicon_database_h
-
-#include <Evas.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/** Creates a type name for @a Ewk_Favicon_Database. */
-typedef struct Ewk_Favicon_Database Ewk_Favicon_Database;
-
-/**
- * @typedef Ewk_Favicon_Database_Icon_Change_Cb Ewk_Favicon_Database_Icon_Change_Cb
- * @brief Callback type for use with ewk_favicon_database_icon_change_callback_add and ewk_favicon_database_icon_change_callback_del
- */
-typedef void (*Ewk_Favicon_Database_Icon_Change_Cb)(const char *page_url, void *event_info);
-
-/**
- * @typedef Ewk_Favicon_Database_Async_Icon_Get_Cb Ewk_Favicon_Database_Async_Icon_Get_Cb
- * @brief Callback type for use with ewk_favicon_database_async_icon_get
- *
- * The @a icon may be NULL if there is no favicon associated to the given @a page_url.
- *
- * You need to call evas_object_ref() on the @a icon if you wish to keep it after the
- * callback is executed.
- */
-typedef void (*Ewk_Favicon_Database_Async_Icon_Get_Cb)(const char *page_url, Evas_Object *icon, void *event_info);
-
-/**
- * Retrieves from the database the favicon URL for the given @a page_url
- *
- * @param database database object to query
- * @param page_url URL of the page to get the favicon URL for
- *
- * @return a newly allocated string guaranteed to be eina_stringshare
- *         or @c NULL in case of error or if the key does not exist.
- *         You need to call eina_stringshare_del() after use.
- */
-EAPI const char *ewk_favicon_database_icon_url_get(Ewk_Favicon_Database *database, const char *page_url);
-
-/**
- * Retrieves asynchronously from the database the favicon for the given @a page_url
- *
- * @param database database object to query
- * @param page_url URL of the page to get the favicon for
- * @param evas The canvas to add the favicon to
- * @param callback callback function to be called when the icon is retrieved
- * @param data the data pointer that was to be passed to the callback
- *
- * @return @c EINA_TRUE if the icon was successfuly requested, @c EINA_FALSE otherwise
- */
-EAPI Eina_Bool ewk_favicon_database_async_icon_get(Ewk_Favicon_Database *database, const char *page_url, Evas *evas, Ewk_Favicon_Database_Async_Icon_Get_Cb callback, void *data);
-
-/**
- * Add (register) a callback function to a icon change event
- *
- * @param database database object to register the callback
- * @param callback callback function to be called when an icon changes
- * @param data the data pointer that was to be passed to the callback
- */
-EAPI void ewk_favicon_database_icon_change_callback_add(Ewk_Favicon_Database *database, Ewk_Favicon_Database_Icon_Change_Cb callback, void *data);
-
-/**
- * Delete (unregister) a callback function registered to a icon change event
- *
- * @param database database object to unregister the callback.
- * @param callback callback function to unregister
- */
-EAPI void ewk_favicon_database_icon_change_callback_del(Ewk_Favicon_Database *database, Ewk_Favicon_Database_Icon_Change_Cb callback);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif // ewk_favicon_database_h
diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_favicon_database_private.h b/Source/WebKit2/UIProcess/API/efl/ewk_favicon_database_private.h
deleted file mode 100644 (file)
index b8ba4f6..0000000
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * Copyright (C) 2012 Intel Corporation. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef ewk_favicon_database_private_h
-#define ewk_favicon_database_private_h
-
-#include "WKIconDatabase.h"
-#include "WKRetainPtr.h"
-#include "ewk_favicon_database.h"
-#include <WebKit2/WKBase.h>
-#include <wtf/HashMap.h>
-
-struct IconChangeCallbackData {
-    Ewk_Favicon_Database_Icon_Change_Cb callback;
-    void* userData;
-
-    IconChangeCallbackData()
-        : callback(0)
-        , userData(0)
-    { }
-
-    IconChangeCallbackData(Ewk_Favicon_Database_Icon_Change_Cb _callback, void* _userData)
-        : callback(_callback)
-        , userData(_userData)
-    { }
-};
-
-struct IconRequestCallbackData {
-    Ewk_Favicon_Database_Async_Icon_Get_Cb callback;
-    void* userData;
-    Evas* evas;
-
-    IconRequestCallbackData()
-        : callback(0)
-        , userData(0)
-        , evas(0)
-    { }
-
-    IconRequestCallbackData(Ewk_Favicon_Database_Async_Icon_Get_Cb _callback, void* _userData, Evas* _evas)
-        : callback(_callback)
-        , userData(_userData)
-        , evas(_evas)
-    { }
-};
-
-typedef HashMap<Ewk_Favicon_Database_Icon_Change_Cb, IconChangeCallbackData> ChangeListenerMap;
-typedef Vector<IconRequestCallbackData> PendingIconRequestVector;
-typedef HashMap<String /* pageURL */, PendingIconRequestVector> PendingIconRequestMap;
-
-class Ewk_Favicon_Database {
-public:
-    static PassOwnPtr<Ewk_Favicon_Database> create(WKIconDatabaseRef iconDatabaseRef)
-    {
-        return adoptPtr(new Ewk_Favicon_Database(iconDatabaseRef));
-    }
-
-    String iconURLForPageURL(const String& pageURL) const;
-    void iconForPageURL(const String& pageURL, const IconRequestCallbackData& callbackData);
-
-    void watchChanges(const IconChangeCallbackData& callbackData);
-    void unwatchChanges(Ewk_Favicon_Database_Icon_Change_Cb callback);
-
-private:
-    explicit Ewk_Favicon_Database(WKIconDatabaseRef iconDatabaseRef);
-
-    PassRefPtr<cairo_surface_t> getIconSurfaceSynchronously(const String& pageURL) const;
-
-    static void didChangeIconForPageURL(WKIconDatabaseRef iconDatabase, WKURLRef pageURL, const void* clientInfo);
-    static void iconDataReadyForPageURL(WKIconDatabaseRef iconDatabase, WKURLRef pageURL, const void* clientInfo);
-
-    WKRetainPtr<WKIconDatabaseRef> m_wkIconDatabase;
-    ChangeListenerMap m_changeListeners;
-    PendingIconRequestMap m_iconRequests;
-};
-
-#endif // ewk_favicon_database_private_h
index ee140f9..7072173 100644 (file)
 #include "WKAPICast.h"
 #include "WKArray.h"
 #include "WKBase.h"
+#include "WKDictionary.h"
+#include "WKFormSubmissionListener.h"
+#include "WKRetainPtr.h"
 #include "WKString.h"
 #include "ewk_form_submission_request_private.h"
 #include <wtf/text/CString.h>
 
 using namespace WebKit;
 
-Ewk_Form_Submission_Request* ewk_form_submission_request_ref(Ewk_Form_Submission_Request* request)
-{
-    EINA_SAFETY_ON_NULL_RETURN_VAL(request, 0);
-    request->ref();
+/**
+ * \struct _Ewk_Form_Submission_Request
+ * @brief Contains the form submission request data.
+ */
+struct _Ewk_Form_Submission_Request {
+    unsigned int __ref; /**< the reference count of the object */
+    WKRetainPtr<WKDictionaryRef> wkValues;
+    WKRetainPtr<WKFormSubmissionListenerRef> wkListener;
+    bool handledRequest;
+
+    _Ewk_Form_Submission_Request(WKDictionaryRef values, WKFormSubmissionListenerRef listener)
+        : __ref(1)
+        , wkValues(values)
+        , wkListener(listener)
+        , handledRequest(false)
+    { }
+
+    ~_Ewk_Form_Submission_Request()
+    {
+        ASSERT(!__ref);
+
+        // Make sure the request is always handled before destroying.
+        if (!handledRequest)
+            WKFormSubmissionListenerContinue(wkListener.get());
+    }
+};
 
-    return request;
+void ewk_form_submission_request_ref(Ewk_Form_Submission_Request* request)
+{
+    EINA_SAFETY_ON_NULL_RETURN(request);
+    ++request->__ref;
 }
 
 void ewk_form_submission_request_unref(Ewk_Form_Submission_Request* request)
 {
     EINA_SAFETY_ON_NULL_RETURN(request);
 
-    request->deref();
+    if (--request->__ref)
+        return;
+
+    delete request;
 }
 
 Eina_List* ewk_form_submission_request_field_names_get(Ewk_Form_Submission_Request* request)
@@ -86,3 +117,15 @@ Eina_Bool ewk_form_submission_request_submit(Ewk_Form_Submission_Request* reques
 
     return true;
 }
+
+/**
+ * @internal ewk_form_submission_request_new
+ * Creates a Ewk_Form_Submission_Request from a dictionary and a WKFormSubmissionListenerRef.
+ */
+Ewk_Form_Submission_Request* ewk_form_submission_request_new(WKDictionaryRef values, WKFormSubmissionListenerRef listener)
+{
+    EINA_SAFETY_ON_NULL_RETURN_VAL(values, 0);
+    EINA_SAFETY_ON_NULL_RETURN_VAL(listener, 0);
+
+    return new Ewk_Form_Submission_Request(values, listener);
+}
index b7fd0c6..fa67e93 100644 (file)
 extern "C" {
 #endif
 
-/** Creates a type name for Ewk_Form_Submission_Request */
-typedef struct Ewk_Form_Submission_Request Ewk_Form_Submission_Request;
+/** Creates a type name for _Ewk_Form_Submission_Request */
+typedef struct _Ewk_Form_Submission_Request Ewk_Form_Submission_Request;
 
 /**
  * Increases the reference count of the given object.
  *
  * @param request the request object to increase the reference count
- *
- * @return a pointer to the object on success, @c NULL otherwise.
  */
-EAPI Ewk_Form_Submission_Request *ewk_form_submission_request_ref(Ewk_Form_Submission_Request *request);
+EAPI void ewk_form_submission_request_ref(Ewk_Form_Submission_Request *request);
 
 /**
  * Decreases the reference count of the given object, possibly freeing it.
index 993b533..feb3d60 100644 (file)
 #ifndef ewk_form_submission_request_private_h
 #define ewk_form_submission_request_private_h
 
-#include "WKDictionary.h"
-#include "WKFormSubmissionListener.h"
-#include "WKRetainPtr.h"
-#include <wtf/PassRefPtr.h>
-#include <wtf/RefCounted.h>
+typedef struct _Ewk_Form_Submission_Request Ewk_Form_Submission_Request;
 
-class Ewk_Form_Submission_Request : public RefCounted<Ewk_Form_Submission_Request> {
-public:
-    WKRetainPtr<WKDictionaryRef> wkValues;
-    WKRetainPtr<WKFormSubmissionListenerRef> wkListener;
-    bool handledRequest;
-
-    ~Ewk_Form_Submission_Request()
-    {
-        // Make sure the request is always handled before destroying.
-        if (!handledRequest)
-            WKFormSubmissionListenerContinue(wkListener.get());
-    }
-
-    static PassRefPtr<Ewk_Form_Submission_Request> create(WKDictionaryRef values, WKFormSubmissionListenerRef listener)
-    {
-        return adoptRef(new Ewk_Form_Submission_Request(values, listener));
-    }
-
-private:
-    Ewk_Form_Submission_Request(WKDictionaryRef values, WKFormSubmissionListenerRef listener)
-        : wkValues(values)
-        , wkListener(listener)
-        , handledRequest(false)
-    { }
-};
+Ewk_Form_Submission_Request* ewk_form_submission_request_new(WKDictionaryRef values, WKFormSubmissionListenerRef);
 
 #endif // ewk_form_submission_request_private_h
old mode 100755 (executable)
new mode 100644 (file)
index 4e14e48..817dbe4
@@ -37,8 +37,6 @@ Ewk_Geolocation* ewkGeolocationCreateGeolocation(WKGeolocationManagerRef);
 Ewk_Geolocation_Permission_Request* ewkGeolocationCreatePermissionRequest(Evas_Object* ewkView, WKGeolocationPermissionRequestRef, WKSecurityOriginRef);
 void ewkGeolocationDeleteGeolocation(Ewk_Geolocation*);
 void ewkGeolocationDeletePermissionRequestList(Eina_List* requestList);
-bool ewkGeolocationIsPermissionRequestSuspended(const Ewk_Geolocation_Permission_Request*);
-bool ewkGeolocationIsPermissionRequestDecided(const Ewk_Geolocation_Permission_Request*);
 bool ewkGeolocationStartLocationManager(Ewk_Geolocation*);
 void ewkGeolocationStopLocationManager(Ewk_Geolocation*);
 
old mode 100755 (executable)
new mode 100644 (file)
index a4fd6ef..8561793
@@ -29,6 +29,8 @@
 #include "WKAPICast.h"
 #include "WKArray.h"
 #include "WKDictionary.h"
+#include "WKIntentData.h"
+#include "WKRetainPtr.h"
 #include "WKString.h"
 #include "WKURL.h"
 #include "ewk_intent_private.h"
 
 using namespace WebKit;
 
+/**
+ * \struct  _Ewk_Intent
+ * @brief   Contains the intent data.
+ */
+struct _Ewk_Intent {
+    unsigned int __ref; /**< the reference count of the object */
 #if ENABLE(WEB_INTENTS)
-Ewk_Intent::Ewk_Intent(WKIntentDataRef intentRef)
-    : m_wkIntent(intentRef)
-    , m_action(AdoptWK, WKIntentDataCopyAction(intentRef))
-    , m_type(AdoptWK, WKIntentDataCopyType(intentRef))
-    , m_service(AdoptWK, WKIntentDataCopyService(intentRef))
-{ }
-
-WebIntentData* Ewk_Intent::webIntentData() const
-{
-    return toImpl(m_wkIntent.get());
-}
-
-const char* Ewk_Intent::action() const
-{
-    return m_action;
-}
-
-const char* Ewk_Intent::type() const
-{
-    return m_type;
-}
-
-const char* Ewk_Intent::service() const
-{
-    return m_service;
-}
-
-WKRetainPtr<WKArrayRef> Ewk_Intent::suggestions() const
-{
-    return adoptWK(WKIntentDataCopySuggestions(m_wkIntent.get()));
-}
-
-String Ewk_Intent::extra(const char* key) const
-{
-    WKRetainPtr<WKStringRef> keyRef = adoptWK(WKStringCreateWithUTF8CString(key));
-    WKRetainPtr<WKStringRef> wkValue(AdoptWK, WKIntentDataCopyExtraValue(m_wkIntent.get(), keyRef.get()));
-    return toImpl(wkValue.get())->string();
-}
-
-WKRetainPtr<WKArrayRef> Ewk_Intent::extraKeys() const
-{
-    WKRetainPtr<WKDictionaryRef> wkExtras(AdoptWK, WKIntentDataCopyExtras(m_wkIntent.get()));
-    return adoptWK(WKDictionaryCopyKeys(wkExtras.get()));
-}
+    WKRetainPtr<WKIntentDataRef> wkIntent;
 #endif
+    const char* action;
+    const char* type;
+    const char* service;
 
-Ewk_Intent* ewk_intent_ref(Ewk_Intent* intent)
+    _Ewk_Intent(WKIntentDataRef intentRef)
+        : __ref(1)
+#if ENABLE(WEB_INTENTS)
+        , wkIntent(intentRef)
+#endif
+        , action(0)
+        , type(0)
+        , service(0)
+    { }
+
+    ~_Ewk_Intent()
+    {
+        ASSERT(!__ref);
+        eina_stringshare_del(action);
+        eina_stringshare_del(type);
+        eina_stringshare_del(service);
+    }
+};
+
+#define EWK_INTENT_WK_GET_OR_RETURN(intent, wkIntent_, ...)    \
+    if (!(intent)) {                                           \
+        EINA_LOG_CRIT("intent is NULL.");                      \
+        return __VA_ARGS__;                                    \
+    }                                                          \
+    if (!(intent)->wkIntent) {                                 \
+        EINA_LOG_CRIT("intent->wkIntent is NULL.");            \
+        return __VA_ARGS__;                                    \
+    }                                                          \
+    WKIntentDataRef wkIntent_ = (intent)->wkIntent.get()
+
+void ewk_intent_ref(Ewk_Intent* intent)
 {
 #if ENABLE(WEB_INTENTS)
-    EINA_SAFETY_ON_NULL_RETURN_VAL(intent, 0);
-
-    intent->ref();
+    EINA_SAFETY_ON_NULL_RETURN(intent);
+    ++intent->__ref;
 #endif
-
-    return intent;
 }
 
 void ewk_intent_unref(Ewk_Intent* intent)
@@ -99,44 +94,65 @@ void ewk_intent_unref(Ewk_Intent* intent)
 #if ENABLE(WEB_INTENTS)
     EINA_SAFETY_ON_NULL_RETURN(intent);
 
-    intent->deref();
+    if (--intent->__ref)
+        return;
+
+    delete intent;
 #endif
 }
 
 const char* ewk_intent_action_get(const Ewk_Intent* intent)
 {
-    EINA_SAFETY_ON_NULL_RETURN_VAL(intent, 0);
-
 #if ENABLE(WEB_INTENTS)
-    return intent->action();
+    EWK_INTENT_WK_GET_OR_RETURN(intent, wkIntent, 0);
+
+    WKRetainPtr<WKStringRef> wkAction(AdoptWK, WKIntentDataCopyAction(wkIntent));
+    Ewk_Intent* ewkIntent = const_cast<Ewk_Intent*>(intent);
+    eina_stringshare_replace(&ewkIntent->action, toImpl(wkAction.get())->string().utf8().data());
+
+    return intent->action;
+#else
+    return 0;
 #endif
 }
 
 const char* ewk_intent_type_get(const Ewk_Intent* intent)
 {
-    EINA_SAFETY_ON_NULL_RETURN_VAL(intent, 0);
-
 #if ENABLE(WEB_INTENTS)
-    return intent->type();
+    EWK_INTENT_WK_GET_OR_RETURN(intent, wkIntent, 0);
+
+    WKRetainPtr<WKStringRef> wkType(AdoptWK, WKIntentDataCopyType(wkIntent));
+    Ewk_Intent* ewkIntent = const_cast<Ewk_Intent*>(intent);
+    eina_stringshare_replace(&ewkIntent->type, toImpl(wkType.get())->string().utf8().data());
+
+    return intent->type;
+#else
+    return 0;
 #endif
 }
 
 const char* ewk_intent_service_get(const Ewk_Intent* intent)
 {
-    EINA_SAFETY_ON_NULL_RETURN_VAL(intent, 0);
-
 #if ENABLE(WEB_INTENTS)
-    return intent->service();
+    EWK_INTENT_WK_GET_OR_RETURN(intent, wkIntent, 0);
+
+    WKRetainPtr<WKURLRef> wkService(AdoptWK, WKIntentDataCopyService(wkIntent));
+    Ewk_Intent* ewkIntent = const_cast<Ewk_Intent*>(intent);
+    eina_stringshare_replace(&ewkIntent->service, toImpl(wkService.get())->string().utf8().data());
+
+    return intent->service;
+#else
+    return 0;
 #endif
 }
 
 Eina_List* ewk_intent_suggestions_get(const Ewk_Intent* intent)
 {
-    EINA_SAFETY_ON_NULL_RETURN_VAL(intent, 0);
-
 #if ENABLE(WEB_INTENTS)
+    EWK_INTENT_WK_GET_OR_RETURN(intent, wkIntent, 0);
+
     Eina_List* listOfSuggestions = 0;
-    WKRetainPtr<WKArrayRef> wkSuggestions = intent->suggestions();
+    WKRetainPtr<WKArrayRef> wkSuggestions(AdoptWK, WKIntentDataCopySuggestions(wkIntent));
     const size_t numSuggestions = WKArrayGetSize(wkSuggestions.get());
     for (size_t i = 0; i < numSuggestions; ++i) {
         WKURLRef wkSuggestion = static_cast<WKURLRef>(WKArrayGetItemAtIndex(wkSuggestions.get(), i));
@@ -144,7 +160,6 @@ Eina_List* ewk_intent_suggestions_get(const Ewk_Intent* intent)
     }
 
     return listOfSuggestions;
-
 #else
     return 0;
 #endif
@@ -152,11 +167,12 @@ Eina_List* ewk_intent_suggestions_get(const Ewk_Intent* intent)
 
 const char* ewk_intent_extra_get(const Ewk_Intent* intent, const char* key)
 {
-    EINA_SAFETY_ON_NULL_RETURN_VAL(intent, 0);
-
 #if ENABLE(WEB_INTENTS)
-    String value = intent->extra(key);
+    EWK_INTENT_WK_GET_OR_RETURN(intent, wkIntent, 0);
 
+    WKRetainPtr<WKStringRef> keyRef = adoptWK(WKStringCreateWithUTF8CString(key));
+    WKRetainPtr<WKStringRef> wkValue(AdoptWK, WKIntentDataCopyExtra(wkIntent, keyRef.get()));
+    String value = toImpl(wkValue.get())->string();
     if (value.isEmpty())
         return 0;
 
@@ -168,11 +184,12 @@ const char* ewk_intent_extra_get(const Ewk_Intent* intent, const char* key)
 
 Eina_List* ewk_intent_extra_names_get(const Ewk_Intent* intent)
 {
-    EINA_SAFETY_ON_NULL_RETURN_VAL(intent, 0);
-
 #if ENABLE(WEB_INTENTS)
+    EWK_INTENT_WK_GET_OR_RETURN(intent, wkIntent, 0);
+
     Eina_List* listOfKeys = 0;
-    WKRetainPtr<WKArrayRef> wkKeys = intent->extraKeys();
+    WKRetainPtr<WKDictionaryRef> wkExtras(AdoptWK, WKIntentDataCopyExtras(wkIntent));
+    WKRetainPtr<WKArrayRef> wkKeys(AdoptWK, WKDictionaryCopyKeys(wkExtras.get()));
     const size_t numKeys = WKArrayGetSize(wkKeys.get());
     for (size_t i = 0; i < numKeys; ++i) {
         WKStringRef wkKey = static_cast<WKStringRef>(WKArrayGetItemAtIndex(wkKeys.get(), i));
@@ -184,3 +201,18 @@ Eina_List* ewk_intent_extra_names_get(const Ewk_Intent* intent)
     return 0;
 #endif
 }
+
+#if ENABLE(WEB_INTENTS)
+Ewk_Intent* ewk_intent_new(WKIntentDataRef intentData)
+{
+    EINA_SAFETY_ON_NULL_RETURN_VAL(intentData, 0);
+
+    return new Ewk_Intent(intentData);
+}
+
+WKIntentDataRef ewk_intent_WKIntentDataRef_get(const Ewk_Intent* intent)
+{
+    EINA_SAFETY_ON_NULL_RETURN_VAL(intent, 0);
+    return intent->wkIntent.get();
+}
+#endif
index a23696d..abcffa5 100644 (file)
 extern "C" {
 #endif
 
-/** Creates a type name for Ewk_Intent */
-typedef struct Ewk_Intent Ewk_Intent;
+/** Creates a type name for _Ewk_Intent */
+typedef struct _Ewk_Intent Ewk_Intent;
 
 /**
  * Increases the reference count of the given object.
  *
  * @param intent the intent object to increase the reference count
- *
- * @return a pointer to the object on success, @c NULL otherwise.
  */
-EAPI Ewk_Intent *ewk_intent_ref(Ewk_Intent *intent);
+EAPI void ewk_intent_ref(Ewk_Intent *intent);
 
 /**
  * Decreases the reference count of the given object, possibly freeing it.
index 03af1e4..0f82689 100644 (file)
 
 #if ENABLE(WEB_INTENTS)
 
-#include "WKEinaSharedString.h"
-#include "WKIntentData.h"
-#include "WKRetainPtr.h"
 #include <WebKit2/WKBase.h>
-#include <wtf/PassRefPtr.h>
-#include <wtf/RefCounted.h>
-#include <wtf/text/WTFString.h>
 
-namespace WebKit {
-class WebIntentData;
-}
+typedef struct _Ewk_Intent Ewk_Intent;
 
-/**
- * \struct  Ewk_Intent
- * @brief   Contains the intent data.
- */
-class Ewk_Intent : public RefCounted<Ewk_Intent> {
-public:
-    static PassRefPtr<Ewk_Intent> create(WKIntentDataRef intentRef)
-    {
-        return adoptRef(new Ewk_Intent(intentRef));
-    }
-
-    WebKit::WebIntentData* webIntentData() const;
-    const char* action() const;
-    const char* type() const;
-    const char* service() const;
-    WKRetainPtr<WKArrayRef> suggestions() const;
-    String extra(const char* key) const;
-    WKRetainPtr<WKArrayRef> extraKeys() const;
-
-private:
-    explicit Ewk_Intent(WKIntentDataRef intentRef);
-
-    WKRetainPtr<WKIntentDataRef> m_wkIntent;
-    WKEinaSharedString m_action;
-    WKEinaSharedString m_type;
-    WKEinaSharedString m_service;
-};
+Ewk_Intent* ewk_intent_new(WKIntentDataRef intentData);
+WKIntentDataRef ewk_intent_WKIntentDataRef_get(const Ewk_Intent* intent);
 
 #endif // ENABLE(WEB_INTENTS)
 
old mode 100755 (executable)
new mode 100644 (file)
index 0068222..18422b7
@@ -28,6 +28,7 @@
 
 #include "IntentServiceInfo.h"
 #include "WKAPICast.h"
+#include "WKIntentServiceInfo.h"
 #include "WKRetainPtr.h"
 #include "WKURL.h"
 #include "ewk_intent_service_private.h"
 
 using namespace WebKit;
 
+/**
+ * \struct _Ewk_Intent_Service
+ * @brief Contains the intent service data.
+ */
+struct _Ewk_Intent_Service {
+    unsigned int __ref; /**< the reference count of the object */
 #if ENABLE(WEB_INTENTS_TAG)
-Ewk_Intent_Service::Ewk_Intent_Service(WKIntentServiceInfoRef serviceRef)
-    : m_action(AdoptWK, WKIntentServiceInfoCopyAction(serviceRef))
-    , m_type(AdoptWK, WKIntentServiceInfoCopyType(serviceRef))
-    , m_href(AdoptWK, WKIntentServiceInfoCopyHref(serviceRef))
-    , m_title(AdoptWK, WKIntentServiceInfoCopyTitle(serviceRef))
-    , m_disposition(AdoptWK, WKIntentServiceInfoCopyDisposition(serviceRef))
-{ }
-
-const char* Ewk_Intent_Service::action() const
-{
-    return m_action;
-}
-
-const char* Ewk_Intent_Service::type() const
-{
-    return m_type;
-}
-
-const char* Ewk_Intent_Service::href() const
-{
-    return m_href;
-}
-
-const char* Ewk_Intent_Service::title() const
-{
-    return m_title;
-}
-
-const char* Ewk_Intent_Service::disposition() const
-{
-    return m_disposition;
-}
+    WKRetainPtr<WKIntentServiceInfoRef> wkService;
 #endif
-
-Ewk_Intent_Service* ewk_intent_service_ref(Ewk_Intent_Service* service)
+    const char* action;
+    const char* type;
+    const char* href;
+    const char* title;
+    const char* disposition;
+
+    _Ewk_Intent_Service(WKIntentServiceInfoRef serviceRef)
+        : __ref(1)
+#if ENABLE(WEB_INTENTS_TAG)
+        , wkService(serviceRef)
+#endif
+        , action(0)
+        , type(0)
+        , href(0)
+        , title(0)
+        , disposition(0)
+    { }
+
+    ~_Ewk_Intent_Service()
+    {
+        ASSERT(!__ref);
+        eina_stringshare_del(action);
+        eina_stringshare_del(type);
+        eina_stringshare_del(href);
+        eina_stringshare_del(title);
+        eina_stringshare_del(disposition);
+    }
+};
+
+#define EWK_INTENT_SERVICE_WK_GET_OR_RETURN(service, wkService_, ...) \
+    if (!(service)) { \
+        EINA_LOG_CRIT("service is NULL."); \
+        return __VA_ARGS__; \
+    } \
+    if (!(service)->wkService) { \
+        EINA_LOG_CRIT("service->wkService is NULL."); \
+        return __VA_ARGS__; \
+    } \
+    WKIntentServiceInfoRef wkService_ = (service)->wkService.get()
+
+void ewk_intent_service_ref(Ewk_Intent_Service* service)
 {
 #if ENABLE(WEB_INTENTS_TAG)
-    EINA_SAFETY_ON_NULL_RETURN_VAL(service, 0);
-    service->ref();
+    EINA_SAFETY_ON_NULL_RETURN(service);
+    ++service->__ref;
 #endif
-
-    return service;
 }
 
 void ewk_intent_service_unref(Ewk_Intent_Service* service)
@@ -85,51 +98,93 @@ void ewk_intent_service_unref(Ewk_Intent_Service* service)
 #if ENABLE(WEB_INTENTS_TAG)
     EINA_SAFETY_ON_NULL_RETURN(service);
 
-    service->deref();
+    if (--service->__ref)
+        return;
+
+    delete service;
 #endif
 }
 
 const char* ewk_intent_service_action_get(const Ewk_Intent_Service* service)
 {
-    EINA_SAFETY_ON_NULL_RETURN_VAL(service, 0);
-
 #if ENABLE(WEB_INTENTS_TAG)
-    return service->action();
+    EWK_INTENT_SERVICE_WK_GET_OR_RETURN(service, wkService, 0);
+
+    WKRetainPtr<WKStringRef> wkAction(AdoptWK, WKIntentServiceInfoCopyAction(wkService));
+    Ewk_Intent_Service* ewkIntentService = const_cast<Ewk_Intent_Service*>(service);
+    eina_stringshare_replace(&ewkIntentService->action, toImpl(wkAction.get())->string().utf8().data());
+
+    return service->action;
+#else
+    return 0;
 #endif
 }
 
 const char* ewk_intent_service_type_get(const Ewk_Intent_Service* service)
 {
-    EINA_SAFETY_ON_NULL_RETURN_VAL(service, 0);
-
 #if ENABLE(WEB_INTENTS_TAG)
-    return service->type();
+    EWK_INTENT_SERVICE_WK_GET_OR_RETURN(service, wkService, 0);
+
+    WKRetainPtr<WKStringRef> wkType(AdoptWK, WKIntentServiceInfoCopyType(wkService));
+    Ewk_Intent_Service* ewkIntentService = const_cast<Ewk_Intent_Service*>(service);
+    eina_stringshare_replace(&ewkIntentService->type, toImpl(wkType.get())->string().utf8().data());
+
+    return service->type;
+#else
+    return 0;
 #endif
 }
 
 const char* ewk_intent_service_href_get(const Ewk_Intent_Service* service)
 {
-    EINA_SAFETY_ON_NULL_RETURN_VAL(service, 0);
-
 #if ENABLE(WEB_INTENTS_TAG)
-    return service->href();
+    EWK_INTENT_SERVICE_WK_GET_OR_RETURN(service, wkService, 0);
+
+    WKRetainPtr<WKURLRef> wkHref(AdoptWK, WKIntentServiceInfoCopyHref(wkService));
+    Ewk_Intent_Service* ewkIntentService = const_cast<Ewk_Intent_Service*>(service);
+    eina_stringshare_replace(&ewkIntentService->href, toImpl(wkHref.get())->string().utf8().data());
+
+    return service->href;
+#else
+    return 0;
 #endif
 }
 
 const char* ewk_intent_service_title_get(const Ewk_Intent_Service* service)
 {
-    EINA_SAFETY_ON_NULL_RETURN_VAL(service, 0);
-
 #if ENABLE(WEB_INTENTS_TAG)
-    return service->title();
+    EWK_INTENT_SERVICE_WK_GET_OR_RETURN(service, wkService, 0);
+
+    WKRetainPtr<WKStringRef> wkTitle(AdoptWK, WKIntentServiceInfoCopyTitle(wkService));
+    Ewk_Intent_Service* ewkIntentService = const_cast<Ewk_Intent_Service*>(service);
+    eina_stringshare_replace(&ewkIntentService->title, toImpl(wkTitle.get())->string().utf8().data());
+
+    return service->title;
+#else
+    return 0;
 #endif
 }
 
 const char* ewk_intent_service_disposition_get(const Ewk_Intent_Service* service)
 {
-    EINA_SAFETY_ON_NULL_RETURN_VAL(service, 0);
-
 #if ENABLE(WEB_INTENTS_TAG)
-    return service->disposition();
+    EWK_INTENT_SERVICE_WK_GET_OR_RETURN(service, wkService, 0);
+
+    WKRetainPtr<WKStringRef> wkDisposition(AdoptWK, WKIntentServiceInfoCopyDisposition(wkService));
+    Ewk_Intent_Service* ewkIntentService = const_cast<Ewk_Intent_Service*>(service);
+    eina_stringshare_replace(&ewkIntentService->disposition, toImpl(wkDisposition.get())->string().utf8().data());
+
+    return service->disposition;
+#else
+    return 0;
 #endif
 }
+
+#if ENABLE(WEB_INTENTS_TAG)
+Ewk_Intent_Service* ewk_intent_service_new(WKIntentServiceInfoRef wkService)
+{
+    EINA_SAFETY_ON_NULL_RETURN_VAL(wkService, 0);
+
+    return new Ewk_Intent_Service(wkService);
+}
+#endif
index a7d3d1a..958e054 100644 (file)
 extern "C" {
 #endif
 
-/** Creates a type name for Ewk_Intent_Service */
-typedef struct Ewk_Intent_Service Ewk_Intent_Service;
+/** Creates a type name for _Ewk_Intent_Service */
+typedef struct _Ewk_Intent_Service Ewk_Intent_Service;
 
 /**
  * Increases the reference count of the given object.
  *
  * @param service the intent service object to increase the reference count
- *
- * @return a pointer to the object on success, @c NULL otherwise.
  */
-EAPI Ewk_Intent_Service *ewk_intent_service_ref(Ewk_Intent_Service *service);
+EAPI void ewk_intent_service_ref(Ewk_Intent_Service *service);
 
 /**
  * Decreases the reference count of the given object, possibly freeing it.
index f2efdff..7ff4923 100644 (file)
 
 #if ENABLE(WEB_INTENTS_TAG)
 
-#include "WKEinaSharedString.h"
-#include "WKIntentServiceInfo.h"
 #include <WebKit2/WKBase.h>
-#include <wtf/PassRefPtr.h>
-#include <wtf/RefCounted.h>
 
-/**
- * \struct Ewk_Intent_Service
- * @brief Contains the intent service data.
- */
-class Ewk_Intent_Service : public RefCounted<Ewk_Intent_Service> {
-public:
-    static PassRefPtr<Ewk_Intent_Service> create(WKIntentServiceInfoRef serviceRef)
-    {
-        return adoptRef(new Ewk_Intent_Service(serviceRef));
-    }
-
-    const char* action() const;
-    const char* type() const;
-    const char* href() const;
-    const char* title() const;
-    const char* disposition() const;
-
-private:
-    explicit Ewk_Intent_Service(WKIntentServiceInfoRef serviceRef);
+typedef struct _Ewk_Intent_Service Ewk_Intent_Service;
 
-    WKEinaSharedString m_action;
-    WKEinaSharedString m_type;
-    WKEinaSharedString m_href;
-    WKEinaSharedString m_title;
-    WKEinaSharedString m_disposition;
-};
+Ewk_Intent_Service* ewk_intent_service_new(WKIntentServiceInfoRef wkService);
 
 #endif // ENABLE(WEB_INTENTS_TAG)
 
old mode 100755 (executable)
new mode 100644 (file)
index 61c6e76..9e4579b
 #include "config.h"
 #include "ewk_main.h"
 
-#include "ewk_private.h"
 #include <Ecore.h>
 #include <Ecore_Evas.h>
-#include <Ecore_IMF.h>
 #include <Edje.h>
 #include <Eina.h>
 #include <Evas.h>
 #include "ewk_context_private.h"
 #endif
 
-#ifdef HAVE_ECORE_X
-#include <Ecore_X.h>
-#endif
-
 static int _ewkInitCount = 0;
 
 /**
@@ -65,47 +59,29 @@ int ewk_init(void)
     }
 
     if (!evas_init()) {
-        CRITICAL("could not init evas.");
+        EINA_LOG_DOM_CRIT(_ewk_log_dom, "could not init evas.");
         goto error_evas;
     }
 
     if (!ecore_init()) {
-        CRITICAL("could not init ecore.");
+        EINA_LOG_DOM_CRIT(_ewk_log_dom, "could not init ecore.");
         goto error_ecore;
     }
 
     if (!ecore_evas_init()) {
-        CRITICAL("could not init ecore_evas.");
+        EINA_LOG_DOM_CRIT(_ewk_log_dom, "could not init ecore_evas.");
         goto error_ecore_evas;
     }
 
-    if (!ecore_imf_init()) {
-        CRITICAL("could not init ecore_imf.");
-        goto error_ecore_imf;
-    }
-
-#ifdef HAVE_ECORE_X
-    if (!ecore_x_init(0)) {
-        CRITICAL("could not init ecore_x.");
-        goto error_ecore_x;
-    }
-#endif
-
     g_type_init();
 
     if (!ecore_main_loop_glib_integrate()) {
-        WARN("Ecore was not compiled with GLib support, some plugins will not "
+        EINA_LOG_DOM_WARN(_ewk_log_dom, "Ecore was not compiled with GLib support, some plugins will not "
             "work (ie: Adobe Flash)");
     }
 
     return ++_ewkInitCount;
 
-#ifdef HAVE_ECORE_X
-error_ecore_x:
-    ecore_imf_shutdown();
-#endif
-error_ecore_imf:
-    ecore_evas_shutdown();
 error_ecore_evas:
     ecore_shutdown();
 error_ecore:
@@ -127,13 +103,9 @@ int ewk_shutdown(void)
 #if ENABLE(TIZEN_CACHE_DUMP_SYNC)
     // FIXME : ewk_context_cache_dump() is called on deconstructor of Ewk_Context.
     // But, I helplessly adds it here because the deconstructor is not called for default ewk context.
-    ewk_context_default_get()->dumpCache();
+    ewk_context_cache_dump(ewk_context_default_get());
 #endif
 
-#ifdef HAVE_ECORE_X
-    ecore_x_shutdown();
-#endif
-    ecore_imf_shutdown();
     ecore_evas_shutdown();
     ecore_shutdown();
     evas_shutdown();
diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_navigation_data.h b/Source/WebKit2/UIProcess/API/efl/ewk_navigation_data.h
deleted file mode 100644 (file)
index b3b5c26..0000000
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * Copyright (C) 2012 Intel Corporation. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/**
- * @file    ewk_navigation_data.h
- * @brief   Describes the Ewk navigation data API.
- */
-
-#ifndef ewk_navigation_data_h
-#define ewk_navigation_data_h
-
-#include "ewk_url_request.h"
-#include <Eina.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/** Creates a type name for Ewk_Navigation_Data */
-typedef struct Ewk_Navigation_Data Ewk_Navigation_Data;
-
-/**
- * Increases the reference count of the given object.
- *
- * @param data the navigation data object to increase the reference count
- *
- * @return a pointer to the object on success, @c NULL otherwise.
- */
-EAPI Ewk_Navigation_Data *ewk_navigation_data_ref(Ewk_Navigation_Data *data);
-
-/**
- * Decreases the reference count of the given object, possibly freeing it.
- *
- * When the reference count reaches 0, the object is freed.
- *
- * @param data the navigation data object to decrease the reference count
- */
-EAPI void ewk_navigation_data_unref(Ewk_Navigation_Data *data);
-
-/**
- * Returns title for this navigation data.
- *
- * The title of the navigated page.
- *
- * @param data navigation data object to query
- *
- * @return the title or @c NULL in case of error. This pointer is
- *         guaranteed to be eina_stringshare, so whenever possible
- *         save yourself some cpu cycles and use
- *         eina_stringshare_ref() instead of eina_stringshare_add() or
- *         strdup().
- */
-EAPI const char *ewk_navigation_data_title_get(const Ewk_Navigation_Data *data);
-
-/**
- * Returns the original request for this navigation data.
- *
- * @param data navigation data object to query
- *
- * @return The URL request pointer or @c NULL in case of error.
- */
-EAPI Ewk_Url_Request *ewk_navigation_data_original_request_get(const Ewk_Navigation_Data *data);
-
-/**
- * Returns URL for this navigation data.
- *
- * The URL of the navigated page.
- *
- * @param data navigation data object to query
- *
- * @return the URL of the @a data or @c NULL in case of error. This pointer is
- *         guaranteed to be eina_stringshare, so whenever possible
- *         save yourself some cpu cycles and use
- *         eina_stringshare_ref() instead of eina_stringshare_add() or
- *         strdup()
- */
-EAPI const char *ewk_navigation_data_url_get(const Ewk_Navigation_Data *data);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif // ewk_navigation_data_h
diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_navigation_data_private.h b/Source/WebKit2/UIProcess/API/efl/ewk_navigation_data_private.h
deleted file mode 100644 (file)
index e06016d..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright (C) 2012 Intel Corporation. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef ewk_navigation_data_private_h
-#define ewk_navigation_data_private_h
-
-#include "WKAPICast.h"
-#include "WKEinaSharedString.h"
-#include "WKNavigationData.h"
-#include "WKRetainPtr.h"
-#include "ewk_private.h"
-#include "ewk_url_request_private.h"
-#include <wtf/PassRefPtr.h>
-#include <wtf/RefCounted.h>
-
-/**
- * \struct  Ewk_Navigation_Data
- * @brief   Contains the navigation data details.
- */
-class Ewk_Navigation_Data : public RefCounted<Ewk_Navigation_Data> {
-public:
-    RefPtr<Ewk_Url_Request> request;
-    WKEinaSharedString title;
-    WKEinaSharedString url;
-
-    static PassRefPtr<Ewk_Navigation_Data> create(WKNavigationDataRef dataRef)
-    {
-        return adoptRef(new Ewk_Navigation_Data(dataRef));
-    }
-
-private:
-    explicit Ewk_Navigation_Data(WKNavigationDataRef dataRef)
-        : request(Ewk_Url_Request::create(adoptWK(WKNavigationDataCopyOriginalRequest(dataRef)).get()))
-        , title(AdoptWK, WKNavigationDataCopyTitle(dataRef))
-        , url(AdoptWK, WKNavigationDataCopyURL(dataRef))
-    { }
-};
-
-#endif // ewk_navigation_data_private_h
index d35c07e..ae725d7 100644 (file)
 #include "config.h"
 #include "ewk_navigation_policy_decision.h"
 
+#include "WKAPICast.h"
+#include "WKFramePolicyListener.h"
+#include "WKRetainPtr.h"
 #include "ewk_navigation_policy_decision_private.h"
 #include "ewk_private.h"
 #include "ewk_url_request_private.h"
 
 using namespace WebKit;
 
-Ewk_Navigation_Policy_Decision* ewk_navigation_policy_decision_ref(Ewk_Navigation_Policy_Decision* decision)
+/**
+ * \struct  _Ewk_Navigation_Policy_Decision
+ * @brief   Contains the navigation policy decision data.
+ */
+struct _Ewk_Navigation_Policy_Decision {
+    unsigned int __ref; /**< the reference count of the object */
+    WKRetainPtr<WKFramePolicyListenerRef> listener;
+    bool actedUponByClient;
+    Ewk_Navigation_Type navigationType;
+    Event_Mouse_Button mouseButton;
+    Event_Modifier_Keys modifiers;
+    Ewk_Url_Request* request;
+    const char* frameName;
+
+    _Ewk_Navigation_Policy_Decision(WKFramePolicyListenerRef _listener, Ewk_Navigation_Type _navigationType, Event_Mouse_Button _mouseButton, Event_Modifier_Keys _modifiers, Ewk_Url_Request* _request, const char* _frameName)
+        : __ref(1)
+        , listener(_listener)
+        , actedUponByClient(false)
+        , navigationType(_navigationType)
+        , mouseButton(_mouseButton)
+        , modifiers(_modifiers)
+        , request(_request)
+        , frameName(eina_stringshare_add(_frameName))
+    { }
+
+    ~_Ewk_Navigation_Policy_Decision()
+    {
+        ASSERT(!__ref);
+
+        // This is the default choice for all policy decisions in WebPageProxy.cpp.
+        if (!actedUponByClient)
+            WKFramePolicyListenerUse(listener.get());
+
+        ewk_url_request_unref(request);
+        eina_stringshare_del(frameName);
+    }
+};
+
+void ewk_navigation_policy_decision_ref(Ewk_Navigation_Policy_Decision* decision)
 {
-    EINA_SAFETY_ON_NULL_RETURN_VAL(decision, 0);
-
-    decision->ref();
+    EINA_SAFETY_ON_NULL_RETURN(decision);
 
-    return decision;
+    ++decision->__ref;
 }
 
 void ewk_navigation_policy_decision_unref(Ewk_Navigation_Policy_Decision* decision)
 {
     EINA_SAFETY_ON_NULL_RETURN(decision);
 
-    decision->deref();
+    if (--decision->__ref)
+        return;
+
+    delete decision;
 }
 
 Ewk_Navigation_Type ewk_navigation_policy_navigation_type_get(const Ewk_Navigation_Policy_Decision* decision)
@@ -80,7 +122,7 @@ Ewk_Url_Request* ewk_navigation_policy_request_get(const Ewk_Navigation_Policy_D
 {
     EINA_SAFETY_ON_NULL_RETURN_VAL(decision, 0);
 
-    return decision->request.get();
+    return decision->request;
 }
 
 void ewk_navigation_policy_decision_accept(Ewk_Navigation_Policy_Decision* decision)
@@ -126,3 +168,13 @@ COMPILE_ASSERT_MATCHING_ENUM(EVENT_MODIFIER_KEY_SHIFT, kWKEventModifiersShiftKey
 COMPILE_ASSERT_MATCHING_ENUM(EVENT_MODIFIER_KEY_CTRL, kWKEventModifiersControlKey);
 COMPILE_ASSERT_MATCHING_ENUM(EVENT_MODIFIER_KEY_ALT, kWKEventModifiersAltKey);
 COMPILE_ASSERT_MATCHING_ENUM(EVENT_MODIFIER_KEY_META, kWKEventModifiersMetaKey);
+
+Ewk_Navigation_Policy_Decision* ewk_navigation_policy_decision_new(WKFrameNavigationType navigationType, WKEventMouseButton mouseButton, WKEventModifiers modifiers, WKURLRequestRef request, const char* frameName, WKFramePolicyListenerRef listener)
+{
+    return new Ewk_Navigation_Policy_Decision(listener,
+                                              static_cast<Ewk_Navigation_Type>(navigationType),
+                                              static_cast<Event_Mouse_Button>(mouseButton),
+                                              static_cast<Event_Modifier_Keys>(modifiers),
+                                              ewk_url_request_new(request),
+                                              frameName);
+}
index 166b1dc..dec9c09 100644 (file)
@@ -38,8 +38,8 @@
 extern "C" {
 #endif
 
-/** Creates a type name for Ewk_Navigation_Policy_Decision */
-typedef struct Ewk_Navigation_Policy_Decision Ewk_Navigation_Policy_Decision;
+/** Creates a type name for _Ewk_Navigation_Policy_Decision */
+typedef struct _Ewk_Navigation_Policy_Decision Ewk_Navigation_Policy_Decision;
 
 /// Enum containing navigation types
 typedef enum  {
@@ -70,10 +70,8 @@ typedef enum {
  * Increases the reference count of the given object.
  *
  * @param decision the policy decision object to increase the reference count
- *
- * @return a pointer to the object on success, @c NULL otherwise.
  */
-EAPI Ewk_Navigation_Policy_Decision *ewk_navigation_policy_decision_ref(Ewk_Navigation_Policy_Decision *decision);
+EAPI void ewk_navigation_policy_decision_ref(Ewk_Navigation_Policy_Decision *decision);
 
 /**
  * Decreases the reference count of the given object, possibly freeing it.
index e7e4549..abc8bed 100644 (file)
 #ifndef ewk_navigation_policy_decision_private_h
 #define ewk_navigation_policy_decision_private_h
 
-#include "WKAPICast.h"
 #include "WKBase.h"
-#include "WKEinaSharedString.h"
 #include "WKEvent.h"
-#include "WKFramePolicyListener.h"
 #include "WKPageLoadTypes.h"
-#include "WKRetainPtr.h"
-#include "ewk_url_request_private.h"
-#include <wtf/PassRefPtr.h>
 
-/**
- * \struct  Ewk_Navigation_Policy_Decision
- * @brief   Contains the navigation policy decision data.
- */
-class Ewk_Navigation_Policy_Decision : public RefCounted<Ewk_Navigation_Policy_Decision> {
-public:
-    WKRetainPtr<WKFramePolicyListenerRef> listener;
-    bool actedUponByClient;
-    Ewk_Navigation_Type navigationType;
-    Event_Mouse_Button mouseButton;
-    Event_Modifier_Keys modifiers;
-    RefPtr<Ewk_Url_Request> request;
-    WKEinaSharedString frameName;
-
-    ~Ewk_Navigation_Policy_Decision()
-    {
-        // This is the default choice for all policy decisions in WebPageProxy.cpp.
-        if (!actedUponByClient)
-            WKFramePolicyListenerUse(listener.get());
-    }
-
-    static PassRefPtr<Ewk_Navigation_Policy_Decision> create(WKFrameNavigationType navigationType, WKEventMouseButton mouseButton, WKEventModifiers modifiers, WKURLRequestRef requestRef, const char* frameName, WKFramePolicyListenerRef listener)
-    {
-        RefPtr<Ewk_Url_Request> request = Ewk_Url_Request::create(requestRef);
-        return adoptRef(new Ewk_Navigation_Policy_Decision(listener, static_cast<Ewk_Navigation_Type>(navigationType), static_cast<Event_Mouse_Button>(mouseButton), static_cast<Event_Modifier_Keys>(modifiers), request.release(), frameName));
-    }
+typedef struct _Ewk_Navigation_Policy_Decision Ewk_Navigation_Policy_Decision;
 
-private:
-    Ewk_Navigation_Policy_Decision(WKFramePolicyListenerRef listener, Ewk_Navigation_Type navigationType, Event_Mouse_Button mouseButton, Event_Modifier_Keys modifiers, PassRefPtr<Ewk_Url_Request> request, const char* frameName)
-        : listener(listener)
-        , actedUponByClient(false)
-        , navigationType(navigationType)
-        , mouseButton(mouseButton)
-        , modifiers(modifiers)
-        , request(request)
-        , frameName(frameName)
-    { }
-};
+Ewk_Navigation_Policy_Decision* ewk_navigation_policy_decision_new(WKFrameNavigationType navigationType, WKEventMouseButton mouseButton, WKEventModifiers modifiers, WKURLRequestRef request, const char* frameName, WKFramePolicyListenerRef listener);
 
 #endif // ewk_navigation_policy_decision_private_h
old mode 100755 (executable)
new mode 100644 (file)
index 1841a82..95b8f2b
@@ -165,7 +165,7 @@ void ewk_notification_clicked(Ewk_Context* ewkContext, uint64_t notificationID)
     EINA_SAFETY_ON_NULL_RETURN(ewkContext);
     TIZEN_LOGI("id (%llu)", notificationID);
 
-    WKNotificationManagerRef notificationManagerRef = WKContextGetNotificationManager(ewkContext->wkContext());
+    WKNotificationManagerRef notificationManagerRef = WKContextGetNotificationManager(ewk_context_WKContext_get(ewkContext));
     WKNotificationManagerProviderDidClickNotification(notificationManagerRef, notificationID);
 #else
     UNUSED_PARAM(ewkContext);
@@ -219,7 +219,7 @@ void ewk_notification_cached_permissions_set(Ewk_Context* ewkContext, Eina_List*
     }
 
     RefPtr<ImmutableDictionary> permissionDictionary = ImmutableDictionary::adopt(cachedPermissions);
-    WKNotificationManagerRef notificationManagerRef = WKContextGetNotificationManager(ewkContext->wkContext());
+    WKNotificationManagerRef notificationManagerRef = WKContextGetNotificationManager(ewk_context_WKContext_get(ewkContext));
     WKNotificationManagerSetCachedPermissions(notificationManagerRef, toAPI(permissionDictionary.get()));
 #else
     UNUSED_PARAM(ewkContext);
@@ -252,7 +252,7 @@ void ewk_notification_permission_request_set(Ewk_Notification_Permission_Request
     WKRetainPtr<WKStringRef> protocolRef(AdoptWK, WKStringCreateWithUTF8CString(ewk_security_origin_protocol_get(origin)));
     WKRetainPtr<WKStringRef> hostRef(AdoptWK, WKStringCreateWithUTF8CString(ewk_security_origin_host_get(origin)));
     WKRetainPtr<WKSecurityOriginRef> securityOriginRef(AdoptWK, WKSecurityOriginCreate(protocolRef.get(), hostRef.get(), ewk_security_origin_port_get(origin)));
-    WKNotificationManagerRef notificationManagerRef = WKContextGetNotificationManager(ewk_view_context_get(permissionRequest->ewkView)->wkContext());
+    WKNotificationManagerRef notificationManagerRef = WKContextGetNotificationManager(ewk_context_WKContext_get(ewk_view_context_get(permissionRequest->ewkView)));
     TIZEN_LOGI("host(%s)", ewk_security_origin_host_get(origin));
 
     WKNotificationManagerProviderDidUpdateNotificationPolicy(notificationManagerRef, securityOriginRef.get(), static_cast<bool>(allowed));
@@ -305,7 +305,7 @@ void ewk_notification_policies_removed(Ewk_Context* ewkContext, Eina_List* origi
     }
 
     WKRetainPtr<WKArrayRef> notificationOriginsArrayRef(AdoptWK, WKArrayCreate(originsList.data(), originsList.size()));
-    WKNotificationManagerRef notificationManagerRef = WKContextGetNotificationManager(ewkContext->wkContext());
+    WKNotificationManagerRef notificationManagerRef = WKContextGetNotificationManager(ewk_context_WKContext_get(ewkContext));
     WKNotificationManagerProviderDidRemoveNotificationPolicies(notificationManagerRef, notificationOriginsArrayRef.get());
 #else
     UNUSED_PARAM(ewkContext);
@@ -333,7 +333,7 @@ void ewk_notification_showed(Ewk_Context* ewkContext, uint64_t notificationID)
     EINA_SAFETY_ON_NULL_RETURN(ewkContext);
     TIZEN_LOGI("id (%llu)", notificationID);
 
-    WKNotificationManagerRef notificationManagerRef = WKContextGetNotificationManager(ewkContext->wkContext());
+    WKNotificationManagerRef notificationManagerRef = WKContextGetNotificationManager(ewk_context_WKContext_get(ewkContext));
     WKNotificationManagerProviderDidShowNotification(notificationManagerRef, notificationID);
 #else
     UNUSED_PARAM(ewkContext);
old mode 100755 (executable)
new mode 100644 (file)
index b082251..0a86df6
@@ -34,7 +34,7 @@
 typedef struct _Ewk_Notification_Permission_Request Ewk_Notification_Permission_Request;
 
 Ewk_Notification* ewkNotificationCreateNotification(WKNotificationRef);
-Ewk_Notification_Permission_Request* ewkNotificationCreatePermissionRequest(Evas_Object*, WKNotificationPermissionRequestRef, WKSecurityOriginRef);
+Ewk_Notification_Permission_Request* ewkNotificationCreatePermissionRequest(WKNotificationPermissionRequestRef, WKSecurityOriginRef);
 void ewkNotificationDeleteNotificationList(Eina_List* notifications);
 void ewkNotificationDeletePermissionRequestList(Eina_List* requestList);
 const char* ewkNotificationGetReplaceID(const Ewk_Notification*);
old mode 100755 (executable)
new mode 100644 (file)
index 4b229be..33bd47f
 #include "config.h"
 #include "ewk_popup_menu_item.h"
 
+#if !OS(TIZEN)
+// FIXME : We should use this after upversioned.
+#include "WKEinaSharedString.h"
 #include "ewk_popup_menu_item_private.h"
 #include "ewk_private.h"
-#include <wtf/text/CString.h>
+#else
+#include "ewk_popup_menu_item_private.h"
+#include <Eina.h>
+#endif
 
 using namespace WebKit;
 
-Ewk_Popup_Menu_Item::Ewk_Popup_Menu_Item(const WebKit::WebPopupItem& item)
-    : type(static_cast<Ewk_Popup_Menu_Item_Type>(item.m_type))
-    , textDirection(static_cast<Ewk_Text_Direction>(item.m_textDirection))
-    , hasTextDirectionOverride(item.m_hasTextDirectionOverride)
-    , isEnabled(item.m_isEnabled)
-    , isLabel(item.m_isLabel)
-    , isSelected(item.m_isSelected)
-    , text(item.m_text.utf8().data())
-    , toolTip(item.m_toolTip.utf8().data())
-    , accessibilityText(item.m_accessibilityText.utf8().data())
-{ }
-
+/**
+ * \struct  _Ewk_Popup_Menu_Item
+ * @brief   Contains the popup menu data.
+ */
+struct _Ewk_Popup_Menu_Item {
+    Ewk_Popup_Menu_Item_Type type;
+    Ewk_Text_Direction textDirection;
+    bool hasTextDirectionOverride;
+    bool isEnabled;
+    bool isLabel;
+
+#if !OS(TIZEN)
+// FIXME : We should use this after upversioned.
+    WKEinaSharedString text;
+    WKEinaSharedString toolTip;
+    WKEinaSharedString accessibilityText;
+#else
+    const char* text;
+    const char* toolTip;
+    const char* accessibilityText;
+#if ENABLE(TIZEN_MULTIPLE_SELECT)
+    bool isSelected;
+#endif
+#endif
+
+
+#if ENABLE(TIZEN_MULTIPLE_SELECT)
+    _Ewk_Popup_Menu_Item(Ewk_Popup_Menu_Item_Type _type, const char* _text, Ewk_Text_Direction _textDirection, bool _hasTextDirectionOverride, const char* _toolTip, const char* _accessibilityText, bool _isEnabled, bool _isLabel, bool selected)
+#else
+    _Ewk_Popup_Menu_Item(Ewk_Popup_Menu_Item_Type _type, const char* _text, Ewk_Text_Direction _textDirection, bool _hasTextDirectionOverride, const char* _toolTip, const char* _accessibilityText, bool _isEnabled, bool _isLabel)
+#endif
+        : type(_type)
+        , textDirection(_textDirection)
+        , hasTextDirectionOverride(_hasTextDirectionOverride)
+        , isEnabled(_isEnabled)
+        , isLabel(_isLabel)
+#if !OS(TIZEN)
+        , text(_text)
+        , toolTip(_toolTip)
+        , accessibilityText(_accessibilityText)
+#else
+        , text(eina_stringshare_add(_text))
+        , toolTip(eina_stringshare_add(_toolTip))
+        , accessibilityText(eina_stringshare_add(_accessibilityText))
+#if ENABLE(TIZEN_MULTIPLE_SELECT)
+        , isSelected(selected)
+#endif
+#endif
+    { }
+
+    ~_Ewk_Popup_Menu_Item()
+    {
+#if OS(TIZEN)
+        eina_stringshare_del(text);
+        eina_stringshare_del(toolTip);
+        eina_stringshare_del(accessibilityText);
+#endif
+    }
+};
+
+#if !OS(TIZEN)
 COMPILE_ASSERT_MATCHING_ENUM(EWK_POPUP_MENU_SEPARATOR, WebPopupItem::Separator);
 COMPILE_ASSERT_MATCHING_ENUM(EWK_POPUP_MENU_ITEM, WebPopupItem::Item);
+#endif
+
+/**
+ * @internal
+ * Constructs a Ewk_Popup_Menu_Item.
+ */
+#if ENABLE(TIZEN_MULTIPLE_SELECT)
+Ewk_Popup_Menu_Item* ewk_popup_menu_item_new(WebKit::WebPopupItem::Type type, const char* text, WebCore::TextDirection textDirection, bool hasTextDirectionOverride, const char* toolTip, const char* accessibilityText, bool isEnabled, bool isSelected, bool isLabel)
+{
+    return new Ewk_Popup_Menu_Item(static_cast<Ewk_Popup_Menu_Item_Type>(type), text, static_cast<Ewk_Text_Direction>(textDirection), hasTextDirectionOverride, toolTip, accessibilityText, isEnabled, isLabel, isSelected);
+}
+#else
+Ewk_Popup_Menu_Item* ewk_popup_menu_item_new(WebKit::WebPopupItem::Type type, const char* text, WebCore::TextDirection textDirection, bool hasTextDirectionOverride, const char* toolTip, const char* accessibilityText, bool isEnabled, bool isLabel)
+{
+    return new Ewk_Popup_Menu_Item(static_cast<Ewk_Popup_Menu_Item_Type>(type), text, static_cast<Ewk_Text_Direction>(textDirection), hasTextDirectionOverride, toolTip, accessibilityText, isEnabled, isLabel);
+}
+#endif
+
+/**
+ * @internal
+ * Frees a Ewk_Popup_Menu_Item.
+ */
+void ewk_popup_menu_item_free(Ewk_Popup_Menu_Item* item)
+{
+    EINA_SAFETY_ON_NULL_RETURN(item);
+    delete item;
+}
 
 Ewk_Popup_Menu_Item_Type ewk_popup_menu_item_type_get(const Ewk_Popup_Menu_Item* item)
 {
@@ -70,11 +152,12 @@ Ewk_Text_Direction ewk_popup_menu_item_text_direction_get(const Ewk_Popup_Menu_I
 
 Eina_Bool ewk_popup_menu_item_text_direction_override_get(const Ewk_Popup_Menu_Item* item)
 {
-    EINA_SAFETY_ON_NULL_RETURN_VAL(item, false);
+    EINA_SAFETY_ON_NULL_RETURN_VAL(item, 0);
 
     return item->hasTextDirectionOverride;
 }
 
+
 const char* ewk_popup_menu_item_tooltip_get(const Ewk_Popup_Menu_Item* item)
 {
     EINA_SAFETY_ON_NULL_RETURN_VAL(item, 0);
@@ -82,6 +165,7 @@ const char* ewk_popup_menu_item_tooltip_get(const Ewk_Popup_Menu_Item* item)
     return item->toolTip;
 }
 
+
 const char* ewk_popup_menu_item_accessibility_text_get(const Ewk_Popup_Menu_Item* item)
 {
     EINA_SAFETY_ON_NULL_RETURN_VAL(item, 0);
@@ -89,23 +173,18 @@ const char* ewk_popup_menu_item_accessibility_text_get(const Ewk_Popup_Menu_Item
     return item->accessibilityText;
 }
 
+
 Eina_Bool ewk_popup_menu_item_enabled_get(const Ewk_Popup_Menu_Item* item)
 {
-    EINA_SAFETY_ON_NULL_RETURN_VAL(item, false);
+    EINA_SAFETY_ON_NULL_RETURN_VAL(item, 0);
 
     return item->isEnabled;
 }
 
+
 Eina_Bool ewk_popup_menu_item_is_label_get(const Ewk_Popup_Menu_Item* item)
 {
-    EINA_SAFETY_ON_NULL_RETURN_VAL(item, false);
+    EINA_SAFETY_ON_NULL_RETURN_VAL(item, 0);
 
     return item->isLabel;
 }
-
-Eina_Bool ewk_popup_menu_item_selected_get(const Ewk_Popup_Menu_Item* item)
-{
-    EINA_SAFETY_ON_NULL_RETURN_VAL(item, false);
-
-    return item->isSelected;
-}
old mode 100755 (executable)
new mode 100644 (file)
index 5efe6fe..5c86b99
@@ -31,8 +31,8 @@
 #ifndef ewk_popup_menu_item_h
 #define ewk_popup_menu_item_h
 
-#include "ewk_view.h"
 #include <Eina.h>
+#include "ewk_view.h"
 
 #ifdef __cplusplus
 extern "C" {
@@ -45,8 +45,8 @@ typedef enum {
     EWK_POPUP_MENU_UNKNOWN = -1
 } Ewk_Popup_Menu_Item_Type;
 
-/** Creates a type name for Ewk_Popup_Menu_Item */
-typedef struct Ewk_Popup_Menu_Item Ewk_Popup_Menu_Item;
+/** Creates a type name for _Ewk_Popup_Menu_Item */
+typedef struct _Ewk_Popup_Menu_Item Ewk_Popup_Menu_Item;
 
 /**
  * Returns type of the popup menu item.
@@ -69,13 +69,13 @@ EAPI Ewk_Popup_Menu_Item_Type ewk_popup_menu_item_type_get(const Ewk_Popup_Menu_
  *         strdup()
  */
 EAPI const char *ewk_popup_menu_item_text_get(const Ewk_Popup_Menu_Item *item);
-    
+
 /**
- * Returns text direction of the popup menu item.
+ * Returns text directionality of the popup menu item.
  *
  * @param item the popup menu item instance
  *
- * @return the text direction of the @a item.
+ * @return the text directionality of the @a item.
  */
 EAPI Ewk_Text_Direction ewk_popup_menu_item_text_direction_get(const Ewk_Popup_Menu_Item *item);
 
@@ -133,15 +133,6 @@ EAPI Eina_Bool ewk_popup_menu_item_enabled_get(const Ewk_Popup_Menu_Item *item);
  */
 EAPI Eina_Bool ewk_popup_menu_item_is_label_get(const Ewk_Popup_Menu_Item *item);
 
-/**
- * Returns whether the popup menu item is selected or not.
- *
- * @param item the popup menu item instance
- *
- * @return @c EINA_TRUE if the popup menu item is selected, @c EINA_FALSE otherwise.
- */
-EAPI Eina_Bool ewk_popup_menu_item_selected_get(const Ewk_Popup_Menu_Item *item);
-
 #ifdef __cplusplus
 }
 #endif
old mode 100755 (executable)
new mode 100644 (file)
index ad215dc..6657d84
 #ifndef ewk_popup_menu_item_private_h
 #define ewk_popup_menu_item_private_h
 
-#include "WKEinaSharedString.h"
 #include "WebPopupItem.h"
-#include "ewk_popup_menu_item.h"
-#include <wtf/PassOwnPtr.h>
 
-/**
- * \struct  Ewk_Popup_Menu_Item
- * @brief   Contains the popup menu data.
- */
-class Ewk_Popup_Menu_Item {
-public:
-    Ewk_Popup_Menu_Item_Type type;
-    Ewk_Text_Direction textDirection;
-
-    bool hasTextDirectionOverride;
-    bool isEnabled;
-    bool isLabel;
-    bool isSelected;
-
-    WKEinaSharedString text;
-    WKEinaSharedString toolTip;
-    WKEinaSharedString accessibilityText;
-
-    static PassOwnPtr<Ewk_Popup_Menu_Item> create(const WebKit::WebPopupItem& item)
-    {
-        return adoptPtr(new Ewk_Popup_Menu_Item(item));
-    }
-
-private:
-    explicit Ewk_Popup_Menu_Item(const WebKit::WebPopupItem& item);
-};
+#if ENABLE(TIZEN_MULTIPLE_SELECT)
+Ewk_Popup_Menu_Item* ewk_popup_menu_item_new(WebKit::WebPopupItem::Type type, const char* text, WebCore::TextDirection textDirection, bool hasTextDirectionOverride, const char* toolTip, const char* accessibilityText, bool isEnabled, bool isSelected, bool isLabel);
+#else
+Ewk_Popup_Menu_Item* ewk_popup_menu_item_new(WebKit::WebPopupItem::Type type, const char* text, WebCore::TextDirection textDirection, bool hasTextDirectionOverride, const char* toolTip, const char* accessibilityText, bool isEnabled, bool isLabel);
+#endif
+void ewk_popup_menu_item_free(Ewk_Popup_Menu_Item* item);
 
 #endif // ewk_popup_menu_item_private_h
index 4bdb25b..86ca42d 100644 (file)
 #define COMPILE_ASSERT_MATCHING_ENUM(ewkName, webcoreName) \
         COMPILE_ASSERT(int(ewkName) == int(webcoreName), mismatchingEnums)
 
-extern int _ewk_log_dom;
-
-#define CRITICAL(...) EINA_LOG_DOM_CRIT(_ewk_log_dom, __VA_ARGS__)
-#define ERR(...) EINA_LOG_DOM_ERR(_ewk_log_dom, __VA_ARGS__)
-#define WARN(...) EINA_LOG_DOM_WARN(_ewk_log_dom, __VA_ARGS__)
-#define INFO(...) EINA_LOG_DOM_INFO(_ewk_log_dom, __VA_ARGS__)
-#define DBG(...) EINA_LOG_DOM_DBG(_ewk_log_dom, __VA_ARGS__)
-
 #endif // ewk_private_h
old mode 100755 (executable)
new mode 100644 (file)
index b36bf92..e4ec8af
@@ -1,6 +1,5 @@
 /*
  * Copyright (C) 2012 Samsung Electronics
- * Copyright (C) 2012 Intel Corporation. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
 #include "config.h"
 #include "ewk_settings.h"
 
-#include "EwkViewImpl.h"
 #include "ewk_settings_private.h"
-#include <WebKit2/WebPageGroup.h>
-#include <WebKit2/WebPageProxy.h>
-#include <WebKit2/WebPreferences.h>
+#include <WebKit2/WKPreferences.h>
 
 #if OS(TIZEN)
 #include "WKAPICast.h"
@@ -42,7 +38,6 @@
 #include <Eina.h>
 #include <wtf/OwnArrayPtr.h>
 #endif
-
 #if ENABLE(SPELLCHECK)
 #include "WKTextChecker.h"
 #include "ewk_text_checker_private.h"
 
 using namespace WebKit;
 
-const WebKit::WebPreferences* Ewk_Settings::preferences() const
-{
-    return m_viewImpl->pageProxy->pageGroup()->preferences();
-}
-
-WebKit::WebPreferences* Ewk_Settings::preferences()
-{
-    return m_viewImpl->pageProxy->pageGroup()->preferences();
-}
-
-#if OS(TIZEN)
-void Ewk_Settings::setDefaultTextEncoding(const char* defaultTextEncoding)
-{
-    m_defaultTextEncoding = defaultTextEncoding;
-}
-
-#if ENABLE(TIZEN_WEBKIT2_FORM_DATABASE)
-void Ewk_Settings::setAutofillPasswordForm(bool enable)
-{
-    m_autofillPasswordForm = enable;
-}
-
-void Ewk_Settings::setFormCandidateData(bool enable)
-{
-    m_formCandidateData = enable;
-}
-#endif
-#endif
-
 #if ENABLE(SPELLCHECK)
 static struct {
     bool isContinuousSpellCheckingEnabled : 1;
@@ -111,32 +77,11 @@ static void spellCheckingLanguagesSet(const Vector<String>& newLanguages)
 }
 #endif // ENABLE(SPELLCHECK)
 
-Eina_Bool ewk_settings_fullscreen_enabled_set(Ewk_Settings* settings, Eina_Bool enable)
-{
-#if ENABLE(FULLSCREEN_API)
-    EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
-    settings->preferences()->setFullScreenEnabled(enable);
-    return true;
-#else
-    return false;
-#endif
-}
-
-Eina_Bool ewk_settings_fullscreen_enabled_get(const Ewk_Settings* settings)
-{
-#if ENABLE(FULLSCREEN_API)
-    EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
-    return settings->preferences()->fullScreenEnabled();
-#else
-    return false;
-#endif
-}
-
 Eina_Bool ewk_settings_javascript_enabled_set(Ewk_Settings* settings, Eina_Bool enable)
 {
     EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
 
-    settings->preferences()->setJavaScriptEnabled(enable);
+    WKPreferencesSetJavaScriptEnabled(settings->preferences.get(), enable);
 
     return true;
 }
@@ -145,14 +90,14 @@ Eina_Bool ewk_settings_javascript_enabled_get(const Ewk_Settings* settings)
 {
     EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
 
-    return settings->preferences()->javaScriptEnabled();
+    return WKPreferencesGetJavaScriptEnabled(settings->preferences.get());
 }
 
 Eina_Bool ewk_settings_loads_images_automatically_set(Ewk_Settings* settings, Eina_Bool automatic)
 {
     EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
 
-    settings->preferences()->setLoadsImagesAutomatically(automatic);
+    WKPreferencesSetLoadsImagesAutomatically(settings->preferences.get(), automatic);
 
     return true;
 }
@@ -161,7 +106,7 @@ Eina_Bool ewk_settings_loads_images_automatically_get(const Ewk_Settings* settin
 {
     EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
 
-    return settings->preferences()->loadsImagesAutomatically();
+    return WKPreferencesGetLoadsImagesAutomatically(settings->preferences.get());
 }
 
 #if OS(TIZEN)
@@ -169,7 +114,7 @@ Eina_Bool ewk_settings_plugins_enabled_set(Ewk_Settings* settings, Eina_Bool ena
 {
     EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
 
-    settings->preferences()->setPluginsEnabled(enable);
+    WKPreferencesSetPluginsEnabled(settings->preferences.get(), enable);
 
     return true;
 }
@@ -178,7 +123,7 @@ Eina_Bool ewk_settings_plugins_enabled_get(const Ewk_Settings* settings)
 {
     EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
 
-    return settings->preferences()->pluginsEnabled();
+    return WKPreferencesGetPluginsEnabled(settings->preferences.get());
 }
 
 Eina_Bool ewk_settings_auto_fitting_set(Ewk_Settings* settings, Eina_Bool enable)
@@ -186,9 +131,9 @@ Eina_Bool ewk_settings_auto_fitting_set(Ewk_Settings* settings, Eina_Bool enable
     EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
 
     if (enable)
-        settings->preferences()->setDefaultViewLevel(0);
+        WKPreferencesSetDefaultViewLevel(settings->preferences.get(), 0);
     else
-        settings->preferences()->setDefaultViewLevel(1);
+        WKPreferencesSetDefaultViewLevel(settings->preferences.get(), 1);
 
     return true;
 }
@@ -197,7 +142,7 @@ Eina_Bool ewk_settings_auto_fitting_get(const Ewk_Settings* settings)
 {
     EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
 
-    double level = settings->preferences()->defaultViewLevel();
+    double level = WKPreferencesGetDefaultViewLevel(settings->preferences.get());
     if (level == 0)
         return true;
     else
@@ -208,7 +153,7 @@ Eina_Bool ewk_settings_font_default_size_set(Ewk_Settings* settings, int size)
 {
     EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
 
-    settings->preferences()->setDefaultFontSize(size);
+    WKPreferencesSetDefaultFontSize(settings->preferences.get(), size);
 
     return true;
 }
@@ -217,14 +162,14 @@ int ewk_settings_font_default_size_get(const Ewk_Settings* settings)
 {
     EINA_SAFETY_ON_NULL_RETURN_VAL(settings, 0);
 
-    return settings->preferences()->defaultFontSize();
+    return WKPreferencesGetDefaultFontSize(settings->preferences.get());
 }
 
 Eina_Bool ewk_settings_scripts_window_open_set(Ewk_Settings* settings, Eina_Bool allow)
 {
     EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
 
-    settings->preferences()->setJavaScriptCanOpenWindowsAutomatically(allow);
+    WKPreferencesSetJavaScriptCanOpenWindowsAutomatically(settings->preferences.get(), allow);
 
     return true;
 }
@@ -233,14 +178,14 @@ Eina_Bool ewk_settings_scripts_window_open_get(const Ewk_Settings* settings)
 {
     EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
 
-    return settings->preferences()->javaScriptCanOpenWindowsAutomatically();
+    return WKPreferencesGetJavaScriptCanOpenWindowsAutomatically(settings->preferences.get());
 }
 
 Eina_Bool ewk_settings_compositing_borders_visible_set(Ewk_Settings* settings, Eina_Bool enable)
 {
     EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
 
-    settings->preferences()->setCompositingBordersVisible(enable);
+    WKPreferencesSetCompositingBordersVisible(settings->preferences.get(), enable);
 
     return true;
 }
@@ -249,7 +194,8 @@ Eina_Bool ewk_settings_default_encoding_set(Ewk_Settings* settings, const char*
 {
     EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
 
-    settings->preferences()->setDefaultTextEncodingName(String::fromUTF8(encoding));
+    WKRetainPtr<WKStringRef> encodingString(AdoptWK, WKStringCreateWithUTF8CString(encoding));
+    WKPreferencesSetDefaultTextEncodingName(settings->preferences.get(), encodingString.get());
 
     return true;
 }
@@ -258,17 +204,22 @@ const char* ewk_settings_default_encoding_get(const Ewk_Settings* settings)
 {
     EINA_SAFETY_ON_NULL_RETURN_VAL(settings, 0);
 
-    const String& encodingString(settings->preferences()->defaultTextEncodingName());
-    const_cast<Ewk_Settings*>(settings)->setDefaultTextEncoding(encodingString.utf8().data());
+    WKRetainPtr<WKStringRef> encodingString(AdoptWK, WKPreferencesCopyDefaultTextEncodingName(settings->preferences.get()));
+
+    size_t size = WKStringGetMaximumUTF8CStringSize(encodingString.get());
+    OwnArrayPtr<char> encoding = adoptArrayPtr(new char[size]);
+    WKStringGetUTF8CString(encodingString.get(), encoding.get(), size);
+
+    eina_stringshare_replace(const_cast<const char**>(&settings->defaultTextEncoding), encoding.get());
 
-    return settings->defaultTextEncoding();
+    return settings->defaultTextEncoding;
 }
 
 Eina_Bool ewk_settings_private_browsing_enabled_set(Ewk_Settings* settings, Eina_Bool enable)
 {
     EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
 
-    settings->preferences()->setPrivateBrowsingEnabled(enable);
+    WKPreferencesSetPrivateBrowsingEnabled(settings->preferences.get(), enable);
 
     return true;
 }
@@ -277,14 +228,14 @@ Eina_Bool ewk_settings_private_browsing_enabled_get(const Ewk_Settings* settings
 {
     EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
 
-    return settings->preferences()->privateBrowsingEnabled();
+    return WKPreferencesGetPrivateBrowsingEnabled(settings->preferences.get());
 }
 
 Eina_Bool ewk_settings_editable_link_behavior_set(Ewk_Settings* settings, Ewk_Editable_Link_Behavior behavior)
 {
     EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
 
-    settings->preferences()->setEditableLinkBehavior(static_cast<WKEditableLinkBehavior>(behavior));
+    WKPreferencesSetEditableLinkBehavior(settings->preferences.get(), static_cast<WKEditableLinkBehavior>(behavior));
 
     return true;
 }
@@ -294,7 +245,7 @@ Eina_Bool ewk_settings_load_remote_images_set(Ewk_Settings* settings, Eina_Bool
 {
     EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
 
-    settings->preferences()->setLoadRemoteImages(loadRemoteImages);
+    WKPreferencesSetLoadRemoteImages(settings->preferences.get(), loadRemoteImages);
 
     return true;
 }
@@ -303,7 +254,7 @@ Eina_Bool ewk_settings_load_remote_images_get(const Ewk_Settings* settings)
 {
     EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
 
-    return settings->preferences()->loadRemoteImages();
+    return WKPreferencesGetLoadRemoteImages(settings->preferences.get());
 }
 #endif
 
@@ -311,7 +262,7 @@ Eina_Bool ewk_settings_uses_encoding_detector_set(Ewk_Settings* settings, Eina_B
 {
     EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
 
-    settings->preferences()->setUsesEncodingDetector(use);
+    WKPreferencesSetUsesEncodingDetector(settings->preferences.get(), use);
 
     return true;
 }
@@ -320,7 +271,7 @@ Eina_Bool ewk_settings_uses_encoding_detector_get(const Ewk_Settings* settings)
 {
     EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
 
-    return settings->preferences()->usesEncodingDetector();
+    return WKPreferencesGetUsesEncodingDetector(settings->preferences.get());
 }
 
 #if ENABLE(TIZEN_ISF_PORT)
@@ -338,7 +289,7 @@ Eina_Bool ewk_settings_default_keypad_enabled_set(Ewk_Settings* settings, Eina_B
 {
     EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
 
-    settings->preferences()->setEnableDefaultKeypad(enable);
+    WKPreferencesSetEnableDefaultKeypad(settings->preferences.get(), enable);
 
     return true;
 }
@@ -347,7 +298,7 @@ Eina_Bool ewk_settings_default_keypad_enabled_get(const Ewk_Settings* settings)
 {
     EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
 
-    return settings->preferences()->defaultKeypadEnabled();
+    return WKPreferencesGetDefaultKeypadEnabled(settings->preferences.get());
 }
 #endif
 
@@ -355,7 +306,7 @@ Eina_Bool ewk_settings_frame_flattening_enabled_set(Ewk_Settings* settings, Eina
 {
     EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
 
-    settings->preferences()->setFrameFlatteningEnabled(enable);
+    WKPreferencesSetFrameFlatteningEnabled(settings->preferences.get(), enable);
 
     return true;
 }
@@ -364,7 +315,7 @@ Eina_Bool ewk_settings_frame_flattening_enabled_get(const Ewk_Settings* settings
 {
     EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
 
-    return settings->preferences()->frameFlatteningEnabled();
+    return WKPreferencesGetFrameFlatteningEnabled(settings->preferences.get());
 }
 
 #if ENABLE(TIZEN_WEBKIT2_TEXT_ZOOM)
@@ -372,7 +323,7 @@ Eina_Bool ewk_settings_text_zoom_enabled_set(Ewk_Settings* settings, Eina_Bool e
 {
     EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
 
-    settings->preferences()->setTextZoomEnabled(enable);
+    WKPreferencesSetTextZoomEnabled(settings->preferences.get(), enable);
 
     return true;
 }
@@ -381,7 +332,7 @@ Eina_Bool ewk_settings_text_zoom_enabled_get(const Ewk_Settings* settings)
 {
     EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
 
-    return settings->preferences()->textZoomEnabled();
+    return WKPreferencesGetTextZoomEnabled(settings->preferences.get());
 }
 #endif
 
@@ -391,7 +342,7 @@ Eina_Bool ewk_settings_style_scoped_set(Ewk_Settings* settings, Eina_Bool enable
     EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
     TIZEN_LOGI("enable (%d)", enable);
 
-    settings->preferences()->setStyleScopedEnabled(enable);
+    WKPreferencesSetStyleScopedEnabled(settings->preferences.get(), enable);
     return true;
 #endif
 }
@@ -402,7 +353,7 @@ Eina_Bool ewk_settings_style_scoped_get(Ewk_Settings* settings)
     EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
     TIZEN_LOGI("settings (%p), settings");
 
-    return settings->preferences()->styleScopedEnabled();
+    return WKPreferencesGetStyleScopedEnabled(settings->preferences.get());
 #endif
 }
 
@@ -410,7 +361,7 @@ Eina_Bool ewk_settings_autofill_password_form_enabled_set(Ewk_Settings* settings
 {
 #if ENABLE(TIZEN_WEBKIT2_FORM_DATABASE)
     EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
-    settings->setAutofillPasswordForm(enable);
+    settings->autofillPasswordForm = enable;
     return true;
 #endif
     return false;
@@ -420,7 +371,7 @@ Eina_Bool ewk_settings_autofill_password_form_enabled_get(Ewk_Settings* settings
 {
 #if ENABLE(TIZEN_WEBKIT2_FORM_DATABASE)
     EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
-    return settings->autofillPasswordForm();
+    return settings->autofillPasswordForm;
 #endif
     return false;
 }
@@ -429,7 +380,7 @@ Eina_Bool ewk_settings_form_candidate_data_enabled_set(Ewk_Settings* settings, E
 {
 #if ENABLE(TIZEN_WEBKIT2_FORM_DATABASE)
     EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
-    settings->setFormCandidateData(enable);
+    settings->formCandidateData = enable;
     return true;
 #endif
     return false;
@@ -439,7 +390,7 @@ Eina_Bool ewk_settings_form_candidate_data_enabled_get(Ewk_Settings* settings)
 {
 #if ENABLE(TIZEN_WEBKIT2_FORM_DATABASE)
     EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
-    return settings->formCandidateData();
+    return settings->formCandidateData;
 #endif
     return false;
 }
@@ -520,21 +471,21 @@ Eina_List* ewk_settings_spell_checking_languages_get()
 void ewk_settings_link_magnifier_enabled_set(Ewk_Settings* settings, Eina_Bool enabled)
 {
     EINA_SAFETY_ON_NULL_RETURN(settings);
-    // settings->preferences()->setLinkMagnifierEnabled(enabled);
+    WKPreferencesSetLinkMagnifierEnabled(settings->preferences.get(), enabled);
 }
 
 Eina_Bool ewk_settings_link_magnifier_enabled_get(const Ewk_Settings* settings)
 {
     EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
-    return settings->preferences()->linkMagnifierEnabled();
+    return WKPreferencesGetLinkMagnifierEnabled(settings->preferences.get());
 }
 
 Eina_Bool ewk_settings_text_selection_enabled_set(Ewk_Settings* settings, Eina_Bool enable)
 {
+#if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION)
     EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
 
-#if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION)
-    settings->setTextSelectionEnabled(enable);
+    settings->textSelectionEnabled= enable;
     return true;
 #else
     return false;
@@ -543,10 +494,10 @@ Eina_Bool ewk_settings_text_selection_enabled_set(Ewk_Settings* settings, Eina_B
 
 Eina_Bool ewk_settings_text_selection_enabled_get(const Ewk_Settings* settings)
 {
+#if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION)
     EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
 
-#if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION)
-    return settings->textSelectionEnabled();
+    return settings->textSelectionEnabled;
 #else
     return false;
 #endif
@@ -554,10 +505,10 @@ Eina_Bool ewk_settings_text_selection_enabled_get(const Ewk_Settings* settings)
 
 Eina_Bool ewk_settings_clear_text_selection_automatically_set(Ewk_Settings* settings, Eina_Bool enable)
 {
+#if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION)
     EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
 
-#if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION)
-    settings->setAutoClearTextSelection(enable);
+    settings->autoClearTextSelection = enable;
     return true;
 #else
     return false;
@@ -566,10 +517,10 @@ Eina_Bool ewk_settings_clear_text_selection_automatically_set(Ewk_Settings* sett
 
 Eina_Bool ewk_settings_clear_text_selection_automatically_get(const Ewk_Settings* settings)
 {
+#if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION)
     EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
 
-#if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION)
-    return settings->autoClearTextSelection();
+    return settings->autoClearTextSelection;
 #else
     return false;
 #endif
index 3861e64..f2de854 100644 (file)
@@ -40,8 +40,8 @@
 extern "C" {
 #endif
 
-/** Creates a type name for Ewk_Settings */
-typedef struct Ewk_Settings Ewk_Settings;
+/** Creates a type name for _Ewk_Settings */
+typedef struct _Ewk_Settings Ewk_Settings;
 
 /**
  * Creates a type name for the callback function used to notify the client when
@@ -67,31 +67,6 @@ enum _Ewk_Editable_Link_Behavior {
 typedef enum _Ewk_Editable_Link_Behavior Ewk_Editable_Link_Behavior;
 // #endif
 
-/*
- * Enables/disables the Javascript Fullscreen API. The Javascript API allows
- * to request full screen mode, for more information see:
- * http://dvcs.w3.org/hg/fullscreen/raw-file/tip/Overview.html
- *
- * Default value for Javascript Fullscreen API setting is @c EINA_TRUE .
- *
- * @param settings settings object to enable Javascript Fullscreen API
- * @param enable @c EINA_TRUE to enable Javascript Fullscreen API or
- *               @c EINA_FALSE to disable
- *
- * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
- */
-EAPI Eina_Bool ewk_settings_fullscreen_enabled_set(Ewk_Settings *settings, Eina_Bool enable);
-
-/**
- * Returns whether the Javascript Fullscreen API is enabled or not.
- *
- * @param settings settings object to query whether Javascript Fullscreen API is enabled
- *
- * @return @c EINA_TRUE if the Javascript Fullscreen API is enabled
- *         @c EINA_FALSE if not or on failure
- */
-EAPI Eina_Bool ewk_settings_fullscreen_enabled_get(const Ewk_Settings *settings);
-
 /**
  * Enables/disables the javascript executing.
  *
old mode 100755 (executable)
new mode 100644 (file)
index 82169e0..1487e8c
@@ -1,6 +1,5 @@
 /*
  * Copyright (C) 2012 Samsung Electronics
- * Copyright (C) 2012 Intel Corporation. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
 #ifndef ewk_settings_private_h
 #define ewk_settings_private_h
 
+#include "ewk_settings.h"
+#include <WebKit2/WKPreferences.h>
+#include <WebKit2/WKRetainPtr.h>
 #include <wtf/PassOwnPtr.h>
 
-#if OS(TIZEN)
-#include "WKEinaSharedString.h"
-#endif
-
-namespace WebKit {
-class WebPreferences;
-}
-class EwkViewImpl;
+/** Creates a type name for _Ewk_Settings */
+typedef struct _Ewk_Settings Ewk_Settings;
 
 /**
- * \struct  Ewk_Settings
+ * \struct  _Ewk_Settings
  * @brief   Contains the settings data.
  */
-class Ewk_Settings {
-public:
-    static PassOwnPtr<Ewk_Settings> create(EwkViewImpl* viewImpl)
-    {
-        return adoptPtr(new Ewk_Settings(viewImpl));
-    }
-
-    const WebKit::WebPreferences* preferences() const;
-    WebKit::WebPreferences* preferences();
-
+struct _Ewk_Settings {
+    WKRetainPtr<WKPreferencesRef> preferences;
 #if OS(TIZEN)
-    const char* defaultTextEncoding() const { return m_defaultTextEncoding; }
-    void setDefaultTextEncoding(const char*);
+    const char* defaultTextEncoding;
 #if ENABLE(TIZEN_WEBKIT2_FORM_DATABASE)
-    bool autofillPasswordForm() const { return m_autofillPasswordForm; }
-    void setAutofillPasswordForm(bool);
-    bool formCandidateData() const { return m_formCandidateData; }
-    void setFormCandidateData(bool);
+    bool autofillPasswordForm;
+    bool formCandidateData;
 #endif
 #if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION)
-    bool textSelectionEnabled() const { return m_textSelectionEnabled; }
-    void setTextSelectionEnabled(bool enable) { m_textSelectionEnabled = enable; }
-    bool autoClearTextSelection() const { return m_autoClearTextSelection; }
-    void setAutoClearTextSelection(bool enable) { m_autoClearTextSelection = enable; }
+    bool textSelectionEnabled;
+    bool autoClearTextSelection;
 #endif
 #endif
 
-private:
-    explicit Ewk_Settings(EwkViewImpl* viewImpl)
-        : m_viewImpl(viewImpl)
+    explicit _Ewk_Settings(WKPreferencesRef wkPreferences)
+        : preferences(wkPreferences)
 #if OS(TIZEN)
+        , defaultTextEncoding(0)
 #if ENABLE(TIZEN_WEBKIT2_FORM_DATABASE)
-        , m_autofillPasswordForm(false)
-        , m_formCandidateData(false)
+        , autofillPasswordForm(false)
+        , formCandidateData(false)
 #endif
 #if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION)
-        , m_textSelectionEnabled(true)
-        , m_autoClearTextSelection(true)
+        , textSelectionEnabled(true)
+        , autoClearTextSelection(true)
 #endif
 #endif
-    {
-        ASSERT(m_viewImpl);
-    }
-
-    EwkViewImpl* m_viewImpl;
+    { }
 
 #if OS(TIZEN)
-    WKEinaSharedString m_defaultTextEncoding;
-#if ENABLE(TIZEN_WEBKIT2_FORM_DATABASE)
-    bool m_autofillPasswordForm;
-    bool m_formCandidateData;
-#endif
-#if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION)
-    bool m_textSelectionEnabled;
-    bool m_autoClearTextSelection;
-#endif
+    ~_Ewk_Settings()
+    {
+        eina_stringshare_del(defaultTextEncoding);
+    }
 #endif
 };
 
index f2971a6..1c9cdd5 100644 (file)
@@ -40,11 +40,11 @@ typedef enum {
     EWK_TOUCH_CANCEL
 } Ewk_Touch_Event_Type;
 
-/// Creates a type name for Ewk_Touch_Point.
-typedef struct Ewk_Touch_Point Ewk_Touch_Point;
+/// Creates a type name for _Ewk_Touch_Point.
+typedef struct _Ewk_Touch_Point Ewk_Touch_Point;
 
 /// Represents a touch point.
-struct Ewk_Touch_Point {
+struct _Ewk_Touch_Point {
     int id; /**< identifier of the touch event */
     int x; /**< the horizontal position of the touch event */
     int y; /**< the vertical position of the touch event */
old mode 100755 (executable)
new mode 100644 (file)
index 55a6801..6587b28
 #include "config.h"
 #include "ewk_url_request.h"
 
+#include "WKAPICast.h"
+#include "WKRetainPtr.h"
+#include "WKURL.h"
+#include "WKURLRequest.h"
+#include "WebURLRequest.h"
+#include "WebURLRequestTizen.h"
 #include "ewk_url_request_private.h"
+#include <wtf/text/CString.h>
 
 using namespace WebKit;
 
-Ewk_Url_Request::Ewk_Url_Request(WKURLRequestRef requestRef)
-    : m_url(AdoptWK, WKURLRequestCopyURL(requestRef))
-    , m_firstParty(AdoptWK, WKURLRequestCopyFirstPartyForCookies(requestRef))
-    , m_httpMethod(AdoptWK, WKURLRequestCopyHTTPMethod(requestRef))
-{ }
-
-const char* Ewk_Url_Request::url() const
-{
-    return m_url;
-}
-
-const char* Ewk_Url_Request::firstParty() const
-{
-    return m_firstParty;
-}
-
-const char* Ewk_Url_Request::httpMethod() const
-{
-    return m_httpMethod;
-}
-
-Ewk_Url_Request* ewk_url_request_ref(Ewk_Url_Request* request)
+/**
+ * \struct  _Ewk_Url_Request
+ * @brief   Contains the URL request data.
+ */
+struct _Ewk_Url_Request {
+    unsigned int __ref; /**< the reference count of the object */
+    WKRetainPtr<WKURLRequestRef> wkRequest;
+
+    const char* url;
+    const char* first_party;
+    const char* http_method;
+
+    _Ewk_Url_Request(WKURLRequestRef requestRef)
+        : __ref(1)
+        , wkRequest(requestRef)
+        , url(0)
+        , first_party(0)
+        , http_method(0)
+    { }
+
+    ~_Ewk_Url_Request()
+    {
+        ASSERT(!__ref);
+        eina_stringshare_del(url);
+        eina_stringshare_del(first_party);
+        eina_stringshare_del(http_method);
+    }
+};
+
+#define EWK_URL_REQUEST_WK_GET_OR_RETURN(request, wkRequest_, ...)    \
+    if (!(request)) {                                                 \
+        EINA_LOG_CRIT("request is NULL.");                            \
+        return __VA_ARGS__;                                           \
+    }                                                                 \
+    if (!(request)->wkRequest) {                                      \
+        EINA_LOG_CRIT("request->wkRequest is NULL.");                 \
+        return __VA_ARGS__;                                           \
+    }                                                                 \
+    WKURLRequestRef wkRequest_ = (request)->wkRequest.get()
+
+void ewk_url_request_ref(Ewk_Url_Request* request)
 {
-    EINA_SAFETY_ON_NULL_RETURN_VAL(request, 0);
-    request->ref();
-
-    return request;
+    EINA_SAFETY_ON_NULL_RETURN(request);
+    ++request->__ref;
 }
 
 void ewk_url_request_unref(Ewk_Url_Request* request)
 {
     EINA_SAFETY_ON_NULL_RETURN(request);
 
-    request->deref();
+    if (--request->__ref)
+        return;
+
+    delete request;
 }
 
 const char* ewk_url_request_url_get(const Ewk_Url_Request* request)
 {
-    EINA_SAFETY_ON_NULL_RETURN_VAL(request, 0);
+    EWK_URL_REQUEST_WK_GET_OR_RETURN(request, wkRequest, 0);
 
-    return request->url();
+    WKRetainPtr<WKURLRef> wkUrl(AdoptWK, WKURLRequestCopyURL(wkRequest));
+    Ewk_Url_Request* ewkRequest = const_cast<Ewk_Url_Request*>(request);
+    eina_stringshare_replace(&ewkRequest->url, toImpl(wkUrl.get())->string().utf8().data());
+
+    return request->url;
 }
 
 const char* ewk_request_cookies_first_party_get(const Ewk_Url_Request* request)
 {
-    EINA_SAFETY_ON_NULL_RETURN_VAL(request, 0);
+    EWK_URL_REQUEST_WK_GET_OR_RETURN(request, wkRequest, 0);
+
+    Ewk_Url_Request* ewkRequest = const_cast<Ewk_Url_Request*>(request);
+    eina_stringshare_replace(&ewkRequest->first_party, toImpl(wkRequest)->resourceRequest().firstPartyForCookies().string().utf8().data());
 
-    return request->firstParty();
+    return request->first_party;
 }
 
 const char* ewk_url_request_http_method_get(const Ewk_Url_Request* request)
 {
-    EINA_SAFETY_ON_NULL_RETURN_VAL(request, 0);
+    EWK_URL_REQUEST_WK_GET_OR_RETURN(request, wkRequest, 0);
+
+    Ewk_Url_Request* ewkRequest = const_cast<Ewk_Url_Request*>(request);
+    eina_stringshare_replace(&ewkRequest->http_method, toImpl(wkRequest)->resourceRequest().httpMethod().utf8().data());
+
+    return request->http_method;
+}
+
+/**
+ * @internal
+ * Constructs a Ewk_Url_Request from a WKURLRequest.
+ */
+Ewk_Url_Request* ewk_url_request_new(WKURLRequestRef wkUrlRequest)
+{
+    EINA_SAFETY_ON_NULL_RETURN_VAL(wkUrlRequest, 0);
 
-    return request->httpMethod();
+    return new Ewk_Url_Request(wkUrlRequest);
 }
index 987bd8f..ec44f5c 100644 (file)
 extern "C" {
 #endif
 
-/** Creates a type name for Ewk_Url_Request */
-typedef struct Ewk_Url_Request Ewk_Url_Request;
+/** Creates a type name for _Ewk_Url_Request */
+typedef struct _Ewk_Url_Request Ewk_Url_Request;
 
 /**
  * Increases the reference count of the given object.
  *
  * @param request the URL request object to increase the reference count
- *
- * @return a pointer to the object on success, @c NULL otherwise.
  */
-EAPI Ewk_Url_Request *ewk_url_request_ref(Ewk_Url_Request *request);
+EAPI void ewk_url_request_ref(Ewk_Url_Request *request);
 
 /**
  * Decreases the reference count of the given object, possibly freeing it.
index 31a1bea..548b6e9 100644 (file)
 #ifndef ewk_url_request_private_h
 #define ewk_url_request_private_h
 
-#include "WKEinaSharedString.h"
-#include "WKURL.h"
-#include "WKURLRequest.h"
-#include "WebURLRequest.h"
-#include <wtf/PassRefPtr.h>
-
-/**
- * \struct  Ewk_Url_Request
- * @brief   Contains the URL request data.
- */
-class Ewk_Url_Request : public RefCounted<Ewk_Url_Request> {
-public:
-    static PassRefPtr<Ewk_Url_Request> create(WKURLRequestRef requestRef)
-    {
-        return adoptRef(new Ewk_Url_Request(requestRef));
-    }
-
-    const char* url() const;
-    const char* firstParty() const;
-    const char* httpMethod() const;
-
-private:
-    explicit Ewk_Url_Request(WKURLRequestRef requestRef);
-
-    WKEinaSharedString m_url;
-    WKEinaSharedString m_firstParty;
-    WKEinaSharedString m_httpMethod;
-};
+Ewk_Url_Request* ewk_url_request_new(WKURLRequestRef);
 
 #endif // ewk_url_request_private_h
index 04e176b..8f9f536 100644 (file)
 #include "ewk_url_response_private.h"
 #include <wtf/text/CString.h>
 
-using namespace WebKit;
-
-Ewk_Url_Response::Ewk_Url_Response(const WebCore::ResourceResponse& coreResponse)
-    : m_coreResponse(coreResponse)
-    , m_url(AdoptWK, WKURLResponseCopyURL(WebKit::toAPI(coreResponse)))
-    , m_mimeType(AdoptWK, WKURLResponseCopyMIMEType(WebKit::toAPI(coreResponse)))
-{ }
-
-int Ewk_Url_Response::httpStatusCode() const
-{
-    return m_coreResponse.httpStatusCode();
-}
-
-const char* Ewk_Url_Response::url() const
-{
-    return m_url;
-}
-
-const char* Ewk_Url_Response::mimeType() const
-{
-    return m_mimeType;
-}
-
-unsigned long Ewk_Url_Response::contentLength() const
-{
-    return m_coreResponse.expectedContentLength();
-}
-
-Ewk_Url_Response* ewk_url_response_ref(Ewk_Url_Response* response)
+/**
+ * \struct  _Ewk_Url_Response
+ * @brief   Contains the URL response data.
+ */
+struct _Ewk_Url_Response {
+    unsigned int __ref; /**< the reference count of the object */
+    WebCore::ResourceResponse coreResponse;
+
+    const char* url;
+    const char* mimeType;
+
+    _Ewk_Url_Response(const WebCore::ResourceResponse& _coreResponse)
+        : __ref(1)
+        , coreResponse(_coreResponse)
+        , url(0)
+        , mimeType(0)
+    { }
+
+    ~_Ewk_Url_Response()
+    {
+        ASSERT(!__ref);
+        eina_stringshare_del(url);
+        eina_stringshare_del(mimeType);
+    }
+};
+
+void ewk_url_response_ref(Ewk_Url_Response* response)
 {
-    EINA_SAFETY_ON_NULL_RETURN_VAL(response, 0);
-    response->ref();
-
-    return response;
+    EINA_SAFETY_ON_NULL_RETURN(response);
+    ++response->__ref;
 }
 
 void ewk_url_response_unref(Ewk_Url_Response* response)
 {
     EINA_SAFETY_ON_NULL_RETURN(response);
 
-    response->deref();
+    if (--response->__ref)
+        return;
+
+    delete response;
 }
 
 const char* ewk_url_response_url_get(const Ewk_Url_Response* response)
 {
     EINA_SAFETY_ON_NULL_RETURN_VAL(response, 0);
 
-    return response->url();
+    Ewk_Url_Response* ewkResponse = const_cast<Ewk_Url_Response*>(response);
+    eina_stringshare_replace(&ewkResponse->url, response->coreResponse.url().string().utf8().data());
+
+    return response->url;
 }
 
 int ewk_url_response_status_code_get(const Ewk_Url_Response* response)
 {
     EINA_SAFETY_ON_NULL_RETURN_VAL(response, 0);
 
-    return response->httpStatusCode();
+    return response->coreResponse.httpStatusCode();
 }
 
 const char* ewk_url_response_mime_type_get(const Ewk_Url_Response* response)
 {
     EINA_SAFETY_ON_NULL_RETURN_VAL(response, 0);
 
-    return response->mimeType();
+    Ewk_Url_Response* ewkResponse = const_cast<Ewk_Url_Response*>(response);
+    eina_stringshare_replace(&ewkResponse->mimeType, response->coreResponse.mimeType().utf8().data());
+
+    return response->mimeType;
 }
 
 unsigned long ewk_url_response_content_length_get(const Ewk_Url_Response* response)
 {
     EINA_SAFETY_ON_NULL_RETURN_VAL(response, 0);
 
-    return response->contentLength();
+    return response->coreResponse.expectedContentLength();
+}
+
+/**
+ * @internal
+ * Constructs a Ewk_Url_Response from a WebCore::ResourceResponse.
+ */
+Ewk_Url_Response* ewk_url_response_new(const WebCore::ResourceResponse& coreResponse)
+{
+    return new Ewk_Url_Response(coreResponse);
 }
index cad8e0f..35631eb 100644 (file)
 extern "C" {
 #endif
 
-/** Creates a type name for Ewk_Url_Response */
-typedef struct Ewk_Url_Response Ewk_Url_Response;
+/** Creates a type name for _Ewk_Url_Response */
+typedef struct _Ewk_Url_Response Ewk_Url_Response;
 
 /**
  * Increases the reference count of the given object.
  *
  * @param response the URL response object to increase the reference count
- *
- * @return a pointer to the object on success, @c NULL otherwise.
  */
-EAPI Ewk_Url_Response *ewk_url_response_ref(Ewk_Url_Response *response);
+EAPI void ewk_url_response_ref(Ewk_Url_Response *response);
 
 /**
  * Decreases the reference count of the given object, possibly freeing it.
index 2d918a8..32d563f 100644 (file)
 #ifndef ewk_url_response_private_h
 #define ewk_url_response_private_h
 
-#include "WKAPICast.h"
-#include "WKEinaSharedString.h"
-#include "WKURLResponse.h"
 #include <WebCore/ResourceResponse.h>
-#include <wtf/PassRefPtr.h>
 
-/**
- * \struct  Ewk_Url_Response
- * @brief   Contains the URL response data.
- */
-class Ewk_Url_Response : public RefCounted<Ewk_Url_Response> {
-public:
-    static PassRefPtr<Ewk_Url_Response> create(WKURLResponseRef wkResponse)
-    {
-        if (!wkResponse)
-            return 0;
-
-        return adoptRef(new Ewk_Url_Response(WebKit::toImpl(wkResponse)->resourceResponse()));
-    }
-
-    int httpStatusCode() const;
-    const char* url() const;
-    const char* mimeType() const;
-    unsigned long contentLength() const;
-
-private:
-    explicit Ewk_Url_Response(const WebCore::ResourceResponse& coreResponse);
+typedef struct _Ewk_Url_Response Ewk_Url_Response;
 
-    WebCore::ResourceResponse m_coreResponse;
-    WKEinaSharedString m_url;
-    WKEinaSharedString m_mimeType;
-};
+Ewk_Url_Response* ewk_url_response_new(const WebCore::ResourceResponse& resourceResponse);
 
 #endif // ewk_url_response_private_h
index 04d9118..32c3281 100644 (file)
 #include "config.h"
 #include "ewk_url_scheme_request.h"
 
-#include "GOwnPtrSoup.h"
 #include "WKData.h"
+#include "WKRetainPtr.h"
+#include "WKSoupRequestManager.h"
 #include "WKString.h"
-#include "ewk_url_scheme_request_private.h"
+#include <wtf/text/CString.h>
 
 using namespace WebKit;
 
-Ewk_Url_Scheme_Request::Ewk_Url_Scheme_Request(WKSoupRequestManagerRef manager, WKURLRef url, uint64_t requestID)
-    : m_wkRequestManager(manager)
-    , m_url(url)
-    , m_requestID(requestID)
+/**
+ * \struct  _Ewk_Url_Scheme_Request
+ * @brief   Contains the URL scheme request data.
+ */
+struct _Ewk_Url_Scheme_Request {
+    unsigned int __ref; /**< the reference count of the object */
+    WKRetainPtr<WKSoupRequestManagerRef> wkRequestManager;
+    const char* url;
+    uint64_t requestID;
+    const char* scheme;
+    const char* path;
+
+    _Ewk_Url_Scheme_Request(WKSoupRequestManagerRef manager, const char* _url, uint64_t _requestID)
+        : __ref(1)
+        , wkRequestManager(manager)
+        , url(eina_stringshare_add(_url))
+        , requestID(_requestID)
+    {
+        SoupURI* soupURI = soup_uri_new(_url);
+        scheme = eina_stringshare_add(soupURI->scheme);
+        path = eina_stringshare_add(soupURI->path);
+        soup_uri_free(soupURI);
+    }
+
+    ~_Ewk_Url_Scheme_Request()
+    {
+        ASSERT(!__ref);
+        eina_stringshare_del(url);
+        eina_stringshare_del(scheme);
+        eina_stringshare_del(path);
+    }
+};
+
+void ewk_url_scheme_request_ref(Ewk_Url_Scheme_Request* request)
 {
-    GOwnPtr<SoupURI> soupURI(soup_uri_new(m_url));
-    m_scheme = soupURI->scheme;
-    m_path = soupURI->path;
+    EINA_SAFETY_ON_NULL_RETURN(request);
+    ++request->__ref;
 }
 
-uint64_t Ewk_Url_Scheme_Request::id() const
+void ewk_url_scheme_request_unref(Ewk_Url_Scheme_Request* request)
 {
-    return m_requestID;
-}
+    EINA_SAFETY_ON_NULL_RETURN(request);
 
-const char* Ewk_Url_Scheme_Request::url() const
-{
-    return m_url;
-}
+    if (--request->__ref)
+        return;
 
-const char* Ewk_Url_Scheme_Request::scheme() const
-{
-    return m_scheme;
+    delete request;
 }
 
-const char* Ewk_Url_Scheme_Request::path() const
-{
-    return m_path;
-}
-
-void Ewk_Url_Scheme_Request::finish(const void* contentData, uint64_t contentLength, const char* mimeType)
+const char* ewk_url_scheme_request_scheme_get(const Ewk_Url_Scheme_Request* request)
 {
-    WKRetainPtr<WKDataRef> wkData(AdoptWK, WKDataCreate(contentLength ? reinterpret_cast<const unsigned char*>(contentData) : 0, contentLength));
-    WKRetainPtr<WKStringRef> wkMimeType = mimeType ? adoptWK(WKStringCreateWithUTF8CString(mimeType)) : 0;
+    EINA_SAFETY_ON_NULL_RETURN_VAL(request, 0);
 
-    // In case of empty reply an empty WKDataRef is sent to the WebProcess.
-    WKSoupRequestManagerDidHandleURIRequest(m_wkRequestManager.get(), wkData.get(), contentLength, wkMimeType.get(), m_requestID);
+    return request->scheme;
 }
 
-Ewk_Url_Scheme_Request* ewk_url_scheme_request_ref(Ewk_Url_Scheme_Request* request)
+const char* ewk_url_scheme_request_url_get(const Ewk_Url_Scheme_Request* request)
 {
     EINA_SAFETY_ON_NULL_RETURN_VAL(request, 0);
-    request->ref();
 
-    return request;
+    return request->url;
 }
 
-void ewk_url_scheme_request_unref(Ewk_Url_Scheme_Request* request)
+const char* ewk_url_scheme_request_path_get(const Ewk_Url_Scheme_Request* request)
 {
-    EINA_SAFETY_ON_NULL_RETURN(request);
+    EINA_SAFETY_ON_NULL_RETURN_VAL(request, 0);
 
-    request->deref();
+    return request->path;
 }
 
-const char* ewk_url_scheme_request_scheme_get(const Ewk_Url_Scheme_Request* request)
+/**
+ * @internal
+ * Returns the #Ewk_Url_Scheme_Request identifier.
+ */
+uint64_t ewk_url_scheme_request_id_get(const Ewk_Url_Scheme_Request* request)
 {
     EINA_SAFETY_ON_NULL_RETURN_VAL(request, 0);
 
-    return request->scheme();
+    return request->requestID;
 }
 
-const char* ewk_url_scheme_request_url_get(const Ewk_Url_Scheme_Request* request)
+Eina_Bool ewk_url_scheme_request_finish(const Ewk_Url_Scheme_Request* request, const void* contentData, unsigned int contentLength, const char* mimeType)
 {
-    EINA_SAFETY_ON_NULL_RETURN_VAL(request, 0);
+    EINA_SAFETY_ON_NULL_RETURN_VAL(request, false);
 
-    return request->url();
-}
+    WKRetainPtr<WKDataRef> wkData(AdoptWK, WKDataCreate(contentLength ? reinterpret_cast<const unsigned char*>(contentData) : 0, contentLength));
+    WKRetainPtr<WKStringRef> wkMimeType = mimeType ? adoptWK(WKStringCreateWithUTF8CString(mimeType)) : 0;
 
-const char* ewk_url_scheme_request_path_get(const Ewk_Url_Scheme_Request* request)
-{
-    EINA_SAFETY_ON_NULL_RETURN_VAL(request, 0);
+    // In case of empty reply an empty WKDataRef is sent to the WebProcess.
+    WKSoupRequestManagerDidHandleURIRequest(request->wkRequestManager.get(), wkData.get(), contentLength, wkMimeType.get(), request->requestID);
 
-    return request->path();
+    return true;
 }
 
-Eina_Bool ewk_url_scheme_request_finish(Ewk_Url_Scheme_Request* request, const void* contentData, uint64_t contentLength, const char* mimeType)
+/**
+ * @internal
+ * Constructs a Ewk_Url_Scheme_Request.
+ */
+Ewk_Url_Scheme_Request* ewk_url_scheme_request_new(WKSoupRequestManagerRef requestManager, WKURLRef url, uint64_t requestID)
 {
-    EINA_SAFETY_ON_NULL_RETURN_VAL(request, false);
+    EINA_SAFETY_ON_NULL_RETURN_VAL(requestManager, 0);
+    EINA_SAFETY_ON_NULL_RETURN_VAL(url, 0);
 
-    request->finish(contentData, contentLength, mimeType);
-
-    return true;
+    return new Ewk_Url_Scheme_Request(requestManager, toImpl(url)->string().utf8().data(), requestID);
 }
old mode 100755 (executable)
new mode 100644 (file)
index ce01afc..deaaf18
 extern "C" {
 #endif
 
-/** Creates a type name for Ewk_Url_Scheme_Request */
-typedef struct Ewk_Url_Scheme_Request Ewk_Url_Scheme_Request;
+/** Creates a type name for _Ewk_Url_Scheme_Request */
+typedef struct _Ewk_Url_Scheme_Request Ewk_Url_Scheme_Request;
 
 /**
  * Increases the reference count of the given object.
  *
  * @param request the URL scheme request object to increase the reference count
- *
- * @return a pointer to the object on success, @c NULL otherwise.
  */
-EAPI Ewk_Url_Scheme_Request *ewk_url_scheme_request_ref(Ewk_Url_Scheme_Request *request);
+EAPI void ewk_url_scheme_request_ref(Ewk_Url_Scheme_Request *request);
 
 /**
  * Decreases the reference count of the given object, possibly freeing it.
@@ -105,7 +103,7 @@ EAPI const char *ewk_url_scheme_request_path_get(const Ewk_Url_Scheme_Request *r
  * @param content_length the length of the @a content_data.
  * @param mime_type the content type of the stream or %c NULL if not known
  */
-EAPI Eina_Bool ewk_url_scheme_request_finish(Ewk_Url_Scheme_Request *request, const void *content_data, uint64_t content_length, const char *mime_type);
+EAPI Eina_Bool ewk_url_scheme_request_finish(const Ewk_Url_Scheme_Request *request, const void *content_data, unsigned int content_length, const char *mime_type);
 
 #ifdef __cplusplus
 }
old mode 100755 (executable)
new mode 100644 (file)
index 30fd6f5..e5dd417
 #ifndef ewk_url_scheme_request_private_h
 #define ewk_url_scheme_request_private_h
 
-#include "WKAPICast.h"
 #include "WKBase.h"
-#include "WKEinaSharedString.h"
-#include "WKRetainPtr.h"
-#include "WKSoupRequestManager.h"
 
-/**
- * \struct  Ewk_Url_Scheme_Request
- * @brief   Contains the URL scheme request data.
- */
-struct Ewk_Url_Scheme_Request : public RefCounted<Ewk_Url_Scheme_Request> {
-    static PassRefPtr<Ewk_Url_Scheme_Request> create(WKSoupRequestManagerRef manager, WKURLRef url, uint64_t requestID)
-    {
-        if (!manager || !url)
-            return 0;
-
-        return adoptRef(new Ewk_Url_Scheme_Request(manager, url, requestID));
-    }
-
-    uint64_t id() const;
-    const char* url() const;
-    const char* scheme() const;
-    const char* path() const;
-
-    void finish(const void* contentData, uint64_t contentLength, const char* mimeType);
+typedef struct _Ewk_Url_Scheme_Request Ewk_Url_Scheme_Request;
+typedef struct _Ewk_Context Ewk_Context;
 
-private:
-    Ewk_Url_Scheme_Request(WKSoupRequestManagerRef manager, WKURLRef urlRef, uint64_t requestID);
+Ewk_Url_Scheme_Request* ewk_url_scheme_request_new(WKSoupRequestManagerRef, WKURLRef, uint64_t requestID);
 
-    WKRetainPtr<WKSoupRequestManagerRef> m_wkRequestManager;
-    WKEinaSharedString m_url;
-    uint64_t m_requestID;
-    WKEinaSharedString m_scheme;
-    WKEinaSharedString m_path;
-};
+uint64_t ewk_url_scheme_request_id_get(const Ewk_Url_Scheme_Request* request);
 
 #endif // ewk_url_scheme_request_private_h
index e518602..a5c2453 100755 (executable)
 #include "ewk_view.h"
 
 #include "EwkViewImpl.h"
-#include "FindClientEfl.h"
-#include "FormClientEfl.h"
 #include "LayerTreeCoordinatorProxy.h"
-#include "InputMethodContextEfl.h"
 #include "NativeWebKeyboardEvent.h"
 #include "NativeWebMouseEvent.h"
 #include "NativeWebWheelEvent.h"
 #include "PageClientImpl.h"
-#include "PageLoadClientEfl.h"
-#include "PagePolicyClientEfl.h"
-#include "PageUIClientEfl.h"
-#include "ResourceLoadClientEfl.h"
 #include "WKAPICast.h"
-#include "WKEinaSharedString.h"
-#include "WKFindOptions.h"
+#if ENABLE(TIZEN_INPUT_COLOR_PICKER) // wait for upstream
+#include "WKColorPickerResultListener.h"
+#endif
 #include "WKRetainPtr.h"
 #include "WKString.h"
-#include "WebContext.h"
+#include "WKURL.h"
 #include "WebData.h"
 #include "WebPageGroup.h"
 #include "WebPopupItem.h"
 #include "WebPopupMenuProxyEfl.h"
-#include "WebPreferences.h"
-#include "ewk_back_forward_list_private.h"
 #include "ewk_context.h"
 #include "ewk_context_private.h"
-#include "ewk_favicon_database_private.h"
 #include "ewk_intent_private.h"
-#include "ewk_popup_menu_item_private.h"
-#include "ewk_private.h"
 #include "ewk_settings_private.h"
+#include "ewk_view_form_client_private.h"
+#include "ewk_view_loader_client_private.h"
+#include "ewk_view_policy_client_private.h"
 #include "ewk_view_private.h"
+#include "ewk_view_resource_load_client_private.h"
+#include "ewk_web_resource.h"
 #include <Ecore_Evas.h>
 #include <Ecore_X.h>
+#include <Edje.h>
+#include <WebCore/Cursor.h>
+#include <WebCore/EflScreenUtilities.h>
 #include <WebKit2/WKPageGroup.h>
 #include <wtf/text/CString.h>
 
-#if ENABLE(FULLSCREEN_API)
-#include "WebFullScreenManagerProxy.h"
+#if USE(ACCELERATED_COMPOSITING)
+#include <Evas_GL.h>
 #endif
 
 #if ENABLE(TIZEN_WEBKIT2_DDK_CHECK)
-namespace EGL {
 #include <EGL/egl.h>
-}
+#define Cursor WebCore::Cursor
 #endif
 
 #if OS(TIZEN)
 #include "DrawingAreaProxyImpl.h"
+#include "JavaScriptPopup.h"
+#include "OpenPanel.h"
 #include "WKArray.h"
 #include "WKData.h"
 #include "WKDownload.h"
@@ -87,6 +85,7 @@ namespace EGL {
 #include "WKSerializedScriptValue.h"
 #include "WKString.h"
 #include "WKURLRequest.h"
+#include "ewk_auth_challenge_private.h"
 #include "ewk_context_menu_private.h"
 #include "ewk_error.h"
 #include "ewk_error_private.h"
@@ -94,16 +93,20 @@ namespace EGL {
 #include "ewk_popup_menu_item.h"
 #include "ewk_popup_menu_item_private.h"
 #include "ewk_view_context_menu_client.h"
+#include "ewk_view_find_client.h"
 #include "ewk_view_icondatabase_client.h"
 #include "ewk_view_tizen_client.h"
+#include "ewk_view_ui_client.h"
 #include <Ecore.h>
+#include <Ecore_Evas.h>
 #include <Elementary.h>
-#include <WebCore/EflScreenUtilities.h>
+#include <JavaScriptCore/JSRetainPtr.h>
 #include <WebCore/NotImplemented.h>
 #include <cairo.h>
 
 #if ENABLE(TIZEN_ICON_DATABASE)
 #include "WKContextPrivate.h"
+#include "WebContext.h"
 #endif
 
 #if ENABLE(TIZEN_GEOLOCATION)
@@ -112,6 +115,15 @@ namespace EGL {
 #include "ewk_view_geolocation_provider.h"
 #endif
 
+#if ENABLE(TIZEN_INPUT_TAG_EXTENSION)
+#include "InputPicker.h"
+#endif
+
+#if ENABLE(TIZEN_GESTURE)
+#include "GestureRecognizer.h"
+#include "GestureClient.h"
+#endif
+
 #if ENABLE(TOUCH_EVENTS)
 #include "NativeWebTouchEvent.h"
 #include "WebEvent.h"
@@ -129,6 +141,10 @@ namespace EGL {
 #include "ewk_view_notification_provider.h"
 #endif
 
+#if ENABLE(TIZEN_WEBKIT2_POPUP_INTERNAL)
+#include "ewk_popup_picker.h"
+#endif
+
 #if ENABLE(TIZEN_MEDIA_STREAM)
 #include "WKUserMediaPermissionRequest.h"
 #include "ewk_user_media_private.h"
@@ -143,6 +159,10 @@ namespace EGL {
 #include "ewk_hit_test_private.h"
 #endif
 
+#if ENABLE(TIZEN_WEBKIT2_FOCUS_RING)
+#include "FocusRing.h"
+#endif
+
 #if ENABLE(TIZEN_WEBKIT2_GET_TEXT_STYLE_FOR_SELECTION)
 #include "ewk_text_style.h"
 #endif
@@ -159,6 +179,7 @@ namespace EGL {
 #include "WKDictionary.h"
 #include "ewk_web_application_icon_data_private.h"
 #endif
+
 #endif // #if OS(TIZEN)
 
 using namespace WebKit;
@@ -166,14 +187,232 @@ using namespace WebCore;
 
 static const char EWK_VIEW_TYPE_STR[] = "EWK2_View";
 
+#if OS(TIZEN)
+typedef struct _Ewk_View_Callback_Context Ewk_View_Callback_Context;
+#endif // #if OS(TIZEN)
+
+static const int defaultCursorSize = 16;
+
+typedef HashMap<uint64_t, Ewk_Web_Resource*> LoadingResourcesMap;
+static void _ewk_view_priv_loading_resources_clear(LoadingResourcesMap& loadingResourcesMap);
+
+struct _Ewk_View_Private_Data {
+    OwnPtr<PageClientImpl> pageClient;
+
+    const char* uri;
+    const char* title;
+    const char* theme;
+    const char* customEncoding;
+    const char* cursorGroup;
+    Evas_Object* cursorObject;
+    LoadingResourcesMap loadingResourcesMap;
+#if ENABLE(TIZEN_INPUT_COLOR_PICKER) // wait for upstream
+    WKColorPickerResultListenerRef colorPickerResultListener;
+#endif
+#if ENABLE(TOUCH_EVENTS)
+    bool areTouchEventsEnabled;
+#endif
+    OwnPtr<Ewk_Settings> settings;
+
+#ifdef HAVE_ECORE_X
+    bool isUsingEcoreX;
+#endif
+
+#if USE(ACCELERATED_COMPOSITING)
+    Evas_GL* evasGl;
+    Evas_GL_Context* evasGlContext;
+    Evas_GL_Surface* evasGlSurface;
+#endif
+
+#if OS(TIZEN)
+    bool areMouseEventsEnabled;
+#if ENABLE(TIZEN_ORIENTATION_EVENTS)
+    int orientation;
+#endif
+
+    JSGlobalContextRef javascriptGlobalContext;
+
+    const char* userAgent;
+    const char* encoding;
+#if ENABLE(TIZEN_SUPPORT_WEBAPP_META_TAG)
+    const char* webAppIconURL;
+    Eina_List* webAppIconURLs;
+#endif
+
+    OwnPtr<Ewk_View_Callback_Context> alertContext;
+    OwnPtr<Ewk_View_Callback_Context> confirmContext;
+    OwnPtr<Ewk_View_Callback_Context> promptContext;
+#if ENABLE(TIZEN_SUPPORT_BEFORE_UNLOAD_CONFIRM_PANEL)
+    OwnPtr<Ewk_View_Callback_Context> beforeUnloadConfirmPanelContext;
+#endif
+    OwnPtr<Ewk_View_Callback_Context> openpanelContext;
+    OwnPtr<JavaScriptPopup> javascriptPopup;
+    bool isWaitingForJavaScriptPopupReply;
+    OwnPtr<OpenPanel> openPanel;
+#if ENABLE(TIZEN_INPUT_TAG_EXTENSION)
+    OwnPtr<InputPicker> inputPicker;
+    const char* inputValue;
+#endif
+
+    Ewk_Auth_Challenge* authChallenge;
+    Ewk_Policy_Decision* policyDecision;
+    WKOpenPanelResultListenerRef openPanelListener;
+
+#if ENABLE(TIZEN_CERTIFICATE_HANDLING)
+    Ewk_Certificate_Policy_Decision* certificatePolicyDecision;
+#endif
+
+#if ENABLE(TIZEN_MEDIA_STREAM)
+    Eina_List* userMediaPermissionRequests;
+#endif
+
+    Ewk_Context* context;
+
+#if ENABLE(TIZEN_GEOLOCATION)
+    Ewk_Geolocation* geolocation;
+    Eina_List* geolocationPermissionRequests;
+#endif
+
+#if ENABLE(TIZEN_ISF_PORT)
+    Eina_List* imfContextList;
+    Ecore_IMF_Context* imfContext;
+#endif
+
+    bool suspendRequested;
+    bool suspendedPainting;
+    bool suspendedResources;
+
+#if ENABLE(TIZEN_NOTIFICATIONS)
+    Eina_List* notifications;
+    Eina_List* notificationPermissionRequests;
+#endif
+#if ENABLE(TIZEN_SQL_DATABASE)
+    Ewk_Context_Exceeded_Quota* exceededDatabaseQuota;
+#endif
+    WebPopupMenuProxyEfl* popupMenuProxy;
+    Eina_List* popupMenuItems;
+#if ENABLE(TIZEN_WEBKIT2_POPUP_INTERNAL)
+    Ewk_Popup_Picker* popupPicker;
+#endif
+
+    bool isVerticalEdge;
+    bool isHorizontalEdge;
+#if ENABLE(TIZEN_WEBKIT2_FOCUS_RING)
+    OwnPtr<FocusRing> focusRing;
+#endif // #if ENABLE(TIZEN_WEBKIT2_FOCUS_RING)
+
+#if ENABLE(TIZEN_GESTURE)
+    OwnPtr<GestureRecognizer> gestureRecognizer;
+    OwnPtr<GestureClient> gestureClient;
+#if ENABLE(TOUCH_EVENTS)
+    Evas_Coord_Point touchDownPoint;
+    bool exceedTouchMoveThreshold;
+    bool wasHandledTouchStart;
+    bool wasHandledTouchMove;
+#endif // #if ENABLE(TOUCH_EVENTS)
+    bool holdHorizontalPanning;
+    bool holdVerticalPanning;
+#endif // #if ENABLE(TIZEN_GESTURE)
+#if ENABLE(TIZEN_WEBKIT2_TILED_SCROLLBAR)
+    bool mainFrameScrollbarVisibility;
+#endif
+
+#if ENABLE(TIZEN_RUNTIME_BACKEND_SELECTION)
+    Ecore_Animator* compositionAnimator;
+#endif
+
+#if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION)
+    const char* selectedText;
+#endif
+#if ENABLE(TIZEN_DATALIST_ELEMENT)
+    Eina_List* dataList;
+#endif
+#if ENABLE(TIZEN_SCREEN_ORIENTATION_SUPPORT_INTERNAL)
+    struct {
+        Ewk_Orientation_Lock_Cb callback;
+        void* data;
+    } orientationLock;
+#endif
+#if ENABLE(TIZEN_WEBKIT2_CREATE_VIEW_WITH_CREATED_PAGE_GROUP_WITH_IDENTIFIER)
+    RefPtr<WebPageGroup> pageGroup;
+#endif
+#endif // #if OS(TIZEN)
+
+    _Ewk_View_Private_Data()
+        : uri(0)
+        , title(0)
+        , theme(0)
+        , customEncoding(0)
+        , cursorGroup(0)
+        , cursorObject(0)
+#if ENABLE(TIZEN_INPUT_COLOR_TYPE) // wait for upstream
+        , colorPickerResultListener(0)
+#endif
+#if ENABLE(TOUCH_EVENTS)
+        , areTouchEventsEnabled(false)
+#endif
+#ifdef HAVE_ECORE_X
+        , isUsingEcoreX(false)
+#endif
+#if USE(ACCELERATED_COMPOSITING)
+        , evasGl(0)
+        , evasGlContext(0)
+        , evasGlSurface(0)
+#endif
+    { }
+
+    ~_Ewk_View_Private_Data()
+    {
+        eina_stringshare_del(uri);
+        eina_stringshare_del(title);
+        eina_stringshare_del(theme);
+        eina_stringshare_del(customEncoding);
+        _ewk_view_priv_loading_resources_clear(loadingResourcesMap);
+
+        if (cursorObject)
+            evas_object_del(cursorObject);
+
+#if ENABLE(TIZEN_RUNTIME_BACKEND_SELECTION)
+        if (compositionAnimator) {
+            ecore_animator_del(compositionAnimator);
+            compositionAnimator = 0;
+        }
+#endif
+
+    }
+};
+
+#if OS(TIZEN)
+struct _Ewk_View_Callback_Context {
+    union {
+        Ewk_Web_App_Capable_Get_Callback webAppCapableCallback;
+        Ewk_Web_App_Icon_URL_Get_Callback webAppIconURLCallback;
+        Ewk_Web_App_Icon_URLs_Get_Callback webAppIconURLsCallback;
+#if ENABLE(TIZEN_WEB_STORAGE) && ENABLE(TIZEN_WEBKIT2_NUMBER_TYPE_SUPPORT)
+        Ewk_Web_Storage_Quota_Get_Callback webStorageQuotaCallback;
+#endif
+        Ewk_View_Script_Execute_Callback scriptExecuteCallback;
+        Ewk_View_Plain_Text_Get_Callback plainTextGetCallback;
+#if ENABLE(TIZEN_SUPPORT_MHTML)
+        Ewk_View_MHTML_Data_Get_Callback mhtmlDataGetCallback;
+#endif
+        Ewk_View_JavaScript_Alert_Callback javascriptAlertCallback;
+        Ewk_View_JavaScript_Confirm_Callback javascriptConfirmCallback;
+        Ewk_View_JavaScript_Prompt_Callback javascriptPromptCallback;
+#if ENABLE(TIZEN_SUPPORT_BEFORE_UNLOAD_CONFIRM_PANEL)
+        Ewk_View_Before_Unload_Confirm_Panel_Callback beforeUnloadConfirmPanelCallback;
+#endif
+        Ewk_View_Open_Panel_Callback openPanelCallback;
+    };
+
+    Evas_Object* ewkView;
+    void* userData;
+};
+#endif // #if OS(TIZEN)
+
 #define EWK_VIEW_TYPE_CHECK(ewkView, result)                                   \
     bool result = true;                                                        \
     do {                                                                       \
-        if (!ewkView) {                                                        \
-            EINA_LOG_CRIT("null is not a ewk_view");                           \
-            result = false;                                                    \
-            break;                                                             \
-        }                                                                      \
         const char* _tmp_otype = evas_object_type_get(ewkView);                \
         const Evas_Smart* _tmp_s = evas_object_smart_smart_get(ewkView);       \
         if (EINA_UNLIKELY(!_tmp_s)) {                                          \
@@ -204,14 +443,53 @@ static const char EWK_VIEW_TYPE_STR[] = "EWK2_View";
     EWK_VIEW_TYPE_CHECK(ewkView, _tmp_result);                                 \
     Ewk_View_Smart_Data* smartData = 0;                                        \
     if (_tmp_result)                                                           \
-        smartData = (Ewk_View_Smart_Data*)evas_object_smart_data_get(ewkView)
+        smartData = (Ewk_View_Smart_Data*)evas_object_smart_data_get(ewkView);
 
 #define EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, ...)                     \
     EWK_VIEW_SD_GET(ewkView, smartData);                                       \
+    if (!smartData) {                                                          \
+        EINA_LOG_CRIT("no smart data for object %p (%s)",                      \
+                 ewkView, evas_object_type_get(ewkView));                      \
+        return __VA_ARGS__;                                                    \
+    }
+
+#define EWK_VIEW_PRIV_GET(smartData, priv)                                     \
+    Ewk_View_Private_Data* priv = smartData->priv
+
+#define EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, ...)                      \
+    if (!smartData) {                                                          \
+        EINA_LOG_CRIT("smart data is null");                                   \
+        return __VA_ARGS__;                                                    \
+    }                                                                          \
+    EWK_VIEW_PRIV_GET(smartData, priv);                                        \
+    if (!priv) {                                                               \
+        EINA_LOG_CRIT("no private data for object %p (%s)",                    \
+                 smartData->self, evas_object_type_get(smartData->self));      \
+        return __VA_ARGS__;                                                    \
+    }
+
+#define EWK_VIEW_IMPL_GET_BY_SD_OR_RETURN(smartData, impl, ...)                \
+    if (!smartData) {                                                          \
+        EINA_LOG_CRIT("smart data is null");                                   \
+        return __VA_ARGS__;                                                    \
+    }                                                                          \
+    EwkViewImpl* impl = smartData->ewkViewImpl;                                \
+    do {                                                                       \
+        if (!impl) {                                                           \
+            EINA_LOG_CRIT("no private data for object %p (%s)",                \
+                smartData->self, evas_object_type_get(smartData->self));       \
+            return __VA_ARGS__;                                                \
+        }                                                                      \
+    } while (0)
+
+#define EWK_VIEW_IMPL_GET_OR_RETURN(ewkView, impl, ...)                        \
+    EwkViewImpl* impl = 0;                                                     \
     do {                                                                       \
-        if (!smartData) {                                                      \
-            EINA_LOG_CRIT("no smart data for object %p (%s)",                  \
-                     ewkView, evas_object_type_get(ewkView));                  \
+        EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, __VA_ARGS__);            \
+        impl = smartData->ewkViewImpl;                                         \
+        if (!impl) {                                                           \
+            EINA_LOG_CRIT("no private data for object %p (%s)",                \
+                smartData->self, evas_object_type_get(smartData->self));       \
             return __VA_ARGS__;                                                \
         }                                                                      \
     } while (0)
@@ -251,6 +529,11 @@ static Eina_Bool _ewk_view_data_list_hide(Ewk_View_Smart_Data*, Ewk_Input_Type);
 static Eina_Bool _ewk_input_picker_color_request(Ewk_View_Smart_Data*, int, int, int, int);
 static Eina_Bool _ewk_input_picker_color_dismiss(Ewk_View_Smart_Data*);
 #endif
+
+#if ENABLE(TIZEN_ISF_PORT)
+static void _ewk_view_imf_context_destroy(Ewk_View_Private_Data*);
+#endif
+
 #endif // #if OS(TIZEN)
 
 static void _ewk_view_smart_changed(Ewk_View_Smart_Data* smartData)
@@ -261,66 +544,57 @@ static void _ewk_view_smart_changed(Ewk_View_Smart_Data* smartData)
     evas_object_smart_changed(smartData->self);
 }
 
-static void _ewk_view_on_favicon_changed(const char* pageURL, void* eventInfo)
-{
-    Evas_Object* ewkView = static_cast<Evas_Object*>(eventInfo);
-    EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl);
-
-    const char* viewURL = ewk_view_url_get(ewkView);
-    if (!viewURL || strcasecmp(viewURL, pageURL))
-        return;
-
-    impl->informIconChange();
-}
-
 // Default Event Handling.
 static Eina_Bool _ewk_view_smart_focus_in(Ewk_View_Smart_Data* smartData)
 {
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false)
     TIZEN_LOGI("");
 
 #if OS(TIZEN)
-    impl->pageClient->setViewFocused(true);
+    priv->pageClient->setViewFocused(true);
 #endif // #if OS(TIZEN)
-    impl->pageProxy->viewStateDidChange(WebPageProxy::ViewIsFocused | WebPageProxy::ViewWindowIsActive);
+    priv->pageClient->page()->viewStateDidChange(WebPageProxy::ViewIsFocused | WebPageProxy::ViewWindowIsActive);
 #if ENABLE(TIZEN_ISF_PORT)
-    if (impl->inputMethodContext())
-        impl->inputMethodContext()->onFocusIn();
+    if (priv->imfContext) {
+        ecore_imf_context_focus_in(priv->imfContext);
+        ecore_imf_context_input_panel_show(priv->imfContext);
+    }
 #endif
     return true;
 }
 
 static Eina_Bool _ewk_view_smart_focus_out(Ewk_View_Smart_Data* smartData)
 {
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
     TIZEN_LOGI("");
 
 #if OS(TIZEN)
 #if ENABLE(TIZEN_ISF_PORT)
     // Keypad should be hidden rapidly when moving focus on elementary
     // because Ecore-ime doesn't support it.
-    if (impl->inputMethodContext())
-        impl->inputMethodContext()->onFocusOut();
+    if (priv->imfContext) {
+        ecore_imf_context_input_panel_hide(priv->imfContext);
+        ecore_imf_context_focus_out(priv->imfContext);
+    }
 #endif
 
 #if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION)
-    if (impl->pageClient->isTextSelectionMode())
-        impl->pageClient->setIsTextSelectionMode(false);
+    if (priv->pageClient->isTextSelectionMode())
+        priv->pageClient->setIsTextSelectionMode(false);
 #endif
 
 #if ENABLE(TIZEN_CONTEXT_MENU_WEBKIT_2)
-    if (impl->pageClient->isContextMenuVisible())
-        impl->pageProxy->hideContextMenu();
+    if (priv->pageClient->isContextMenuVisible())
+        priv->pageClient->page()->hideContextMenu();
 #endif
 
 #if ENABLE(TIZEN_WEBKIT2_CONTEXT_MENU_CLIPBOARD)
-    impl->pageClient->clearClipboardSelectionHandler();
+    priv->pageClient->clearClipboardSelectionHandler();
 #endif
 
 #if ENABLE(TIZEN_DRAG_SUPPORT)
-    if (impl->pageClient->isDragMode())
-        impl->pageClient->setDragMode(false);
+    if (priv->pageClient->isDragMode())
+        priv->pageClient->setDragMode(false);
 #endif
 
 #if ENABLE(TIZEN_WEBKIT2_FORM_DATABASE)
@@ -328,68 +602,77 @@ static Eina_Bool _ewk_view_smart_focus_out(Ewk_View_Smart_Data* smartData)
         smartData->api->formdata_candidate_hide(smartData);
 #endif
 
-    impl->pageClient->setViewFocused(false);
+    priv->pageClient->setViewFocused(false);
 #endif // #if OS(TIZEN)
-    impl->pageProxy->viewStateDidChange(WebPageProxy::ViewIsFocused | WebPageProxy::ViewWindowIsActive);
+    priv->pageClient->page()->viewStateDidChange(WebPageProxy::ViewIsFocused | WebPageProxy::ViewWindowIsActive);
     return true;
 }
 
 static Eina_Bool _ewk_view_smart_mouse_wheel(Ewk_View_Smart_Data* smartData, const Evas_Event_Mouse_Wheel* wheelEvent)
 {
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false)
+    EWK_VIEW_IMPL_GET_BY_SD_OR_RETURN(smartData, impl, false);
 
-    impl->page()->handleWheelEvent(NativeWebWheelEvent(wheelEvent, impl->transformFromScene(), impl->transformToScreen()));
+    // FIXME: impl->page() is used in the webkit opensource, but tizen webkit does not use it yet.
+    //impl->page()->handleWheelEvent(NativeWebWheelEvent(wheelEvent, impl->transformFromScene(), impl->transformToScreen()));
+    priv->pageClient->page()->handleWheelEvent(NativeWebWheelEvent(wheelEvent, impl->transformFromScene(), impl->transformToScreen()));
     return true;
 }
 
 static Eina_Bool _ewk_view_smart_mouse_down(Ewk_View_Smart_Data* smartData, const Evas_Event_Mouse_Down* downEvent)
 {
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false)
+    EWK_VIEW_IMPL_GET_BY_SD_OR_RETURN(smartData, impl, false);
 
-    impl->page()->handleMouseEvent(NativeWebMouseEvent(downEvent, impl->transformFromScene(), impl->transformToScreen()));
+    // FIXME: impl->page() is used in the webkit opensource, but tizen webkit does not use it yet.
+    //impl->page()->handleMouseEvent(NativeWebMouseEvent(downEvent, impl->transformFromScene(), impl->transformToScreen()));
+    priv->pageClient->page()->handleMouseEvent(NativeWebMouseEvent(downEvent, impl->transformFromScene(), impl->transformToScreen()));
     return true;
 }
 
 static Eina_Bool _ewk_view_smart_mouse_up(Ewk_View_Smart_Data* smartData, const Evas_Event_Mouse_Up* upEvent)
 {
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
-
-    impl->page()->handleMouseEvent(NativeWebMouseEvent(upEvent, impl->transformFromScene(), impl->transformToScreen()));
-
-    InputMethodContextEfl* inputMethodContext = impl->inputMethodContext();
-    if (inputMethodContext)
-        inputMethodContext->handleMouseUpEvent(upEvent);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false)
+    EWK_VIEW_IMPL_GET_BY_SD_OR_RETURN(smartData, impl, false);
 
+    // FIXME: impl->page() is used in the webkit opensource, but tizen webkit does not use it yet.
+    //impl->page()->handleMouseEvent(NativeWebMouseEvent(upEvent, impl->transformFromScene(), impl->transformToScreen()));
+    priv->pageClient->page()->handleMouseEvent(NativeWebMouseEvent(upEvent, impl->transformFromScene(), impl->transformToScreen()));
     return true;
 }
 
 static Eina_Bool _ewk_view_smart_mouse_move(Ewk_View_Smart_Data* smartData, const Evas_Event_Mouse_Move* moveEvent)
 {
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false)
+    EWK_VIEW_IMPL_GET_BY_SD_OR_RETURN(smartData, impl, false);
 
     // FIXME: impl->page() is used in the webkit opensource, but tizen webkit does not use it yet.
-    impl->page()->handleMouseEvent(NativeWebMouseEvent(moveEvent, impl->transformFromScene(), impl->transformToScreen()));
+    //impl->page()->handleMouseEvent(NativeWebMouseEvent(moveEvent, impl->transformFromScene(), impl->transformToScreen()));
+    priv->pageClient->page()->handleMouseEvent(NativeWebMouseEvent(moveEvent, impl->transformFromScene(), impl->transformToScreen()));
     return true;
 }
 
 static Eina_Bool _ewk_view_smart_key_down(Ewk_View_Smart_Data* smartData, const Evas_Event_Key_Down* downEvent)
 {
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false)
 
-    bool isFiltered = false;
-    InputMethodContextEfl* inputMethodContext = impl->inputMethodContext();
-    if (inputMethodContext)
-        inputMethodContext->handleKeyDownEvent(downEvent, &isFiltered);
+#if ENABLE(TIZEN_ISF_PORT)
+    Ecore_IMF_Event IMFEvent;
+    ecore_imf_evas_event_key_down_wrap(const_cast<Evas_Event_Key_Down*>(downEvent), &IMFEvent.key_down);
+    bool filtered = ecore_imf_context_filter_event(priv->imfContext, ECORE_IMF_EVENT_KEY_DOWN, &IMFEvent);
 
-    impl->pageProxy->handleKeyboardEvent(NativeWebKeyboardEvent(downEvent, isFiltered));
+    priv->pageClient->page()->handleKeyboardEvent(NativeWebKeyboardEvent(downEvent, filtered));
+#else
+    priv->pageClient->page()->handleKeyboardEvent(NativeWebKeyboardEvent(downEvent));
+#endif // #if ENABLE(TIZEN_ISF_PORT)
     return true;
 }
 
 static Eina_Bool _ewk_view_smart_key_up(Ewk_View_Smart_Data* smartData, const Evas_Event_Key_Up* upEvent)
 {
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false)
 
-    impl->pageProxy->handleKeyboardEvent(NativeWebKeyboardEvent(upEvent));
+    priv->pageClient->page()->handleKeyboardEvent(NativeWebKeyboardEvent(upEvent));
     return true;
 }
 
@@ -397,26 +680,27 @@ static Eina_Bool _ewk_view_smart_key_up(Ewk_View_Smart_Data* smartData, const Ev
 static Eina_Bool _ewk_view_smart_gesture_start(Ewk_View_Smart_Data* smartData, const Ewk_Event_Gesture* event)
 {
 #if ENABLE(TIZEN_GESTURE)
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false)
+    EWK_VIEW_IMPL_GET_BY_SD_OR_RETURN(smartData, impl, false);
 
 #if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION) && ENABLE(TIZEN_WEBKIT2_FOR_MOVING_TEXT_SELECTION_HANDLE_FROM_OSP)
-    if (impl->pageClient->isTextSelectionMode() && impl->pageClient->isTextSelectionHandleDowned())
+    if (priv->pageClient->isTextSelectionMode() && priv->pageClient->isTextSelectionHandleDowned())
         return true;
 #endif
 
 #if ENABLE(TIZEN_WEBKIT2_FOCUS_RING)
-    if (impl->focusRing) {
+    if (priv->focusRing) {
         if (event->type == EWK_GESTURE_TAP && event->count == 1) {
-            impl->focusRing->requestToShow(IntPoint(event->position.x, event->position.y));
+            priv->focusRing->requestToShow(IntPoint(event->position.x, event->position.y));
         } else if (event->type == EWK_GESTURE_PAN) {
-            if (impl->exceedTouchMoveThreshold)
-                impl->focusRing->hide();
+            if (priv->exceedTouchMoveThreshold)
+                priv->focusRing->hide();
         } else {
             if (event->type != EWK_GESTURE_LONG_PRESS) {
 #if ENABLE(TIZEN_CONTEXT_MENU_WEBKIT_2)
-                if (!impl->pageClient->isContextMenuVisible())
+                if (!priv->pageClient->isContextMenuVisible())
 #endif
-                    impl->focusRing->hide();
+                    priv->focusRing->hide();
             }
         }
     }
@@ -429,26 +713,26 @@ static Eina_Bool _ewk_view_smart_gesture_start(Ewk_View_Smart_Data* smartData, c
 
     switch (event->type) {
     case EWK_GESTURE_TAP:
-        impl->gestureClient->startTap(IntPoint(event->position.x, event->position.y));
+        priv->gestureClient->startTap(IntPoint(event->position.x, event->position.y));
         break;
     case EWK_GESTURE_LONG_PRESS: {
 #if ENABLE(TIZEN_WEBKIT2_HIT_TEST)
 #if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION)
-        if (ewk_settings_text_selection_enabled_get(impl->settings()))
-            impl->pageClient->setIsTextSelectionMode(false);
+        if (ewk_settings_text_selection_enabled_get(priv->settings.get()))
+            priv->pageClient->setIsTextSelectionMode(false);
 #endif
         IntPoint scenePoint(event->position.x, event->position.y);
         IntPoint contentsPoint = impl->transformFromScene().mapPoint(scenePoint);
-        WebHitTestResult::Data hitTestResultData = impl->pageProxy->hitTestResultAtPoint(contentsPoint);
+        WebHitTestResult::Data hitTestResultData = priv->pageClient->page()->hitTestResultAtPoint(contentsPoint);
 #if ENABLE(TIZEN_DRAG_SUPPORT)
         // 1. Check to start dragging.
         if (hitTestResultData.isDragSupport) {
-            impl->pageClient->setDragPoint(scenePoint);
+            priv->pageClient->setDragPoint(scenePoint);
 #if ENABLE(TIZEN_WEBKIT2_FOCUS_RING)
-            if (impl->focusRing)
-                impl->focusRing->show(IntRect(), true);
+            if (priv->focusRing)
+                priv->focusRing->show(IntRect(), true);
 #endif
-            impl->gestureClient->showContextMenu(scenePoint);
+            priv->gestureClient->showContextMenu(scenePoint);
             break;
         }
 #endif
@@ -457,15 +741,15 @@ static Eina_Bool _ewk_view_smart_gesture_start(Ewk_View_Smart_Data* smartData, c
             || !hitTestResultData.absoluteLinkURL.isEmpty()
             || !hitTestResultData.absoluteMediaURL.isEmpty()) {
 #if ENABLE(TIZEN_WEBKIT2_FOCUS_RING)
-            if (impl->focusRing)
-                impl->focusRing->show(IntRect(), true);
+            if (priv->focusRing)
+                priv->focusRing->show(IntRect(), true);
 #endif
-            impl->gestureClient->showContextMenu(scenePoint);
+            priv->gestureClient->showContextMenu(scenePoint);
             break;
         }
 #if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION)
         // 3. Check for text selection.
-        if (ewk_settings_text_selection_enabled_get(impl->settings())) {
+        if (ewk_settings_text_selection_enabled_get(priv->settings.get())) {
             // Process gesture_end(EWK_GESTURE_TAP) to activate the editing if node under point is editable.
             if (hitTestResultData.context & WebHitTestResult::HitTestResultContextEditable) {
                 if (smartData->api && smartData->api->gesture_end) {
@@ -474,9 +758,9 @@ static Eina_Bool _ewk_view_smart_gesture_start(Ewk_View_Smart_Data* smartData, c
                 }
             }
 
-            if (impl->pageClient->textSelectionDown(scenePoint)) {
-                impl->gestureClient->setGestureEnabled(false);
-                impl->feedCancelTouchEvents();
+            if (priv->pageClient->textSelectionDown(scenePoint)) {
+                priv->gestureClient->setGestureEnabled(false);
+                ewkViewHandleTouchEvent(smartData->self, EWK_TOUCH_CANCEL);
             }
         }
 #endif
@@ -484,14 +768,14 @@ static Eina_Bool _ewk_view_smart_gesture_start(Ewk_View_Smart_Data* smartData, c
 #endif // #if ENABLE(TIZEN_WEBKIT2_HIT_TEST)
     }
     case EWK_GESTURE_PAN:
-        impl->gestureClient->startPan(IntPoint(event->position.x, event->position.y));
+        priv->gestureClient->startPan(IntPoint(event->position.x, event->position.y));
         break;
     case EWK_GESTURE_FLICK:
-        impl->gestureClient->startFlick(IntPoint(event->position.x, event->position.y), IntPoint(event->velocity.x, event->velocity.y));
+        priv->gestureClient->startFlick(IntPoint(event->position.x, event->position.y), IntPoint(event->velocity.x, event->velocity.y));
         break;
     case EWK_GESTURE_PINCH:
-        if (impl->pageClient->viewportConstraints().userScalable)
-            impl->gestureClient->startPinch(IntPoint(event->position.x, event->position.y), event->scale);
+        if (priv->pageClient->viewportConstraints().userScalable)
+            priv->gestureClient->startPinch(IntPoint(event->position.x, event->position.y), event->scale);
         break;
     default:
         ASSERT_NOT_REACHED();
@@ -507,19 +791,19 @@ static Eina_Bool _ewk_view_smart_gesture_start(Ewk_View_Smart_Data* smartData, c
 static Eina_Bool _ewk_view_smart_gesture_end(Ewk_View_Smart_Data* smartData, const Ewk_Event_Gesture* event)
 {
 #if ENABLE(TIZEN_GESTURE)
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false)
 
 #if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION) && ENABLE(TIZEN_WEBKIT2_FOR_MOVING_TEXT_SELECTION_HANDLE_FROM_OSP)
-    if (impl->pageClient->isTextSelectionMode() && impl->pageClient->isTextSelectionHandleDowned())
+    if (priv->pageClient->isTextSelectionMode() && priv->pageClient->isTextSelectionHandleDowned())
         return true;
 #endif
 
 #if ENABLE(TIZEN_WEBKIT2_FOCUS_RING)
-    if (impl->focusRing) {
+    if (priv->focusRing) {
 #if ENABLE(TIZEN_CONTEXT_MENU_WEBKIT_2)
-        if (!impl->pageClient->isContextMenuVisible())
+        if (!priv->pageClient->isContextMenuVisible())
 #endif
-            impl->focusRing->hide();
+            priv->focusRing->hide();
     }
 #endif
 
@@ -527,36 +811,36 @@ static Eina_Bool _ewk_view_smart_gesture_end(Ewk_View_Smart_Data* smartData, con
     case EWK_GESTURE_TAP:
         if (event->count == 1) {
 #if ENABLE(TIZEN_DRAG_SUPPORT)
-        if (impl->pageClient->isDragMode())
-            impl->pageClient->setDragMode(false);
+        if (priv->pageClient->isDragMode())
+            priv->pageClient->setDragMode(false);
 #endif
-            impl->gestureClient->endTap(IntPoint(event->position.x, event->position.y));
+            priv->gestureClient->endTap(IntPoint(event->position.x, event->position.y));
 #if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION)
-            if (impl->pageClient->isTextSelectionMode())
-                impl->pageClient->setIsTextSelectionMode(false);
+            if (priv->pageClient->isTextSelectionMode())
+                priv->pageClient->setIsTextSelectionMode(false);
 #endif
 #if ENABLE(TIZEN_ISF_PORT)
             evas_object_focus_set(smartData->self, true);
 #endif
         } else if (event->count == 2)
-            impl->gestureClient->endDoubleTap(IntPoint(event->position.x, event->position.y));
+            priv->gestureClient->endDoubleTap(IntPoint(event->position.x, event->position.y));
         break;
     case EWK_GESTURE_LONG_PRESS:
 #if ENABLE(TIZEN_DRAG_SUPPORT)
-        if (impl->pageClient->isDragMode())
-            impl->pageClient->setDragMode(false);
+        if (priv->pageClient->isDragMode())
+            priv->pageClient->setDragMode(false);
 #endif
         // Prcess endTap for LONG_PRESS gesture if text-selection and context menu did not work
-        impl->gestureClient->endTap(IntPoint(event->position.x, event->position.y));
+        priv->gestureClient->endTap(IntPoint(event->position.x, event->position.y));
         break;
     case EWK_GESTURE_PAN:
-        impl->gestureClient->endPan(IntPoint(event->position.x, event->position.y));
+        priv->gestureClient->endPan(IntPoint(event->position.x, event->position.y));
         break;
     case EWK_GESTURE_FLICK:
-        impl->gestureClient->endFlick(IntPoint(event->position.x, event->position.y), IntPoint(event->velocity.x, event->velocity.y));
+        priv->gestureClient->endFlick(IntPoint(event->position.x, event->position.y), IntPoint(event->velocity.x, event->velocity.y));
         break;
     case EWK_GESTURE_PINCH:
-        impl->gestureClient->endPinch(IntPoint(event->position.x, event->position.y), event->scale);
+        priv->gestureClient->endPinch(IntPoint(event->position.x, event->position.y), event->scale);
         break;
     default:
         ASSERT_NOT_REACHED();
@@ -572,29 +856,29 @@ static Eina_Bool _ewk_view_smart_gesture_end(Ewk_View_Smart_Data* smartData, con
 static Eina_Bool _ewk_view_smart_gesture_move(Ewk_View_Smart_Data* smartData, const Ewk_Event_Gesture* event)
 {
 #if ENABLE(TIZEN_GESTURE)
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false)
 
 #if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION) && ENABLE(TIZEN_WEBKIT2_FOR_MOVING_TEXT_SELECTION_HANDLE_FROM_OSP)
-    if (impl->pageClient->isTextSelectionMode() && impl->pageClient->isTextSelectionHandleDowned())
+    if (priv->pageClient->isTextSelectionMode() && priv->pageClient->isTextSelectionHandleDowned())
         return true;
 #endif
 
 #if ENABLE(TIZEN_WEBKIT2_FOCUS_RING)
-    if (impl->focusRing && !(event->type == EWK_GESTURE_PAN && !impl->exceedTouchMoveThreshold))
-        impl->focusRing->hide();
+    if (priv->focusRing && !(event->type == EWK_GESTURE_PAN && !priv->exceedTouchMoveThreshold))
+        priv->focusRing->hide();
 #endif
 
     switch (event->type) {
     case EWK_GESTURE_PAN:
-        impl->gestureClient->movePan(IntPoint(event->position.x, event->position.y));
+        priv->gestureClient->movePan(IntPoint(event->position.x, event->position.y));
         break;
     case EWK_GESTURE_TAP:
     case EWK_GESTURE_LONG_PRESS:
     case EWK_GESTURE_FLICK:
         break;
     case EWK_GESTURE_PINCH:
-        if (impl->pageClient->viewportConstraints().userScalable)
-            impl->gestureClient->movePinch(IntPoint(event->position.x, event->position.y), event->scale);
+        if (priv->pageClient->viewportConstraints().userScalable)
+            priv->gestureClient->movePinch(IntPoint(event->position.x, event->position.y), event->scale);
         break;
     default:
         ASSERT_NOT_REACHED();
@@ -634,7 +918,34 @@ static void _ewk_view_on_mouse_wheel(void* data, Evas* canvas, Evas_Object* ewkV
     smartData->api->mouse_wheel(smartData, wheelEvent);
 }
 
-static void _ewk_view_on_key_down(void* data, Evas*, Evas_Object*, void* eventInfo)
+static void _ewk_view_on_mouse_down(void* data, Evas* canvas, Evas_Object* ewkView, void* eventInfo)
+{
+    Evas_Event_Mouse_Down* downEvent = static_cast<Evas_Event_Mouse_Down*>(eventInfo);
+    Ewk_View_Smart_Data* smartData = static_cast<Ewk_View_Smart_Data*>(data);
+    EINA_SAFETY_ON_NULL_RETURN(smartData->api);
+    EINA_SAFETY_ON_NULL_RETURN(smartData->api->mouse_down);
+    smartData->api->mouse_down(smartData, downEvent);
+}
+
+static void _ewk_view_on_mouse_up(void* data, Evas* canvas, Evas_Object* ewkView, void* eventInfo)
+{
+    Evas_Event_Mouse_Up* upEvent = static_cast<Evas_Event_Mouse_Up*>(eventInfo);
+    Ewk_View_Smart_Data* smartData = static_cast<Ewk_View_Smart_Data*>(data);
+    EINA_SAFETY_ON_NULL_RETURN(smartData->api);
+    EINA_SAFETY_ON_NULL_RETURN(smartData->api->mouse_up);
+    smartData->api->mouse_up(smartData, upEvent);
+}
+
+static void _ewk_view_on_mouse_move(void* data, Evas* canvas, Evas_Object* ewkView, void* eventInfo)
+{
+    Evas_Event_Mouse_Move* moveEvent = static_cast<Evas_Event_Mouse_Move*>(eventInfo);
+    Ewk_View_Smart_Data* smartData = static_cast<Ewk_View_Smart_Data*>(data);
+    EINA_SAFETY_ON_NULL_RETURN(smartData->api);
+    EINA_SAFETY_ON_NULL_RETURN(smartData->api->mouse_move);
+    smartData->api->mouse_move(smartData, moveEvent);
+}
+
+static void _ewk_view_on_key_down(void* data, Evas* canvas, Evas_Object* ewkView, void* eventInfo)
 {
     Evas_Event_Key_Down* downEvent = static_cast<Evas_Event_Key_Down*>(eventInfo);
     Ewk_View_Smart_Data* smartData = static_cast<Ewk_View_Smart_Data*>(data);
@@ -652,76 +963,121 @@ static void _ewk_view_on_key_up(void* data, Evas* canvas, Evas_Object* ewkView,
     smartData->api->key_up(smartData, upEvent);
 }
 
-static void _ewk_view_on_show(void* data, Evas*, Evas_Object*, void* /*eventInfo*/)
+#if ENABLE(TOUCH_EVENTS)
+static inline void _ewk_view_feed_touch_event_using_touch_point_list_of_evas(Evas_Object* ewkView, Ewk_Touch_Event_Type type)
 {
-    Ewk_View_Smart_Data* smartData = static_cast<Ewk_View_Smart_Data*>(data);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl);
-    impl->pageProxy->viewStateDidChange(WebPageProxy::ViewIsVisible);
+    EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
+
+    unsigned count = evas_touch_point_list_count(smartData->base.evas);
+    if (!count)
+        return;
+
+    Eina_List* points = 0;
+    for (unsigned i = 0; i < count; ++i) {
+        Ewk_Touch_Point* point = new Ewk_Touch_Point;
+        point->id = evas_touch_point_list_nth_id_get(smartData->base.evas, i);
+        evas_touch_point_list_nth_xy_get(smartData->base.evas, i, &point->x, &point->y);
+        point->state = evas_touch_point_list_nth_state_get(smartData->base.evas, i);
+#if ENABLE(TOUCH_EVENTS) && ENABLE(TIZEN_GESTURE)
+        if (type == EWK_TOUCH_CANCEL)
+            point->state = EVAS_TOUCH_POINT_CANCEL;
+#endif
+        points = eina_list_append(points, point);
+    }
+
+    ewk_view_feed_touch_event(ewkView, type, points, evas_key_modifier_get(smartData->base.evas));
+
+    void* data;
+    EINA_LIST_FREE(points, data)
+        delete static_cast<Ewk_Touch_Point*>(data);
 }
 
-static void _ewk_view_on_hide(void* data, Evas*, Evas_Object*, void* /*eventInfo*/)
+static void _ewk_view_on_touch_down(void* data, Evas* canvas, Evas_Object* ewkView, void* eventInfo)
 {
-    Ewk_View_Smart_Data* smartData = static_cast<Ewk_View_Smart_Data*>(data);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl);
+    _ewk_view_feed_touch_event_using_touch_point_list_of_evas(ewkView, EWK_TOUCH_START);
+}
+
+static void _ewk_view_on_touch_up(void* data, Evas* canvas, Evas_Object* ewkView, void* eventInfo)
+{
+    _ewk_view_feed_touch_event_using_touch_point_list_of_evas(ewkView, EWK_TOUCH_END);
+}
+
+static void _ewk_view_on_touch_move(void* data, Evas* canvas, Evas_Object* ewkView, void* eventInfo)
+{
+    _ewk_view_feed_touch_event_using_touch_point_list_of_evas(ewkView, EWK_TOUCH_MOVE);
+}
 
-    // This call may look wrong, but we really need to pass ViewIsVisible here.
-    // viewStateDidChange() itself is responsible for actually setting the visibility to Visible or Hidden
-    // depending on what WebPageProxy::isViewVisible() returns, this simply triggers the process.
-    impl->pageProxy->viewStateDidChange(WebPageProxy::ViewIsVisible);
+#if OS(TIZEN)
+void ewkViewHandleTouchEvent(Evas_Object* ewkView, Ewk_Touch_Event_Type type)
+{
+    _ewk_view_feed_touch_event_using_touch_point_list_of_evas(ewkView, type);
 }
+#endif
+#endif
 
 #if OS(TIZEN)
 #if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION)
 Eina_Bool _ewk_view_text_selection_down(Ewk_View_Smart_Data* smartData, int x, int y)
 {
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
 
-    return impl->pageClient->textSelectionDown(IntPoint(x, y), true);
+    return priv->pageClient->textSelectionDown(IntPoint(x, y), true);
 }
 
 Eina_Bool _ewk_view_text_selection_move(Ewk_View_Smart_Data* smartData, int x, int y)
 {
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
 
     IntPoint point(x, y);
-    impl->pageClient->textSelectionMove(point, true);
+    priv->pageClient->textSelectionMove(point, true);
 
     return true;
 }
 
 Eina_Bool _ewk_view_text_selection_up(Ewk_View_Smart_Data* smartData, int x, int y)
 {
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
 
     IntPoint point(x, y);
-    impl->pageClient->textSelectionUp(point, true);
+    priv->pageClient->textSelectionUp(point, true);
 
     return true;
 }
 #endif
 
+#if ENABLE(TIZEN_DATALIST_ELEMENT)
+static void _ewk_view_data_list_del(Eina_List* dataList)
+{
+    EINA_SAFETY_ON_NULL_RETURN(dataList);
+
+    void* item;
+    EINA_LIST_FREE(dataList, item)
+        eina_stringshare_del(static_cast<char*>(item));
+}
+#endif
+
 #if ENABLE(TIZEN_WEBKIT2_FORM_DATABASE)
 Eina_Bool _ewk_view_smart_formdata_candidate_show(Ewk_View_Smart_Data* smartData, int x, int y, int w, int h)
 {
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
 
-    impl->pageClient->showFormDataCandidate(IntRect(x, y, w, h));
+    priv->pageClient->showFormDataCandidate(IntRect(x, y, w, h));
 
     return true;
 }
 
 Eina_Bool _ewk_view_smart_formdata_candidate_hide(Ewk_View_Smart_Data* smartData)
 {
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
 
-    impl->pageClient->hideFormDataCandidate();
+    priv->pageClient->hideFormDataCandidate();
 
     return true;
 }
 
 Eina_Bool _ewk_view_smart_formdata_candidate_update_data(Ewk_View_Smart_Data* smartData, Eina_List* dataList)
 {
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
 
     Vector<String> formData;
     Eina_List* list;
@@ -729,38 +1085,198 @@ Eina_Bool _ewk_view_smart_formdata_candidate_update_data(Ewk_View_Smart_Data* sm
     EINA_LIST_FOREACH(dataList, list, data)
         formData.append(String::fromUTF8(static_cast<char*>(data)));
 
-    impl->pageClient->updateFormDataCandidate(formData);
+    priv->pageClient->updateFormDataCandidate(formData);
 
     return true;
 }
 
 Eina_Bool _ewk_view_smart_formdata_candidate_is_showing(Ewk_View_Smart_Data* smartData)
 {
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
 
-    return impl->pageClient->isShowingFormDataCandidate();
+    return priv->pageClient->isShowingFormDataCandidate();
 }
 #endif
 
 #if ENABLE(TIZEN_SCREEN_READER)
 Eina_Bool _ewk_view_screen_reader_command_execute(Ewk_View_Smart_Data* smartData, unsigned int command, int data1, int data2)
 {
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
-
-    return ScreenReaderProxy::screenReader().executeCommand(impl, command, data1, data2);
+    return ScreenReaderProxy::screenReader().executeCommand(smartData->self, command, data1, data2);
 }
 #endif
 #endif // #if OS(TIZEN)
 
 static Evas_Smart_Class g_parentSmartClass = EVAS_SMART_CLASS_INIT_NULL;
 
-static void _ewk_view_impl_del(EwkViewImpl* impl)
+#if ENABLE(TIZEN_WEBKIT2_CREATE_VIEW_WITH_CREATED_PAGE_GROUP_WITH_IDENTIFIER)
+static uint64_t generatePageGroupIdentifierID()
+{
+    static uint64_t uniquePageGroupIdentifierID = 1;
+    return uniquePageGroupIdentifierID++;
+}
+#endif
+
+static Ewk_View_Private_Data* _ewk_view_priv_new(Ewk_View_Smart_Data* smartData)
 {
-    /* Unregister icon change callback */
-    Ewk_Favicon_Database* iconDatabase = impl->context->faviconDatabase();
-    iconDatabase->unwatchChanges(_ewk_view_on_favicon_changed);
+    Ewk_View_Private_Data* priv = new Ewk_View_Private_Data;
+    memset(priv, 0, sizeof(Ewk_View_Private_Data)); // FIXME : below code should be considered to move to constructor.
+#if OS(TIZEN)
+    priv->areMouseEventsEnabled = false;
+
+    priv->javascriptPopup = adoptPtr<JavaScriptPopup>(new JavaScriptPopup(smartData->self));
+    priv->openPanel = adoptPtr<OpenPanel>(new OpenPanel(smartData->self));
+
+#if ENABLE(TIZEN_INPUT_TAG_EXTENSION)
+    priv->inputPicker = adoptPtr<InputPicker>(new InputPicker(smartData->self));
+#endif // ENABLE(TIZEN_INPUT_TAG_EXTENSION)
+
+#if ENABLE(TIZEN_WEBKIT2_FOCUS_RING)
+    priv->focusRing = FocusRing::create(smartData->self);
+#endif // #if ENABLE(TIZEN_WEBKIT2_FOCUS_RING)
+
+#if ENABLE(TIZEN_GESTURE)
+    priv->gestureRecognizer = GestureRecognizer::create(smartData->self);
+    priv->gestureClient = GestureClient::create(smartData->ewkViewImpl);
+#endif // #if ENABLE(TIZEN_GESTURE)
+#if ENABLE(TIZEN_WEBKIT2_TILED_SCROLLBAR)
+    const char* hideScrollbar = getenv("TIZEN_WEBKIT2_TILED_SCROLLBAR_HIDE");
+    if (hideScrollbar && atoi(hideScrollbar) == 1)
+        priv->mainFrameScrollbarVisibility = false;
+    else
+        priv->mainFrameScrollbarVisibility = true;
+#endif
+
+#if ENABLE(TIZEN_DATALIST_ELEMENT)
+    priv->dataList = 0;
+#endif
 
-    delete impl;
+#if ENABLE(TIZEN_WEBKIT2_CREATE_VIEW_WITH_CREATED_PAGE_GROUP_WITH_IDENTIFIER)
+    String pageGroupIdentifierID = String::number(generatePageGroupIdentifierID());
+    String pageGroupIdentifier = String::format("PageGroup%s", pageGroupIdentifierID.utf8().data());
+
+    WKRetainPtr<WKStringRef> pageGroupIdentifierRef(AdoptWK, WKStringCreateWithUTF8CString(pageGroupIdentifier.utf8().data()));
+    priv->pageGroup = WebPageGroup::create(toWTFString(pageGroupIdentifierRef.get()));
+#endif
+
+    priv->suspendRequested = false;
+    priv->suspendedPainting = false;
+    priv->suspendedResources = false;
+#endif // #if OS(TIZEN)
+
+#ifdef HAVE_ECORE_X
+    priv->isUsingEcoreX = WebCore::isUsingEcoreX(smartData->base.evas);
+#endif
+
+    return priv;
+}
+
+static void _ewk_view_priv_loading_resources_clear(LoadingResourcesMap& loadingResourcesMap)
+{
+    // Clear the loadingResources HashMap.
+    LoadingResourcesMap::iterator it = loadingResourcesMap.begin();
+    LoadingResourcesMap::iterator end = loadingResourcesMap.end();
+    for ( ; it != end; ++it)
+        ewk_web_resource_unref(it->second);
+
+    loadingResourcesMap.clear();
+}
+
+static void _ewk_view_priv_del(Ewk_View_Private_Data* priv)
+{
+    if (!priv)
+        return;
+
+#if OS(TIZEN)
+    if (priv->javascriptGlobalContext)
+        JSGlobalContextRelease(priv->javascriptGlobalContext);
+
+    eina_stringshare_del(priv->userAgent);
+    eina_stringshare_del(priv->encoding);
+#if ENABLE(TIZEN_SUPPORT_WEBAPP_META_TAG)
+    eina_stringshare_del(priv->webAppIconURL);
+    if (priv->webAppIconURLs) {
+        void* data = 0;
+        EINA_LIST_FREE(priv->webAppIconURLs, data)
+            ewkWebAppIconDataDelete(static_cast<Ewk_Web_App_Icon_Data*>(data));
+    }
+#endif
+
+    if (priv->authChallenge)
+        ewkAuthChallengeDelete(priv->authChallenge);
+    if (priv->policyDecision)
+        ewkPolicyDecisionDelete(priv->policyDecision);
+
+#if ENABLE(TIZEN_CERTIFICATE_HANDLING)
+    if (priv->certificatePolicyDecision)
+        ewkCertificatePolicyDecisionDelete(priv->certificatePolicyDecision);
+#endif
+
+#if ENABLE(TIZEN_MEDIA_STREAM)
+    if (priv->userMediaPermissionRequests)
+        ewkUserMediaDeletePermissionRequestList(priv->userMediaPermissionRequests);
+#endif
+
+    priv->openPanelListener = 0;
+    priv->openPanel = nullptr;
+    priv->javascriptPopup = nullptr;
+    priv->alertContext = nullptr;
+    priv->confirmContext = nullptr;
+#if ENABLE(TIZEN_SUPPORT_BEFORE_UNLOAD_CONFIRM_PANEL)
+    priv->beforeUnloadConfirmPanelContext = nullptr;
+#endif
+    priv->promptContext = nullptr;
+    priv->isWaitingForJavaScriptPopupReply = false;
+    priv->openpanelContext = nullptr;
+#if ENABLE(TIZEN_INPUT_TAG_EXTENSION)
+    priv->inputPicker = nullptr;
+    eina_stringshare_del(priv->inputValue);
+#endif
+
+#if ENABLE(TIZEN_DATALIST_ELEMENT)
+    if (priv->dataList) {
+        _ewk_view_data_list_del(priv->dataList);
+        priv->dataList = 0;
+    }
+#endif
+
+#if ENABLE(TIZEN_GEOLOCATION)
+    if (priv->geolocation)
+        ewkGeolocationDeleteGeolocation(priv->geolocation);
+    if (priv->geolocationPermissionRequests)
+        ewkGeolocationDeletePermissionRequestList(priv->geolocationPermissionRequests);
+#endif
+
+#if ENABLE(TIZEN_NOTIFICATIONS)
+    if (priv->notifications)
+        ewkNotificationDeleteNotificationList(priv->notifications);
+    if (priv->notificationPermissionRequests)
+        ewkNotificationDeletePermissionRequestList(priv->notificationPermissionRequests);
+#endif
+#if ENABLE(TIZEN_SQL_DATABASE)
+    if (priv->exceededDatabaseQuota)
+        ewkContextDeleteExceededQuota(priv->exceededDatabaseQuota);
+#endif
+#if ENABLE(TIZEN_WEBKIT2_FOCUS_RING)
+    priv->focusRing = nullptr;
+#endif // #if ENABLE(TIZEN_WEBKIT2_FOCUS_RING)
+#if ENABLE(TIZEN_GESTURE)
+    priv->gestureRecognizer = nullptr;
+    priv->gestureClient = nullptr;
+#endif // #if ENABLE(TIZEN_GESTURE)
+
+#if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION)
+    eina_stringshare_del(priv->selectedText);
+#endif
+#if ENABLE(TIZEN_WEBKIT2_CREATE_VIEW_WITH_CREATED_PAGE_GROUP_WITH_IDENTIFIER)
+    priv->pageGroup = nullptr;
+#endif
+
+#if ENABLE(TIZEN_ISF_PORT)
+    _ewk_view_imf_context_destroy(priv);
+#endif
+#endif // #if OS(TIZEN)
+
+    delete priv;
 }
 
 static void _ewk_view_smart_add(Evas_Object* ewkView)
@@ -784,13 +1300,11 @@ static void _ewk_view_smart_add(Evas_Object* ewkView)
 
     g_parentSmartClass.add(ewkView);
 
-    smartData->priv = new EwkViewImpl(ewkView);
-    if (!smartData->priv) {
-        EINA_LOG_CRIT("could not allocate EwkViewImpl");
-        evas_object_smart_data_set(ewkView, 0);
-        free(smartData);
-        return;
-    }
+    // FIXME: Ewk_View_Private_Data was replaced with EwkViewImpl in the webkit opensource.
+    // So, we have both Ewk_View_Private_Data and EwkViewImpl now,
+    // but Ewk_View_Private_Data should be removed later.
+    smartData->ewkViewImpl = new EwkViewImpl(ewkView);
+    smartData->priv = _ewk_view_priv_new(smartData);
 
     // Create evas_object_image to draw web contents.
     smartData->image = evas_object_image_add(smartData->base.evas);
@@ -816,7 +1330,7 @@ static void _ewk_view_smart_add(Evas_Object* ewkView)
     evas_object_propagate_events_set(ewkView, false);
 
 #if ENABLE(TIZEN_SCREEN_READER)
-    ScreenReaderProxy::screenReader().addView(smartData->priv);
+    ScreenReaderProxy::screenReader().addView(ewkView);
 #endif
 #endif // #if OS(TIZEN)
 
@@ -824,22 +1338,31 @@ static void _ewk_view_smart_add(Evas_Object* ewkView)
     CONNECT(EVAS_CALLBACK_FOCUS_IN, _ewk_view_on_focus_in);
     CONNECT(EVAS_CALLBACK_FOCUS_OUT, _ewk_view_on_focus_out);
     CONNECT(EVAS_CALLBACK_MOUSE_WHEEL, _ewk_view_on_mouse_wheel);
+#if !OS(TIZEN)
+    CONNECT(EVAS_CALLBACK_MOUSE_DOWN, _ewk_view_on_mouse_down);
+    CONNECT(EVAS_CALLBACK_MOUSE_UP, _ewk_view_on_mouse_up);
+    CONNECT(EVAS_CALLBACK_MOUSE_MOVE, _ewk_view_on_mouse_move);
+#endif
     CONNECT(EVAS_CALLBACK_KEY_DOWN, _ewk_view_on_key_down);
     CONNECT(EVAS_CALLBACK_KEY_UP, _ewk_view_on_key_up);
-    CONNECT(EVAS_CALLBACK_SHOW, _ewk_view_on_show);
-    CONNECT(EVAS_CALLBACK_HIDE, _ewk_view_on_hide);
 #undef CONNECT
 }
 
 static void _ewk_view_smart_del(Evas_Object* ewkView)
 {
-    EwkViewImpl::removeFromPageViewMap(ewkView);
     EWK_VIEW_SD_GET(ewkView, smartData);
 #if ENABLE(TIZEN_SCREEN_READER)
-    ScreenReaderProxy::screenReader().removeView(smartData->priv);
+    ScreenReaderProxy::screenReader().removeView(ewkView);
 #endif
-    if (smartData && smartData->priv)
-        _ewk_view_impl_del(smartData->priv);
+    if (smartData && smartData->priv) {
+        _ewk_view_priv_del(smartData->priv);
+        smartData->priv = 0;
+    }
+
+    // FIXME: Ewk_View_Private_Data was replaced with EwkViewImpl in the webkit opensource.
+    // If then, ewkViewImpl will be changed to priv.
+    if (smartData)
+        delete smartData->ewkViewImpl;
 
     g_parentSmartClass.del(ewkView);
 }
@@ -854,7 +1377,7 @@ static void _ewk_view_smart_resize(Evas_Object* ewkView, Evas_Coord width, Evas_
     evas_object_image_size_set(smartData->image, width, height);
     evas_object_image_fill_set(smartData->image, 0, 0, width, height);
 #if OS(TIZEN)
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
 #if ENABLE(TIZEN_WEBKIT2_TILED_AC)
     evas_object_image_native_surface_set(smartData->image, 0);
 
@@ -863,7 +1386,7 @@ static void _ewk_view_smart_resize(Evas_Object* ewkView, Evas_Coord width, Evas_
         _ewk_view_composite(smartData);
     else // OpenGL backend
 #endif
-    impl->pageClient->displayViewport();
+    priv->pageClient->displayViewport();
 #endif
 #endif // #if OS(TIZEN)
 
@@ -879,11 +1402,98 @@ static void _ewk_view_smart_move(Evas_Object* ewkView, Evas_Coord x, Evas_Coord
     _ewk_view_smart_changed(smartData);
 }
 
+IntSize ewk_view_size_get(const Evas_Object* ewkView)
+{
+    int width, height;
+    evas_object_geometry_get(ewkView, 0, 0, &width, &height);
+    return IntSize(width, height);
+}
+
+#if USE(ACCELERATED_COMPOSITING)
+static bool ewk_view_create_gl_surface(const Evas_Object* ewkView, const IntSize& viewSize)
+{
+    EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
+
+    Evas_GL_Config evasGlConfig = {
+        EVAS_GL_RGBA_8888,
+        EVAS_GL_DEPTH_BIT_8,
+        EVAS_GL_STENCIL_NONE,
+        EVAS_GL_OPTIONS_NONE,
+        EVAS_GL_MULTISAMPLE_NONE
+    };
+
+    ASSERT(!priv->evasGlSurface);
+    priv->evasGlSurface = evas_gl_surface_create(priv->evasGl, &evasGlConfig, viewSize.width(), viewSize.height());
+    if (!priv->evasGlSurface)
+        return false;
+
+    Evas_Native_Surface nativeSurface;
+    evas_gl_native_surface_get(priv->evasGl, priv->evasGlSurface, &nativeSurface);
+    evas_object_image_native_surface_set(smartData->image, &nativeSurface);
+
+    return true;
+}
+
+bool ewk_view_accelerated_compositing_mode_enter(const Evas_Object* ewkView)
+{
+    EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
+
+    EINA_SAFETY_ON_TRUE_RETURN_VAL(!!priv->evasGl, false);
+
+    Evas* evas = evas_object_evas_get(ewkView);
+    priv->evasGl = evas_gl_new(evas);
+    if (!priv->evasGl)
+        return false;
+
+    priv->evasGlContext = evas_gl_context_create(priv->evasGl, 0);
+    if (!priv->evasGlContext) {
+        evas_gl_free(priv->evasGl);
+        priv->evasGl = 0;
+        return false;
+    }
+
+    if (!ewk_view_create_gl_surface(ewkView, ewk_view_size_get(ewkView))) {
+        evas_gl_context_destroy(priv->evasGl, priv->evasGlContext);
+        priv->evasGlContext = 0;
+
+        evas_gl_free(priv->evasGl);
+        priv->evasGl = 0;
+        return false;
+    }
+
+    return true;
+}
+
+bool ewk_view_accelerated_compositing_mode_exit(const Evas_Object* ewkView)
+{
+    EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
+
+    EINA_SAFETY_ON_NULL_RETURN_VAL(priv->evasGl, false);
+
+    if (priv->evasGlSurface) {
+        evas_gl_surface_destroy(priv->evasGl, priv->evasGlSurface);
+        priv->evasGlSurface = 0;
+    }
+
+    if (priv->evasGlContext) {
+        evas_gl_context_destroy(priv->evasGl, priv->evasGlContext);
+        priv->evasGlContext = 0;
+    }
+
+    evas_gl_free(priv->evasGl);
+    priv->evasGl = 0;
+
+    return true;
+}
+#endif
+
 static void _ewk_view_smart_calculate(Evas_Object* ewkView)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl);
-
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
     Evas_Coord x, y, width, height;
 
     smartData->changed.any = false;
@@ -892,21 +1502,14 @@ static void _ewk_view_smart_calculate(Evas_Object* ewkView)
 
     if (smartData->changed.size) {
 #if !OS(TIZEN)
-#if USE(COORDINATED_GRAPHICS)
-        impl->pageViewportControllerClient->updateViewportSize(IntSize(width, height));
-#endif
-#if USE(ACCELERATED_COMPOSITING)
-        needsNewSurface = impl->evasGlSurface;
-#endif
-
-        if (impl->pageProxy->drawingArea())
-            impl->pageProxy->drawingArea()->setSize(IntSize(width, height), IntSize());
+        if (priv->pageClient->page()->drawingArea())
+            priv->pageClient->page()->drawingArea()->setSize(IntSize(width, height), IntSize());
 
 #if USE(ACCELERATED_COMPOSITING)
-        if (!impl->evasGlSurface)
+        if (!priv->evasGlSurface)
             return;
-        evas_gl_surface_destroy(impl->evasGl, impl->evasGlSurface);
-        impl->evasGlSurface = 0;
+        evas_gl_surface_destroy(priv->evasGl, priv->evasGlSurface);
+        priv->evasGlSurface = 0;
         ewk_view_create_gl_surface(ewkView, IntSize(width, height));
         ewk_view_display(ewkView, IntRect(IntPoint(), IntSize(width, height)));
 #endif
@@ -917,22 +1520,22 @@ static void _ewk_view_smart_calculate(Evas_Object* ewkView)
         smartData->changed.size = false;
 
 #if OS(TIZEN)
-        if (impl->pageClient) {
-            if (DrawingAreaProxy* drawingArea = impl->pageProxy->drawingArea()) {
+        if (priv->pageClient) {
+            if (DrawingAreaProxy* drawingArea = priv->pageClient->page()->drawingArea()) {
 #if ENABLE(TIZEN_WEBKIT2_TILED_AC)
-                if (impl->pageProxy->isViewVisible())
+                if (priv->pageClient->page()->isViewVisible())
                     drawingArea->setSize(IntSize(width, height), IntSize());
 #else
                 drawingArea->setSize(IntSize(width, height), IntSize());
 #endif
 #if ENABLE(TIZEN_WEBKIT2_TILED_BACKING_STORE) && !ENABLE(TIZEN_WEBKIT2_EFL_WTR)
-                impl->pageClient->updateViewportSize(IntSize(width, height));
+                priv->pageClient->updateViewportSize(IntSize(width, height));
                 if (ewk_view_is_opengl_backend(ewkView))
-                    impl->pageClient->displayViewport();
+                    priv->pageClient->displayViewport();
 #endif
             }
 #if ENABLE(TIZEN_WEBKIT2_TILED_SCROLLBAR)
-            impl->pageClient->frameRectChanged();
+            priv->pageClient->frameRectChanged();
 #endif
         }
 #endif // #if OS(TIZEN)
@@ -945,23 +1548,23 @@ static void _ewk_view_smart_calculate(Evas_Object* ewkView)
         smartData->changed.position = false;
 #if OS(TIZEN)
 #if ENABLE(TIZEN_WEBKIT2_TILED_SCROLLBAR)
-        impl->pageClient->frameRectChanged();
+        priv->pageClient->frameRectChanged();
 #endif
 #if ENABLE(TIZEN_SCREEN_READER)
-        impl->pageProxy->recalcScreenReaderFocusRect();
+        priv->pageClient->page()->recalcScreenReaderFocusRect();
 #endif
 #endif // #if OS(TIZEN)
     }
 #if OS(TIZEN)
-    if (impl->popupPicker)
-        ewk_popup_picker_resize(impl->popupPicker);
+    if (priv->popupPicker)
+        ewk_popup_picker_resize(priv->popupPicker);
 #endif // #if OS(TIZEN)
 }
 
 static void _ewk_view_smart_show(Evas_Object* ewkView)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
 
     if (evas_object_clipees_get(smartData->base.clipper))
         evas_object_show(smartData->base.clipper);
@@ -975,16 +1578,16 @@ static void _ewk_view_smart_hide(Evas_Object* ewkView)
     evas_object_hide(smartData->base.clipper);
     evas_object_hide(smartData->image);
 #if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION)
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl);
-    if (impl->pageClient->isTextSelectionMode())
-        impl->pageClient->setIsTextSelectionMode(false);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
+    if (priv->pageClient->isTextSelectionMode())
+        priv->pageClient->setIsTextSelectionMode(false);
 #endif
 }
 
 static void _ewk_view_smart_color_set(Evas_Object* ewkView, int red, int green, int blue, int alpha)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
 
     if (alpha < 0)
         alpha = 0;
@@ -1002,9 +1605,9 @@ static void _ewk_view_smart_color_set(Evas_Object* ewkView, int red, int green,
 #undef CHECK_COLOR
 
     evas_object_image_alpha_set(smartData->image, alpha < 255);
-    impl->pageProxy->setDrawsBackground(red || green || blue);
-    impl->pageProxy->setDrawsTransparentBackground(alpha < 255);
-    impl->pageClient->setBackgroundColor(red/255.0, green/255.0, blue/255.0, alpha/255.0);
+    priv->pageClient->page()->setDrawsBackground(red || green || blue);
+    priv->pageClient->page()->setDrawsTransparentBackground(alpha < 255);
+    priv->pageClient->setBackgroundColor(red/255.0, green/255.0, blue/255.0, alpha/255.0);
 
 #if !OS(TIZEN)
     g_parentSmartClass.color_set(ewkView, red, green, blue, alpha);
@@ -1106,87 +1709,51 @@ static inline Evas_Smart* _ewk_view_smart_class_new(void)
     return smart;
 }
 
-static void _ewk_view_initialize(Evas_Object* ewkView, PassRefPtr<Ewk_Context> context, WKPageGroupRef pageGroupRef)
+static void _ewk_view_initialize(Evas_Object* ewkView, Ewk_Context* context, WKPageGroupRef pageGroupRef)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv)
     EINA_SAFETY_ON_NULL_RETURN(context);
 
-    if (impl->pageClient)
+    if (priv->pageClient)
         return;
 
 #if ENABLE(TIZEN_RUNTIME_BACKEND_SELECTION)
-    bool isOpenGL = ewk_view_is_opengl_backend(ewkView);
-    if (isOpenGL)
-        impl->pageClient = PageClientEvasGL::create(impl);
-    else
-        impl->pageClient = PageClientImpl::create(impl);
-#else
-    impl->pageClient = PageClientImpl::create(impl);
-#endif
-
-    if (pageGroupRef)
-        impl->pageProxy = toImpl(context->wkContext())->createWebPage(impl->pageClient.get(), toImpl(pageGroupRef));
-    else
-        impl->pageProxy = toImpl(context->wkContext())->createWebPage(impl->pageClient.get(), WebPageGroup::create().get());
-
-    EwkViewImpl::addToPageViewMap(ewkView);
-
-#if OS(TIZEN)
-    impl->pageProxy->pageGroup()->preferences()->setAcceleratedCompositingEnabled(true);
-    impl->pageProxy->pageGroup()->preferences()->setForceCompositingMode(true);
-    impl->pageProxy->pageGroup()->preferences()->setFrameFlatteningEnabled(true);
-    impl->pageProxy->pageGroup()->preferences()->setAllowUniversalAccessFromFileURLs(true);
-
-    int deviceWidth, deviceHeight;
-    ecore_evas_screen_geometry_get(ecore_evas_ecore_evas_get(evas_object_evas_get(ewkView)), 0, 0, &deviceWidth, &deviceHeight);
-    impl->pageProxy->pageGroup()->preferences()->setDeviceWidth(deviceWidth);
-    impl->pageProxy->pageGroup()->preferences()->setDeviceHeight(deviceHeight);
-#endif
-
-    impl->pageProxy->initializeWebPage();
-
-#if ENABLE(TIZEN_VIEWPORT_META_TAG)
-    impl->pageProxy->setCustomDeviceScaleFactor((float)getMobileDPI() / 160);
-#else
-    impl->pageProxy->setCustomDeviceScaleFactor((float)getDPI() / 160);
-#endif
-
-#if ENABLE(TIZEN_WEBKIT2_TILED_BACKING_STORE) && !ENABLE(TIZEN_WEBKIT2_EFL_WTR)
-    impl->pageProxy->setUseFixedLayout(true);
-#endif
-#if ENABLE(FULLSCREEN_API)
-    impl->pageProxy->fullScreenManager()->setWebView(ewkView);
-#endif
-
-#if ENABLE(TIZEN_RUNTIME_BACKEND_SELECTION)
-    if (isOpenGL)
-        impl->pageProxy->drawingArea()->layerTreeCoordinatorProxy()->initializeAcceleratedCompositingMode(true);
+    if (ewk_view_is_opengl_backend(ewkView)) {
+        priv->pageClient = PageClientEvasGL::create(toImpl(ewk_context_WKContext_get(context)), toImpl(pageGroupRef), ewkView);
+        priv->pageClient->page()->drawingArea()->layerTreeCoordinatorProxy()->initializeAcceleratedCompositingMode(true);
+    }
     else {
-        impl->pageProxy->pageGroup()->preferences()->setAcceleratedCompositingEnabled(false);
-        impl->pageProxy->pageGroup()->preferences()->setWebGLEnabled(false);
-        impl->pageProxy->drawingArea()->layerTreeCoordinatorProxy()->initializeAcceleratedCompositingMode(false);
+        priv->pageClient = PageClientImpl::create(toImpl(ewk_context_WKContext_get(context)), toImpl(pageGroupRef), ewkView);
+        priv->pageClient->page()->pageGroup()->preferences()->setAcceleratedCompositingEnabled(false);
+        priv->pageClient->page()->pageGroup()->preferences()->setWebGLEnabled(false);
+        priv->pageClient->page()->drawingArea()->layerTreeCoordinatorProxy()->initializeAcceleratedCompositingMode(false);
     }
+#else
+    priv->pageClient = PageClientImpl::create(toImpl(ewk_context_WKContext_get(context)), toImpl(pageGroupRef), ewkView);
 #endif
-
-    impl->backForwardList = Ewk_Back_Forward_List::create(toAPI(impl->pageProxy->backForwardList()));
-
-    impl->context = context;
+    // FixMe: Comment should be removed when pageClient is removed.
+    //priv->settings = adoptPtr(new Ewk_Settings(WKPageGroupGetPreferences(WKPageGetPageGroup(toAPI(priv->pageProxy.get())))));
+    priv->settings = adoptPtr(new Ewk_Settings(WKPageGroupGetPreferences(WKPageGetPageGroup(toAPI(priv->pageClient->page())))));
 
 #if OS(TIZEN)
+    priv->context = context;
+
     ewkViewContextMenuClientAttachClient(ewkView);
+    ewkViewFindClientAttatchClient(ewkView);
     ewkViewTizenClientAttachClient(ewkView);
+    ewkViewUIClientAttatchClient(ewkView);
 
 #if ENABLE(TIZEN_GEOLOCATION)
-    ewkViewGeolocationProviderAttachProvider(ewkView, impl->context->wkContext());
+    ewkViewGeolocationProviderAttachProvider(ewkView, ewk_context_WKContext_get(context));
 #endif
 
 #if ENABLE(TIZEN_NOTIFICATIONS)
-    ewkViewNotificationProviderAttachProvider(ewkView, impl->context->wkContext());
+    ewkViewNotificationProviderAttachProvider(ewkView, ewk_context_WKContext_get(context));
 #endif
 
 #if ENABLE(TIZEN_ICON_DATABASE)
-    ewk_view_icondatabase_client_attach(ewkView, impl->context->wkContext());
+    ewk_view_icondatabase_client_attach(ewkView, ewk_context_WKContext_get(context));
 #endif
 
     ewk_view_javascript_alert_callback_set(ewkView, _ewk_view_default_javascript_alert, 0);
@@ -1197,39 +1764,26 @@ static void _ewk_view_initialize(Evas_Object* ewkView, PassRefPtr<Ewk_Context> c
 #endif
     ewk_view_open_panel_callback_set(ewkView, _ewk_view_default_open_panel, 0);
 #else // #if OS(TIZEN)
+    priv->backForwardList = ewk_back_forward_list_new(toAPI(priv->pageClient->page()->backForwardList()));
+
 #if USE(COORDINATED_GRAPHICS)
-    impl->viewportHandler = EflViewportHandler::create(impl->pageClient.get());
+    priv->viewportHandler = EflViewportHandler::create(priv->pageClient.get());
 #endif
 #endif // #if OS(TIZEN)
 
-#if ENABLE(FULLSCREEN_API)
-    impl->pageProxy->fullScreenManager()->setWebView(ewkView);
-    impl->pageProxy->pageGroup()->preferences()->setFullScreenEnabled(true);
-#endif
-
-    // Initialize page clients.
-    impl->pageLoadClient = PageLoadClientEfl::create(impl);
-    impl->pagePolicyClient = PagePolicyClientEfl::create(impl);
-    impl->pageUIClient = PageUIClientEfl::create(impl);
-    impl->resourceLoadClient = ResourceLoadClientEfl::create(impl);
-    impl->findClient = FindClientEfl::create(impl);
-    impl->formClient = FormClientEfl::create(impl);
-
-    /* Listen for favicon changes */
-    Ewk_Favicon_Database* iconDatabase = impl->context->faviconDatabase();
-    iconDatabase->watchChanges(IconChangeCallbackData(_ewk_view_on_favicon_changed, ewkView));
+    WKPageRef wkPage = toAPI(priv->pageClient->page());
+    ewk_view_form_client_attach(wkPage, ewkView);
+    ewk_view_loader_client_attach(wkPage, ewkView);
+    ewk_view_policy_client_attach(wkPage, ewkView);
+    ewk_view_resource_load_client_attach(wkPage, ewkView);
 
 #if ENABLE(TIZEN_WEBKIT2_THEME_SET_INTERNAL)
     ewk_view_theme_set(ewkView, "/usr/share/edje/webkit.edj");
 #endif
 
 #if ENABLE(TIZEN_WEBKIT2_CONTEXT_X_WINDOW)
-    if (!impl->context->xWindow())
-        impl->context->setXWindow(elm_win_xwindow_get(ewkView));
-#endif
-
-#if ENABLE(TIZEN_WEBKIT2_FOCUS_RING)
-    impl->focusRing = FocusRing::create(impl);
+    if (!ewk_context_x_window_get(context))
+        ewk_context_x_window_set(context, elm_win_xwindow_get(ewkView));
 #endif
 }
 
@@ -1239,12 +1793,9 @@ static Evas_Object* _ewk_view_add_with_smart(Evas* canvas, Evas_Smart* smart)
     EINA_SAFETY_ON_NULL_RETURN_VAL(smart, 0);
 
 #if ENABLE(TIZEN_WEBKIT2_DDK_CHECK)
-    {
-        using namespace EGL;
-        if(!eglGetDisplay(EGL_DEFAULT_DISPLAY)) {
-            EINA_LOG_CRIT("Fail in initiziling view because No DDK is installed.");
-            return 0;
-        }
+    if(!eglGetDisplay(EGL_DEFAULT_DISPLAY)) {
+        EINA_LOG_CRIT("Fail in initiziling view because No DDK is installed.");
+        return 0;
     }
 #endif
 
@@ -1258,8 +1809,8 @@ static Evas_Object* _ewk_view_add_with_smart(Evas* canvas, Evas_Smart* smart)
         return 0;
     }
 
-    EWK_VIEW_IMPL_GET(smartData, impl);
-    if (!impl) {
+    EWK_VIEW_PRIV_GET(smartData, priv);
+    if (!priv) {
         evas_object_del(ewkView);
         return 0;
     }
@@ -1280,7 +1831,7 @@ Evas_Object* ewk_view_base_add(Evas* canvas, WKContextRef contextRef, WKPageGrou
     if (!ewkView)
         return 0;
 
-    _ewk_view_initialize(ewkView, Ewk_Context::create(contextRef), pageGroupRef);
+    _ewk_view_initialize(ewkView, ewk_context_new_from_WKContext(contextRef), pageGroupRef);
 
     return ewkView;
 }
@@ -1297,14 +1848,14 @@ Evas_Object* ewk_view_smart_add(Evas* canvas, Evas_Smart* smart, Ewk_Context* co
 
 #if ENABLE(TIZEN_ICON_DATABASE)
     //set default iconDatabasePath
-    WKContextRef contextRef = context->wkContext();
+    WKContextRef contextRef = ewk_context_WKContext_get(context);
     toImpl(contextRef)->setIconDatabasePath(toImpl(contextRef)->iconDatabasePath());
 #endif
 
 #if ENABLE(TIZEN_WEBKIT2_CREATE_VIEW_WITH_CREATED_PAGE_GROUP_WITH_IDENTIFIER)
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, 0);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, 0);
-    _ewk_view_initialize(ewkView, context, toAPI(impl->pageGroup.get()));
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, 0);
+    _ewk_view_initialize(ewkView, context, toAPI(priv->pageGroup.get()));
 #else
     _ewk_view_initialize(ewkView, context, 0);
 #endif
@@ -1314,7 +1865,6 @@ Evas_Object* ewk_view_smart_add(Evas* canvas, Evas_Smart* smart, Ewk_Context* co
 
 Evas_Object* ewk_view_add_with_context(Evas* canvas, Ewk_Context* context)
 {
-    EINA_SAFETY_ON_NULL_RETURN_VAL(context, 0);
     return ewk_view_smart_add(canvas, _ewk_view_smart_class_new(), context);
 }
 
@@ -1323,22 +1873,36 @@ Evas_Object* ewk_view_add(Evas* canvas)
     return ewk_view_add_with_context(canvas, ewk_context_default_get());
 }
 
-Ewk_Context* ewk_view_context_get(const Evas_Object* ewkView)
+/**
+ * @internal
+ * The uri of view was changed by the frame loader.
+ *
+ * Emits signal: "uri,changed" with pointer to new uri string.
+ */
+void ewk_view_uri_update(Evas_Object* ewkView)
 {
-    EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, 0);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, 0);
+    EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
 
-    return impl->ewkContext();
+    String activeURL = priv->pageClient->page()->activeURL();
+    if (activeURL.isEmpty())
+        return;
+
+    if (!eina_stringshare_replace(&priv->uri, activeURL.utf8().data()))
+        return;
+
+    evas_object_smart_callback_call(ewkView, "uri,changed", static_cast<void*>(const_cast<char*>(priv->uri)));
+    evas_object_smart_callback_call(ewkView, "url,changed", static_cast<void*>(const_cast<char*>(priv->uri)));
 }
 
-Eina_Bool ewk_view_url_set(Evas_Object* ewkView, const char* url)
+Eina_Bool ewk_view_url_set(Evas_Object* ewkView, const char* uri)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
-    EINA_SAFETY_ON_NULL_RETURN_VAL(url, false);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
+    EINA_SAFETY_ON_NULL_RETURN_VAL(uri, false);
 
-    impl->pageProxy->loadURL(url);
-    impl->informURLChange();
+    priv->pageClient->page()->loadURL(String::fromUTF8(uri));
+    ewk_view_uri_update(ewkView);
 
     return true;
 }
@@ -1346,26 +1910,18 @@ Eina_Bool ewk_view_url_set(Evas_Object* ewkView, const char* url)
 const char* ewk_view_url_get(const Evas_Object* ewkView)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, 0);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, 0);
-
-    return impl->url();
-}
-
-const char *ewk_view_icon_url_get(const Evas_Object *ewkView)
-{
-    EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, 0);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, 0);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, 0);
 
-    return impl->faviconURL();
+    return priv->uri;
 }
 
 Eina_Bool ewk_view_reload(Evas_Object* ewkView)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
 
-    impl->pageProxy->reload(/*reloadFromOrigin*/ false);
-    impl->informURLChange();
+    priv->pageClient->page()->reload(/*reloadFromOrigin*/ false);
+    ewk_view_uri_update(ewkView);
 
     return true;
 }
@@ -1373,10 +1929,10 @@ Eina_Bool ewk_view_reload(Evas_Object* ewkView)
 Eina_Bool ewk_view_reload_bypass_cache(Evas_Object* ewkView)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
 
-    impl->pageProxy->reload(/*reloadFromOrigin*/ true);
-    impl->informURLChange();
+    priv->pageClient->page()->reload(/*reloadFromOrigin*/ true);
+    ewk_view_uri_update(ewkView);
 
     return true;
 }
@@ -1384,27 +1940,128 @@ Eina_Bool ewk_view_reload_bypass_cache(Evas_Object* ewkView)
 Eina_Bool ewk_view_stop(Evas_Object* ewkView)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
+
+    priv->pageClient->page()->stopLoading();
+
+    return true;
+}
+
+Ewk_Settings* ewk_view_settings_get(const Evas_Object* ewkView)
+{
+    EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, 0);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, 0);
+
+    return priv->settings.get();
+}
+
+/**
+ * @internal
+ * Load was initiated for a resource in the view.
+ *
+ * Emits signal: "resource,request,new" with pointer to resource request.
+ */
+void ewk_view_resource_load_initiated(Evas_Object* ewkView, uint64_t resourceIdentifier, Ewk_Web_Resource* resource, Ewk_Url_Request* request)
+{
+    EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
+
+    Ewk_Web_Resource_Request resourceRequest = {resource, request, 0};
+
+    // Keep the resource internally to reuse it later.
+    ewk_web_resource_ref(resource);
+    priv->loadingResourcesMap.add(resourceIdentifier, resource);
+
+    evas_object_smart_callback_call(ewkView, "resource,request,new", &resourceRequest);
+}
+
+/**
+ * @internal
+ * Received a response to a resource load request in the view.
+ *
+ * Emits signal: "resource,request,response" with pointer to resource response.
+ */
+void ewk_view_resource_load_response(Evas_Object* ewkView, uint64_t resourceIdentifier, Ewk_Url_Response* response)
+{
+    EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
+
+    if (!priv->loadingResourcesMap.contains(resourceIdentifier))
+        return;
+
+    Ewk_Web_Resource* resource = priv->loadingResourcesMap.get(resourceIdentifier);
+    Ewk_Web_Resource_Load_Response resourceLoadResponse = {resource, response};
+    evas_object_smart_callback_call(ewkView, "resource,request,response", &resourceLoadResponse);
+}
+
+/**
+ * @internal
+ * Failed loading a resource in the view.
+ *
+ * Emits signal: "resource,request,finished" with pointer to the resource load error.
+ */
+void ewk_view_resource_load_failed(Evas_Object* ewkView, uint64_t resourceIdentifier, Ewk_Web_Error* error)
+{
+    EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
+
+    if (!priv->loadingResourcesMap.contains(resourceIdentifier))
+        return;
+
+    Ewk_Web_Resource* resource = priv->loadingResourcesMap.get(resourceIdentifier);
+    Ewk_Web_Resource_Load_Error resourceLoadError = {resource, error};
+    evas_object_smart_callback_call(ewkView, "resource,request,failed", &resourceLoadError);
+}
+
+/**
+ * @internal
+ * Finished loading a resource in the view.
+ *
+ * Emits signal: "resource,request,finished" with pointer to the resource.
+ */
+void ewk_view_resource_load_finished(Evas_Object* ewkView, uint64_t resourceIdentifier)
+{
+    EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
+
+    if (!priv->loadingResourcesMap.contains(resourceIdentifier))
+        return;
 
-    impl->pageProxy->stopLoading();
+    Ewk_Web_Resource* resource = priv->loadingResourcesMap.take(resourceIdentifier);
+    evas_object_smart_callback_call(ewkView, "resource,request,finished", resource);
 
-    return true;
+    ewk_web_resource_unref(resource);
 }
 
-Ewk_Settings* ewk_view_settings_get(const Evas_Object* ewkView)
+/**
+ * @internal
+ * Request was sent for a resource in the view.
+ *
+ * Emits signal: "resource,request,sent" with pointer to resource request and possible redirect response.
+ */
+void ewk_view_resource_request_sent(Evas_Object* ewkView, uint64_t resourceIdentifier, Ewk_Url_Request* request, Ewk_Url_Response* redirectResponse)
 {
-    EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, 0);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, 0);
+    EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
+
+    if (!priv->loadingResourcesMap.contains(resourceIdentifier))
+        return;
+
+    Ewk_Web_Resource* resource = priv->loadingResourcesMap.get(resourceIdentifier);
+    Ewk_Web_Resource_Request resourceRequest = {resource, request, redirectResponse};
 
-    return impl->settings();
+    evas_object_smart_callback_call(ewkView, "resource,request,sent", &resourceRequest);
 }
 
 const char* ewk_view_title_get(const Evas_Object* ewkView)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, 0);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, 0);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, 0);
 
-    return impl->title();
+    CString title = priv->pageClient->page()->pageTitle().utf8();
+    eina_stringshare_replace(&priv->title, title.data());
+
+    return priv->title;
 }
 
 /**
@@ -1418,33 +2075,44 @@ void ewk_view_text_found(Evas_Object* ewkView, unsigned int matchCount)
     evas_object_smart_callback_call(ewkView, "text,found", &matchCount);
 }
 
+/**
+ * @internal
+ * The view title was changed by the frame loader.
+ *
+ * Emits signal: "title,changed" with pointer to new title string.
+ */
+void ewk_view_title_changed(Evas_Object* ewkView, const char* title)
+{
+    evas_object_smart_callback_call(ewkView, "title,changed", const_cast<char*>(title));
+}
+
 double ewk_view_load_progress_get(const Evas_Object* ewkView)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, -1.0);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, -1.0);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, -1.0);
 
-    return impl->pageProxy->estimatedProgress();
+    return priv->pageClient->page()->estimatedProgress();
 }
 
 Eina_Bool ewk_view_scale_set(Evas_Object* ewkView, double scaleFactor, int x, int y)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
 
 #if OS(TIZEN)
     // FIXME
     int centerX = x;
     int centerY = y;
-    scaleFactor = impl->pageClient->adjustScaleWithViewport(scaleFactor);
+    scaleFactor = priv->pageClient->adjustScaleWithViewport(scaleFactor);
 
-    IntPoint scrollPosition = impl->pageClient->scrollPosition();
-    double scaleDifference = scaleFactor / impl->pageClient->scaleFactor();
+    IntPoint scrollPosition = priv->pageClient->scrollPosition();
+    double scaleDifference = scaleFactor / priv->pageClient->scaleFactor();
     int newScrollX = (scrollPosition.x() + centerX - smartData->view.x) * scaleDifference - (centerX - smartData->view.x);
     int newScrollY = (scrollPosition.y() + centerY - smartData->view.y) * scaleDifference - (centerY - smartData->view.y);
 
-    impl->pageProxy->scale(scaleFactor, IntPoint(newScrollX, newScrollY));
+    priv->pageClient->page()->scale(scaleFactor, IntPoint(newScrollX, newScrollY));
 #else
-    impl->pageProxy->scalePage(scaleFactor, IntPoint(x, y));
+    priv->pageClient->page()->scalePage(scaleFactor, IntPoint(x, y));
 #endif
     return true;
 }
@@ -1452,21 +2120,21 @@ Eina_Bool ewk_view_scale_set(Evas_Object* ewkView, double scaleFactor, int x, in
 double ewk_view_scale_get(const Evas_Object* ewkView)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, -1);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, -1);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, -1);
 
 #if OS(TIZEN)
-    return impl->pageProxy->scaleFactor();
+    return priv->pageClient->page()->scaleFactor();
 #else
-    return impl->pageProxy->pageScaleFactor();
+    return priv->pageClient->page()->pageScaleFactor();
 #endif
 }
 
 Eina_Bool ewk_view_device_pixel_ratio_set(Evas_Object* ewkView, float ratio)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
 
-    impl->pageProxy->setCustomDeviceScaleFactor(ratio);
+    priv->pageClient->page()->setCustomDeviceScaleFactor(ratio);
 
     return true;
 }
@@ -1474,33 +2142,180 @@ Eina_Bool ewk_view_device_pixel_ratio_set(Evas_Object* ewkView, float ratio)
 float ewk_view_device_pixel_ratio_get(const Evas_Object* ewkView)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, -1.0);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, -1.0);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, -1.0);
+
+    return priv->pageClient->page()->deviceScaleFactor();
+}
+
+#if ENABLE(TIZEN_WEBKIT2_SEPERATE_LOAD_PROGRESS)
+void ewk_view_load_progress_started(Evas_Object* ewkView)
+{
+    evas_object_smart_callback_call(ewkView, "load,progress,started", 0);
+}
+#endif
+
+/**
+ * @internal
+ * Reports load progress changed.
+ *
+ * Emits signal: "load,progress" with pointer to a double from 0.0 to 1.0.
+ */
+void ewk_view_load_progress_changed(Evas_Object* ewkView, double progress)
+{
+    evas_object_smart_callback_call(ewkView, "load,progress", &progress);
+}
+
+#if ENABLE(TIZEN_WEBKIT2_SEPERATE_LOAD_PROGRESS)
+void ewk_view_load_progress_finished(Evas_Object* ewkView)
+{
+    evas_object_smart_callback_call(ewkView, "load,progress,finished", 0);
+}
+#endif
 
-    return impl->pageProxy->deviceScaleFactor();
+#if ENABLE(WEB_INTENTS)
+/**
+ * @internal
+ * The view received a new intent request.
+ *
+ * Emits signal: "intent,request,new" with pointer to a Ewk_Intent.
+ */
+void ewk_view_intent_request_new(Evas_Object* ewkView, const Ewk_Intent* ewkIntent)
+{
+    evas_object_smart_callback_call(ewkView, "intent,request,new", const_cast<Ewk_Intent*>(ewkIntent));
 }
+#endif
 
 void ewk_view_theme_set(Evas_Object* ewkView, const char* path)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
 
-    impl->setThemePath(path);
+    if (!eina_stringshare_replace(&priv->theme, path))
+        return;
+
+    priv->pageClient->page()->setThemePath(path);
 }
 
 const char* ewk_view_theme_get(const Evas_Object* ewkView)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, 0);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, 0);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, 0);
+
+    return priv->theme;
+}
+
+void ewk_view_cursor_set(Evas_Object* ewkView, const Cursor& cursor)
+{
+    EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
+
+    const char* group = cursor.platformCursor();
+    if (!group || group == priv->cursorGroup)
+        return;
+
+    priv->cursorGroup = group;
+
+    if (priv->cursorObject)
+        evas_object_del(priv->cursorObject);
+    priv->cursorObject = edje_object_add(smartData->base.evas);
+
+    Ecore_Evas* ecoreEvas = ecore_evas_ecore_evas_get(smartData->base.evas);
+    if (!priv->theme || !edje_object_file_set(priv->cursorObject, priv->theme, group)) {
+        evas_object_del(priv->cursorObject);
+        priv->cursorObject = 0;
+
+        ecore_evas_object_cursor_set(ecoreEvas, 0, 0, 0, 0);
+#ifdef HAVE_ECORE_X
+        if (priv->isUsingEcoreX)
+            WebCore::applyFallbackCursor(ecoreEvas, group);
+#endif
+        return;
+    }
+
+    Evas_Coord width, height;
+    edje_object_size_min_get(priv->cursorObject, &width, &height);
+    if (width <= 0 || height <= 0)
+        edje_object_size_min_calc(priv->cursorObject, &width, &height);
+    if (width <= 0 || height <= 0) {
+        width = defaultCursorSize;
+        height = defaultCursorSize;
+    }
+    evas_object_resize(priv->cursorObject, width, height);
+
+    const char* data;
+    int hotspotX = 0;
+    data = edje_object_data_get(priv->cursorObject, "hot.x");
+    if (data)
+        hotspotX = atoi(data);
+
+    int hotspotY = 0;
+    data = edje_object_data_get(priv->cursorObject, "hot.y");
+    if (data)
+        hotspotY = atoi(data);
 
-    return impl->themePath();
+    ecore_evas_object_cursor_set(ecoreEvas, priv->cursorObject, EVAS_LAYER_MAX, hotspotX, hotspotY);
+}
+
+void ewk_view_display(Evas_Object* ewkView, const IntRect& rect)
+{
+    EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
+    if (!smartData->image)
+        return;
+
+    evas_object_image_data_update_add(smartData->image, rect.x(), rect.y(), rect.width(), rect.height());
+}
+
+/**
+ * @internal
+ * A download for that view was cancelled.
+ *
+ * Emits signal: "download,cancelled" with pointer to a Ewk_Download_Job.
+ */
+void ewk_view_download_job_cancelled(Evas_Object* ewkView, Ewk_Download_Job* download)
+{
+    evas_object_smart_callback_call(ewkView, "download,cancelled", download);
+}
+
+/**
+ * @internal
+ * A new download has been requested for that view.
+ *
+ * Emits signal: "download,request" with pointer to a Ewk_Download_Job.
+ */
+void ewk_view_download_job_requested(Evas_Object* ewkView, Ewk_Download_Job* download)
+{
+     evas_object_smart_callback_call(ewkView, "download,request", download);
+}
+
+/**
+ * @internal
+ * A download for that view has failed.
+ *
+ * Emits signal: "download,failed" with pointer to a Ewk_Download_Job_Error.
+ */
+void ewk_view_download_job_failed(Evas_Object* ewkView, Ewk_Download_Job* download, Ewk_Web_Error* error)
+{
+    Ewk_Download_Job_Error downloadError = { download, error };
+    evas_object_smart_callback_call(ewkView, "download,failed", &downloadError);
+}
+
+/**
+ * @internal
+ * A download for that view finished successfully.
+ *
+ * Emits signal: "download,finished" with pointer to a Ewk_Download_Job.
+ */
+void ewk_view_download_job_finished(Evas_Object* ewkView, Ewk_Download_Job* download)
+{
+     evas_object_smart_callback_call(ewkView, "download,finished", download);
 }
 
 Eina_Bool ewk_view_back(Evas_Object* ewkView)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
 
-    WebPageProxy* page = impl->pageProxy.get();
+    WebPageProxy* page = priv->pageClient->page();
     if (page->canGoBack()) {
         page->goBack();
         return true;
@@ -1512,9 +2327,9 @@ Eina_Bool ewk_view_back(Evas_Object* ewkView)
 Eina_Bool ewk_view_forward(Evas_Object* ewkView)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
 
-    WebPageProxy* page = impl->pageProxy.get();
+    WebPageProxy* page = priv->pageClient->page();
     if (page->canGoForward()) {
         page->goForward();
         return true;
@@ -1527,11 +2342,11 @@ Eina_Bool ewk_view_intent_deliver(Evas_Object* ewkView, Ewk_Intent* intent)
 {
 #if ENABLE(WEB_INTENTS)
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
     EINA_SAFETY_ON_NULL_RETURN_VAL(intent, false);
 
-    WebPageProxy* page = impl->pageProxy.get();
-    page->deliverIntentToFrame(page->mainFrame(), intent->webIntentData());
+    WebPageProxy* page = priv->pageClient->page();
+    page->deliverIntentToFrame(page->mainFrame(), toImpl(ewk_intent_WKIntentDataRef_get(intent)));
 
     return true;
 #else
@@ -1542,38 +2357,52 @@ Eina_Bool ewk_view_intent_deliver(Evas_Object* ewkView, Ewk_Intent* intent)
 Eina_Bool ewk_view_back_possible(Evas_Object* ewkView)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
 
-    return impl->pageProxy->canGoBack();
+    return priv->pageClient->page()->canGoBack();
 }
 
 Eina_Bool ewk_view_forward_possible(Evas_Object* ewkView)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
 
-    return impl->pageProxy->canGoForward();
+    return priv->pageClient->page()->canGoForward();
 }
 
-Ewk_Back_Forward_List* ewk_view_back_forward_list_get(const Evas_Object* ewkView)
+void ewk_view_image_data_set(Evas_Object* ewkView, void* imageData, const IntSize& size)
 {
-    EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, 0);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, 0);
+    EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
+    if (!imageData || !smartData->image)
+        return;
+
+    evas_object_resize(smartData->image, size.width(), size.height());
+    evas_object_image_size_set(smartData->image, size.width(), size.height());
+    evas_object_image_data_copy_set(smartData->image, imageData);
+}
 
-    return impl->backForwardList.get();
+/**
+ * @internal
+ * Reports that a form request is about to be submitted.
+ *
+ * Emits signal: "form,submission,request" with pointer to Ewk_Form_Submission_Request.
+ */
+void ewk_view_form_submission_request_new(Evas_Object* ewkView, Ewk_Form_Submission_Request* request)
+{
+    evas_object_smart_callback_call(ewkView, "form,submission,request", request);
 }
 
 #if ENABLE(TIZEN_WEBKIT2_FORM_DATABASE)
 void ewk_view_text_change_in_textfield(Evas_Object* ewkView, const String& name, const String& value)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
 
     if (!ewk_settings_form_candidate_data_enabled_get(ewk_view_settings_get(ewkView)))
         return;
 
-    InputMethodContextEfl* imfContext = impl->inputMethodContext();
-    if (!imfContext || !imfContext->isShow())
+    Ecore_IMF_Context* imfContext = ewk_view_imf_context_get(ewkView);
+    if (!imfContext || ecore_imf_context_input_panel_state_get(imfContext) == ECORE_IMF_INPUT_PANEL_STATE_HIDE)
         return;
 
     if (value.isEmpty()) {
@@ -1603,30 +2432,30 @@ void ewk_view_text_change_in_textfield(Evas_Object* ewkView, const String& name,
     if (!smartData->api->formdata_candidate_is_showing(smartData))
         smartData->api->formdata_candidate_hide(smartData);
 
-    IntRect inputFieldRect = impl->pageClient->focusedNodeRect();
+    IntRect inputFieldRect = priv->pageClient->focusedNodeRect();
     smartData->api->formdata_candidate_show(smartData, inputFieldRect.x(), inputFieldRect.y(), inputFieldRect.width(), inputFieldRect.height());
 }
 
 void ewk_view_form_data_add(Evas_Object* ewkView, WKDictionaryRef& formData, bool isPasswordForm)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
     if (!ewk_settings_autofill_password_form_enabled_get(ewk_view_settings_get(ewkView))
         && !ewk_settings_form_candidate_data_enabled_get(ewk_view_settings_get(ewkView)))
         return;
-    ewk_view_context_get(ewkView)->addFormData(impl->url(), formData, isPasswordForm);
+    ewk_context_form_data_add(ewk_view_context_get(ewkView), priv->uri, formData, isPasswordForm);
 }
 
 void ewk_view_form_password_data_fill(Evas_Object* ewkView)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
 
     if (!ewk_settings_autofill_password_form_enabled_get(ewk_view_settings_get(ewkView)))
         return;
 
     Vector<std::pair<String, String> > passwordFormData;
-    ewk_view_context_get(ewkView)->passwordFormData(impl->url(), passwordFormData);
+    ewk_context_form_password_data_get(ewk_view_context_get(ewkView), priv->uri, passwordFormData);
 
     if (!passwordFormData.size())
         return;
@@ -1646,61 +2475,233 @@ void ewk_view_form_password_data_fill(Evas_Object* ewkView)
 void ewk_view_form_candidate_data_get(Evas_Object* ewkView, const String& name, Vector<String>& candidates)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl);
-    ewk_view_context_get(ewkView)->candidateFormData(name, candidates);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
+    ewk_context_form_candidate_data_get(ewk_view_context_get(ewkView), name, candidates);
+}
+#endif
+
+/**
+ * @internal
+ * Reports load failed with error information.
+ *
+ * Emits signal: "load,error" with pointer to Ewk_Web_Error.
+ */
+void ewk_view_load_error(Evas_Object* ewkView, const Ewk_Web_Error* error)
+{
+    evas_object_smart_callback_call(ewkView, "load,error", const_cast<Ewk_Web_Error*>(error));
+}
+
+/**
+ * @internal
+ * Reports load finished.
+ *
+ * Emits signal: "load,finished".
+ */
+void ewk_view_load_finished(Evas_Object* ewkView)
+{
+    ewk_view_uri_update(ewkView);
+    evas_object_smart_callback_call(ewkView, "load,finished", 0);
+
+    EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
+
+#if ENABLE(TIZEN_CSS_OVERFLOW_SCROLL_ACCELERATION)
+    priv->pageClient->page()->setLoadingFinished(true);
+#endif
+
+#if ENABLE(TIZEN_WEBKIT2_FORM_DATABASE)
+    ewk_view_form_password_data_fill(ewkView);
+#endif
+
+    if (!priv->suspendRequested)
+        return;
+
+    priv->suspendRequested = false;
+
+    if (!priv->suspendedPainting) {
+        priv->pageClient->page()->suspendPainting();
+        priv->suspendedPainting = true;
+    }
+    if (!priv->suspendedResources) {
+        priv->pageClient->page()->suspendJavaScriptAndResource();
+        priv->suspendedResources = true;
+    }
+}
+
+/**
+ * @internal
+ * Reports view provisional load failed with error information.
+ *
+ * Emits signal: "load,provisional,failed" with pointer to Ewk_Web_Error.
+ */
+void ewk_view_load_provisional_failed(Evas_Object* ewkView, const Ewk_Web_Error* error)
+{
+    evas_object_smart_callback_call(ewkView, "load,provisional,failed", const_cast<Ewk_Web_Error*>(error));
 }
+
+/**
+ * @internal
+ * Reports view received redirect for provisional load.
+ *
+ * Emits signal: "load,provisional,redirect".
+ */
+void ewk_view_load_provisional_redirect(Evas_Object* ewkView)
+{
+    ewk_view_uri_update(ewkView);
+    evas_object_smart_callback_call(ewkView, "load,provisional,redirect", 0);
+}
+
+/**
+ * @internal
+ * Reports view provisional load started.
+ *
+ * Emits signal: "load,provisional,started".
+ */
+void ewk_view_load_provisional_started(Evas_Object* ewkView)
+{
+#if OS(TIZEN)
+    evas_object_smart_callback_call(ewkView, "load,started", 0);
+#endif
+
+    EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
+
+#if ENABLE(TIZEN_DRAG_SUPPORT)
+    if (priv->pageClient->isDragMode())
+        priv->pageClient->setDragMode(false);
+#endif
+
+#if ENABLE(TIZEN_CSS_OVERFLOW_SCROLL_ACCELERATION)
+    priv->pageClient->page()->setLoadingFinished(false);
 #endif
 
+    // The main frame started provisional load, we should clear
+    // the loadingResources HashMap to start clean.
+    _ewk_view_priv_loading_resources_clear(priv->loadingResourcesMap);
+
+    ewk_view_uri_update(ewkView);
+    evas_object_smart_callback_call(ewkView, "load,provisional,started", 0);
+}
+
+/**
+ * @internal
+ * Reports that a navigation policy decision should be taken.
+ *
+ * Emits signal: "policy,decision,navigation".
+ */
+void ewk_view_navigation_policy_decision(Evas_Object* ewkView, Ewk_Navigation_Policy_Decision* decision)
+{
+    evas_object_smart_callback_call(ewkView, "policy,decision,navigation", decision);
+}
+
+/**
+ * @internal
+ * Reports that a new window policy decision should be taken.
+ *
+ * Emits signal: "policy,decision,new,window".
+ */
+void ewk_view_new_window_policy_decision(Evas_Object* ewkView, Ewk_Navigation_Policy_Decision* decision)
+{
+    evas_object_smart_callback_call(ewkView, "policy,decision,new,window", decision);
+}
+
 Eina_Bool ewk_view_html_string_load(Evas_Object* ewkView, const char* html, const char* baseUrl, const char* unreachableUrl)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
     EINA_SAFETY_ON_NULL_RETURN_VAL(html, false);
 
     if (unreachableUrl && *unreachableUrl)
-        impl->pageProxy->loadAlternateHTMLString(String::fromUTF8(html), baseUrl ? String::fromUTF8(baseUrl) : "", String::fromUTF8(unreachableUrl));
+        priv->pageClient->page()->loadAlternateHTMLString(String::fromUTF8(html), baseUrl ? String::fromUTF8(baseUrl) : "", String::fromUTF8(unreachableUrl));
     else
-        impl->pageProxy->loadHTMLString(String::fromUTF8(html), baseUrl ? String::fromUTF8(baseUrl) : "");
-
-    impl->informURLChange();
+        priv->pageClient->page()->loadHTMLString(String::fromUTF8(html), baseUrl ? String::fromUTF8(baseUrl) : "");
+    ewk_view_uri_update(ewkView);
 
     return true;
 }
 
+#if ENABLE(WEB_INTENTS_TAG)
+/**
+ * @internal
+ * The view received a new intent service registration.
+ *
+ * Emits signal: "intent,service,register" with pointer to a Ewk_Intent_Service.
+ */
+void ewk_view_intent_service_register(Evas_Object* ewkView, const Ewk_Intent_Service* ewkIntentService)
+{
+    evas_object_smart_callback_call(ewkView, "intent,service,register", const_cast<Ewk_Intent_Service*>(ewkIntentService));
+}
+#endif // ENABLE(WEB_INTENTS_TAG)
+
+WebPageProxy* ewk_view_page_get(const Evas_Object* ewkView)
+{
+    EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, 0);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, 0);
+
+    return priv->pageClient->page();
+}
+
 const char* ewk_view_custom_encoding_get(const Evas_Object* ewkView)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, 0);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, 0);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, 0);
+
+    String customEncoding = priv->pageClient->page()->customTextEncodingName();
+    if (customEncoding.isEmpty())
+        return 0;
+
+    eina_stringshare_replace(&priv->customEncoding, customEncoding.utf8().data());
 
-    return impl->customTextEncodingName();
+    return priv->customEncoding;
 }
 
 Eina_Bool ewk_view_custom_encoding_set(Evas_Object* ewkView, const char* encoding)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
 
-    impl->setCustomTextEncodingName(encoding);
+    if (eina_stringshare_replace(&priv->customEncoding, encoding))
+        priv->pageClient->page()->setCustomTextEncodingName(encoding ? String::fromUTF8(encoding) : String());
 
     return true;
 }
 
 #if OS(TIZEN)
+Ewk_Context* ewk_view_context_get(const Evas_Object* ewkView)
+{
+    EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, 0);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, 0);
+    return priv->context;
+}
+
 // FIXME: It should be removed.
 WKPageRef ewk_view_WKPage_get(Evas_Object* ewkView)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, 0);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, 0);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, 0);
 
-    return toAPI(impl->pageProxy.get());
+    return toAPI(priv->pageClient->page());
 }
 
 Eina_Bool ewk_view_mouse_events_enabled_set(Evas_Object* ewkView, Eina_Bool enabled)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
+
+    enabled = !!enabled;
+    if (priv->areMouseEventsEnabled == enabled)
+        return true;
 
-    impl->setMouseEventsEnabled(!!enabled);
+    priv->areMouseEventsEnabled = enabled;
+    if (enabled) {
+        evas_object_event_callback_add(ewkView, EVAS_CALLBACK_MOUSE_DOWN, _ewk_view_on_mouse_down, smartData);
+        evas_object_event_callback_add(ewkView, EVAS_CALLBACK_MOUSE_UP, _ewk_view_on_mouse_up, smartData);
+        evas_object_event_callback_add(ewkView, EVAS_CALLBACK_MOUSE_MOVE, _ewk_view_on_mouse_move, smartData);
+    } else {
+        evas_object_event_callback_del(ewkView, EVAS_CALLBACK_MOUSE_DOWN, _ewk_view_on_mouse_down);
+        evas_object_event_callback_del(ewkView, EVAS_CALLBACK_MOUSE_UP, _ewk_view_on_mouse_up);
+        evas_object_event_callback_del(ewkView, EVAS_CALLBACK_MOUSE_MOVE, _ewk_view_on_mouse_move);
+    }
 
     return true;
 }
@@ -1708,77 +2709,65 @@ Eina_Bool ewk_view_mouse_events_enabled_set(Evas_Object* ewkView, Eina_Bool enab
 Eina_Bool ewk_view_mouse_events_enabled_get(const Evas_Object* ewkView)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
-
-    return impl->mouseEventsEnabled();
-}
-
-Eina_Bool ewk_view_color_picker_color_set(Evas_Object* ewkView, int r, int g, int b, int a)
-{
-#if ENABLE(INPUT_TYPE_COLOR)
-    EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
 
-    return impl->setColorPickerColor(WebCore::Color(r, g, b, a));
-#else
-    return false;
-#endif
+    return priv->areMouseEventsEnabled;
 }
 
 static Eina_Bool _ewk_view_default_javascript_alert(Evas_Object* ewkView, const char* alertText, void* userData)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
 
-    return impl->javascriptPopup->alert(alertText);
+    return priv->javascriptPopup->alert(alertText);
 }
 
 static Eina_Bool _ewk_view_default_javascript_confirm(Evas_Object* ewkView, const char* message, void* userData)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
 
-    return impl->javascriptPopup->confirm(message);
+    return priv->javascriptPopup->confirm(message);
 }
 
 static Eina_Bool _ewk_view_default_javascript_prompt(Evas_Object* ewkView, const char* message, const char* defaultValue, void* userData)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
 
-    return impl->javascriptPopup->prompt(message, defaultValue);
+    return priv->javascriptPopup->prompt(message, defaultValue);
 }
 
 #if ENABLE(TIZEN_SUPPORT_BEFORE_UNLOAD_CONFIRM_PANEL)
 static Eina_Bool _ewk_view_default_before_unload_confirm_panel(Evas_Object* ewkView, const char* message, void* userData)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
 
-    return impl->javascriptPopup->beforeUnloadConfirmPanel(message);
+    return priv->javascriptPopup->beforeUnloadConfirmPanel(message);
 }
 #endif
 
 static Eina_Bool _ewk_view_default_open_panel(Evas_Object* ewkView, Eina_Bool allow_multiple_files, Eina_List *accepted_mime_types, const char* capture, void* userData)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
 
-    return impl->openPanel->openPanel(ewkView, allow_multiple_files, accepted_mime_types, capture, impl);
+    return priv->openPanel->openPanel(ewkView, allow_multiple_files, accepted_mime_types, capture, priv);
 }
 
 #if ENABLE(TIZEN_WEBKIT2_POPUP_INTERNAL)
 Eina_Bool _ewk_view_popup_menu_show(Ewk_View_Smart_Data* smartData, Eina_Rectangle rect, Ewk_Text_Direction text_direction, double page_scale_factor, Eina_List* items, int selectedIndex)
 {
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
 
-    if (impl->popupPicker)
-        ewk_popup_picker_del(impl->popupPicker);
+    if (priv->popupPicker)
+        ewk_popup_picker_del(priv->popupPicker);
 
 #if ENABLE(TIZEN_MULTIPLE_SELECT)
-    impl->popupPicker = ewk_popup_picker_new(smartData->self, items, selectedIndex, false);
+    priv->popupPicker = ewk_popup_picker_new(smartData->self, items, selectedIndex, false);
 #else
-    impl->popupPicker = ewk_popup_picker_new(smartData->self, items, selectedIndex);
+    priv->popupPicker = ewk_popup_picker_new(smartData->self, items, selectedIndex);
 #endif
 
     return true;
@@ -1787,12 +2776,12 @@ Eina_Bool _ewk_view_popup_menu_show(Ewk_View_Smart_Data* smartData, Eina_Rectang
 #if ENABLE(TIZEN_MULTIPLE_SELECT)
 Eina_Bool _ewk_view_multiple_popup_menu_show(Ewk_View_Smart_Data* smartData, Eina_Rectangle rect, Ewk_Text_Direction text_direction, double page_scale_factor, Eina_List* items)
 {
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
 
-    if (impl->popupPicker)
-        ewk_popup_picker_del(impl->popupPicker);
+    if (priv->popupPicker)
+        ewk_popup_picker_del(priv->popupPicker);
 
-    impl->popupPicker = ewk_popup_picker_new(smartData->self, items, 0, true);
+    priv->popupPicker = ewk_popup_picker_new(smartData->self, items, 0, true);
 
     return true;
 }
@@ -1800,13 +2789,13 @@ Eina_Bool _ewk_view_multiple_popup_menu_show(Ewk_View_Smart_Data* smartData, Ein
 
 Eina_Bool _ewk_view_popup_menu_hide(Ewk_View_Smart_Data* smartData)
 {
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
 
-    if (!impl->popupPicker)
+    if (!priv->popupPicker)
         return false;
 
-    ewk_popup_picker_del(impl->popupPicker);
-    impl->popupPicker = 0;
+    ewk_popup_picker_del(priv->popupPicker);
+    priv->popupPicker = 0;
 
     return true;
 }
@@ -1815,12 +2804,12 @@ Eina_Bool _ewk_view_popup_menu_update(Ewk_View_Smart_Data* smartData, Eina_Recta
 {
     // FIXME: The rect should be updated if it was changed
 
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
 
-    if (!impl->popupPicker)
+    if (!priv->popupPicker)
         return false;
 
-    ewk_popup_picker_update(smartData->self, impl->popupPicker, items, selectedIndex);
+    ewk_popup_picker_update(smartData->self, priv->popupPicker, items, selectedIndex);
 
     return true;
 }
@@ -1829,9 +2818,9 @@ Eina_Bool _ewk_view_popup_menu_update(Ewk_View_Smart_Data* smartData, Eina_Recta
 #if ENABLE(TIZEN_INPUT_TAG_EXTENSION)
 static Eina_Bool _ewk_view_input_picker_show(Ewk_View_Smart_Data* smartData, Ewk_Input_Type inputType, const char* inputValue)
 {
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
 
-    impl->inputPicker->show(inputType, inputValue);
+    priv->inputPicker->show(inputType, inputValue);
     return true;
 }
 #endif
@@ -1839,17 +2828,17 @@ static Eina_Bool _ewk_view_input_picker_show(Ewk_View_Smart_Data* smartData, Ewk
 #if ENABLE(TIZEN_DATALIST_ELEMENT)
 static Eina_Bool _ewk_view_data_list_show(Ewk_View_Smart_Data* smartData, Ewk_Input_Type inputType, Eina_List* optionList)
 {
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
 
-    impl->inputPicker->showDataList(inputType, optionList);
+    priv->inputPicker->showDataList(inputType, optionList);
     return true;
 }
 
 static Eina_Bool _ewk_view_data_list_hide(Ewk_View_Smart_Data* smartData, Ewk_Input_Type inputType)
 {
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
 
-    impl->inputPicker->hideDataList(inputType);
+    priv->inputPicker->hideDataList(inputType);
     return true;
 }
 #endif
@@ -1857,17 +2846,17 @@ static Eina_Bool _ewk_view_data_list_hide(Ewk_View_Smart_Data* smartData, Ewk_In
 #if ENABLE(TIZEN_INPUT_COLOR_PICKER)
 static Eina_Bool _ewk_input_picker_color_request(Ewk_View_Smart_Data* smartData, int r, int g, int b, int a)
 {
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
 
-    impl->inputPicker->showColorPicker(r, g, b, a);
+    priv->inputPicker->showColorPicker(r, g, b, a);
     return true;
 }
 
 static Eina_Bool _ewk_input_picker_color_dismiss(Ewk_View_Smart_Data* smartData)
 {
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
 
-    impl->inputPicker->hideColorPicker();
+    priv->inputPicker->hideColorPicker();
     return true;
 }
 #endif
@@ -1875,25 +2864,25 @@ static Eina_Bool _ewk_input_picker_color_dismiss(Ewk_View_Smart_Data* smartData)
 PageClientImpl* ewkViewGetPageClient(const Evas_Object* ewkView)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, 0);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, 0);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, 0);
 
-    return impl->pageClient.get();
+    return priv->pageClient.get();
 }
 
 double ewk_view_text_zoom_get(const Evas_Object* ewkView)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, 1);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, 1);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, 1);
 
-    return WKPageGetTextZoomFactor(toAPI(impl->pageProxy.get()));
+    return WKPageGetTextZoomFactor(toAPI(priv->pageClient->page()));
 }
 
 Eina_Bool ewk_view_text_zoom_set(Evas_Object* ewkView, double textZoomFactor)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
 
-    WKPageSetTextZoomFactor(toAPI(impl->pageProxy.get()), textZoomFactor);
+    WKPageSetTextZoomFactor(toAPI(priv->pageClient->page()), textZoomFactor);
     return true;
 }
 
@@ -1901,68 +2890,80 @@ Eina_Bool ewk_view_text_zoom_set(Evas_Object* ewkView, double textZoomFactor)
 FocusRing* ewkViewGetFocusRing(Evas_Object* ewkView)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, 0);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, 0);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, 0);
 
-    return impl->focusRing.get();
+    return priv->focusRing.get();
 }
 #endif
 
 Ewk_Frame_Ref ewk_view_main_frame_get(Evas_Object* ewkView)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, 0);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, 0);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, 0);
 
-    return static_cast<Ewk_Frame_Ref>(WKPageGetMainFrame(toAPI(impl->pageProxy.get())));
+    return static_cast<Ewk_Frame_Ref>(WKPageGetMainFrame(toAPI(priv->pageClient->page())));
 }
 
 Ewk_Frame_Ref ewk_view_focused_frame_get(Evas_Object* ewkView)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, 0);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, 0);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, 0);
 
-    return static_cast<Ewk_Frame_Ref>(WKPageGetFocusedFrame(toAPI(impl->pageProxy.get())));
+    return static_cast<Ewk_Frame_Ref>(WKPageGetFocusedFrame(toAPI(priv->pageClient->page())));
 }
 
 JSGlobalContextRef ewkViewGetJavascriptGlobalContext(Evas_Object* ewkView)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, 0);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, 0);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, 0);
 
-    if (!impl->javascriptGlobalContext)
-        impl->javascriptGlobalContext = JSGlobalContextCreate(0);
-    return impl->javascriptGlobalContext;
+    if (!priv->javascriptGlobalContext)
+        priv->javascriptGlobalContext = JSGlobalContextCreate(0);
+    return priv->javascriptGlobalContext;
 }
 
 void ewkViewLoadCommitted(Evas_Object* ewkView)
 {
 #if ENABLE(TIZEN_GESTURE)
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl);
-    impl->gestureClient->reset();
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
+    priv->gestureClient->reset();
 #endif
 #if ENABLE(TIZEN_ISF_PORT)
-    impl->inputMethodContext()->hideIMFContext();
+     ewk_view_imf_context_hide(ewkView);
 #endif
-    impl->informURLChange();
+    ewk_view_uri_update(ewkView);
     evas_object_smart_callback_call(ewkView, "load,committed", 0);
 }
 
 void ewkViewLoadError(Evas_Object* ewkView, WKErrorRef error)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
+
+    Ewk_Error* ewkError = ewkErrorCreate(error);
+    ewkErrorLoadErrorPage(ewkError, toAPI(priv->pageClient->page()));
+    evas_object_smart_callback_call(ewkView, "load,error", ewkError);
+    ewkErrorDelete(ewkError);
+}
+
+void ewkViewSetTitleAndURL(Evas_Object* ewkView, const char* title, const char* url)
+{
+    EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
 
-    OwnPtr<Ewk_Error> ewkError = Ewk_Error::create(error);
-    ewk_error_load_error_page(ewkError.get(), toAPI(impl->pageProxy.get()));
-    evas_object_smart_callback_call(ewkView, "load,error", ewkError.get());
+    if (title && eina_stringshare_replace(&priv->title, title))
+        evas_object_smart_callback_call(ewkView, "title,changed", static_cast<void*>(const_cast<char*>(priv->title)));
+    if (url && eina_stringshare_replace(&priv->uri, url))
+        evas_object_smart_callback_call(ewkView, "uri,changed", static_cast<void*>(const_cast<char*>(priv->uri)));
 }
 
 void ewkViewDidFirstVisuallyNonEmptyLayout(Evas_Object* ewkView)
 {
 #if ENABLE(TIZEN_GESTURE)
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl);
-    impl->gestureClient->reset();
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
+    priv->gestureClient->reset();
 #endif
     evas_object_smart_callback_call(ewkView, "load,nonemptylayout,finished", 0);
 }
@@ -1970,13 +2971,13 @@ void ewkViewDidFirstVisuallyNonEmptyLayout(Evas_Object* ewkView)
 void ewkViewDidReceiveAuthenticationChallenge(Evas_Object* ewkView, Ewk_Auth_Challenge* authChallenge)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
 
-    if (impl->authChallenge)
-        ewkAuthChallengeDelete(impl->authChallenge);
-    impl->authChallenge = authChallenge;
+    if (priv->authChallenge)
+        ewkAuthChallengeDelete(priv->authChallenge);
+    priv->authChallenge = authChallenge;
 
-    evas_object_smart_callback_call(ewkView, "authentication,challenge", impl->authChallenge);
+    evas_object_smart_callback_call(ewkView, "authentication,challenge", priv->authChallenge);
 }
 
 void ewk_view_process_crashed(Evas_Object* ewkView)
@@ -1992,19 +2993,19 @@ void ewk_view_process_crashed(Evas_Object* ewkView)
 unsigned long long ewkViewExceededDatabaseQuota(Evas_Object* ewkView, WKSecurityOriginRef origin, WKStringRef databaseName, WKStringRef displayName, unsigned long long currentQuota, unsigned long long currentOriginUsage, unsigned long long currentDatabaseUsage, unsigned long long expectedUsage)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, currentQuota);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, currentQuota);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, currentQuota);
 
     TIZEN_LOGI("database,quota,exceeded");
-    uint64_t defaultQuota = ewkContextGetDatabaseQuota(impl->context.get());
+    uint64_t defaultQuota = ewkContextGetDatabaseQuota(priv->context);
     if (defaultQuota >= expectedUsage + currentQuota)
         return defaultQuota;
 
-    if (impl->exceededDatabaseQuota)
-        ewkContextDeleteExceededQuota(impl->exceededDatabaseQuota);
-    impl->exceededDatabaseQuota = ewkContextCreateExceededQuota(origin, databaseName, displayName, currentQuota, currentOriginUsage, currentDatabaseUsage, expectedUsage);
-    evas_object_smart_callback_call(ewkView, "database,quota,exceeded", impl->exceededDatabaseQuota);
+    if (priv->exceededDatabaseQuota)
+        ewkContextDeleteExceededQuota(priv->exceededDatabaseQuota);
+    priv->exceededDatabaseQuota = ewkContextCreateExceededQuota(origin, databaseName, displayName, currentQuota, currentOriginUsage, currentDatabaseUsage, expectedUsage);
+    evas_object_smart_callback_call(ewkView, "database,quota,exceeded", priv->exceededDatabaseQuota);
 
-    return ewkContextGetNewQuotaForExceededQuota(impl->context.get(), impl->exceededDatabaseQuota);
+    return ewkContextGetNewQuotaForExceededQuota(priv->context, priv->exceededDatabaseQuota);
 }
 #endif
 
@@ -2018,40 +3019,40 @@ void ewkViewCancelNotification(Evas_Object* ewkView, uint64_t notificationID)
 void ewkViewRequestNotificationPermission(Evas_Object* ewkView, Ewk_Notification_Permission_Request* notificationPermissionRequest)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
 
     TIZEN_LOGI("notification,permission,request");
-    impl->notificationPermissionRequests = eina_list_append(impl->notificationPermissionRequests, notificationPermissionRequest);
+    priv->notificationPermissionRequests = eina_list_append(priv->notificationPermissionRequests, notificationPermissionRequest);
     evas_object_smart_callback_call(ewkView, "notification,permission,request", notificationPermissionRequest);
 }
 
 void ewkViewShowNotification(Evas_Object* ewkView, Ewk_Notification* notification)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
 
     TIZEN_LOGI("notification,show");
     Eina_List* listIterator=0;
     void* data=0;
     const char* replaceID = ewkNotificationGetReplaceID(notification);
     if(strlen(replaceID)) {
-        EINA_LIST_FOREACH(impl->notifications, listIterator, data) {
+        EINA_LIST_FOREACH(priv->notifications, listIterator, data) {
             Ewk_Notification* notificationForReplace = static_cast<Ewk_Notification*>(data);
             if(!strcmp(ewkNotificationGetReplaceID(notificationForReplace), replaceID))
                 ewkViewCancelNotification(ewkView, ewk_notification_id_get(notificationForReplace));
         }
     }
 
-    impl->notifications = eina_list_append(impl->notifications, notification);
+    priv->notifications = eina_list_append(priv->notifications, notification);
     evas_object_smart_callback_call(ewkView, "notification,show", notification);
 }
 
 void ewkViewDeleteNotificationPermissionRequest(Evas_Object* ewkView, Ewk_Notification_Permission_Request* ewkNotificationPermissionRequest)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
 
-    impl->notificationPermissionRequests = eina_list_remove(impl->notificationPermissionRequests, ewkNotificationPermissionRequest);
+    priv->notificationPermissionRequests = eina_list_remove(priv->notificationPermissionRequests, ewkNotificationPermissionRequest);
 }
 #endif
 
@@ -2170,18 +3171,18 @@ bool ewkViewGetStandaloneStatus(Evas_Object* ewkView)
 void ewkViewRequestUserMediaPermission(Evas_Object* ewkView, Ewk_User_Media_Permission_Request* userMediaPermission)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
 
-    impl->userMediaPermissionRequests = eina_list_append(impl->userMediaPermissionRequests, userMediaPermission);
+    priv->userMediaPermissionRequests = eina_list_append(priv->userMediaPermissionRequests, userMediaPermission);
     evas_object_smart_callback_call(ewkView, "usermedia,permission,request", userMediaPermission);
 }
 
 void ewkViewDeleteUserMediaPermissionRequest(Evas_Object* ewkView, Ewk_User_Media_Permission_Request* permission)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
 
-    impl->userMediaPermissionRequests = eina_list_remove(impl->userMediaPermissionRequests, permission);
+    priv->userMediaPermissionRequests = eina_list_remove(priv->userMediaPermissionRequests, permission);
 }
 
 #endif
@@ -2204,10 +3205,10 @@ void ewkViewProcessJSBridgePlugin(Evas_Object* ewkView, WKStringRef request, WKS
 void ewkViewRequestCertificateConfirm(Evas_Object* ewkView, Ewk_Certificate_Policy_Decision* certificatePolicyDecision)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd);
-    EWK_VIEW_IMPL_GET_OR_RETURN(sd, impl);
-    if (impl->certificatePolicyDecision)
-        ewkCertificatePolicyDecisionDelete(impl->certificatePolicyDecision);
-    impl->certificatePolicyDecision = certificatePolicyDecision;
+    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv);
+    if (priv->certificatePolicyDecision)
+        ewkCertificatePolicyDecisionDelete(priv->certificatePolicyDecision);
+    priv->certificatePolicyDecision = certificatePolicyDecision;
 
     evas_object_smart_callback_call(ewkView, "request,certificate,confirm", certificatePolicyDecision);
 }
@@ -2223,39 +3224,44 @@ void ewkViewCustomContextMenuItemSelected(Evas_Object* ewkView, Ewk_Context_Menu
     evas_object_smart_callback_call(ewkView, "contextmenu,selected", static_cast<void*>(item));
 }
 
+void ewkViewClosePage(Evas_Object* ewkView)
+{
+    evas_object_smart_callback_call(ewkView, "close,window", 0);
+}
+
 #if ENABLE(TIZEN_GEOLOCATION)
 void ewkViewRequestGeolocationPermission(Evas_Object* ewkView, Ewk_Geolocation_Permission_Request* geolocationPermissionRequest)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
 
     TIZEN_LOGI("geolocation,permission,request");
-    impl->geolocationPermissionRequests = eina_list_append(impl->geolocationPermissionRequests, geolocationPermissionRequest);
+    priv->geolocationPermissionRequests = eina_list_append(priv->geolocationPermissionRequests, geolocationPermissionRequest);
     evas_object_smart_callback_call(ewkView, "geolocation,permission,request", geolocationPermissionRequest);
 }
 
 void ewkViewDeleteGeolocationPermission(Evas_Object* ewkView, Ewk_Geolocation_Permission_Request* geolocationPermissionRequest)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
 
-    impl->geolocationPermissionRequests = eina_list_remove(impl->geolocationPermissionRequests, geolocationPermissionRequest);
+    priv->geolocationPermissionRequests = eina_list_remove(priv->geolocationPermissionRequests, geolocationPermissionRequest);
 }
 
 void ewkViewSetGeolocation(Evas_Object* ewkView, Ewk_Geolocation* geolocation)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
 
-    impl->geolocation = geolocation;
+    priv->geolocation = geolocation;
 }
 
 Ewk_Geolocation* ewkViewGetGeolocation(Evas_Object* ewkView)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, 0);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, 0);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, 0);
 
-    return impl->geolocation;
+    return priv->geolocation;
 }
 
 bool ewkViewIsValidLocationService(Evas_Object* ewkView)
@@ -2268,6 +3274,18 @@ bool ewkViewIsValidLocationService(Evas_Object* ewkView)
 }
 #endif
 
+WKPageRef ewkViewCreateNewPage(Evas_Object* ewkView)
+{
+    Evas_Object* createdEwkView = 0;
+
+    evas_object_smart_callback_call(ewkView, "create,window", &createdEwkView);
+
+    if (!createdEwkView)
+        return 0;
+
+    return static_cast<WKPageRef>(WKRetain(toAPI(ewk_view_page_get(createdEwkView))));
+}
+
 void ewkViewFormSubmit(Evas_Object* ewkView, Ewk_Form_Data* formData)
 {
     evas_object_smart_callback_call(ewkView, "form,submit", formData);
@@ -2276,45 +3294,45 @@ void ewkViewFormSubmit(Evas_Object* ewkView, Ewk_Form_Data* formData)
 void ewkViewPolicyNavigationDecide(Evas_Object* ewkView, Ewk_Policy_Decision* policyDecision)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd);
-    EWK_VIEW_IMPL_GET_OR_RETURN(sd, impl);
-    if (impl->policyDecision)
-        ewkPolicyDecisionDelete(impl->policyDecision);
-    impl->policyDecision = policyDecision;
+    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv);
+    if (priv->policyDecision)
+        ewkPolicyDecisionDelete(priv->policyDecision);
+    priv->policyDecision = policyDecision;
 
-    evas_object_smart_callback_call(ewkView, "policy,navigation,decide", impl->policyDecision);
+    evas_object_smart_callback_call(ewkView, "policy,navigation,decide", priv->policyDecision);
 }
 
 void ewkViewPolicyNewWindowDecide(Evas_Object* ewkView, Ewk_Policy_Decision* policyDecision)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd);
-    EWK_VIEW_IMPL_GET_OR_RETURN(sd, impl);
-    if (impl->policyDecision)
-        ewkPolicyDecisionDelete(impl->policyDecision);
-    impl->policyDecision = policyDecision;
+    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv);
+    if (priv->policyDecision)
+        ewkPolicyDecisionDelete(priv->policyDecision);
+    priv->policyDecision = policyDecision;
 
-    evas_object_smart_callback_call(ewkView, "policy,newwindow,decide", impl->policyDecision);
+    evas_object_smart_callback_call(ewkView, "policy,newwindow,decide", priv->policyDecision);
 }
 
 void ewkViewPolicyResponseDecide(Evas_Object* ewkView, Ewk_Policy_Decision* policyDecision)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd);
-    EWK_VIEW_IMPL_GET_OR_RETURN(sd, impl);
-    if (impl->policyDecision)
-        ewkPolicyDecisionDelete(impl->policyDecision);
-    impl->policyDecision = policyDecision;
+    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv);
+    if (priv->policyDecision)
+        ewkPolicyDecisionDelete(priv->policyDecision);
+    priv->policyDecision = policyDecision;
 
-    evas_object_smart_callback_call(ewkView, "policy,response,decide", impl->policyDecision);
+    evas_object_smart_callback_call(ewkView, "policy,response,decide", priv->policyDecision);
 }
 
 void ewkViewSendScrollEvent(Evas_Object* ewkView, int deltaX, int deltaY)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
 
-    IntPoint scrollPosition = impl->pageClient->scrollPosition();
-    IntSize contentsSize = impl->pageProxy->contentsSize();
+    IntPoint scrollPosition = priv->pageClient->scrollPosition();
+    IntSize contentsSize = priv->pageClient->page()->contentsSize();
 #if ENABLE(TIZEN_WEBKIT2_TILED_BACKING_STORE)
-    contentsSize.scale(impl->pageClient->scaleFactor());
+    contentsSize.scale(priv->pageClient->scaleFactor());
 #endif
 
     // some website's contents size is smaller than view size,
@@ -2342,51 +3360,51 @@ void ewkViewSendScrollEvent(Evas_Object* ewkView, int deltaX, int deltaY)
 void ewkViewSendEdgeEvent(Evas_Object* ewkView, const IntPoint& scrollPosition, int deltaX, int deltaY)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
 
-    IntSize contentsSize = impl->pageProxy->contentsSize();
+    IntSize contentsSize = priv->pageClient->page()->contentsSize();
 #if ENABLE(TIZEN_WEBKIT2_TILED_BACKING_STORE)
-    contentsSize.scale(impl->pageClient->scaleFactor());
+    contentsSize.scale(priv->pageClient->scaleFactor());
 #endif
 
     int maxScrollY = contentsSize.height() - smartData->view.h;
-    if (!impl->isVerticalEdge) {
+    if (!priv->isVerticalEdge) {
         if (deltaY < 0 && (scrollPosition.y() + deltaY) <= 0) {
             evas_object_smart_callback_call(ewkView, "edge,top", NULL);
-            impl->isVerticalEdge = true;
+            priv->isVerticalEdge = true;
         } else if (deltaY > 0 && (scrollPosition.y() + deltaY) >= maxScrollY) {
             evas_object_smart_callback_call(ewkView, "edge,bottom", NULL);
-            impl->isVerticalEdge = true;
+            priv->isVerticalEdge = true;
         }
     } else {
         if (maxScrollY && ((scrollPosition.y() == 0 && deltaY > 0)
                            || (scrollPosition.y() == maxScrollY && deltaY < 0)))
-            impl->isVerticalEdge = false;
+            priv->isVerticalEdge = false;
     }
 
     int maxScrollX = contentsSize.width() - smartData->view.w;
-    if (!impl->isHorizontalEdge) {
+    if (!priv->isHorizontalEdge) {
         if (deltaX < 0 && (scrollPosition.x() + deltaX) <= 0) {
             evas_object_smart_callback_call(ewkView, "edge,left", NULL);
-            impl->isHorizontalEdge = true;
+            priv->isHorizontalEdge = true;
         } else if (deltaX > 0 && (scrollPosition.x() + deltaX) >= maxScrollX) {
             evas_object_smart_callback_call(ewkView, "edge,right", NULL);
-            impl->isHorizontalEdge = true;
+            priv->isHorizontalEdge = true;
         }
     } else {
         if (maxScrollX && ((scrollPosition.x() == 0 && deltaX > 0)
                            || (scrollPosition.x() == maxScrollX && deltaX < 0)))
-            impl->isHorizontalEdge = false;
+            priv->isHorizontalEdge = false;
     }
 }
 
 void ewkViewClearEdges(Evas_Object* ewkView)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
 
-    impl->isVerticalEdge = false;
-    impl->isHorizontalEdge = false;
+    priv->isVerticalEdge = false;
+    priv->isHorizontalEdge = false;
 }
 
 void ewk_view_scale_range_get(Evas_Object* ewkView, double* minimumScale, double* maximumScale)
@@ -2410,19 +3428,19 @@ void ewk_view_scale_range_get(Evas_Object* ewkView, double* minimumScale, double
 bool ewk_view_focused_node_adjust(Evas_Object* ewkView, Eina_Bool adjustForExternalKeyboard)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
 
-    double scaleFactor = impl->pageClient->scaleFactor();
-    IntSize contentsSize = impl->pageProxy->contentsSize();
+    double scaleFactor = priv->pageClient->scaleFactor();
+    IntSize contentsSize = priv->pageClient->page()->contentsSize();
 
     double newScaleFactor = scaleFactor;
     // Readable zoom value is dependent on device DPI
-    if (scaleFactor < impl->pageProxy->deviceScaleFactor()
-        && impl->pageClient->viewportConstraints().userScalable)
-        newScaleFactor = impl->pageProxy->deviceScaleFactor();
+    if (scaleFactor < priv->pageClient->page()->deviceScaleFactor()
+        && priv->pageClient->viewportConstraints().userScalable)
+        newScaleFactor = priv->pageClient->page()->deviceScaleFactor();
 
     // Readable zoom value should be inside of viewport scale range
-    newScaleFactor = impl->pageClient->adjustScaleWithViewport(newScaleFactor);
+    newScaleFactor = priv->pageClient->adjustScaleWithViewport(newScaleFactor);
 
     // scale contents' size with new scale factor
 #if ENABLE(TIZEN_WEBKIT2_TILED_BACKING_STORE)
@@ -2450,12 +3468,12 @@ bool ewk_view_focused_node_adjust(Evas_Object* ewkView, Eina_Bool adjustForExter
     // 2. external keyboard is not connected(if adjustForExternalKeyboard is true)
     // 3. imfContext is null(if adjustForExternalKeyboard is false)
     // 4. input panel state is hidden(if adjustForExternalKeyboard is false)
-    if ((!(static_cast<PageClient*>(impl->pageClient.get()))->isViewFocused()
+    if ((!(static_cast<PageClient*>(priv->pageClient.get()))->isViewFocused()
         || (adjustForExternalKeyboard && !isExternalKeyboardConnected)
-        || (!adjustForExternalKeyboard && !impl->inputMethodContext())
-        || (!adjustForExternalKeyboard && !impl->inputMethodContext()->isShow()))
+        || (!adjustForExternalKeyboard && !priv->imfContext)
+        || (!adjustForExternalKeyboard && ecore_imf_context_input_panel_state_get(priv->imfContext) == ECORE_IMF_INPUT_PANEL_STATE_HIDE))
 #if ENABLE(TIZEN_WEBKIT2_CONTEXT_MENU_CLIPBOARD)
-        && !(impl->pageClient->isClipboardWindowOpened())
+        && !(priv->pageClient->isClipboardWindowOpened())
 #endif
         )
         return false;
@@ -2464,8 +3482,8 @@ bool ewk_view_focused_node_adjust(Evas_Object* ewkView, Eina_Bool adjustForExter
     IntSize visibleSize(smartData->view.w, smartData->view.h);
     // caret position can be outside of visible rect.
     // we need to consider it.
-    IntRect selectionRect = impl->pageProxy->getSelectionRect(true);
-    IntRect focusedNodeRect = impl->pageClient->focusedNodeRect();
+    IntRect selectionRect = priv->pageClient->page()->getSelectionRect(true);
+    IntRect focusedNodeRect = priv->pageClient->focusedNodeRect();
 #if ENABLE(TIZEN_WEBKIT2_TILED_BACKING_STORE)
     selectionRect.scale(newScaleFactor);
     focusedNodeRect.scale(newScaleFactor);
@@ -2485,12 +3503,12 @@ bool ewk_view_focused_node_adjust(Evas_Object* ewkView, Eina_Bool adjustForExter
         scrollPosition.setX(focusedNodeRect.x());
 
 #if ENABLE(TIZEN_WEBKIT2_TILED_BACKING_STORE)
-    impl->pageClient->setVisibleContentRect(IntRect(scrollPosition, impl->size()), newScaleFactor);
+    priv->pageClient->setVisibleContentRect(IntRect(scrollPosition, ewk_view_size_get(ewkView)), newScaleFactor);
 #else
     if (newScaleFactor != scaleFactor)
-        impl->pageProxy->scalePage(newScaleFactor, scrollPosition);
+        priv->pageClient->page()->scalePage(newScaleFactor, scrollPosition);
     else
-        impl->pageProxy->scrollMainFrameTo(scrollPosition);
+        priv->pageClient->page()->scrollMainFrameTo(scrollPosition);
 #endif
     evas_object_move(smartData->image, smartData->view.x, smartData->view.y);
     return true;
@@ -2501,7 +3519,7 @@ bool ewk_view_focused_node_adjust(Evas_Object* ewkView, Eina_Bool adjustForExter
 static Eina_Bool _ewk_view_composite(void* data)
 {
     Ewk_View_Smart_Data* smartData = static_cast<Ewk_View_Smart_Data*>(data);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false)
 
     if (!evas_object_visible_get(smartData->image))
         return ECORE_CALLBACK_CANCEL;
@@ -2519,14 +3537,14 @@ static Eina_Bool _ewk_view_composite(void* data)
     cairo_fill(context.get());
     cairo_restore(context.get());
 
-    impl->pageClient->drawContents(context.get());
+    priv->pageClient->drawContents(context.get());
 
     evas_object_image_data_set(smartData->image, pixels);
     evas_object_image_data_update_add(smartData->image, 0, 0, ow, oh);
 
     ewkViewFrameRendered(smartData->self);
 
-    impl->compositionAnimator = 0;
+    priv->compositionAnimator = 0;
 
     return ECORE_CALLBACK_CANCEL;
 }
@@ -2538,11 +3556,11 @@ void ewk_view_mark_for_sync(Evas_Object* ewkView)
     EINA_SAFETY_ON_NULL_RETURN(smartData->image);
 
 #if ENABLE(TIZEN_RUNTIME_BACKEND_SELECTION)
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
 
     if (!ewk_view_is_opengl_backend(ewkView)) {
-        if (!impl->compositionAnimator)
-            impl->compositionAnimator = ecore_animator_add(_ewk_view_composite, smartData);
+        if (!priv->compositionAnimator)
+            priv->compositionAnimator = ecore_animator_add(_ewk_view_composite, smartData);
         return;
     }
 #endif
@@ -2554,14 +3572,14 @@ static void on_pixels_for_accelerated_compositing(void* data, Evas_Object* obj)
 {
     Evas_Object* ewkView = static_cast<Evas_Object*>(data);
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl);
-    impl->pageClient->drawContents();
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
+    priv->pageClient->drawContents();
 }
 
 bool ewk_view_image_native_surface_set(Evas_Object* ewkView, Evas_Native_Surface* nativeSurface)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
 
     if (!smartData->image)
         return false;
@@ -2576,35 +3594,35 @@ bool ewk_view_image_native_surface_set(Evas_Object* ewkView, Evas_Native_Surface
 void _ewk_view_suspend_painting(Evas_Object* ewkView)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
 
-    if (!impl->suspendedPainting) {
-        impl->pageProxy->suspendPainting();
-        impl->suspendedPainting = true;
+    if (!priv->suspendedPainting) {
+        priv->pageClient->page()->suspendPainting();
+        priv->suspendedPainting = true;
     }
 }
 
 void _ewk_view_resume_painting(Evas_Object* ewkView)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
 
-    if (impl->suspendedPainting) {
-        impl->pageProxy->resumePainting();
-        impl->suspendedPainting = false;
+    if (priv->suspendedPainting) {
+        priv->pageClient->page()->resumePainting();
+        priv->suspendedPainting = false;
     }
 }
 
 void ewk_view_suspend(Evas_Object* ewkView)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
 
-    if (impl->pageProxy->estimatedProgress() < 1.0) {
-        impl->suspendRequested = true;
+    if (priv->pageClient->page()->estimatedProgress() < 1.0) {
+        priv->suspendRequested = true;
         return;
     }
-    impl->suspendRequested = false;
+    priv->suspendRequested = false;
 
     _ewk_view_suspend_painting(ewkView);
 
@@ -2618,23 +3636,23 @@ void ewk_view_suspend(Evas_Object* ewkView)
     // will be suspended again.
     // Multiple suspend of ActiveDOMObject makes unintended suspend/resume status of
     // the ActiveDOMObject.
-    if (!impl->suspendedResources && !impl->isWaitingForJavaScriptPopupReply) {
-        impl->pageProxy->suspendJavaScriptAndResource();
-        impl->suspendedResources = true;
+    if (!priv->suspendedResources && !priv->isWaitingForJavaScriptPopupReply) {
+        priv->pageClient->page()->suspendJavaScriptAndResource();
+        priv->suspendedResources = true;
     }
 
 #if ENABLE(TIZEN_PLUGIN_SUSPEND_RESUME)
-    impl->pageProxy->suspendPlugin();
+    priv->pageClient->page()->suspendPlugin();
 #endif
 }
 
 void ewk_view_resume(Evas_Object* ewkView)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
 
-    if (impl->suspendRequested) {
-        impl->suspendRequested = false;
+    if (priv->suspendRequested) {
+        priv->suspendRequested = false;
         return;
     }
 
@@ -2650,20 +3668,20 @@ void ewk_view_resume(Evas_Object* ewkView)
     // will be suspended again.
     // Multiple suspend of ActiveDOMObject makes unintended suspend/resume status of
     // the ActiveDOMObject.
-    if (impl->suspendedResources && !impl->isWaitingForJavaScriptPopupReply) {
-        impl->pageProxy->resumeJavaScriptAndResource();
-        impl->suspendedResources = false;
+    if (priv->suspendedResources && !priv->isWaitingForJavaScriptPopupReply) {
+        priv->pageClient->page()->resumeJavaScriptAndResource();
+        priv->suspendedResources = false;
     }
 
 #if ENABLE(TIZEN_PLUGIN_SUSPEND_RESUME)
-    impl->pageProxy->resumePlugin();
+    priv->pageClient->page()->resumePlugin();
 #endif
 }
 
 Eina_Bool ewk_view_url_request_set(Evas_Object* ewkView, const char* url, Ewk_Http_Method method, Eina_Hash* headers, const char* body)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
     EINA_SAFETY_ON_NULL_RETURN_VAL(url, false);
 
     ResourceRequest request(String::fromUTF8(url));
@@ -2704,7 +3722,7 @@ Eina_Bool ewk_view_url_request_set(Evas_Object* ewkView, const char* url, Ewk_Ht
         request.setHTTPBody(FormData::create(body));
 
     WKRetainPtr<WKURLRequestRef> urlRequest(AdoptWK,toAPI(WebURLRequest::create(request).leakRef()));
-    WKPageLoadURLRequest(toAPI(impl->pageProxy.get()), urlRequest.get());
+    WKPageLoadURLRequest(toAPI(priv->pageClient->page()), urlRequest.get());
 
     return true;
 }
@@ -2712,10 +3730,10 @@ Eina_Bool ewk_view_url_request_set(Evas_Object* ewkView, const char* url, Ewk_Ht
 Eina_Bool ewk_view_plain_text_set(Evas_Object* ewkView, const char* plainText)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
 
     WKRetainPtr<WKStringRef> plainTextRef(AdoptWK, WKStringCreateWithUTF8CString(plainText));
-    WKPageLoadPlainTextString(toAPI(impl->pageProxy.get()), plainTextRef.get());
+    WKPageLoadPlainTextString(toAPI(priv->pageClient->page()), plainTextRef.get());
 
     return true;
 }
@@ -2723,7 +3741,7 @@ Eina_Bool ewk_view_plain_text_set(Evas_Object* ewkView, const char* plainText)
 Eina_Bool ewk_view_contents_set(Evas_Object* ewkView, const char* contents, size_t contentsSize, char* mimeType, char* encoding, char* baseUri)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
     EINA_SAFETY_ON_NULL_RETURN_VAL(contents, false);
 
     if (contentsSize == 0)
@@ -2748,7 +3766,7 @@ Eina_Bool ewk_view_contents_set(Evas_Object* ewkView, const char* contents, size
         baseUriString = String::fromUTF8("about:blank");
 
     WKRetainPtr<WKDataRef> contentsRef(AdoptWK, WKDataCreate(reinterpret_cast<const unsigned char*>(contents), contentsSize));
-    impl->pageProxy->loadContentsbyMimeType(toImpl(contentsRef.get()), mimeTypeString, encodingString, baseUriString);
+    priv->pageClient->page()->loadContentsbyMimeType(toImpl(contentsRef.get()), mimeTypeString, encodingString, baseUriString);
 
     return true;
 }
@@ -2756,12 +3774,12 @@ Eina_Bool ewk_view_contents_set(Evas_Object* ewkView, const char* contents, size
 Eina_Bool ewk_view_html_contents_set(Evas_Object* ewkView, const char* html, const char* baseUri)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
 
     WKRetainPtr<WKStringRef> htmlString(AdoptWK, WKStringCreateWithUTF8CString(html));
     WKRetainPtr<WKURLRef> baseURL(AdoptWK, WKURLCreateWithUTF8CString(baseUri));
 
-    WKPageLoadHTMLString(toAPI(impl->pageProxy.get()), htmlString.get(), baseURL.get());
+    WKPageLoadHTMLString(toAPI(priv->pageClient->page()), htmlString.get(), baseURL.get());
 
     return true;
 }
@@ -2769,11 +3787,13 @@ Eina_Bool ewk_view_html_contents_set(Evas_Object* ewkView, const char* html, con
 Eina_Bool ewk_view_page_visibility_state_set(Evas_Object* ewkView, Ewk_Page_Visibility_State pageVisibilityState, Eina_Bool initialState)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
 
     TIZEN_LOGI("initialState (%d)", initialState);
 #if ENABLE(TIZEN_PAGE_VISIBILITY_API)
-    WKPageSetPageVisibility(toAPI(impl->pageProxy.get()), static_cast<WKPageVisibilityState>(pageVisibilityState), initialState);
+    WKPageSetPageVisibility(toAPI(priv->pageClient->page()), static_cast<WKPageVisibilityState
+    >(pageVisibilityState), initialState);
+
     return true;
 #else
     return false;
@@ -2785,12 +3805,12 @@ Eina_Bool ewk_view_user_agent_set(Evas_Object* ewkView, const char* userAgent)
     EINA_SAFETY_ON_NULL_RETURN_VAL(userAgent, false);
 
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
 
-    impl->userAgent = userAgent;
+    eina_stringshare_replace(&priv->userAgent, userAgent);
 
     WKRetainPtr<WKStringRef> userAgentString(AdoptWK, WKStringCreateWithUTF8CString(userAgent));
-    WKPageSetCustomUserAgent(toAPI(impl->pageProxy.get()), userAgentString.get());
+    WKPageSetCustomUserAgent(toAPI(priv->pageClient->page()), userAgentString.get());
 
     return true;
 }
@@ -2798,29 +3818,29 @@ Eina_Bool ewk_view_user_agent_set(Evas_Object* ewkView, const char* userAgent)
 const char* ewk_view_user_agent_get(const Evas_Object* ewkView)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, 0);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, 0);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, 0);
 
-    if (!impl->userAgent) {
-        WKRetainPtr<WKStringRef> userAgentString(AdoptWK, WKPageCopyUserAgent(toAPI(impl->pageProxy.get())));
+    if (!priv->userAgent) {
+        WKRetainPtr<WKStringRef> userAgentString(AdoptWK, WKPageCopyUserAgent(toAPI(priv->pageClient->page())));
 
         int length = WKStringGetMaximumUTF8CStringSize(userAgentString.get());
         OwnArrayPtr<char> buffer = adoptArrayPtr(new char[length]);
         WKStringGetUTF8CString(userAgentString.get(), buffer.get(), length);
-        impl->userAgent = buffer.get();
+        eina_stringshare_replace(&priv->userAgent, buffer.get());
     }
 
-    return impl->userAgent;
+    return priv->userAgent;
 }
 Eina_Bool ewk_view_custom_header_add(const Evas_Object* ewkView, const char* name, const char* value)
 {
 #if ENABLE(TIZEN_CUSTOM_HEADERS)
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
 
     WKRetainPtr<WKStringRef> customHeaderName(AdoptWK, WKStringCreateWithUTF8CString(name));
     WKRetainPtr<WKStringRef> customHeaderValue(AdoptWK, WKStringCreateWithUTF8CString(value));
 
-    WKPageAddCustomHeader(toAPI(impl->pageProxy.get()), customHeaderName.get(), customHeaderValue.get());
+    WKPageAddCustomHeader(toAPI(priv->pageClient->page()), customHeaderName.get(), customHeaderValue.get());
     return true;
 #else
     ERR("TIZEN_CUSTOM_HEADERS not enabled!");
@@ -2832,11 +3852,11 @@ Eina_Bool ewk_view_custom_header_remove(const Evas_Object* ewkView, const char*
 {
 #if ENABLE(TIZEN_CUSTOM_HEADERS)
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
 
     WKRetainPtr<WKStringRef> customHeaderName(AdoptWK, WKStringCreateWithUTF8CString(name));
 
-    WKPageRemoveCustomHeader(toAPI(impl->pageProxy.get()), customHeaderName.get());
+    WKPageRemoveCustomHeader(toAPI(priv->pageClient->page()), customHeaderName.get());
     return true;
 #else
     ERR("TIZEN_CUSTOM_HEADERS not enabled!");
@@ -2848,9 +3868,9 @@ Eina_Bool ewk_view_custom_header_clear(const Evas_Object* ewkView)
 {
 #if ENABLE(TIZEN_CUSTOM_HEADERS)
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
 
-    WKPageClearCustomHeaders(toAPI(impl->pageProxy.get()));
+    WKPageClearCustomHeaders(toAPI(priv->pageClient->page()));
     return true;
 #else
     ERR("TIZEN_CUSTOM_HEADERS not enabled!");
@@ -2862,14 +3882,14 @@ Eina_Bool ewk_view_custom_header_clear(const Evas_Object* ewkView)
 Eina_Bool ewk_view_visibility_set(Evas_Object* ewkView, Eina_Bool enable)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
 
 #if ENABLE(TIZEN_DRAG_SUPPORT)
-    if (impl->pageClient->isDragMode())
-        impl->pageClient->setDragMode(false);
+    if (priv->pageClient->isDragMode())
+        priv->pageClient->setDragMode(false);
 #endif
 
-    impl->pageClient->setIsVisible(enable);
+    priv->pageClient->setIsVisible(enable);
     return true;
 }
 #endif
@@ -2879,7 +3899,7 @@ Evas_Object* ewk_view_screenshot_contents_get(const Evas_Object* ewkView, Eina_R
     EINA_SAFETY_ON_NULL_RETURN_VAL(canvas, 0);
 
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, 0);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, 0);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, 0);
 
     WKRect rect;
     rect.origin.x = viewArea.x;
@@ -2887,7 +3907,7 @@ Evas_Object* ewk_view_screenshot_contents_get(const Evas_Object* ewkView, Eina_R
     rect.size.width = viewArea.w;
     rect.size.height = viewArea.h;
 
-    WKRetainPtr<WKImageRef> snapshot(AdoptWK, WKPageCreateSnapshot(toAPI(impl->pageProxy.get()), rect, scaleFactor));
+    WKRetainPtr<WKImageRef> snapshot(AdoptWK, WKPageCreateSnapshot(toAPI(priv->pageClient->page()), rect, scaleFactor));
     if (!snapshot.get())
         return 0;
 
@@ -2921,9 +3941,9 @@ unsigned int ewk_view_inspector_server_start(Evas_Object* ewkView, unsigned int
 {
 #if ENABLE(TIZEN_WEBKIT2_REMOTE_WEB_INSPECTOR)
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, 0);
-    EWK_VIEW_IMPL_GET_OR_RETURN(sd, impl, 0);
+    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, 0);
 
-    return impl->pageProxy->startInspectorServer(port);
+    return priv->pageClient->page()->startInspectorServer(port);
 #else
     LOG_ERROR("TIZEN_WEBKIT2_REMOTE_WEB_INSPECTOR is disabled.\n");
     return 0;
@@ -2934,9 +3954,9 @@ Eina_Bool ewk_view_inspector_server_stop(Evas_Object* ewkView)
 {
 #if ENABLE(TIZEN_WEBKIT2_REMOTE_WEB_INSPECTOR)
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, false);
-    EWK_VIEW_IMPL_GET_OR_RETURN(sd, impl, false);
+    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, false);
 
-    return impl->pageProxy->stopInspectorServer();
+    return priv->pageClient->page()->stopInspectorServer();
 #else
     LOG_ERROR("TIZEN_WEBKIT2_REMOTE_WEB_INSPECTOR is disabled.\n");
     return false;
@@ -2946,9 +3966,9 @@ Eina_Bool ewk_view_inspector_server_stop(Evas_Object* ewkView)
 void ewk_view_scroll_by(Evas_Object* ewkView, int deltaX, int deltaY)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
 
-    WKPageScrollBy(toAPI(impl->pageProxy.get()), toAPI(IntSize(deltaX, deltaY)));
+    WKPageScrollBy(toAPI(priv->pageClient->page()), toAPI(IntSize(deltaX, deltaY)));
 }
 
 Eina_Bool ewk_view_scroll_pos_get(Evas_Object* ewkView, int* x, int* y)
@@ -2958,9 +3978,9 @@ Eina_Bool ewk_view_scroll_pos_get(Evas_Object* ewkView, int* x, int* y)
     if (y)
         *y = 0;
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
 
-    IntPoint scrollPosition = impl->pageClient->scrollPosition();
+    IntPoint scrollPosition = priv->pageClient->scrollPosition();
     if (x)
         *x = scrollPosition.x();
     if (y)
@@ -2972,9 +3992,9 @@ Eina_Bool ewk_view_scroll_pos_get(Evas_Object* ewkView, int* x, int* y)
 Eina_Bool ewk_view_scroll_set(Evas_Object* ewkView, int x, int y)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
 
-    impl->pageProxy->scrollMainFrameTo(IntPoint(x, y));
+    priv->pageClient->page()->scrollMainFrameTo(IntPoint(x, y));
     return true;
 }
 
@@ -2985,11 +4005,11 @@ Eina_Bool ewk_view_scroll_size_get(const Evas_Object* ewkView, int* width, int*
     if (height)
         *height = 0;
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
 
-    IntSize contentsSize = impl->pageProxy->contentsSize();
+    IntSize contentsSize = priv->pageClient->page()->contentsSize();
 #if ENABLE(TIZEN_WEBKIT2_TILED_BACKING_STORE)
-    contentsSize.scale(impl->pageClient->scaleFactor());
+    contentsSize.scale(priv->pageClient->scaleFactor());
 #endif
 
     if (width && contentsSize.width() > smartData->view.w)
@@ -3002,65 +4022,65 @@ Eina_Bool ewk_view_scroll_size_get(const Evas_Object* ewkView, int* width, int*
 bool ewkViewRunJavaScriptAlert(Evas_Object* ewkView, WKStringRef alertText)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
-    if (!impl->alertContext || !impl->alertContext->javascriptAlertCallback)
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
+    if (!priv->alertContext || !priv->alertContext->javascriptAlertCallback)
         return false;
-    EINA_SAFETY_ON_FALSE_RETURN_VAL(impl->alertContext->ewkView == ewkView, false);
+    EINA_SAFETY_ON_FALSE_RETURN_VAL(priv->alertContext->ewkView == ewkView, false);
 
-    impl->isWaitingForJavaScriptPopupReply = true;
+    priv->isWaitingForJavaScriptPopupReply = true;
     int length = WKStringGetMaximumUTF8CStringSize(alertText);
     OwnArrayPtr<char> alertTextBuffer = adoptArrayPtr(new char[length]);
     WKStringGetUTF8CString(alertText, alertTextBuffer.get(), length);
-    return impl->alertContext->javascriptAlertCallback(impl->alertContext->ewkView, alertTextBuffer.get(), impl->alertContext->userData) == EINA_TRUE;
+    return priv->alertContext->javascriptAlertCallback(priv->alertContext->ewkView, alertTextBuffer.get(), priv->alertContext->userData) == EINA_TRUE;
 }
 
 bool ewkViewRunJavaScriptConfirm(Evas_Object* ewkView, WKStringRef message)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
-    if (!impl->confirmContext || !impl->confirmContext->javascriptConfirmCallback)
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
+    if (!priv->confirmContext || !priv->confirmContext->javascriptConfirmCallback)
         return false;
-    EINA_SAFETY_ON_FALSE_RETURN_VAL(impl->confirmContext->ewkView == ewkView, false);
+    EINA_SAFETY_ON_FALSE_RETURN_VAL(priv->confirmContext->ewkView == ewkView, false);
 
-    impl->isWaitingForJavaScriptPopupReply = true;
+    priv->isWaitingForJavaScriptPopupReply = true;
     int length = WKStringGetMaximumUTF8CStringSize(message);
     OwnArrayPtr<char> messageBuffer = adoptArrayPtr(new char[length]);
     WKStringGetUTF8CString(message, messageBuffer.get(), length);
-    return impl->confirmContext->javascriptConfirmCallback(impl->confirmContext->ewkView, messageBuffer.get(), impl->confirmContext->userData) == EINA_TRUE;
+    return priv->confirmContext->javascriptConfirmCallback(priv->confirmContext->ewkView, messageBuffer.get(), priv->confirmContext->userData) == EINA_TRUE;
 }
 
 bool ewkViewRunJavaScriptPrompt(Evas_Object* ewkView, WKStringRef message, WKStringRef defaultValue)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
-    if (!impl->promptContext || !impl->promptContext->javascriptPromptCallback)
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
+    if (!priv->promptContext || !priv->promptContext->javascriptPromptCallback)
         return false;
-    EINA_SAFETY_ON_FALSE_RETURN_VAL(impl->promptContext->ewkView == ewkView, false);
+    EINA_SAFETY_ON_FALSE_RETURN_VAL(priv->promptContext->ewkView == ewkView, false);
 
-    impl->isWaitingForJavaScriptPopupReply = true;
+    priv->isWaitingForJavaScriptPopupReply = true;
     int length = WKStringGetMaximumUTF8CStringSize(message);
     OwnArrayPtr<char> messageBuffer = adoptArrayPtr(new char[length]);
     WKStringGetUTF8CString(message, messageBuffer.get(), length);
     length = WKStringGetMaximumUTF8CStringSize(defaultValue);
     OwnArrayPtr<char> defaultValueBuffer = adoptArrayPtr(new char[length]);
     WKStringGetUTF8CString(defaultValue, defaultValueBuffer.get(), length);
-    return impl->promptContext->javascriptPromptCallback(impl->promptContext->ewkView, messageBuffer.get(), defaultValueBuffer.get(), impl->promptContext->userData) == EINA_TRUE;
+    return priv->promptContext->javascriptPromptCallback(priv->promptContext->ewkView, messageBuffer.get(), defaultValueBuffer.get(), priv->promptContext->userData) == EINA_TRUE;
 }
 
 #if ENABLE(TIZEN_SUPPORT_BEFORE_UNLOAD_CONFIRM_PANEL)
 bool ewk_view_run_before_unload_confirm_panel(Evas_Object* ewkView, WKStringRef message)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
-    if (!impl->beforeUnloadConfirmPanelContext || !impl->beforeUnloadConfirmPanelContext->beforeUnloadConfirmPanelCallback)
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
+    if (!priv->beforeUnloadConfirmPanelContext || !priv->beforeUnloadConfirmPanelContext->beforeUnloadConfirmPanelCallback)
         return false;
-    EINA_SAFETY_ON_FALSE_RETURN_VAL(impl->beforeUnloadConfirmPanelContext->ewkView == ewkView, false);
+    EINA_SAFETY_ON_FALSE_RETURN_VAL(priv->beforeUnloadConfirmPanelContext->ewkView == ewkView, false);
 
-    impl->isWaitingForJavaScriptPopupReply = true;
+    priv->isWaitingForJavaScriptPopupReply = true;
     int length = WKStringGetMaximumUTF8CStringSize(message);
     OwnArrayPtr<char> messageBuffer = adoptArrayPtr(new char[length]);
     WKStringGetUTF8CString(message, messageBuffer.get(), length);
-    bool result = impl->beforeUnloadConfirmPanelContext->beforeUnloadConfirmPanelCallback(impl->beforeUnloadConfirmPanelContext->ewkView, messageBuffer.get(), impl->beforeUnloadConfirmPanelContext->userData) == EINA_TRUE;
+    bool result = priv->beforeUnloadConfirmPanelContext->beforeUnloadConfirmPanelCallback(priv->beforeUnloadConfirmPanelContext->ewkView, messageBuffer.get(), priv->beforeUnloadConfirmPanelContext->userData) == EINA_TRUE;
     return result;
 }
 #endif
@@ -3068,13 +4088,13 @@ bool ewk_view_run_before_unload_confirm_panel(Evas_Object* ewkView, WKStringRef
 bool ewkViewRunOpenPanel(Evas_Object* ewkView, WKOpenPanelParametersRef parameters, WKOpenPanelResultListenerRef listener)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
-    if (!impl->openpanelContext || !impl->openpanelContext->openPanelCallback)
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
+    if (!priv->openpanelContext || !priv->openpanelContext->openPanelCallback)
         return false;
 
-    EINA_SAFETY_ON_FALSE_RETURN_VAL(impl->openpanelContext->ewkView == ewkView, false);
+    EINA_SAFETY_ON_FALSE_RETURN_VAL(priv->openpanelContext->ewkView == ewkView, false);
 
-    impl->openPanelListener = listener;
+    priv->openPanelListener = listener;
 
     Eina_Bool allowMultipleFiles = WKOpenPanelParametersGetAllowsMultipleFiles(parameters) ? EINA_TRUE : EINA_FALSE;
     Eina_List* acceptedMimeTypes = 0;
@@ -3095,7 +4115,7 @@ bool ewkViewRunOpenPanel(Evas_Object* ewkView, WKOpenPanelParametersRef paramete
     WKRetainPtr<WKStringRef> captureRef(AdoptWK, WKOpenPanelParametersCopyCapture(parameters));
     capture = eina_stringshare_add(toImpl(captureRef.get())->string().utf8().data());
 #endif
-    bool result = impl->openpanelContext->openPanelCallback(impl->openpanelContext->ewkView, allowMultipleFiles, acceptedMimeTypes, capture, 0);
+    bool result = priv->openpanelContext->openPanelCallback(priv->openpanelContext->ewkView, allowMultipleFiles, acceptedMimeTypes, capture, 0);
     if (!acceptedMimeTypes)
         return result;
 
@@ -3110,115 +4130,115 @@ bool ewkViewRunOpenPanel(Evas_Object* ewkView, WKOpenPanelParametersRef paramete
 void ewk_view_javascript_alert_callback_set(Evas_Object* ewkView, Ewk_View_JavaScript_Alert_Callback callback, void* userData)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
 
-    if (!impl->alertContext)
-        impl->alertContext = adoptPtr<Ewk_View_Callback_Context>(new Ewk_View_Callback_Context);
-    impl->alertContext->javascriptAlertCallback = callback;
-    impl->alertContext->ewkView = ewkView;
-    impl->alertContext->userData = userData;
+    if (!priv->alertContext)
+        priv->alertContext = adoptPtr<Ewk_View_Callback_Context>(new Ewk_View_Callback_Context);
+    priv->alertContext->javascriptAlertCallback = callback;
+    priv->alertContext->ewkView = ewkView;
+    priv->alertContext->userData = userData;
 }
 
 void ewk_view_javascript_alert_reply(Evas_Object* ewkView)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
 
-    WKPageReplyJavaScriptAlert(toAPI(impl->page()));
-    impl->isWaitingForJavaScriptPopupReply = false;
+    WKPageReplyJavaScriptAlert(toAPI(ewk_view_page_get(ewkView)));
+    priv->isWaitingForJavaScriptPopupReply = false;
 }
 
 void ewk_view_javascript_confirm_callback_set(Evas_Object* ewkView, Ewk_View_JavaScript_Confirm_Callback callback, void* userData)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
 
-    if (!impl->confirmContext)
-        impl->confirmContext = adoptPtr<Ewk_View_Callback_Context>(new Ewk_View_Callback_Context);
-    impl->confirmContext->javascriptConfirmCallback = callback;
-    impl->confirmContext->ewkView = ewkView;
-    impl->confirmContext->userData = userData;
+    if (!priv->confirmContext)
+        priv->confirmContext = adoptPtr<Ewk_View_Callback_Context>(new Ewk_View_Callback_Context);
+    priv->confirmContext->javascriptConfirmCallback = callback;
+    priv->confirmContext->ewkView = ewkView;
+    priv->confirmContext->userData = userData;
 }
 
 void ewk_view_javascript_confirm_reply(Evas_Object* ewkView, Eina_Bool result)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
 
-    WKPageReplyJavaScriptConfirm(toAPI(impl->page()), result == EINA_TRUE);
-    impl->isWaitingForJavaScriptPopupReply = false;
+    WKPageReplyJavaScriptConfirm(toAPI(ewk_view_page_get(ewkView)), result == EINA_TRUE);
+    priv->isWaitingForJavaScriptPopupReply = false;
 }
 
 void ewk_view_javascript_prompt_callback_set(Evas_Object* ewkView, Ewk_View_JavaScript_Prompt_Callback callback, void* userData)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
 
-    if (!impl->promptContext)
-        impl->promptContext = adoptPtr<Ewk_View_Callback_Context>(new Ewk_View_Callback_Context);
-    impl->promptContext->javascriptPromptCallback = callback;
-    impl->promptContext->ewkView = ewkView;
-    impl->promptContext->userData = userData;
+    if (!priv->promptContext)
+        priv->promptContext = adoptPtr<Ewk_View_Callback_Context>(new Ewk_View_Callback_Context);
+    priv->promptContext->javascriptPromptCallback = callback;
+    priv->promptContext->ewkView = ewkView;
+    priv->promptContext->userData = userData;
 }
 
 void ewk_view_javascript_prompt_reply(Evas_Object* ewkView, const char* result)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
 
     WKRetainPtr<WKStringRef> resultString(AdoptWK, WKStringCreateWithUTF8CString(result));
-    WKPageReplyJavaScriptPrompt(toAPI(impl->page()), result ? resultString.get() : 0);
-    impl->isWaitingForJavaScriptPopupReply = false;
+    WKPageReplyJavaScriptPrompt(toAPI(ewk_view_page_get(ewkView)), result ? resultString.get() : 0);
+    priv->isWaitingForJavaScriptPopupReply = false;
 }
 
 #if ENABLE(TIZEN_SUPPORT_BEFORE_UNLOAD_CONFIRM_PANEL)
 void ewk_view_before_unload_confirm_panel_callback_set(Evas_Object* ewkView, Ewk_View_Before_Unload_Confirm_Panel_Callback callback, void* userData)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
 
-    if (!impl->beforeUnloadConfirmPanelContext)
-        impl->beforeUnloadConfirmPanelContext = adoptPtr<Ewk_View_Callback_Context>(new Ewk_View_Callback_Context);
-    impl->beforeUnloadConfirmPanelContext->beforeUnloadConfirmPanelCallback = callback;
-    impl->beforeUnloadConfirmPanelContext->ewkView = ewkView;
-    impl->beforeUnloadConfirmPanelContext->userData = userData;
+    if (!priv->beforeUnloadConfirmPanelContext)
+        priv->beforeUnloadConfirmPanelContext = adoptPtr<Ewk_View_Callback_Context>(new Ewk_View_Callback_Context);
+    priv->beforeUnloadConfirmPanelContext->beforeUnloadConfirmPanelCallback = callback;
+    priv->beforeUnloadConfirmPanelContext->ewkView = ewkView;
+    priv->beforeUnloadConfirmPanelContext->userData = userData;
 }
 
 void ewk_view_before_unload_confirm_panel_reply(Evas_Object* ewkView, Eina_Bool result)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
 
-    WKPageReplyBeforeUnloadConfirmPanel(toAPI(impl->page()), result == EINA_TRUE);
-    impl->isWaitingForJavaScriptPopupReply = false;
+    WKPageReplyBeforeUnloadConfirmPanel(toAPI(ewk_view_page_get(ewkView)), result == EINA_TRUE);
+    priv->isWaitingForJavaScriptPopupReply = false;
 }
 #endif
 
 void ewk_view_open_panel_callback_set(Evas_Object* ewkView, Ewk_View_Open_Panel_Callback callback, void* userData)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
 
-    if (!impl->openpanelContext)
-        impl->openpanelContext = adoptPtr<Ewk_View_Callback_Context>(new Ewk_View_Callback_Context);
+    if (!priv->openpanelContext)
+        priv->openpanelContext = adoptPtr<Ewk_View_Callback_Context>(new Ewk_View_Callback_Context);
 
-    impl->openpanelContext->openPanelCallback = callback;
-    impl->openpanelContext->ewkView = ewkView;
-    impl->openpanelContext->userData = userData;
+    priv->openpanelContext->openPanelCallback = callback;
+    priv->openpanelContext->ewkView = ewkView;
+    priv->openpanelContext->userData = userData;
 }
 
 void ewk_view_open_panel_reply(Evas_Object* ewkView, Eina_List* fileUrls, Eina_Bool result)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
 
-    if (!impl->openPanelListener)
+    if (!priv->openPanelListener)
         return;
 
     unsigned int size = eina_list_count(fileUrls);
     if ((result == EINA_FALSE) || (size == 0)) {
-        WKOpenPanelResultListenerCancel(impl->openPanelListener);
-        impl->openPanelListener = 0;
+        WKOpenPanelResultListenerCancel(priv->openPanelListener);
+        priv->openPanelListener = 0;
         return;
     }
 
@@ -3232,8 +4252,8 @@ void ewk_view_open_panel_reply(Evas_Object* ewkView, Eina_List* fileUrls, Eina_B
         items[i++] = WKURLCreateWithUTF8CString(url.string().utf8().data());
     }
     WKRetainPtr<WKArrayRef> filesArray(AdoptWK, WKArrayCreate(items, size));
-    WKOpenPanelResultListenerChooseFiles(impl->openPanelListener, filesArray.get());
-    impl->openPanelListener = 0;
+    WKOpenPanelResultListenerChooseFiles(priv->openPanelListener, filesArray.get());
+    priv->openPanelListener = 0;
     delete [] items;
     eina_list_free(fileUrls);
 }
@@ -3265,13 +4285,13 @@ static void didGetWebAppIconURL(WKStringRef iconURL, WKErrorRef, void* context)
     Ewk_View_Callback_Context* webAppContext = static_cast<Ewk_View_Callback_Context*>(context);
 
     EWK_VIEW_SD_GET_OR_RETURN(webAppContext->ewkView, smartData);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
 
     ASSERT(webAppContext->webAppIconURLCallback);
 
     if (iconURL) {
-        impl->webAppIconURL = toImpl(iconURL)->string().utf8().data();
-        webAppContext->webAppIconURLCallback(impl->webAppIconURL, webAppContext->userData);
+        eina_stringshare_replace(&priv->webAppIconURL, toImpl(iconURL)->string().utf8().data());
+        webAppContext->webAppIconURLCallback(priv->webAppIconURL, webAppContext->userData);
     } else
         webAppContext->webAppIconURLCallback(0, webAppContext->userData);
 
@@ -3286,13 +4306,13 @@ static void didGetWebAppIconURLs(WKDictionaryRef iconURLs, WKErrorRef, void* con
     Ewk_View_Callback_Context* webAppContext = static_cast<Ewk_View_Callback_Context*>(context);
 
     EWK_VIEW_SD_GET_OR_RETURN(webAppContext->ewkView, smartData);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
 
     ASSERT(webAppContext->webAppIconURLsCallback);
 
-    if (impl->webAppIconURLs) {
+    if (priv->webAppIconURLs) {
         void* data = 0;
-        EINA_LIST_FREE(impl->webAppIconURLs, data)
+        EINA_LIST_FREE(priv->webAppIconURLs, data)
             ewkWebAppIconDataDelete(static_cast<Ewk_Web_App_Icon_Data*>(data));
     }
 
@@ -3301,11 +4321,11 @@ static void didGetWebAppIconURLs(WKDictionaryRef iconURLs, WKErrorRef, void* con
     for (size_t i = 0; i < iconURLCount; i++) {
         WKStringRef urlRef = static_cast<WKStringRef>(WKArrayGetItemAtIndex(wkKeys.get(), i));
         WKStringRef sizeRef = static_cast<WKStringRef>(WKDictionaryGetItemForKey(iconURLs, urlRef));
-        impl->webAppIconURLs = eina_list_append(impl->webAppIconURLs, ewkWebAppIconDataCreate(sizeRef, urlRef));
+        priv->webAppIconURLs = eina_list_append(priv->webAppIconURLs, ewkWebAppIconDataCreate(sizeRef, urlRef));
     }
     TIZEN_LOGI("webAppIconURLsCallback exist. found %d icon urls", iconURLCount);
 
-    webAppContext->webAppIconURLsCallback(impl->webAppIconURLs, webAppContext->userData);
+    webAppContext->webAppIconURLsCallback(priv->webAppIconURLs, webAppContext->userData);
     delete webAppContext;
 }
 #endif
@@ -3315,7 +4335,7 @@ Eina_Bool ewk_view_web_application_capable_get(Evas_Object* ewkView, Ewk_Web_App
 #if ENABLE(TIZEN_SUPPORT_WEBAPP_META_TAG)
     EINA_SAFETY_ON_NULL_RETURN_VAL(callback, false);
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, 0);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, 0);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, 0);
 
     TIZEN_LOGI("callback(%d), userData(%d)", callback, userData);
     Ewk_View_Callback_Context* context = new Ewk_View_Callback_Context;
@@ -3323,7 +4343,7 @@ Eina_Bool ewk_view_web_application_capable_get(Evas_Object* ewkView, Ewk_Web_App
     context->ewkView = ewkView;
     context->userData = userData;
 
-    WKPageGetWebAppCapable(toAPI(impl->pageProxy.get()), context, didGetWebAppCapable);
+    WKPageGetWebAppCapable(toAPI(priv->pageClient->page()), context, didGetWebAppCapable);
 
     return true;
 #else
@@ -3336,14 +4356,14 @@ Eina_Bool ewk_view_web_application_icon_url_get(Evas_Object* ewkView, Ewk_Web_Ap
 #if ENABLE(TIZEN_SUPPORT_WEBAPP_META_TAG)
     EINA_SAFETY_ON_NULL_RETURN_VAL(callback, false);
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, 0);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, 0);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, 0);
 
     Ewk_View_Callback_Context* context = new Ewk_View_Callback_Context;
     context->webAppIconURLCallback = callback;
     context->ewkView = ewkView;
     context->userData = userData;
 
-    WKPageGetWebAppIconURL(toAPI(impl->page()), context, didGetWebAppIconURL);
+    WKPageGetWebAppIconURL(toAPI(priv->pageClient->page()), context, didGetWebAppIconURL);
 
     return true;
 #else
@@ -3356,7 +4376,7 @@ Eina_Bool ewk_view_web_application_icon_urls_get(Evas_Object* ewkView, Ewk_Web_A
 #if ENABLE(TIZEN_SUPPORT_WEBAPP_META_TAG)
     EINA_SAFETY_ON_NULL_RETURN_VAL(callback, false);
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, 0);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, 0);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, 0);
 
     TIZEN_LOGI("callback(%d), userData(%d)", callback, userData);
     Ewk_View_Callback_Context* context = new Ewk_View_Callback_Context;
@@ -3364,26 +4384,51 @@ Eina_Bool ewk_view_web_application_icon_urls_get(Evas_Object* ewkView, Ewk_Web_A
     context->ewkView = ewkView;
     context->userData = userData;
 
-    WKPageGetWebAppIconURLs(toAPI(impl->page()), context, didGetWebAppIconURLs);
+    WKPageGetWebAppIconURLs(toAPI(priv->pageClient->page()), context, didGetWebAppIconURLs);
+
+    return true;
+#else
+    UNUSED_PARAM(ewkView);
+    UNUSED_PARAM(callback);
+    UNUSED_PARAM(userData);
+    return 0;
+#endif
+}
+
+Eina_Bool ewk_view_command_execute(Evas_Object* ewkView, const char* command, const char* value)
+{
+    EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
+    EINA_SAFETY_ON_NULL_RETURN_VAL(command, false);
+
+    WKRetainPtr<WKStringRef> commandString(AdoptWK, WKStringCreateWithUTF8CString(command));
+    WKRetainPtr<WKStringRef> valueString(AdoptWK, WKStringCreateWithUTF8CString(value));
+    WKPageExecuteCommandWithArgument(toAPI(priv->pageClient->page()), commandString.get(), valueString.get());
+
+    return true;
+}
+
+Eina_Bool ewk_view_text_find(Evas_Object* ewkView, const char* text, Ewk_Find_Options options, unsigned maxMatchCount)
+{
+    EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
+    EINA_SAFETY_ON_NULL_RETURN_VAL(text, false);
+
+    // FixMe: Comment should be removed when pageClient is removed.
+    //priv->pageProxy->findString(String::fromUTF8(text), static_cast<WebKit::FindOptions>(options), maxMatchCount);
+    priv->pageClient->page()->findString(String::fromUTF8(text), static_cast<WebKit::FindOptions>(options), maxMatchCount);
 
     return true;
-#else
-    UNUSED_PARAM(ewkView);
-    UNUSED_PARAM(callback);
-    UNUSED_PARAM(userData);
-    return 0;
-#endif
 }
 
-Eina_Bool ewk_view_command_execute(Evas_Object* ewkView, const char* command, const char* value)
+Eina_Bool ewk_view_text_find_highlight_clear(Evas_Object* ewkView)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
-    EINA_SAFETY_ON_NULL_RETURN_VAL(command, false);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
 
-    WKRetainPtr<WKStringRef> commandString(AdoptWK, WKStringCreateWithUTF8CString(command));
-    WKRetainPtr<WKStringRef> valueString(AdoptWK, WKStringCreateWithUTF8CString(value));
-    WKPageExecuteCommandWithArgument(toAPI(impl->pageProxy.get()), commandString.get(), valueString.get());
+    // FixMe: Comment should be removed when pageClient is removed.
+    //priv->pageProxy->hideFindUI();
+    priv->pageClient->page()->hideFindUI();
 
     return true;
 }
@@ -3396,9 +4441,9 @@ Eina_Bool ewk_view_contents_size_get(Evas_Object* ewkView, Evas_Coord* width, Ev
         *height = 0;
 
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
 
-    IntSize contentsSize = impl->pageProxy->contentsSize();
+    IntSize contentsSize = priv->pageClient->page()->contentsSize();
 
     if (width)
         *width = contentsSize.width();
@@ -3412,11 +4457,11 @@ Eina_Bool ewk_view_contents_pdf_get_temp(Evas_Object* ewkView, int width, int he
 {
 #if ENABLE(TIZEN_MOBILE_WEB_PRINT)
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
     EINA_SAFETY_ON_NULL_RETURN_VAL(fileName, false);
 
-    IntSize contentsSize = impl->pageProxy->contentsSize();
-    WKPageGetSnapshotPdfFile(toAPI(impl->pageProxy.get()), toAPI(IntSize(width, height)), toAPI(IntSize(contentsSize.width(), contentsSize.height())), WKStringCreateWithUTF8CString(fileName));
+    IntSize contentsSize = priv->pageClient->page()->contentsSize();
+    WKPageGetSnapshotPdfFile(toAPI(priv->pageClient->page()), toAPI(IntSize(width, height)), toAPI(IntSize(contentsSize.width(), contentsSize.height())), WKStringCreateWithUTF8CString(fileName));
 
     return true;
 #else
@@ -3428,11 +4473,11 @@ Eina_Bool ewk_view_contents_pdf_get(Evas_Object* ewkView, int width, int height,
 {
 #if ENABLE(TIZEN_MOBILE_WEB_PRINT)
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
     EINA_SAFETY_ON_NULL_RETURN_VAL(fileName, false);
 
-    IntSize contentsSize = impl->pageProxy->contentsSize();
-    WKPageGetSnapshotPdfFile(toAPI(impl->pageProxy.get()), toAPI(IntSize(width, height)), toAPI(IntSize(contentsSize.width(), contentsSize.height())), WKStringCreateWithUTF8CString(fileName));
+    IntSize contentsSize = priv->pageClient->page()->contentsSize();
+    WKPageGetSnapshotPdfFile(toAPI(priv->pageClient->page()), toAPI(IntSize(width, height)), toAPI(IntSize(contentsSize.width(), contentsSize.height())), WKStringCreateWithUTF8CString(fileName));
 
     return true;
 #else
@@ -3468,16 +4513,16 @@ static void runJavaScriptCallback(WKSerializedScriptValueRef scriptValue, WKErro
 Eina_Bool ewk_view_script_execute(Evas_Object* ewkView, const char* script, Ewk_View_Script_Execute_Callback callback, void* user_data)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
     EINA_SAFETY_ON_NULL_RETURN_VAL(script, false);
-    EINA_SAFETY_ON_NULL_RETURN_VAL(impl->pageClient, false);
+    EINA_SAFETY_ON_NULL_RETURN_VAL(priv->pageClient, false);
 
     Ewk_View_Callback_Context* context = new Ewk_View_Callback_Context;
     context->scriptExecuteCallback = callback;
     context->ewkView = ewkView;
     context->userData = user_data;
     WKRetainPtr<WKStringRef> scriptString(AdoptWK, WKStringCreateWithUTF8CString(script));
-    WKPageRunJavaScriptInMainFrame(toAPI(impl->pageProxy.get()), scriptString.get(), context, runJavaScriptCallback);
+    WKPageRunJavaScriptInMainFrame(toAPI(priv->pageClient->page()), scriptString.get(), context, runJavaScriptCallback);
 
     return true;
 }
@@ -3501,15 +4546,13 @@ Eina_Bool ewk_view_web_storage_quota_get(const Evas_Object* ewkView, Ewk_Web_Sto
 #if ENABLE(TIZEN_WEB_STORAGE) && ENABLE(TIZEN_WEBKIT2_NUMBER_TYPE_SUPPORT)
     EINA_SAFETY_ON_NULL_RETURN_VAL(ewkView, false);
     EINA_SAFETY_ON_NULL_RETURN_VAL(resultCallback, false);
-    EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
     TIZEN_LOGI("resultCallback (%p)", resultCallback);
 
     Ewk_View_Callback_Context* context = new Ewk_View_Callback_Context;
     context->webStorageQuotaCallback = resultCallback;
     context->userData = userData;
 
-    WKPageRef pageRef = toAPI(impl->page());
+    WKPageRef pageRef = toAPI(ewk_view_page_get(const_cast<Evas_Object*>(ewkView)));
     WKPageGetWebStorageQuota(pageRef, context, didGetWebStorageQuota);
 
     return true;
@@ -3522,11 +4565,9 @@ Eina_Bool ewk_view_web_storage_quota_set(Evas_Object* ewkView, uint32_t quota)
 {
 #if ENABLE(TIZEN_WEB_STORAGE)
     EINA_SAFETY_ON_NULL_RETURN_VAL(ewkView, false);
-    EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
 
     TIZEN_LOGI("quota (%d)", quota);
-    WKPageRef pageRef = toAPI(impl->page());
+    WKPageRef pageRef = toAPI(ewk_view_page_get(const_cast<Evas_Object*>(ewkView)));
     WKPageSetWebStorageQuota(pageRef, quota);
 
     return true;
@@ -3557,15 +4598,15 @@ static void getContentsAsStringCallback(WKStringRef plain_text, WKErrorRef error
 Eina_Bool ewk_view_plain_text_get(Evas_Object* ewkView, Ewk_View_Plain_Text_Get_Callback callback, void* user_data)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
     EINA_SAFETY_ON_NULL_RETURN_VAL(callback, false);
-    EINA_SAFETY_ON_NULL_RETURN_VAL(impl->pageClient, false);
+    EINA_SAFETY_ON_NULL_RETURN_VAL(priv->pageClient, false);
 
     Ewk_View_Callback_Context* context = new Ewk_View_Callback_Context;
     context->plainTextGetCallback = callback;
     context->ewkView = ewkView;
     context->userData = user_data;
-    WKPageGetContentsAsString(toAPI(impl->pageProxy.get()), context, getContentsAsStringCallback);
+    WKPageGetContentsAsString(toAPI(priv->pageClient->page()), context, getContentsAsStringCallback);
 
     return true;
 }
@@ -3591,14 +4632,14 @@ Eina_Bool ewk_view_mhtml_data_get(Evas_Object* ewkView, Ewk_View_MHTML_Data_Get_
 {
     EINA_SAFETY_ON_NULL_RETURN_VAL(callback, false);
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, 0);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
 
     Ewk_View_Callback_Context* context = new Ewk_View_Callback_Context;
     context->mhtmlDataGetCallback = callback;
     context->ewkView = ewkView;
     context->userData = user_data;
 
-    WKPageGetContentsAsMHTMLData(toAPI(impl->page()), false, context, getContentsAsMHTMLCallback);
+    WKPageGetContentsAsMHTMLData(toAPI(priv->pageClient->page()), false, context, getContentsAsMHTMLCallback);
 
     return true;
 }
@@ -3608,10 +4649,11 @@ Ewk_Hit_Test* ewk_view_hit_test_new(Evas_Object* ewkView, int x, int y, int hitT
 {
 #if ENABLE(TIZEN_WEBKIT2_HIT_TEST)
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, 0);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, 0);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, 0);
+    EWK_VIEW_IMPL_GET_BY_SD_OR_RETURN(smartData, impl, 0);
 
     IntPoint pointForHitTest = impl->transformFromScene().mapPoint(IntPoint(x, y));
-    WebHitTestResult::Data hitTestResultData = impl->pageProxy->hitTestResultAtPoint(pointForHitTest, hitTestMode);
+    WebHitTestResult::Data hitTestResultData = priv->pageClient->page()->hitTestResultAtPoint(pointForHitTest, hitTestMode);
     Ewk_Hit_Test* hitTest = ewkHitTestCreate(hitTestResultData);
 
     return hitTest;
@@ -3623,9 +4665,7 @@ Ewk_Hit_Test* ewk_view_hit_test_new(Evas_Object* ewkView, int x, int y, int hitT
 Ewk_History* ewk_view_history_get(Evas_Object* ewkView)
 {
     EINA_SAFETY_ON_NULL_RETURN_VAL(ewkView, 0);
-    EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
-    WebPageProxy* page = impl->page();
+    WebPageProxy* page = ewk_view_page_get(ewkView);
     EINA_SAFETY_ON_NULL_RETURN_VAL(page, 0);
 
     return ewkHistoryCreate(WKPageGetBackForwardList(toAPI(page)));
@@ -3634,9 +4674,9 @@ Ewk_History* ewk_view_history_get(Evas_Object* ewkView)
 Eina_Bool ewk_view_recording_surface_enable_set(Evas_Object* ewkView, Eina_Bool enable)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
 
-    WKPageRecordingSurfaceSetEnable(toAPI(impl->pageProxy.get()), enable);
+    WKPageRecordingSurfaceSetEnable(toAPI(priv->pageClient->page()), enable);
 
     return true;
 }
@@ -3645,8 +4685,8 @@ Eina_Bool ewk_view_notification_closed(Evas_Object* ewkView, Eina_List* ewkNotif
 {
 #if ENABLE(TIZEN_NOTIFICATIONS)
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
-    EINA_SAFETY_ON_NULL_RETURN_VAL(impl->context, false);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
+    EINA_SAFETY_ON_NULL_RETURN_VAL(priv->context, false);
 
     TIZEN_LOGI("ewkNotifications (%p)", ewkNotifications);
     if (!eina_list_count(ewkNotifications))
@@ -3659,11 +4699,11 @@ Eina_Bool ewk_view_notification_closed(Evas_Object* ewkView, Eina_List* ewkNotif
         Ewk_Notification* notification = static_cast<Ewk_Notification*>(data);
         WKUInt64Ref idRef = WKUInt64Create(ewk_notification_id_get(notification));
         ids.append(idRef);
-        impl->notifications = eina_list_remove(impl->notifications, notification);
+        priv->notifications = eina_list_remove(priv->notifications, notification);
     }
 
     WKRetainPtr<WKArrayRef> notificationIDsArray(AdoptWK, WKArrayCreate(ids.data(), ids.size()));
-    WKNotificationManagerRef notificationManager = WKContextGetNotificationManager(impl->context->wkContext());
+    WKNotificationManagerRef notificationManager = WKContextGetNotificationManager(ewk_context_WKContext_get(priv->context));
     WKNotificationManagerProviderDidCloseNotifications(notificationManager, notificationIDsArray.get());
     ewkNotificationDeleteNotificationList(ewkNotifications);
 
@@ -3673,13 +4713,24 @@ Eina_Bool ewk_view_notification_closed(Evas_Object* ewkView, Eina_List* ewkNotif
 #endif
 }
 
-#if ENABLE(TIZEN_WEBKIT2_POPUP_INTERNAL)
 static Eina_List* createPopupMenuList(const Vector<WebPopupItem>& items)
 {
     Eina_List* popupItems = 0;
     size_t size = items.size();
-    for (size_t i = 0; i < size; ++i)
-        popupItems = eina_list_append(popupItems, Ewk_Popup_Menu_Item::create(items[i]).leakPtr());
+    for (size_t i = 0; i < size; ++i) {
+        Ewk_Popup_Menu_Item* item = ewk_popup_menu_item_new(items[i].m_type,
+                items[i].m_text.utf8().data(),
+                items[i].m_textDirection,
+                items[i].m_hasTextDirectionOverride,
+                items[i].m_toolTip.utf8().data(),
+                items[i].m_accessibilityText.utf8().data(),
+                items[i].m_isEnabled,
+#if ENABLE(TIZEN_MULTIPLE_SELECT)
+                items[i].m_isSelected,
+#endif
+                items[i].m_isLabel);
+        popupItems = eina_list_append(popupItems, item);
+    }
     TIZEN_LOGI("size : %d", size);
     return popupItems;
 }
@@ -3691,92 +4742,129 @@ static void releasePopupMenuList(Eina_List* popupMenuItems)
 
     void* item;
     EINA_LIST_FREE(popupMenuItems, item)
-        delete static_cast<Ewk_Popup_Menu_Item*>(item);
+        ewk_popup_menu_item_free(static_cast<Ewk_Popup_Menu_Item*>(item));
 }
-#endif
 
-Eina_Bool ewk_view_popup_menu_close(Evas_Object* ewkView)
-{
-    EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
-    EINA_SAFETY_ON_NULL_RETURN_VAL(smartData->api, false);
-#if OS(TIZEN)
-    TIZEN_LOGI("proxy : %p", impl->popupMenuProxy);
+#if ENABLE(TIZEN_MULTIPLE_SELECT)
+void ewk_view_popup_menu_request(Evas_Object* ewkView, WebPopupMenuProxyEfl* popupMenu, const IntRect& rect, TextDirection textDirection, double pageScaleFactor, const Vector<WebPopupItem>& items, int32_t selectedIndex, bool multiple)
+#else
+void ewk_view_popup_menu_request(Evas_Object* ewkView, WebPopupMenuProxyEfl* popupMenu, const IntRect& rect, TextDirection textDirection, double pageScaleFactor, const Vector<WebPopupItem>& items, int32_t selectedIndex)
 #endif
+{
+    EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
+    EINA_SAFETY_ON_NULL_RETURN(smartData->api);
+    TIZEN_LOGI("proxy : %p", priv->popupMenuProxy);
 
-    if (!impl->popupMenuProxy)
-        return false;
+    ASSERT(popupMenu);
 
-    impl->popupMenuProxy = 0;
+#if ENABLE(TIZEN_MULTIPLE_SELECT)
+    if (!smartData->api->popup_menu_show && !smartData->api->multiple_popup_menu_show)
+#else
+    if (!smartData->api->popup_menu_show)
+#endif
+        return;
 
-    if (smartData->api->popup_menu_hide)
-        smartData->api->popup_menu_hide(smartData);
-#if ENABLE(TIZEN_WEBKIT2_POPUP_INTERNAL)
-    ewk_view_touch_events_enabled_set(ewkView, true);
+    if (priv->popupMenuProxy)
+        ewk_view_popup_menu_close(ewkView);
+    priv->popupMenuProxy = popupMenu;
+
+    priv->popupMenuItems = createPopupMenuList(items);
 
-    releasePopupMenuList(impl->popupMenuItems);
-    impl->popupMenuItems = 0;
+#if ENABLE(TIZEN_MULTIPLE_SELECT)
+    if ((!multiple && smartData->api->popup_menu_show(smartData, rect, static_cast<Ewk_Text_Direction>(textDirection), pageScaleFactor, priv->popupMenuItems, selectedIndex)) ||
+            (multiple && smartData->api->multiple_popup_menu_show(smartData, rect, static_cast<Ewk_Text_Direction>(textDirection), pageScaleFactor, priv->popupMenuItems))) {
 #else
-    void* item;
-    EINA_LIST_FREE(impl->popupMenuItems, item)
-        delete static_cast<Ewk_Popup_Menu_Item*>(item);
+    if (smartData->api->popup_menu_show(smartData, rect, static_cast<Ewk_Text_Direction>(textDirection), pageScaleFactor, priv->popupMenuItems, selectedIndex)) {
 #endif
+#if ENABLE(TIZEN_WEBKIT2_POPUP_INTERNAL)
+        /* maps.google.com generate mouse event in touch down without preventDefault.
+         * So, popup menu is opend in touch down event and closed via fake mouse down
+         * which generated by endTap.
+         * In order to fix select of maps.google.com (based on touch behavior),
+         * We should disable touch events when select popup is open.
+         */
 
-    return true;
+#if ENABLE(TIZEN_GESTURE)
+        priv->gestureClient->reset();
+#endif
+        ewk_view_touch_events_enabled_set(ewkView, false);
+#endif
+    }
 }
 
-Eina_Bool ewk_view_popup_menu_select(Evas_Object* ewkView, unsigned int selectedIndex)
+Eina_Bool ewk_view_popup_menu_close(Evas_Object* ewkView)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
-    EINA_SAFETY_ON_NULL_RETURN_VAL(impl->popupMenuProxy, false);
-#if OS(TIZEN)
-    TIZEN_LOGI("proxy : %p / index : %d", impl->popupMenuProxy, selectedIndex);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
+    EINA_SAFETY_ON_NULL_RETURN_VAL(smartData->api, false);
+    TIZEN_LOGI("proxy : %p", priv->popupMenuProxy);
 
-    if (!impl->popupMenuItems)
+    if (!priv->popupMenuProxy)
         return false;
-#endif
 
-    if (selectedIndex >= eina_list_count(impl->popupMenuItems))
-        return false;
+    priv->popupMenuProxy = 0;
 
-    impl->popupMenuProxy->valueChanged(selectedIndex);
+    if (smartData->api->popup_menu_hide)
+        smartData->api->popup_menu_hide(smartData);
+#if ENABLE(TIZEN_WEBKIT2_POPUP_INTERNAL)
+    ewk_view_touch_events_enabled_set(ewkView, true);
+#endif
+
+    releasePopupMenuList(priv->popupMenuItems);
+    priv->popupMenuItems = 0;
 
     return true;
 }
 
-#if ENABLE(TIZEN_WEBKIT2_POPUP_INTERNAL)
 void ewk_view_popup_menu_update(Evas_Object* ewkView, TextDirection textDirection, const Vector<WebPopupItem>& items, int32_t selectedIndex)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
     EINA_SAFETY_ON_NULL_RETURN(smartData->api);
-    TIZEN_LOGI("proxy : %p", impl->popupMenuProxy);
+    TIZEN_LOGI("proxy : %p", priv->popupMenuProxy);
 
-    if (!impl->popupMenuProxy)
+    if (!priv->popupMenuProxy)
         return;
 
     if (!smartData->api->popup_menu_update)
         return;
 
-    releasePopupMenuList(impl->popupMenuItems);
-    impl->popupMenuItems = createPopupMenuList(items);
+    releasePopupMenuList(priv->popupMenuItems);
+    priv->popupMenuItems = createPopupMenuList(items);
 
     // TODO: Instead of passing a dummy rect, updated rect should be coming from WebProcess
-    smartData->api->popup_menu_update(smartData, IntRect(), static_cast<Ewk_Text_Direction>(textDirection), impl->popupMenuItems, selectedIndex);
+    smartData->api->popup_menu_update(smartData, IntRect(), static_cast<Ewk_Text_Direction>(textDirection), priv->popupMenuItems, selectedIndex);
+}
+
+Eina_Bool ewk_view_popup_menu_select(Evas_Object* ewkView, unsigned int selectedIndex)
+{
+    EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
+    EINA_SAFETY_ON_NULL_RETURN_VAL(priv->popupMenuProxy, false);
+    TIZEN_LOGI("proxy : %p / index : %d", priv->popupMenuProxy, selectedIndex);
+
+    if (!priv->popupMenuItems)
+        return false;
+
+    if (selectedIndex >= eina_list_count(priv->popupMenuItems))
+        return false;
+
+    priv->popupMenuProxy->valueChanged(selectedIndex);
+
+    return true;
 }
-#endif
 
 #if ENABLE(TIZEN_MULTIPLE_SELECT)
 Eina_Bool ewk_view_popup_menu_multiple_select(Evas_Object* ewkView, Eina_Inarray* changeList)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
-    EINA_SAFETY_ON_NULL_RETURN_VAL(impl->popupMenuProxy, false);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
+    EINA_SAFETY_ON_NULL_RETURN_VAL(priv->popupMenuProxy, false);
 
     Vector<int> selectedIndex;
 
-    if (!impl->popupMenuItems)
+    if (!priv->popupMenuItems)
         return false;
 
     Eina_Iterator* itr;
@@ -3789,7 +4877,7 @@ Eina_Bool ewk_view_popup_menu_multiple_select(Evas_Object* ewkView, Eina_Inarray
     }
     eina_iterator_free(itr);
 
-    impl->popupMenuProxy->multipleValueChanged(selectedIndex);
+    priv->popupMenuProxy->multipleValueChanged(selectedIndex);
     return true;
 }
 #endif
@@ -3798,18 +4886,18 @@ void ewk_view_orientation_send(Evas_Object* ewkView, int orientation)
 {
 #if ENABLE(TIZEN_ORIENTATION_EVENTS)
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
     TIZEN_LOGI("orientation : %d", orientation);
 
     if (orientation != 0 && orientation != 90 && orientation != -90 && orientation != 180)
         return;
 
-    if (impl->orientation == orientation)
+    if (priv->orientation == orientation)
         return;
 
-    impl->orientation = orientation;
+    priv->orientation = orientation;
 
-    impl->pageProxy->sendOrientationChangeEvent(orientation);
+    priv->pageClient->page()->sendOrientationChangeEvent(orientation);
 #endif
 }
 
@@ -3827,11 +4915,12 @@ Eina_Bool ewk_view_text_selection_enable_set(Evas_Object* ewkView, Eina_Bool ena
 Eina_Bool ewk_view_text_selection_range_get(Evas_Object* ewkView, Eina_Rectangle* leftRect, Eina_Rectangle* rightRect)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
+    EWK_VIEW_IMPL_GET_BY_SD_OR_RETURN(smartData, impl, false);
 
     IntRect leftSelectionRect;
     IntRect rightSelectionRect;
-    if (!impl->pageProxy->getSelectionHandlers(leftSelectionRect, rightSelectionRect)) {
+    if (!priv->pageClient->page()->getSelectionHandlers(leftSelectionRect, rightSelectionRect)) {
         leftRect->x = 0;
         leftRect->y = 0;
         leftRect->w = 0;
@@ -3864,12 +4953,12 @@ Eina_Bool ewk_view_text_selection_range_get(Evas_Object* ewkView, Eina_Rectangle
 const char* ewk_view_text_selection_text_get(Evas_Object* ewkView)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, 0);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, 0);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, 0);
 
-    const CString selectedString = impl->pageProxy->getSelectionText().utf8();
-    impl->selectedText = selectedString.data();
+    const CString selectedString = priv->pageClient->page()->getSelectionText().utf8();
+    eina_stringshare_replace(&priv->selectedText, selectedString.data());
 
-    return impl->selectedText;
+    return priv->selectedText;
 }
 
 Eina_Bool ewk_view_auto_clear_text_selection_mode_set(Evas_Object* ewkView, Eina_Bool enable)
@@ -3898,16 +4987,16 @@ void ewkViewInputPickerRequest(Evas_Object* ewkView, Ewk_Input_Type inputType, c
 void ewkViewGetWindowFrame(Evas_Object* ewkView, int *x, int *y, int *w, int *h)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl);
-    IntPoint drawingPosition = (IntPoint)(impl->pageClient->visibleContentRect().location() - impl->pageClient->scrollPosition());
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
+    IntPoint drawingPosition = (IntPoint)(priv->pageClient->visibleContentRect().location() - priv->pageClient->scrollPosition());
     if (x)
         *x = drawingPosition.x();
     if (y)
         *y = drawingPosition.y();
     if (w)
-        *w = impl->pageClient->visibleContentRect().width();
+        *w = priv->pageClient->visibleContentRect().width();
     if (h)
-        *h = impl->pageClient->visibleContentRect().height();
+        *h = priv->pageClient->visibleContentRect().height();
 }
 #endif
 
@@ -3915,9 +5004,9 @@ void ewk_view_focused_input_element_value_set(Evas_Object* ewkView, const char*
 {
 #if ENABLE(TIZEN_INPUT_TAG_EXTENSION)
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
 
-    impl->pageProxy->setFocusedInputElementValue(String::fromUTF8(value));
+    priv->pageClient->page()->setFocusedInputElementValue(String::fromUTF8(value));
 #endif // ENABLE(TIZEN_INPUT_TAG_EXTENSION)
 }
 
@@ -3925,10 +5014,10 @@ const char* ewk_view_focused_input_element_value_get(Evas_Object* ewkView)
 {
 #if ENABLE(TIZEN_INPUT_TAG_EXTENSION)
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, 0);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, 0);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, 0);
 
-    impl->inputValue = impl->pageProxy->getFocusedInputElementValue().utf8().data();
-    return impl->inputValue;
+    eina_stringshare_replace(&priv->inputValue, priv->pageClient->page()->getFocusedInputElementValue().utf8().data());
+    return priv->inputValue;
 #else
     return 0;
 #endif // ENABLE(TIZEN_INPUT_TAG_EXTENSION)
@@ -3938,30 +5027,33 @@ const char* ewk_view_focused_input_element_value_get(Evas_Object* ewkView)
 void ewkViewDataListShowRequest(Evas_Object* ewkView, Ewk_Input_Type inputType, Vector<String> optionList)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
     EINA_SAFETY_ON_NULL_RETURN(smartData->api);
     EINA_SAFETY_ON_NULL_RETURN(smartData->api->data_list_show);
 
-    if (impl->dataList)
+    if (priv->dataList)
         ewkViewDataListHideRequest(ewkView, inputType);
 
     for (Vector<String>::const_iterator it = optionList.begin(); it != optionList.end(); ++it) {
         String value = *it;
-        impl->dataList = eina_list_append(impl->dataList, eina_stringshare_add(value.utf8().data()));
+        priv->dataList = eina_list_append(priv->dataList, eina_stringshare_add(value.utf8().data()));
     }
 
-    smartData->api->data_list_show(smartData, inputType, impl->dataList);
+    smartData->api->data_list_show(smartData, inputType, priv->dataList);
 }
 
 void ewkViewDataListHideRequest(Evas_Object* ewkView, Ewk_Input_Type inputType)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl);
-    EINA_SAFETY_ON_NULL_RETURN(impl->dataList);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
+    EINA_SAFETY_ON_NULL_RETURN(priv->dataList);
     EINA_SAFETY_ON_NULL_RETURN(smartData->api);
     EINA_SAFETY_ON_NULL_RETURN(smartData->api->data_list_hide);
 
-    impl->deleteDataList();
+    if (priv->dataList) {
+        _ewk_view_data_list_del(priv->dataList);
+        priv->dataList = 0;
+    }
 
     smartData->api->data_list_hide(smartData, inputType);
 }
@@ -3971,9 +5063,12 @@ void ewk_view_data_list_close(Evas_Object* ewkView, const char* value)
 {
 #if ENABLE(TIZEN_DATALIST_ELEMENT)
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
 
-    impl->deleteDataList();
+    if (priv->dataList) {
+        _ewk_view_data_list_del(priv->dataList);
+        priv->dataList = 0;
+    }
 
     ewk_view_focused_input_element_value_set(ewkView, value);
 #endif
@@ -3982,9 +5077,9 @@ void ewk_view_data_list_close(Evas_Object* ewkView, const char* value)
 Eina_Bool ewk_view_horizontal_panning_hold_get(Evas_Object* ewkView)
 {
 #if ENABLE(TIZEN_GESTURE)
-    EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
-    return impl->holdHorizontalPanning;
+    EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false)
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false)
+    return priv->holdHorizontalPanning;
 #else
     return false;
 #endif
@@ -3993,18 +5088,18 @@ Eina_Bool ewk_view_horizontal_panning_hold_get(Evas_Object* ewkView)
 void ewk_view_horizontal_panning_hold_set(Evas_Object* ewkView, Eina_Bool hold)
 {
 #if ENABLE(TIZEN_GESTURE)
-    EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl);
-    impl->holdHorizontalPanning = hold;
+    EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData)
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv)
+    priv->holdHorizontalPanning = hold;
 #endif
 }
 
 Eina_Bool ewk_view_vertical_panning_hold_get(Evas_Object* ewkView)
 {
 #if ENABLE(TIZEN_GESTURE)
-    EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
-    return impl->holdVerticalPanning;
+    EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false)
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false)
+    return priv->holdVerticalPanning;
 #else
     return false;
 #endif
@@ -4013,34 +5108,34 @@ Eina_Bool ewk_view_vertical_panning_hold_get(Evas_Object* ewkView)
 void ewk_view_vertical_panning_hold_set(Evas_Object* ewkView, Eina_Bool hold)
 {
 #if ENABLE(TIZEN_GESTURE)
-    EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl);
-    impl->holdVerticalPanning = hold;
+    EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData)
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv)
+    priv->holdVerticalPanning = hold;
 #endif
 }
 
 void ewk_view_touch_event_handler_result_set(Evas_Object* ewkView, WebKit::WebEvent::Type type, bool wasHandled)
 {
 #if ENABLE(TIZEN_GESTURE)
-    EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl);
+    EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData)
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv)
 
 #if ENABLE(TIZEN_WEBKIT2_FOCUS_RING)
-    if (impl->focusRing && wasHandled)
-        impl->focusRing->hide();
+    if (priv->focusRing && wasHandled)
+        priv->focusRing->hide();
 #endif // #if ENABLE(TIZEN_WEBKIT2_FOCUS_RING)
 
-    if (impl->mouseEventsEnabled())
+    if (priv->areMouseEventsEnabled)
         return;
 
 #if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION)
-    if (wasHandled && impl->pageClient->isTextSelectionMode()) {
+    if (wasHandled && priv->pageClient->isTextSelectionMode()) {
         if (type == WebEvent::TouchStart)
-            impl->pageClient->updateTextSelectionHandlesAndContextMenu(false);
+            priv->pageClient->updateTextSelectionHandlesAndContextMenu(false);
         else if (type == WebEvent::TouchMove)
-            impl->pageClient->updateTextSelectionHandlesAndContextMenu(false);
+            priv->pageClient->updateTextSelectionHandlesAndContextMenu(false);
         else if (type == WebEvent::TouchEnd)
-            impl->pageClient->requestToShowTextSelectionHandlesAndContextMenu();
+            priv->pageClient->requestToShowTextSelectionHandlesAndContextMenu();
     }
 #endif
 
@@ -4060,28 +5155,28 @@ void ewk_view_touch_event_handler_result_set(Evas_Object* ewkView, WebKit::WebEv
     //      x      |not occured |     x     || enable  |  enable
     // ------------------------------------------------------------
     if (type == WebEvent::TouchStart) {
-        impl->gestureClient->setGestureEnabled(!wasHandled);
-        impl->wasHandledTouchStart = wasHandled;
+        priv->gestureClient->setGestureEnabled(!wasHandled);
+        priv->wasHandledTouchStart = wasHandled;
 
         // Initialize wasHandledTouchMove to true and notify that to the application
         // to prevent applications scrolling at the beginning of touch.
-        impl->wasHandledTouchMove = true;
-        evas_object_smart_callback_call(ewkView, "touchmove,handled", static_cast<void*>(&impl->wasHandledTouchMove));
+        priv->wasHandledTouchMove = true;
+        evas_object_smart_callback_call(ewkView, "touchmove,handled", static_cast<void*>(&priv->wasHandledTouchMove));
     } else if (type == WebEvent::TouchMove) {
-        impl->gestureClient->setMovingEnabled(!wasHandled);
+        priv->gestureClient->setMovingEnabled(!wasHandled);
 
         // We have to set wasHandled to true if touchstart was handled even though current touchmove was not handled.
-        if (impl->wasHandledTouchStart)
+        if (priv->wasHandledTouchStart)
             wasHandled = true;
 
         // Notify the result of touchmove to applications when handled value is changed
         // in order to make applications to choose whether scrolling its scrollable objects or not.
-        if (impl->wasHandledTouchMove != wasHandled)
+        if (priv->wasHandledTouchMove != wasHandled)
             evas_object_smart_callback_call(ewkView, "touchmove,handled", static_cast<void*>(&wasHandled));
-        impl->wasHandledTouchMove = wasHandled;
-    } else if (type == WebEvent::TouchEnd && !impl->exceedTouchMoveThreshold && !wasHandled) {
-        impl->gestureClient->setMovingEnabled(!wasHandled);
-        impl->gestureClient->setTapEnabled(!wasHandled);
+        priv->wasHandledTouchMove = wasHandled;
+    } else if (type == WebEvent::TouchEnd && !priv->exceedTouchMoveThreshold && !wasHandled) {
+        priv->gestureClient->setMovingEnabled(!wasHandled);
+        priv->gestureClient->setTapEnabled(!wasHandled);
     }
 #endif
 }
@@ -4129,36 +5224,50 @@ void ewk_view_orientation_lock_callback_set(Evas_Object* ewkView, Ewk_Orientatio
 {
 #if ENABLE(TIZEN_SCREEN_ORIENTATION_SUPPORT_INTERNAL)
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
     TIZEN_LOGI("callbacks: %p / data: %p", func, data);
 
-    impl->orientationLock.callback = func;
-    impl->orientationLock.data = data;
+    priv->orientationLock.callback = func;
+    priv->orientationLock.data = data;
 #endif
 }
 
 #if ENABLE(TIZEN_SCREEN_ORIENTATION_SUPPORT_INTERNAL)
 Eina_Bool _ewk_orientation_lock(Ewk_View_Smart_Data *sd, int orientations)
 {
-    EWK_VIEW_IMPL_GET_OR_RETURN(sd, impl, false);
+    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, false);
     TIZEN_LOGI("locked orientations : %d", orientations);
 
-    if (impl->orientationLock.callback)
-        return impl->orientationLock.callback(sd->self, true, orientations, impl->orientationLock.data);
+    if (priv->orientationLock.callback)
+        return priv->orientationLock.callback(sd->self, true, orientations, priv->orientationLock.data);
 
     return false;
 }
 
 void _ewk_orientation_unlock(Ewk_View_Smart_Data *sd)
 {
-    EWK_VIEW_IMPL_GET_OR_RETURN(sd, impl);
+    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv);
     TIZEN_LOGI("unlock is requested");
 
-    if (impl->orientationLock.callback)
-        impl->orientationLock.callback(sd->self, false, 0, impl->orientationLock.data);
+    if (priv->orientationLock.callback)
+        priv->orientationLock.callback(sd->self, false, 0, priv->orientationLock.data);
 }
 #endif
 
+void ewk_view_fullscreen_enter(Evas_Object* ewkView)
+{
+    TIZEN_LOGI("fullscreen,enterfullscreen");
+    ewk_view_main_frame_scrollbar_visible_set(ewkView, false);
+    evas_object_smart_callback_call(ewkView, "fullscreen,enterfullscreen", 0);
+}
+
+void ewk_view_fullscreen_exit(Evas_Object* ewkView)
+{
+    TIZEN_LOGI("fullscreen,exitfullscreen");
+    ewk_view_main_frame_scrollbar_visible_set(ewkView, true);
+    evas_object_smart_callback_call(ewkView, "fullscreen,exitfullscreen", 0);
+}
+
 #if ENABLE(TIZEN_RUNTIME_BACKEND_SELECTION)
 bool ewk_view_is_opengl_backend(Evas_Object* ewkView)
 {
@@ -4176,19 +5285,236 @@ void ewk_view_zoomable_area_set(Evas_Object* ewkView, const IntPoint& target, co
 {
 #if ENABLE(TIZEN_GESTURE)
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
 
-    impl->gestureClient->setZoomableArea(target, area);
+    priv->gestureClient->setZoomableArea(target, area);
 #endif
 }
 
+#if ENABLE(TIZEN_ISF_PORT)
+static void imfInputPanelStateEventCb(void* data, Ecore_IMF_Context* ctx, int state)
+{
+    Ewk_View_Smart_Data* smartData = static_cast<Ewk_View_Smart_Data*>(data);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
+
+    if (state == ECORE_IMF_INPUT_PANEL_STATE_HIDE) {
+        evas_object_smart_callback_call(smartData->self, "editorclient,ime,closed", 0);
+        LOG(ISF, "[SIGNAL] editorclient,ime,closed\n");
+    } else if (state == ECORE_IMF_INPUT_PANEL_STATE_SHOW) {
+        evas_object_smart_callback_call(smartData->self, "editorclient,ime,opened", 0);
+        LOG(ISF, "[SIGNAL] editorclient,ime,opened\n");
+    }
+}
+
+static void imfInputPanelGeometryEventCb(void* data, Ecore_IMF_Context* ctx, int value)
+{
+    Ewk_View_Smart_Data* smartData = static_cast<Ewk_View_Smart_Data*>(data);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
+
+    Eina_Rectangle rect;
+    ecore_imf_context_input_panel_geometry_get(priv->imfContext, &rect.x, &rect.y, &rect.w, &rect.h);
+    evas_object_smart_callback_call(smartData->self, "inputmethod,changed", &rect);
+    LOG(ISF, "%s : [SIGNAL] inputmethod,changed (%d,%d,%d,%d)\n", __func__, rect.x, rect.y, rect.w, rect.h);
+}
+
+static void imfCandidatePanelStateEventCb(void* data, Ecore_IMF_Context* ctx, int state)
+{
+    Ewk_View_Smart_Data* smartData = static_cast<Ewk_View_Smart_Data*>(data);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
+
+    if (state == ECORE_IMF_CANDIDATE_PANEL_SHOW)
+        evas_object_smart_callback_call(smartData->self, "editorclient,candidate,opened", 0);
+    else
+        evas_object_smart_callback_call(smartData->self, "editorclient,candidate,closed", 0);
+}
+
+static void imfCandidatePanelGeometryEventCb(void* data, Ecore_IMF_Context* ctx, int value)
+{
+    Ewk_View_Smart_Data* smartData = static_cast<Ewk_View_Smart_Data*>(data);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
+
+    Eina_Rectangle rect;
+    ecore_imf_context_candidate_panel_geometry_get(priv->imfContext, &rect.x, &rect.y, &rect.w, &rect.h);
+    evas_object_smart_callback_call(smartData->self, "editorclient,candidate,changed", &rect);
+}
+
+static Eina_Bool imfRetrieveSurroundingCb(void* data, Ecore_IMF_Context* context, char** text, int* offset)
+{
+    Ewk_View_Smart_Data* smartData = static_cast<Ewk_View_Smart_Data*>(data);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
+
+    if (!priv->pageClient->page()->focusedFrame() || (!text && !offset))
+        return false;
+
+    String surroundingText;
+    int cursorOffset;
+    priv->pageClient->page()->getSurroundingTextAndCursorOffset(surroundingText, cursorOffset);
+
+    if (text) {
+        CString utf8Text(surroundingText.utf8());
+        size_t length = utf8Text.length();
+
+        *text = static_cast<char*>(malloc((length + 1) * sizeof(char)));
+        if (!(*text))
+            return false;
+
+        if (length)
+            strncpy(*text, utf8Text.data(), length);
+        (*text)[length] = 0;
+    }
+
+    if (offset)
+        *offset = cursorOffset;
+
+    return true;
+}
+
+static void imfPreeditChangedCb(void* data, Ecore_IMF_Context* context, void* eventInfo)
+{
+    Ewk_View_Smart_Data* smartData = static_cast<Ewk_View_Smart_Data*>(data);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
+
+    priv->pageClient->imContextPreeditChanged(context);
+}
+
+static void imfEventCommittedCb(void* data, Ecore_IMF_Context* context, void* eventInfo)
+{
+    Ewk_View_Smart_Data* smartData = static_cast<Ewk_View_Smart_Data*>(data);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
+
+    priv->pageClient->imContextCommitted(context, static_cast<char*>(eventInfo));
+}
+
+static void imfContextDeleteSurroundingCb(void* data, Ecore_IMF_Context* context, void* eventInfo)
+{
+    Ewk_View_Smart_Data* smartData = static_cast<Ewk_View_Smart_Data*>(data);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
+
+    Ecore_IMF_Event_Delete_Surrounding* event = static_cast<Ecore_IMF_Event_Delete_Surrounding*>(eventInfo);
+    if (!event)
+        return;
+
+    priv->pageClient->page()->deleteSurroundingText(event->offset, event->n_chars);
+}
+
+Ecore_IMF_Context* ewk_view_imf_context_get(Evas_Object* ewkView)
+{
+    EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, 0);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, 0);
+
+    return priv->imfContext;
+}
+
+Ecore_IMF_Context* ewk_view_imf_context_set(Evas_Object* ewkView, Ecore_IMF_Input_Panel_Layout layout)
+{
+    EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, 0);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, 0);
+
+    Ecore_IMF_Context* imfContext;
+    Eina_List* iterator;
+    void* data;
+
+    EINA_LIST_FOREACH(priv->imfContextList, iterator, data) {
+        imfContext = static_cast<Ecore_IMF_Context*>(data);
+        if (ecore_imf_context_input_panel_layout_get(imfContext) == layout) {
+            priv->imfContext = imfContext;
+            return imfContext;
+        }
+    }
+
+    imfContext = ecore_imf_context_add(ecore_imf_context_default_id_get());
+    if (!imfContext)
+        return 0;
+
+    ecore_imf_context_input_panel_enabled_set(imfContext, false);
+    ecore_imf_context_input_panel_event_callback_add(imfContext, ECORE_IMF_INPUT_PANEL_STATE_EVENT, imfInputPanelStateEventCb, smartData);
+    ecore_imf_context_input_panel_event_callback_add(imfContext, ECORE_IMF_INPUT_PANEL_GEOMETRY_EVENT, imfInputPanelGeometryEventCb, smartData);
+    ecore_imf_context_input_panel_event_callback_add(imfContext, ECORE_IMF_CANDIDATE_PANEL_STATE_EVENT, imfCandidatePanelStateEventCb, smartData);
+    ecore_imf_context_input_panel_event_callback_add(imfContext, ECORE_IMF_CANDIDATE_PANEL_GEOMETRY_EVENT, imfCandidatePanelGeometryEventCb, smartData);
+    ecore_imf_context_retrieve_surrounding_callback_set(imfContext, imfRetrieveSurroundingCb, smartData); // Support for Auto Capitalization
+    ecore_imf_context_event_callback_add(imfContext, ECORE_IMF_CALLBACK_PREEDIT_CHANGED, imfPreeditChangedCb, smartData);
+    ecore_imf_context_event_callback_add(imfContext, ECORE_IMF_CALLBACK_COMMIT, imfEventCommittedCb, smartData);
+    ecore_imf_context_event_callback_add(imfContext, ECORE_IMF_CALLBACK_DELETE_SURROUNDING, imfContextDeleteSurroundingCb, smartData); //Support for Automatic Full Stop
+    ecore_imf_context_input_panel_layout_set(imfContext, layout);
+
+    priv->imfContextList = eina_list_append(priv->imfContextList, imfContext);
+    priv->imfContext = imfContext;
+
+    return imfContext;
+}
+
+void ewk_view_imf_context_reset(Evas_Object* ewkView)
+{
+    EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
+
+    if (!priv->imfContext)
+        return;
+
+    ecore_imf_context_reset(priv->imfContext);
+
+    if (ecore_imf_context_input_panel_state_get(priv->imfContext) == ECORE_IMF_INPUT_PANEL_STATE_HIDE)
+        priv->imfContext = 0;
+}
+
+void ewk_view_imf_context_hide(Evas_Object* ewkView)
+{
+    EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
+
+    if (!priv->imfContext)
+        return;
+
+    if (ecore_imf_context_input_panel_state_get(priv->imfContext) != ECORE_IMF_INPUT_PANEL_STATE_HIDE) {
+        ecore_imf_context_reset(priv->imfContext);
+        ecore_imf_context_input_panel_hide(priv->imfContext);
+        ecore_imf_context_focus_out(priv->imfContext);
+    }
+
+    priv->imfContext = 0;
+}
+
+static void _ewk_view_imf_context_destroy(Ewk_View_Private_Data* priv)
+{
+    if (!priv->imfContextList)
+        return;
+
+    void* item;
+    EINA_LIST_FREE(priv->imfContextList, item) {
+        Ecore_IMF_Context* imfContext = static_cast<Ecore_IMF_Context*>(item);
+        if (!imfContext)
+            continue;
+
+        ecore_imf_context_input_panel_event_callback_del(imfContext, ECORE_IMF_INPUT_PANEL_STATE_EVENT, imfInputPanelStateEventCb);
+        ecore_imf_context_input_panel_event_callback_del(imfContext, ECORE_IMF_INPUT_PANEL_GEOMETRY_EVENT, imfInputPanelGeometryEventCb);
+        ecore_imf_context_input_panel_event_callback_del(imfContext, ECORE_IMF_CANDIDATE_PANEL_STATE_EVENT, imfCandidatePanelStateEventCb);
+        ecore_imf_context_input_panel_event_callback_del(imfContext, ECORE_IMF_CANDIDATE_PANEL_GEOMETRY_EVENT, imfCandidatePanelGeometryEventCb);
+        ecore_imf_context_event_callback_del(imfContext, ECORE_IMF_CALLBACK_PREEDIT_CHANGED, imfPreeditChangedCb);
+        ecore_imf_context_event_callback_del(imfContext, ECORE_IMF_CALLBACK_COMMIT, imfEventCommittedCb);
+        ecore_imf_context_event_callback_del(imfContext, ECORE_IMF_CALLBACK_DELETE_SURROUNDING, imfContextDeleteSurroundingCb);
+        ecore_imf_context_del(imfContext);
+    }
+
+    priv->imfContextList = 0;
+    priv->imfContext = 0;
+}
+
+void ewk_view_imf_context_destroy(Evas_Object* ewkView)
+{
+    EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
+
+    _ewk_view_imf_context_destroy(priv);
+}
+#endif
+
 #if ENABLE(TIZEN_BACKFORWARD_LIST_CLEAR)
 void ewk_view_back_forward_list_clear(const Evas_Object* ewkView)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
 
-    WKBackForwardListClearBackForwardList(WKPageGetBackForwardList(toAPI(impl->pageProxy.get())));
+    WKBackForwardListClearBackForwardList(WKPageGetBackForwardList(toAPI(priv->pageClient->page())));
 }
 #endif
 
@@ -4210,65 +5536,118 @@ void ewkViewIconReceived(Evas_Object* ewkView)
 
 #endif // #if OS(TIZEN)
 
+#if ENABLE(TIZEN_INPUT_COLOR_PICKER) // wait for upstream
+#if ENABLE(INPUT_TYPE_COLOR)
+/**
+ * @internal
+ * Reqeusts to show external color picker.
+ */
+void ewk_view_color_picker_request(Evas_Object* ewkView, int r, int g, int b, int a, WKColorPickerResultListenerRef listener)
+{
+    EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
+    EINA_SAFETY_ON_NULL_RETURN(smartData->api->input_picker_color_request);
+
+    priv->colorPickerResultListener = listener;
+
+    smartData->api->input_picker_color_request(smartData, r, g, b, a);
+}
+
+/**
+ * @internal
+ * Reqeusts to hide external color picker.
+ */
+void ewk_view_color_picker_dismiss(Evas_Object* ewkView)
+{
+    EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
+    EINA_SAFETY_ON_NULL_RETURN(smartData->api->input_picker_color_dismiss);
+
+    priv->colorPickerResultListener = 0;
+
+    smartData->api->input_picker_color_dismiss(smartData);
+}
+#endif
+
+Eina_Bool ewk_view_color_picker_color_set(Evas_Object* ewkView, int r, int g, int b, int a)
+{
+#if ENABLE(INPUT_TYPE_COLOR)
+    EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
+    EINA_SAFETY_ON_NULL_RETURN_VAL(priv->colorPickerResultListener, false);
+
+    WebCore::Color color = WebCore::Color(r, g, b, a);
+    WKRetainPtr<WKStringRef> colorString(AdoptWK, WKStringCreateWithUTF8CString(color.serialized().utf8().data()));
+    WKColorPickerResultListenerSetColor(priv->colorPickerResultListener, colorString.get());
+    priv->colorPickerResultListener = 0;
+
+    return true;
+#else
+    return false;
+#endif
+}
+#endif // ENABLE(TIZEN_INPUT_COLOR_PICKER)
+
 Eina_Bool ewk_view_feed_touch_event(Evas_Object* ewkView, Ewk_Touch_Event_Type type, const Eina_List* points, const Evas_Modifier* modifiers)
 {
 #if ENABLE(TOUCH_EVENTS)
     EINA_SAFETY_ON_NULL_RETURN_VAL(points, false);
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
+    EWK_VIEW_IMPL_GET_BY_SD_OR_RETURN(smartData, impl, false);
 
 #if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION) && ENABLE(TIZEN_WEBKIT2_FOR_MOVING_TEXT_SELECTION_HANDLE_FROM_OSP)
-    if (impl->pageClient->isTextSelectionMode() && eina_list_count(points) == 1) {
+    if (priv->pageClient->isTextSelectionMode() && eina_list_count(points) == 1) {
         Ewk_Touch_Point* point = static_cast<Ewk_Touch_Point*>(eina_list_data_get(points));
         IntPoint handlePoint(point->x, point->y);
 
         if (type == EWK_TOUCH_START)
-            impl->pageClient->textSelectonHandleDown(handlePoint);
+            priv->pageClient->textSelectonHandleDown(handlePoint);
         else if (type == EWK_TOUCH_MOVE)
-            impl->pageClient->textSelectonHandleMove(handlePoint);
+            priv->pageClient->textSelectonHandleMove(handlePoint);
         else
-            impl->pageClient->textSelectonHandleUp();
+            priv->pageClient->textSelectonHandleUp();
     }
 #endif
 
 #if ENABLE(TIZEN_GESTURE)
 #if ENABLE(TIZEN_CONTEXT_MENU_WEBKIT_2)
     // We don't want to process touch event when context menu is shown.
-    if (impl->pageClient->isContextMenuVisible() && type != EWK_TOUCH_CANCEL)
+    if (priv->pageClient->isContextMenuVisible() && type != EWK_TOUCH_CANCEL)
         return true;
 #endif
 #if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION)
-    if (impl->pageClient->isTextSelectionDowned() && type != EWK_TOUCH_CANCEL)
+    if (priv->pageClient->isTextSelectionDowned() && type != EWK_TOUCH_CANCEL)
         return true;
 #endif
 
     if (type == EWK_TOUCH_START) {
         if (eina_list_count(points) == 1) {
-            impl->gestureClient->reset();
+            priv->gestureClient->reset();
             Ewk_Touch_Point* point = static_cast<Ewk_Touch_Point*>(eina_list_data_get(points));
-            impl->touchDownPoint.x = point->x;
-            impl->touchDownPoint.y = point->y;
-            impl->exceedTouchMoveThreshold = false;
+            priv->touchDownPoint.x = point->x;
+            priv->touchDownPoint.y = point->y;
+            priv->exceedTouchMoveThreshold = false;
         }
-    } else if (type == EWK_TOUCH_MOVE && !impl->exceedTouchMoveThreshold) {
+    } else if (type == EWK_TOUCH_MOVE && !priv->exceedTouchMoveThreshold) {
         if (eina_list_count(points) == 1) {
             unsigned int threshold = elm_config_scroll_thumbscroll_threshold_get();
             Ewk_Touch_Point* point = static_cast<Ewk_Touch_Point*>(eina_list_data_get(points));
-            int diffX = impl->touchDownPoint.x - point->x;
-            int diffY = impl->touchDownPoint.y - point->y;
+            int diffX = priv->touchDownPoint.x - point->x;
+            int diffY = priv->touchDownPoint.y - point->y;
             if (static_cast<unsigned int>(diffX * diffX + diffY * diffY) > threshold * threshold)
-                impl->exceedTouchMoveThreshold = true;
+                priv->exceedTouchMoveThreshold = true;
             else
                 return true;
         } else {
-            impl->exceedTouchMoveThreshold = true;
+            priv->exceedTouchMoveThreshold = true;
         }
     }
 #endif // #if ENABLE(TIZEN_GESTURE)
 
     // FIXME: impl is used in the webkit opensource, but tizen webkit does not use it yet.
     //impl->page()->handleTouchEvent(NativeWebTouchEvent(type, points, modifiers, impl->transformFromScene(), impl->transformToScreen(), ecore_time_get()));
-    impl->pageProxy->handleTouchEvent(NativeWebTouchEvent(type, points, modifiers, impl->transformFromScene(), impl->transformToScreen(), ecore_time_get()));
+    priv->pageClient->page()->handleTouchEvent(NativeWebTouchEvent(type, points, modifiers, impl->transformFromScene(), impl->transformToScreen(), ecore_time_get()));
 
     return true;
 #else
@@ -4280,9 +5659,33 @@ Eina_Bool ewk_view_touch_events_enabled_set(Evas_Object* ewkView, Eina_Bool enab
 {
 #if ENABLE(TOUCH_EVENTS)
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
+
+    enabled = !!enabled;
+    if (priv->areTouchEventsEnabled == enabled)
+        return true;
 
-    impl->setTouchEventsEnabled(!!enabled);
+    priv->areTouchEventsEnabled = enabled;
+    if (enabled) {
+        // FIXME: We have to connect touch callbacks with mouse and multi events
+        // because the Evas creates mouse events for first touch and multi events
+        // for second and third touches. Below codes should be fixed when the Evas
+        // supports the touch events.
+        // See https://bugs.webkit.org/show_bug.cgi?id=97785 for details.
+        evas_object_event_callback_add(ewkView, EVAS_CALLBACK_MOUSE_DOWN, _ewk_view_on_touch_down, smartData);
+        evas_object_event_callback_add(ewkView, EVAS_CALLBACK_MOUSE_UP, _ewk_view_on_touch_up, smartData);
+        evas_object_event_callback_add(ewkView, EVAS_CALLBACK_MOUSE_MOVE, _ewk_view_on_touch_move, smartData);
+        evas_object_event_callback_add(ewkView, EVAS_CALLBACK_MULTI_DOWN, _ewk_view_on_touch_down, smartData);
+        evas_object_event_callback_add(ewkView, EVAS_CALLBACK_MULTI_UP, _ewk_view_on_touch_up, smartData);
+        evas_object_event_callback_add(ewkView, EVAS_CALLBACK_MULTI_MOVE, _ewk_view_on_touch_move, smartData);
+    } else {
+        evas_object_event_callback_del(ewkView, EVAS_CALLBACK_MOUSE_DOWN, _ewk_view_on_touch_down);
+        evas_object_event_callback_del(ewkView, EVAS_CALLBACK_MOUSE_UP, _ewk_view_on_touch_up);
+        evas_object_event_callback_del(ewkView, EVAS_CALLBACK_MOUSE_MOVE, _ewk_view_on_touch_move);
+        evas_object_event_callback_del(ewkView, EVAS_CALLBACK_MULTI_DOWN, _ewk_view_on_touch_down);
+        evas_object_event_callback_del(ewkView, EVAS_CALLBACK_MULTI_UP, _ewk_view_on_touch_up);
+        evas_object_event_callback_del(ewkView, EVAS_CALLBACK_MULTI_MOVE, _ewk_view_on_touch_move);
+    }
 
     return true;
 #else
@@ -4294,9 +5697,9 @@ Eina_Bool ewk_view_touch_events_enabled_get(const Evas_Object* ewkView)
 {
 #if ENABLE(TOUCH_EVENTS)
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
 
-    return impl->touchEventsEnabled();
+    return priv->areTouchEventsEnabled;
 #else
     return false;
 #endif
@@ -4306,10 +5709,10 @@ Eina_Bool ewk_view_main_frame_scrollbar_visible_set(Evas_Object* ewkView, Eina_B
 {
 #if ENABLE(TIZEN_WEBKIT2_TILED_SCROLLBAR)
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
 
-    impl->mainFrameScrollbarVisibility = visible;
-    impl->pageClient->updateVisibility();
+    priv->mainFrameScrollbarVisibility = visible;
+    priv->pageClient->updateVisibility();
 
     return true;
 #else
@@ -4321,9 +5724,9 @@ Eina_Bool ewk_view_main_frame_scrollbar_visible_get(const Evas_Object* ewkView)
 {
 #if ENABLE(TIZEN_WEBKIT2_TILED_SCROLLBAR)
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
 
-    return impl->mainFrameScrollbarVisibility;
+    return priv->mainFrameScrollbarVisibility;
 #else
     return false;
 #endif
@@ -4333,13 +5736,13 @@ Eina_Bool ewk_view_page_save(Evas_Object* ewkView, const char* path)
 {
 #if ENABLE(TIZEN_OFFLINE_PAGE_SAVE)
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
     EINA_SAFETY_ON_NULL_RETURN_VAL(path, false);
 
     String title = ewk_view_title_get(ewkView);
     String url = ewk_view_url_get(ewkView);
     String directoryPath(path);
-    impl->pageClient->startOfflinePageSave(directoryPath, url, title);
+    priv->pageClient->startOfflinePageSave(directoryPath, url, title);
 
     return true;
 #else
@@ -4380,15 +5783,15 @@ Eina_Bool ewk_view_page_contents_get(const Evas_Object* ewkView, Ewk_Page_Conten
     EINA_SAFETY_ON_NULL_RETURN_VAL(context, false);
     EINA_SAFETY_ON_NULL_RETURN_VAL(context->callback, false);
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
 
     switch (context->type) {
     case EWK_PAGE_CONTENTS_TYPE_MHTML:
-        impl->pageProxy->getContentsAsMHTMLData(DataCallback::create(context, ewkViewPageContentsAsMHTMLCallback), false);
+        priv->pageClient->page()->getContentsAsMHTMLData(DataCallback::create(context, ewkViewPageContentsAsMHTMLCallback), false);
         break;
 
     case EWK_PAGE_CONTENTS_TYPE_STRING:
-        impl->pageProxy->getContentsAsString(StringCallback::create(context, ewkViewPageContentsAsStringCallback));
+        priv->pageClient->page()->getContentsAsString(StringCallback::create(context, ewkViewPageContentsAsStringCallback));
         break;
 
     default:
@@ -4403,9 +5806,9 @@ Eina_Bool ewk_view_animated_scroll_set(Evas_Object* ewkView, int x, int y)
 {
 #if ENABLE(TIZEN_GESTURE)
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
 
-    return impl->gestureClient->scrollToWithAnimation(x, y);
+    return priv->gestureClient->scrollToWithAnimation(x, y);
 #else
     UNUSED_PARAM(ewkView);
     UNUSED_PARAM(x);
@@ -4418,10 +5821,10 @@ Eina_Bool ewk_view_animated_scroll_set(Evas_Object* ewkView, int x, int y)
 void ewkViewFocusRingHide(Evas_Object* ewkView)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
 
-    if (impl->focusRing)
-        impl->focusRing->hide();
+    if (priv->focusRing)
+        priv->focusRing->hide();
 }
 #endif
 
@@ -4429,51 +5832,9 @@ void ewk_view_content_security_policy_set(Evas_Object* ewkView, const char* poli
 {
 #if ENABLE(TIZEN_CSP)
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd);
-    EWK_VIEW_IMPL_GET_OR_RETURN(sd, impl);
+    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv);
 
     TIZEN_LOGI("policy(%s), type(%d)\n", policy, type);
-    impl->pageProxy->setContentSecurityPolicy(String::fromUTF8(policy), static_cast<WebCore::ContentSecurityPolicy::HeaderType>(type));
+    priv->pageClient->page()->setContentSecurityPolicy(String::fromUTF8(policy), static_cast<WebCore::ContentSecurityPolicy::HeaderType>(type));
 #endif
 }
-
-// EwkFindOptions should be matched up orders with WkFindOptions.
-COMPILE_ASSERT_MATCHING_ENUM(EWK_FIND_OPTIONS_CASE_INSENSITIVE, kWKFindOptionsCaseInsensitive);
-COMPILE_ASSERT_MATCHING_ENUM(EWK_FIND_OPTIONS_AT_WORD_STARTS, kWKFindOptionsAtWordStarts);
-COMPILE_ASSERT_MATCHING_ENUM(EWK_FIND_OPTIONS_TREAT_MEDIAL_CAPITAL_AS_WORD_START, kWKFindOptionsTreatMedialCapitalAsWordStart);
-COMPILE_ASSERT_MATCHING_ENUM(EWK_FIND_OPTIONS_BACKWARDS, kWKFindOptionsBackwards);
-COMPILE_ASSERT_MATCHING_ENUM(EWK_FIND_OPTIONS_WRAP_AROUND, kWKFindOptionsWrapAround);
-COMPILE_ASSERT_MATCHING_ENUM(EWK_FIND_OPTIONS_SHOW_OVERLAY, kWKFindOptionsShowOverlay);
-COMPILE_ASSERT_MATCHING_ENUM(EWK_FIND_OPTIONS_SHOW_FIND_INDICATOR, kWKFindOptionsShowFindIndicator);
-COMPILE_ASSERT_MATCHING_ENUM(EWK_FIND_OPTIONS_SHOW_HIGHLIGHT, kWKFindOptionsShowHighlight);
-
-Eina_Bool ewk_view_text_find(Evas_Object* ewkView, const char* text, Ewk_Find_Options options, unsigned maxMatchCount)
-{
-    EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
-    EINA_SAFETY_ON_NULL_RETURN_VAL(text, false);
-
-    impl->pageProxy->findString(String::fromUTF8(text), static_cast<WebKit::FindOptions>(options), maxMatchCount);
-
-    return true;
-}
-
-Eina_Bool ewk_view_text_find_highlight_clear(Evas_Object* ewkView)
-{
-    EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
-
-    impl->pageProxy->hideFindUI();
-
-    return true;
-}
-
-Eina_Bool ewk_view_text_matches_count(Evas_Object* ewkView, const char* text, Ewk_Find_Options options, unsigned maxMatchCount)
-{
-    EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
-    EINA_SAFETY_ON_NULL_RETURN_VAL(text, false);
-
-    impl->pageProxy->countStringMatches(String::fromUTF8(text), static_cast<WebKit::FindOptions>(options), maxMatchCount);
-
-    return true;
-}
old mode 100755 (executable)
new mode 100644 (file)
index 384c6b4..63b837f
@@ -26,9 +26,6 @@
  *
  * The following signals (see evas_object_smart_callback_add()) are emitted:
  *
- * - "back,forward,list,changed", void: reports that the view's back / forward list had changed.
- * - "close,window", void: window is closed.
- * - "create,window", Evas_Object**: a new window is created.
  * - "download,cancelled", Ewk_Download_Job*: reports that a download was effectively cancelled.
  * - "download,failed", Ewk_Download_Job_Error*: reports that a download failed with the given error.
  * - "download,finished", Ewk_Download_Job*: reports that a download completed successfully.
  *   when done to continue with the form submission. If the last reference is removed on a
  *   #Ewk_Form_Submission_Request and the form has not been submitted yet,
  *   ewk_form_submission_request_submit() will be called automatically.
- * - "icon,changed", void: reports that the view's favicon has changed.
- * - "intent,request,new", Ewk_Intent*: reports new Web intent request.
+ * - "intent,request,new", Ewk_Intent_Request*: reports new Web intent request.
  * - "intent,service,register", Ewk_Intent_Service*: reports new Web intent service registration.
- * - "load,error", const Ewk_Error*: reports main frame load failed.
+ * - "load,error", const Ewk_Web_Error*: reports main frame load failed.
  * - "load,finished", void: reports load finished.
  * - "load,progress", double*: load progress has changed (value from 0.0 to 1.0).
- * - "load,provisional,failed", const Ewk_Error*: view provisional load failed.
+ * - "load,provisional,failed", const Ewk_Web_Error*: view provisional load failed.
  * - "load,provisional,redirect", void: view received redirect for provisional load.
  * - "load,provisional,started", void: view started provisional load.
- * - "pageSave,success", void: page save operation was success.
- * - "pageSave,error", void: page save operation has failed.
  * - "policy,decision,navigation", Ewk_Navigation_Policy_Decision*: a navigation policy decision should be taken.
  *   To make a policy decision asynchronously, simply increment the reference count of the
  *   #Ewk_Navigation_Policy_Decision object using ewk_navigation_policy_decision_ref().
  * - "policy,decision,new,window", Ewk_Navigation_Policy_Decision*: a new window policy decision should be taken.
  *   To make a policy decision asynchronously, simply increment the reference count of the
  *   #Ewk_Navigation_Policy_Decision object using ewk_navigation_policy_decision_ref().
- * - "resource,request,failed", const Ewk_Resource_Load_Error*: a resource failed loading.
- * - "resource,request,finished", const Ewk_Resource*: a resource finished loading.
- * - "resource,request,new", const Ewk_Resource_Request*: a resource request was initiated.
- * - "resource,request,response", Ewk_Resource_Load_Response*: a response to a resource request was received.
- * - "resource,request,sent", const Ewk_Resource_Request*: a resource request was sent.
+ * - "resource,request,failed", const Ewk_Web_Resource_Load_Error*: a resource failed loading.
+ * - "resource,request,finished", const Ewk_Web_Resource*: a resource finished loading.
+ * - "resource,request,new", const Ewk_Web_Resource_Request*: a resource request was initiated.
+ * - "resource,request,response", Ewk_Web_Resource_Load_Response*: a response to a resource request was received.
+ * - "resource,request,sent", const Ewk_Web_Resource_Request*: a resource request was sent.
  * - "text,found", unsigned int*: the requested text was found and it gives the number of matches.
  * - "title,changed", const char*: title of the main frame was changed.
- * - "tooltip,text,set", const char*: tooltip was set.
- * - "tooltip,text,unset", void: tooltip was unset.
- * - "url,changed", const char*: url of the main frame was changed.
- * - "webprocess,crashed", Eina_Bool*: expects a @c EINA_TRUE if web process crash is handled; @c EINA_FALSE, otherwise.
+ * - "uri,changed", const char*: uri of the main frame was changed.
+ * - "pageSave,success", void: page save operation was success.
+ * - "pageSave,error", void: page save operation has failed.
  *
  *
  * Tizen specific signals
 #ifndef ewk_view_h
 #define ewk_view_h
 
-#include "ewk_back_forward_list.h"
 #include "ewk_context.h"
 #include "ewk_download_job.h"
-#include "ewk_error.h"
 #include "ewk_intent.h"
-#include "ewk_resource.h"
-#include "ewk_settings.h"
 #include "ewk_touch.h"
+#include "ewk_settings.h"
 #include "ewk_url_request.h"
 #include "ewk_url_response.h"
+#include "ewk_web_error.h"
+#include "ewk_web_resource.h"
 #include <Evas.h>
 
 // #if OS(TIZEN)
@@ -121,15 +113,15 @@ typedef enum {
     EWK_TEXT_DIRECTION_LEFT_TO_RIGHT
 } Ewk_Text_Direction;
 
-typedef struct Ewk_View_Smart_Data Ewk_View_Smart_Data;
-typedef struct Ewk_View_Smart_Class Ewk_View_Smart_Class;
+typedef struct _Ewk_View_Smart_Data Ewk_View_Smart_Data;
+typedef struct _Ewk_View_Smart_Class Ewk_View_Smart_Class;
 
 // #if OS(TIZEN)
 /// Creates a type name for _Ewk_Event_Gesture.
-typedef struct Ewk_Event_Gesture Ewk_Event_Gesture;
+typedef struct _Ewk_Event_Gesture Ewk_Event_Gesture;
 
 /// Represents a gesture event.
-struct Ewk_Event_Gesture {
+struct _Ewk_Event_Gesture {
     Ewk_Gesture_Type type; /**< type of the gesture event */
     Evas_Coord_Point position; /**< position of the gesture event */
     Evas_Point velocity; /**< velocity of the gesture event. The unit is pixel per second. */
@@ -143,7 +135,7 @@ struct Ewk_Event_Gesture {
  * \enum    Ewk_Input_Type
  * @brief   Provides type of focused input element
  */
-enum Ewk_Input_Type {
+enum _Ewk_Input_Type {
     EWK_INPUT_TYPE_TEXT,
     EWK_INPUT_TYPE_TELEPHONE,
     EWK_INPUT_TYPE_NUMBER,
@@ -158,12 +150,12 @@ enum Ewk_Input_Type {
     EWK_INPUT_TYPE_TIME,
     EWK_INPUT_TYPE_WEEK
 };
-typedef enum Ewk_Input_Type Ewk_Input_Type;
+typedef enum _Ewk_Input_Type Ewk_Input_Type;
 // #endif // ENABLE(TIZEN_INPUT_TAG_EXTENSION)
 // #endif // #if OS(TIZEN)
 
 /// Ewk view's class, to be overridden by sub-classes.
-struct Ewk_View_Smart_Class {
+struct _Ewk_View_Smart_Class {
     Evas_Smart_Class sc; /**< all but 'data' is free to be changed. */
     unsigned long version;
 
@@ -199,8 +191,6 @@ struct Ewk_View_Smart_Class {
     //  - if overridden, have to call parent method if desired
     Eina_Bool (*focus_in)(Ewk_View_Smart_Data *sd);
     Eina_Bool (*focus_out)(Ewk_View_Smart_Data *sd);
-    Eina_Bool (*fullscreen_enter)(Ewk_View_Smart_Data *sd);
-    Eina_Bool (*fullscreen_exit)(Ewk_View_Smart_Data *sd);
     Eina_Bool (*mouse_wheel)(Ewk_View_Smart_Data *sd, const Evas_Event_Mouse_Wheel *ev);
     Eina_Bool (*mouse_down)(Ewk_View_Smart_Data *sd, const Evas_Event_Mouse_Down *ev);
     Eina_Bool (*mouse_up)(Ewk_View_Smart_Data *sd, const Evas_Event_Mouse_Up *ev);
@@ -208,20 +198,12 @@ struct Ewk_View_Smart_Class {
     Eina_Bool (*key_down)(Ewk_View_Smart_Data *sd, const Evas_Event_Key_Down *ev);
     Eina_Bool (*key_up)(Ewk_View_Smart_Data *sd, const Evas_Event_Key_Up *ev);
 
-    // javascript popup:
-    //   - All strings should be guaranteed to be stringshared.
-    void (*run_javascript_alert)(Ewk_View_Smart_Data *sd, const char *message);
-    Eina_Bool (*run_javascript_confirm)(Ewk_View_Smart_Data *sd, const char *message);
-    const char *(*run_javascript_prompt)(Ewk_View_Smart_Data *sd, const char *message, const char *default_value); /**< return string should be stringshared. */
-
+// #if ENABLE(TIZEN_INPUT_COLOR_PICKER) // wait for upstream
     // color picker:
     //   - Shows and hides color picker.
     Eina_Bool (*input_picker_color_request)(Ewk_View_Smart_Data *sd, int r, int g, int b, int a);
     Eina_Bool (*input_picker_color_dismiss)(Ewk_View_Smart_Data *sd);
-
-    // storage:
-    //   - Web database.
-    unsigned long long (*exceeded_database_quota)(Ewk_View_Smart_Data *sd, const char *databaseName, const char *displayName, unsigned long long currentQuota, unsigned long long currentOriginUsage, unsigned long long currentDatabaseUsage, unsigned long long expectedUsage);
+// #endif
 
 // #if ENABLE(TIZEN_WEBKIT2_FORM_DATABASE)
     Eina_Bool (*formdata_candidate_show)(Ewk_View_Smart_Data *sd, int x, int y, int w, int h);
@@ -271,7 +253,7 @@ typedef void (*Ewk_Web_App_Icon_URLs_Get_Callback)(Eina_List *icon_urls, void *u
  * The version you have to put into the version field
  * in the @a Ewk_View_Smart_Class structure.
  */
-#define EWK_VIEW_SMART_CLASS_VERSION 6UL
+#define EWK_VIEW_SMART_CLASS_VERSION 1UL
 
 /**
  * Initializer for whole Ewk_View_Smart_Class structure.
@@ -283,7 +265,7 @@ typedef void (*Ewk_Web_App_Icon_URLs_Get_Callback)(Eina_List *icon_urls, void *u
  * @see EWK_VIEW_SMART_CLASS_INIT_VERSION
  * @see EWK_VIEW_SMART_CLASS_INIT_NAME_VERSION
  */
-#define EWK_VIEW_SMART_CLASS_INIT(smart_class_init) {smart_class_init, EWK_VIEW_SMART_CLASS_VERSION, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
+#define EWK_VIEW_SMART_CLASS_INIT(smart_class_init) {smart_class_init, EWK_VIEW_SMART_CLASS_VERSION, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
 
 /**
  * Initializer to zero a whole Ewk_View_Smart_Class structure.
@@ -312,19 +294,25 @@ typedef void (*Ewk_Web_App_Icon_URLs_Get_Callback)(Eina_List *icon_urls, void *u
  */
 #define EWK_VIEW_SMART_CLASS_INIT_NAME_VERSION(name) EWK_VIEW_SMART_CLASS_INIT(EVAS_SMART_CLASS_INIT_NAME_VERSION(name))
 
+typedef struct _Ewk_View_Private_Data Ewk_View_Private_Data;
 typedef struct EwkViewImpl EwkViewImpl;
+
 /**
  * @brief Contains an internal View data.
  *
  * It is to be considered private by users, but may be extended or
  * changed by sub-classes (that's why it's in public header file).
  */
-struct Ewk_View_Smart_Data {
+struct _Ewk_View_Smart_Data {
     Evas_Object_Smart_Clipped_Data base;
     const Ewk_View_Smart_Class* api; /**< reference to casted class instance */
     Evas_Object* self; /**< reference to owner object */
     Evas_Object* image; /**< reference to evas_object_image for drawing web contents */
-    EwkViewImpl* priv; /**< should never be accessed, c++ stuff */
+    // FIXME: Ewk_View_Private_Data was replaced with EwkViewImpl in the webkit opensource.
+    // So, we have both Ewk_View_Private_Data and EwkViewImpl now,
+    // but Ewk_View_Private_Data should be removed later.
+    Ewk_View_Private_Data* priv; /**< should never be accessed, c++ stuff */
+    EwkViewImpl* ewkViewImpl; /**< should never be accessed, c++ stuff */
     struct {
         Evas_Coord x, y, w, h; /**< last used viewport */
     } view;
@@ -335,51 +323,51 @@ struct Ewk_View_Smart_Data {
     } changed;
 };
 
-/// Creates a type name for Ewk_Resource_Request.
-typedef struct Ewk_Resource_Request Ewk_Resource_Request;
+/// Creates a type name for _Ewk_Web_Resource_Request.
+typedef struct _Ewk_Web_Resource_Request Ewk_Web_Resource_Request;
 
 /**
  * @brief Structure containing details about a resource request.
  */
-struct Ewk_Resource_Request {
-    Ewk_Resource *resource; /**< resource being requested */
+struct _Ewk_Web_Resource_Request {
+    Ewk_Web_Resource *resource; /**< resource being requested */
     Ewk_Url_Request *request; /**< URL request for the resource */
     Ewk_Url_Response *redirect_response; /**< Possible redirect response for the resource or @c NULL */
 };
 
-/// Creates a type name for Ewk_Resource_Load_Response.
-typedef struct Ewk_Resource_Load_Response Ewk_Resource_Load_Response;
+/// Creates a type name for _Ewk_Web_Resource_Load_Response.
+typedef struct _Ewk_Web_Resource_Load_Response Ewk_Web_Resource_Load_Response;
 
 /**
  * @brief Structure containing details about a response to a resource request.
  */
-struct Ewk_Resource_Load_Response {
-    Ewk_Resource *resource; /**< resource requested */
-    Ewk_Url_Response *response; /**< resource load response */
+struct _Ewk_Web_Resource_Load_Response {
+     Ewk_Web_Resource *resource; /**< resource requested */
+     Ewk_Url_Response *response; /**< resource load response */
 };
 
-/// Creates a type name for Ewk_Resource_Load_Error.
-typedef struct Ewk_Resource_Load_Error Ewk_Resource_Load_Error;
+/// Creates a type name for _Ewk_Web_Resource_Load_Error.
+typedef struct _Ewk_Web_Resource_Load_Error Ewk_Web_Resource_Load_Error;
 
 /**
  * @brief Structure containing details about a resource load error.
  *
  * Details given about a resource load failure.
  */
-struct Ewk_Resource_Load_Error {
-    Ewk_Resource *resource; /**< resource that failed loading */
-    Ewk_Error *error; /**< load error */
+struct _Ewk_Web_Resource_Load_Error {
+    Ewk_Web_Resource *resource; /**< resource that failed loading */
+    Ewk_Web_Error *error; /**< load error */
 };
 
-/// Creates a type name for Ewk_Download_Job_Error.
-typedef struct Ewk_Download_Job_Error Ewk_Download_Job_Error;
+/// Creates a type name for _Ewk_Download_Job_Error.
+typedef struct _Ewk_Download_Job_Error Ewk_Download_Job_Error;
 
 /**
  * @brief Structure containing details about a download failure.
  */
-struct Ewk_Download_Job_Error {
+struct _Ewk_Download_Job_Error {
     Ewk_Download_Job *download_job; /**< download that failed */
-    Ewk_Error *error; /**< download error */
+    Ewk_Web_Error *error; /**< download error */
 };
 
 /// Enum values containing page contents type values.
@@ -446,24 +434,6 @@ EAPI Eina_Bool ewk_view_smart_class_set(Ewk_View_Smart_Class *api);
 EAPI Evas_Object *ewk_view_smart_add(Evas *e, Evas_Smart *smart, Ewk_Context *context);
 
 /**
- * Enum values used to specify search options.
- * @brief   Provides option to find text
- * @info    Keep this in sync with WKFindOptions.h
- */
-enum Ewk_Find_Options {
-    EWK_FIND_OPTIONS_NONE, /**< no search flags, this means a case sensitive, no wrap, forward only search. */
-    EWK_FIND_OPTIONS_CASE_INSENSITIVE = 1 << 0, /**< case insensitive search. */
-    EWK_FIND_OPTIONS_AT_WORD_STARTS = 1 << 1, /**< search text only at the beginning of the words. */
-    EWK_FIND_OPTIONS_TREAT_MEDIAL_CAPITAL_AS_WORD_START = 1 << 2, /**< treat capital letters in the middle of words as word start. */
-    EWK_FIND_OPTIONS_BACKWARDS = 1 << 3, /**< search backwards. */
-    EWK_FIND_OPTIONS_WRAP_AROUND = 1 << 4, /**< if not present search will stop at the end of the document. */
-    EWK_FIND_OPTIONS_SHOW_OVERLAY = 1 << 5, /**< show overlay */
-    EWK_FIND_OPTIONS_SHOW_FIND_INDICATOR = 1 << 6, /**< show indicator */
-    EWK_FIND_OPTIONS_SHOW_HIGHLIGHT = 1 << 7 /**< show highlight */
-};
-typedef enum Ewk_Find_Options Ewk_Find_Options;
-
-/**
  * Creates a new EFL WebKit view object.
  *
  * @param e canvas object where to create the view object
@@ -483,50 +453,29 @@ EAPI Evas_Object *ewk_view_add(Evas *e);
 EAPI Evas_Object *ewk_view_add_with_context(Evas *e, Ewk_Context *context);
 
 /**
- * Gets the Ewk_Context of this view.
- *
- * @param o the view object to get the Ewk_Context
+ * Asks the object to load the given URI.
  *
- * @return the Ewk_Context of this view or @c NULL on failure
- */
-EAPI Ewk_Context *ewk_view_context_get(const Evas_Object *o);
-
-/**
- * Asks the object to load the given URL.
- *
- * @param o view object to load @a URL
- * @param url uniform resource identifier to load
+ * @param o view object to load @a URI
+ * @param uri uniform resource identifier to load
  *
  * @return @c EINA_TRUE is returned if @a o is valid, irrespective of load,
  *         or @c EINA_FALSE on failure
  */
-EAPI Eina_Bool ewk_view_url_set(Evas_Object *o, const char *url);
+EAPI Eina_Bool ewk_view_url_set(Evas_Object *o, const char *uri);
 
 /**
- * Returns the current URL string of view object.
+ * Returns the current URI string of view object.
  *
  * It returns an internal string and should not
  * be modified. The string is guaranteed to be stringshared.
  *
- * @param o view object to get current URL
+ * @param o view object to get current URI
  *
- * @return current URL on success or @c NULL on failure
+ * @return current URI on success or @c NULL on failure
  */
 EAPI const char *ewk_view_url_get(const Evas_Object *o);
 
 /**
- * Returns the current icon URL of view object.
- *
- * It returns an internal string and should not
- * be modified. The string is guaranteed to be stringshared.
- *
- * @param o view object to get current icon URL
- *
- * @return current icon URL on success or @c NULL if unavailable or on failure
- */
-EAPI const char *ewk_view_icon_url_get(const Evas_Object *o);
-
-/**
  * Asks the main frame to reload the current document.
  *
  * @param o view object to reload current document
@@ -566,21 +515,39 @@ EAPI Ewk_Settings *ewk_view_settings_get(const Evas_Object *o);
 
 // #if OS(TIZEN)
 
-enum Ewk_Page_Visibility_State {
+enum _Ewk_Page_Visibility_State {
     EWK_PAGE_VISIBILITY_STATE_VISIBLE,
     EWK_PAGE_VISIBILITY_STATE_HIDDEN,
     EWK_PAGE_VISIBILITY_STATE_PRERENDER
 };
-typedef enum Ewk_Page_Visibility_State Ewk_Page_Visibility_State;
+typedef enum _Ewk_Page_Visibility_State Ewk_Page_Visibility_State;
 
-enum Ewk_Http_Method {
+enum _Ewk_Http_Method {
     EWK_HTTP_METHOD_GET,
     EWK_HTTP_METHOD_HEAD,
     EWK_HTTP_METHOD_POST,
     EWK_HTTP_METHOD_PUT,
     EWK_HTTP_METHOD_DELETE,
 };
-typedef enum Ewk_Http_Method Ewk_Http_Method;
+typedef enum _Ewk_Http_Method Ewk_Http_Method;
+
+/**
+ * Enum values used to specify search options.
+ * @brief   Provides option to find text
+ * @info    Keep this in sync with WKFindOptions.h
+ */
+enum _Ewk_Find_Options {
+    EWK_FIND_OPTIONS_NONE, /**< no search flags, this means a case sensitive, no wrap, forward only search. */
+    EWK_FIND_OPTIONS_CASE_INSENSITIVE = 1 << 0, /**< case insensitive search. */
+    EWK_FIND_OPTIONS_AT_WORD_STARTS = 1 << 1, /**< search text only at the beginning of the words. */
+    EWK_FIND_OPTIONS_TREAT_MEDIAL_CAPITAL_AS_WORD_START = 1 << 2, /**< treat capital letters in the middle of words as word start. */
+    EWK_FIND_OPTIONS_BACKWARDS = 1 << 3, /**< search backwards. */
+    EWK_FIND_OPTIONS_WRAP_AROUND = 1 << 4, /**< if not present search will stop at the end of the document. */
+    EWK_FIND_OPTIONS_SHOW_OVERLAY = 1 << 5, /**< show overlay */
+    EWK_FIND_OPTIONS_SHOW_FIND_INDICATOR = 1 << 6, /**< show indicator */
+    EWK_FIND_OPTIONS_SHOW_HIGHLIGHT = 1 << 7 /**< show highlight */
+};
+typedef enum _Ewk_Find_Options Ewk_Find_Options;
 
 /**
  * Callback for ewk_view_script_execute
@@ -611,6 +578,30 @@ typedef void (*Ewk_View_Plain_Text_Get_Callback)(Evas_Object* o, const char* pla
 typedef void (*Ewk_View_MHTML_Data_Get_Callback)(Evas_Object *o, const char *data, void *user_data);
 // #endif // ENABLE(TIZEN_SUPPORT_MHTML)
 
+// #if OS(TIZEN)
+/**
+ * Sets whether the ewk_view supports the mouse events or not.
+ *
+ * The ewk_view will support the mouse events if EINA_TRUE or not support the
+ * mouse events otherwise. The default value is EINA_TRUE.
+ *
+ * @param o view object to enable/disable the mouse events
+ * @param enabled a state to set
+ *
+ * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
+ */
+EAPI Eina_Bool ewk_view_mouse_events_enabled_set(Evas_Object *o, Eina_Bool enabled);
+
+/**
+ * Queries if the ewk_view supports the mouse events.
+ *
+ * @param o view object to query if the mouse events are enabled
+ *
+ * @return @c EINA_TRUE if the mouse events are enabled or @c EINA_FALSE otherwise
+ */
+EAPI Eina_Bool ewk_view_mouse_events_enabled_get(const Evas_Object *o);
+// #endif // #if OS(TIZEN)
+
 /**
  * Gets the Ewk_Context of this view.
  *
@@ -700,15 +691,6 @@ EAPI void ewk_view_open_panel_callback_set(Evas_Object* o, Ewk_View_Open_Panel_C
 EAPI void ewk_view_open_panel_reply(Evas_Object* o, Eina_List* file_url, Eina_Bool result);
 
 /**
- * Gets the Ewk_Settings of this view.
- *
- * @param o view object to get Ewk_Settings
- *
- * @return the Ewk_Settings of this view or @c NULL on failure
- */
-EAPI Ewk_Settings *ewk_view_settings_get(const Evas_Object *o);
-
-/**
  * Delivers a Web intent to the view's main frame.
  *
  * @param o view object to deliver the intent to
@@ -758,21 +740,6 @@ EAPI Eina_Bool    ewk_view_back_possible(Evas_Object *o);
 EAPI Eina_Bool    ewk_view_forward_possible(Evas_Object *o);
 
 /**
- * Gets the back-forward list associated with this view.
- *
- * The returned instance is unique for this view and thus multiple calls
- * to this function with the same view as parameter returns the same
- * handle. This handle is alive while view is alive, thus one
- * might want to listen for EVAS_CALLBACK_DEL on given view
- * (@a o) to know when to stop using returned handle.
- *
- * @param o view object to get navigation back-forward list
- *
- * @return the back-forward list instance handle associated with this view
- */
-EAPI Ewk_Back_Forward_List *ewk_view_back_forward_list_get(const Evas_Object *o);
-
-/**
  * Gets the current title of the main frame.
  *
  * It returns an internal string and should not
@@ -908,6 +875,27 @@ EAPI Eina_Bool ewk_view_custom_header_remove(const Evas_Object* o, const char* n
 EAPI Eina_Bool ewk_view_custom_header_clear(const Evas_Object* o);
 //#endif
 
+/**
+ * Searches and hightlights the given string in the document.
+ *
+ * @param o view object to find text
+ * @param text text to find
+ * @param options options to find
+ * @param max_match_count maximum match count to find, unlimited if 0
+ *
+ * @return @c EINA_TRUE on success, @c EINA_FALSE on errors
+ */
+EAPI Eina_Bool ewk_view_text_find(Evas_Object *o, const char *text, Ewk_Find_Options options, unsigned max_match_count);
+
+/**
+ * Clears the highlight of searched text.
+ *
+ * @param o view object to find text
+ *
+ * @return @c EINA_TRUE on success, @c EINA_FALSE on errors
+ */
+EAPI Eina_Bool ewk_view_text_find_highlight_clear(Evas_Object *o);
+
 //#if ENABLE(TIZEN_WEBKIT2_VIEW_VISIBILITY)
 /**
  * Request to set the current page's visibility.
@@ -1302,28 +1290,6 @@ EAPI Eina_Bool ewk_view_popup_menu_multiple_select(Evas_Object *o, Eina_Inarray*
  */
 EAPI Eina_Bool ewk_view_popup_menu_close(Evas_Object *o);
 
-/**
- * Sets whether the ewk_view supports the mouse events or not.
- *
- * The ewk_view will support the mouse events if EINA_TRUE or not support the
- * mouse events otherwise. The default value is EINA_TRUE.
- *
- * @param o view object to enable/disable the mouse events
- * @param enabled a state to set
- *
- * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
- */
-EAPI Eina_Bool ewk_view_mouse_events_enabled_set(Evas_Object *o, Eina_Bool enabled);
-
-/**
- * Queries if the ewk_view supports the mouse events.
- *
- * @param o view object to query if the mouse events are enabled
- *
- * @return @c EINA_TRUE if the mouse events are enabled or @c EINA_FALSE otherwise
- */
-EAPI Eina_Bool ewk_view_mouse_events_enabled_get(const Evas_Object *o);
-
 typedef Eina_Bool (*Ewk_Orientation_Lock_Cb)(Evas_Object* o, Eina_Bool need_lock, int orientation, void* user_data);
  /**
  * Deprecated
@@ -1446,7 +1412,7 @@ EAPI Eina_Bool ewk_view_device_pixel_ratio_set(Evas_Object *o, float ratio);
  * use this one.
  *
  * @param o view object to change theme
- * @param path theme path
+ * @param path theme path, may be @c NULL to reset to the default theme
  */
 EAPI void ewk_view_theme_set(Evas_Object *o, const char *path);
 
@@ -1481,50 +1447,7 @@ EAPI const char  *ewk_view_custom_encoding_get(const Evas_Object *o);
  */
 EAPI Eina_Bool    ewk_view_custom_encoding_set(Evas_Object *o, const char *encoding);
 
-/**
- * Searches and hightlights the given string in the document.
- *
- * @param o view object to find text
- * @param text text to find
- * @param options options to find
- * @param max_match_count maximum match count to find, unlimited if 0
- *
- * @return @c EINA_TRUE on success, @c EINA_FALSE on errors
- */
-EAPI Eina_Bool ewk_view_text_find(Evas_Object *o, const char *text, Ewk_Find_Options options, unsigned max_match_count);
-
-/**
- * Clears the highlight of searched text.
- *
- * @param o view object to find text
- *
- * @return @c EINA_TRUE on success, @c EINA_FALSE on errors
- */
-EAPI Eina_Bool ewk_view_text_find_highlight_clear(Evas_Object *o);
-
-/**
- * Counts the given string in the document.
- *
- * This does not highlight the matched string and just count the matched string.
- *
- * As the search is carried out through the whole document,
- * only the following EWK_FIND_OPTIONS are valid.
- *  - EWK_FIND_OPTIONS_NONE
- *  - EWK_FIND_OPTIONS_CASE_INSENSITIVE
- *  - EWK_FIND_OPTIONS_AT_WORD_START
- *  - EWK_FIND_OPTIONS_TREAT_MEDIAL_CAPITAL_AS_WORD_START
- *
- * The "text,found" callback will be called with the number of matched string.
- *
- * @param o view object to find text
- * @param text text to find
- * @param options options to find
- * @param max_match_count maximum match count to find, unlimited if 0
- *
- * @return @c EINA_TRUE on success, @c EINA_FALSE on errors
- */
-EAPI Eina_Bool ewk_view_text_matches_count(Evas_Object *o, const char *text, Ewk_Find_Options options, unsigned max_match_count);
-
+// #if ENABLE(TIZEN_INPUT_COLOR_PICKER) // wait for upstream
 /*
  * Sets the user chosen color. To be used when implementing a color picker.
  *
@@ -1541,6 +1464,7 @@ EAPI Eina_Bool ewk_view_text_matches_count(Evas_Object *o, const char *text, Ewk
  * @return @c EINA_TRUE on success @c EINA_FALSE otherwise
  */
 EAPI Eina_Bool ewk_view_color_picker_color_set(Evas_Object *o, int r, int g, int b, int a);
+// #endif
 
 /**
  * Feeds the touch event to the view.
old mode 100755 (executable)
new mode 100644 (file)
index 26831b9..de72ada
 #include "ewk_view_context_menu_client.h"
 
 #if OS(TIZEN)
-#include "EwkViewImpl.h"
 #include "WKPage.h"
 #include "WKPageTizen.h"
 #include "WKRetainPtr.h"
 #include "ewk_context_menu.h"
 #include "ewk_context_menu_private.h"
+#include "ewk_view_private.h"
 #include "ewk_view.h"
 
 static void getContextMenuFromProposedMenu(WKPageRef page, WKArrayRef proposedMenu, WKArrayRef* newMenu, WKHitTestResultRef hitTestResult, WKTypeRef userData, const void* clientInfo)
@@ -69,6 +69,6 @@ void ewkViewContextMenuClientAttachClient(Evas_Object* ewkView)
         getContextMenuFromProposedMenu
     };
 
-    WKPageSetPageContextMenuClient(toAPI(EwkViewImpl::fromEvasObject(ewkView)->page()), &contextMenuClient);
+    WKPageSetPageContextMenuClient(toAPI(ewk_view_page_get(ewkView)), &contextMenuClient);
 }
 #endif // #if OS(TIZEN)
diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_view_find_client.cpp b/Source/WebKit2/UIProcess/API/efl/ewk_view_find_client.cpp
new file mode 100644 (file)
index 0000000..c4ce6c7
--- /dev/null
@@ -0,0 +1,59 @@
+/*
+   Copyright (C) 2012 Samsung Electronics
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Library General Public
+    License as published by the Free Software Foundation; either
+    version 2 of the License, or (at your option) any later version.
+
+    This library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Library General Public License for more details.
+
+    You should have received a copy of the GNU Library General Public License
+    along with this library; see the file COPYING.LIB.  If not, write to
+    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+    Boston, MA 02110-1301, USA.
+*/
+
+#include "config.h"
+#include "ewk_view_find_client.h"
+
+#if OS(TIZEN)
+#include "WKPage.h"
+#include "WKString.h"
+#include "ewk_view_private.h"
+#include "ewk_view_find_client_private.h"
+#include "ewk_view.h"
+
+static void didFindString(WKPageRef page, WKStringRef string, unsigned matchCount, const void* clientInfo)
+{
+    ewk_view_text_found(static_cast<Evas_Object*>(const_cast<void*>(clientInfo)), matchCount);
+}
+
+static void didFailToFindString(WKPageRef page, WKStringRef string, const void* clientInfo)
+{
+    ewk_view_text_found(static_cast<Evas_Object*>(const_cast<void*>(clientInfo)), 0);
+}
+
+static void didCountStringMatches(WKPageRef page, WKStringRef string, unsigned matchCount, const void* clientInfo)
+{
+    ewk_view_text_found(static_cast<Evas_Object*>(const_cast<void*>(clientInfo)), matchCount);
+}
+
+void ewkViewFindClientAttatchClient(Evas_Object* ewkView)
+{
+    EINA_SAFETY_ON_NULL_RETURN(ewkView);
+
+    WKPageFindClient findClient = {
+        kWKPageFindClientCurrentVersion,
+        ewkView, // clientInfo
+        didFindString,
+        didFailToFindString,
+        didCountStringMatches
+    };
+
+    WKPageSetPageFindClient(toAPI(ewk_view_page_get(ewkView)), &findClient);
+}
+#endif // #if OS(TIZEN)
diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_view_find_client.h b/Source/WebKit2/UIProcess/API/efl/ewk_view_find_client.h
new file mode 100644 (file)
index 0000000..356eb0f
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+   Copyright (C) 2012 Samsung Electronics
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Library General Public
+    License as published by the Free Software Foundation; either
+    version 2 of the License, or (at your option) any later version.
+
+    This library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Library General Public License for more details.
+
+    You should have received a copy of the GNU Library General Public License
+    along with this library; see the file COPYING.LIB.  If not, write to
+    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+    Boston, MA 02110-1301, USA.
+*/
+
+#ifndef ewk_view_find_client_h
+#define ewk_view_find_client_h
+
+#include <Evas.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void ewkViewFindClientAttatchClient(Evas_Object* ewkView);
+
+#ifdef __cplusplus
+}
+#endif
+#endif // ewk_view_find_client_h
\ No newline at end of file
@@ -1,6 +1,5 @@
 /*
  * Copyright (C) 2012 Samsung Electronics. All rights reserved.
- * Copyright (C) 2012 Intel Corporation. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef FindClientEfl_h
-#define FindClientEfl_h
+#ifndef ewk_view_find_client_private_h
+#define ewk_view_find_client_private_h
 
+#include <Evas.h>
 #include <WebKit2/WKBase.h>
-#include <wtf/PassOwnPtr.h>
 
-class EwkViewImpl;
+void ewk_view_find_client_attach(WKPageRef pageRef, Evas_Object* ewkView);
 
-namespace WebKit {
-
-class FindClientEfl {
-public:
-    static PassOwnPtr<FindClientEfl> create(EwkViewImpl* viewImpl)
-    {
-        return adoptPtr(new FindClientEfl(viewImpl));
-    }
-
-private:
-    explicit FindClientEfl(EwkViewImpl*);
-
-    static void didFindString(WKPageRef, WKStringRef, unsigned matchCount, const void* clientInfo);
-    static void didFailToFindString(WKPageRef, WKStringRef, const void* clientInfo);
-
-    EwkViewImpl* m_viewImpl;
-};
-
-} // namespace WebKit
-
-#endif // FindClientEfl_h
+#endif // ewk_view_find_client_private_h
  */
 
 #include "config.h"
-#include "FormClientEfl.h"
 
-#include "EwkViewImpl.h"
+#include "WKFormSubmissionListener.h"
 #include "WKPage.h"
+#include "ewk_form_submission_request.h"
 #include "ewk_form_submission_request_private.h"
-
-namespace WebKit {
-
-static inline FormClientEfl* toFormClientEfl(const void* clientInfo)
-{
-    return static_cast<FormClientEfl*>(const_cast<void*>(clientInfo));
-}
+#include "ewk_view_form_client_private.h"
+#include "ewk_view_private.h"
 
 #if ENABLE(TIZEN_WEBKIT2_FORM_DATABASE)
-void FormClientEfl::willSubmitForm(WKPageRef, WKFrameRef, WKFrameRef sourceFrame, WKDictionaryRef values, bool containsPasswordData, WKTypeRef, WKFormSubmissionListenerRef listener, const void* clientInfo)
+static void willSubmitForm(WKPageRef page, WKFrameRef frame, WKFrameRef sourceFrame, WKDictionaryRef values, bool containsPasswordData, WKTypeRef userData, WKFormSubmissionListenerRef listener, const void* clientInfo)
+#else
+static void willSubmitForm(WKPageRef page, WKFrameRef frame, WKFrameRef sourceFrame, WKDictionaryRef values, WKTypeRef userData, WKFormSubmissionListenerRef listener, const void* clientInfo)
+#endif
 {
-    FormClientEfl* formClient = toFormClientEfl(clientInfo);
+    Evas_Object* ewkView = static_cast<Evas_Object*>(const_cast<void*>(clientInfo));
 
+    Ewk_Form_Submission_Request* request = ewk_form_submission_request_new(values, listener);
 #if ENABLE(TIZEN_WEBKIT2_FORM_DATABASE)
-    ewk_view_form_data_add(formClient->m_viewImpl->view(), values, containsPasswordData);
+    ewk_view_form_data_add(ewkView, values, containsPasswordData);
 #endif
-
-    RefPtr<Ewk_Form_Submission_Request> request = Ewk_Form_Submission_Request::create(values, listener);
-    formClient->m_viewImpl->informNewFormSubmissionRequest(request.get());
-
+    ewk_view_form_submission_request_new(ewkView, request);
+    ewk_form_submission_request_unref(request);
 #if ENABLE(TIZEN_WEBKIT2_LOCAL_IMPLEMETATION_FOR_FORM)
     Ewk_Form_Data* formData = ewkFormDataCreate(sourceFrame, values);
-    ewkViewFormSubmit(formClient->m_viewImpl->view(), formData);
+    ewkViewFormSubmit(ewkView, formData);
     ewkFormDataDelete(formData);
 
     WKFormSubmissionListenerContinue(listener);
 #endif
 }
-#else
-void FormClientEfl::willSubmitForm(WKPageRef, WKFrameRef /*frame*/, WKFrameRef /*sourceFrame*/, WKDictionaryRef values, WKTypeRef /*userData*/, WKFormSubmissionListenerRef listener, const void* clientInfo)
-{
-    FormClientEfl* formClient = toFormClientEfl(clientInfo);
 
-    RefPtr<Ewk_Form_Submission_Request> request = Ewk_Form_Submission_Request::create(values, listener);
-    formClient->m_viewImpl->informNewFormSubmissionRequest(request.get());
-}
-#endif
-
-FormClientEfl::FormClientEfl(EwkViewImpl* viewImpl)
-    : m_viewImpl(viewImpl)
+void ewk_view_form_client_attach(WKPageRef pageRef, Evas_Object* ewkView)
 {
-    WKPageRef pageRef = m_viewImpl->wkPage();
-    ASSERT(pageRef);
-
     WKPageFormClient formClient;
     memset(&formClient, 0, sizeof(WKPageFormClient));
     formClient.version = kWKPageFormClientCurrentVersion;
-    formClient.clientInfo = this;
+    formClient.clientInfo = ewkView;
     formClient.willSubmitForm = willSubmitForm;
     WKPageSetPageFormClient(pageRef, &formClient);
 }
-
-} // namespace WebKit
diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_view_form_client_private.h b/Source/WebKit2/UIProcess/API/efl/ewk_view_form_client_private.h
new file mode 100644 (file)
index 0000000..9feb4a1
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+ * Copyright (C) 2012 Intel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef ewk_view_form_client_private_h
+#define ewk_view_form_client_private_h
+
+#include <Evas.h>
+#include <WebKit2/WKBase.h>
+
+void ewk_view_form_client_attach(WKPageRef pageRef, Evas_Object* ewkView);
+
+#endif // ewk_view_form_client_private_h
old mode 100755 (executable)
new mode 100644 (file)
index f1dcbbc..2422215
@@ -24,7 +24,7 @@
 #include "WKIconDatabase.h"\r
 #include "ewk_view_private.h"\r
 \r
-static void didChangeIconForPageURLTizen(WKIconDatabaseRef iconDatabase, WKURLRef pageURL, const void* clientInfo)\r
+static void didChangeIconForPageURL(WKIconDatabaseRef iconDatabase, WKURLRef pageURL, const void* clientInfo)\r
 {\r
     Evas_Object* ewkView = static_cast<Evas_Object*>(const_cast<void*>(clientInfo));\r
     ewkViewIconReceived(ewkView);\r
@@ -37,7 +37,7 @@ void ewk_view_icondatabase_client_attach(Evas_Object* ewkView, WKContextRef cont
     iconDataBaseClient.version = kWKIconDatabaseClientCurrentVersion;\r
     iconDataBaseClient.clientInfo = ewkView;\r
 \r
-    iconDataBaseClient.didChangeIconForPageURL = didChangeIconForPageURLTizen;\r
+    iconDataBaseClient.didChangeIconForPageURL = didChangeIconForPageURL;\r
 \r
     WKIconDatabaseRef iconDataBase = WKContextGetIconDatabase(contextRef);\r
     WKIconDatabaseSetIconDatabaseClient(iconDataBase, &iconDataBaseClient);\r
diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_view_loader_client.cpp b/Source/WebKit2/UIProcess/API/efl/ewk_view_loader_client.cpp
new file mode 100755 (executable)
index 0000000..6dd417d
--- /dev/null
@@ -0,0 +1,276 @@
+/*
+ * Copyright (C) 2012 Intel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+
+#include "WKFrame.h"
+#include "ewk_intent.h"
+#include "ewk_intent_private.h"
+#include "ewk_intent_service.h"
+#include "ewk_intent_service_private.h"
+#include "ewk_view_loader_client_private.h"
+#include "ewk_view_private.h"
+#include "ewk_web_error.h"
+#include "ewk_web_error_private.h"
+#include <wtf/text/CString.h>
+
+#if OS(TIZEN)
+#include "WKRetainPtr.h"
+#include "ewk_auth_challenge.h"
+#include "ewk_auth_challenge_private.h"
+#endif
+
+using namespace WebKit;
+
+#if OS(TIZEN)
+static void didCommitLoadForFrame(WKPageRef page, WKFrameRef frame, WKTypeRef userData, const void* clientInfo)
+{
+    if (!WKFrameIsMainFrame(frame))
+        return;
+
+    Evas_Object* ewkView = static_cast<Evas_Object*>(const_cast<void*>(clientInfo));
+    ewkViewLoadCommitted(ewkView);
+}
+
+static void didSameDocumentNavigationForFrame(WKPageRef page, WKFrameRef frame, WKSameDocumentNavigationType type, WKTypeRef userData, const void* clientInfo)
+{
+    if (!WKFrameIsMainFrame(frame))
+        return;
+
+    Evas_Object* ewkView = static_cast<Evas_Object*>(const_cast<void*>(clientInfo));
+    WKRetainPtr<WKStringRef> title(AdoptWK, WKPageCopyTitle(page));
+    WKRetainPtr<WKURLRef> url(AdoptWK, WKFrameCopyURL(frame));
+    ewkViewSetTitleAndURL(ewkView, toImpl(title.get())->string().utf8().data(), toImpl(url.get())->string().utf8().data());
+}
+
+static void didFirstVisuallyNonEmptyLayoutForFrame(WKPageRef page, WKFrameRef frame, WKTypeRef userData, const void* clientInfo)
+{
+    if (!WKFrameIsMainFrame(frame))
+        return;
+
+    Evas_Object* ewkView = static_cast<Evas_Object*>(const_cast<void*>(clientInfo));
+    ewkViewDidFirstVisuallyNonEmptyLayout(ewkView);
+}
+
+static void didReceiveAuthenticationChallengeInFrame(WKPageRef page, WKFrameRef frame, WKAuthenticationChallengeRef authenticationChallenge, const void *clientInfo)
+{
+    if (!WKFrameIsMainFrame(frame))
+        return;
+
+    Evas_Object* ewkView = static_cast<Evas_Object*>(const_cast<void*>(clientInfo));
+    Ewk_Auth_Challenge* authChallenge = ewkAuthChallengeCreate(authenticationChallenge);
+    ewkViewDidReceiveAuthenticationChallenge(ewkView, authChallenge);
+
+    if (!ewkAuthChallengeDecided(authChallenge) && !ewkAuthChallengeSuspended(authChallenge))
+        ewk_auth_challenge_credential_cancel(authChallenge);
+}
+
+static void processDidCrash(WKPageRef page, const void* clientInfo)
+{
+    Evas_Object* ewkView = static_cast<Evas_Object*>(const_cast<void*>(clientInfo));
+    ewk_view_process_crashed(ewkView);
+}
+#endif // #if OS(TIZEN)
+
+static void didReceiveTitleForFrame(WKPageRef, WKStringRef title, WKFrameRef frame, WKTypeRef, const void* clientInfo)
+{
+    if (!WKFrameIsMainFrame(frame))
+        return;
+
+    Evas_Object* ewkView = static_cast<Evas_Object*>(const_cast<void*>(clientInfo));
+    ewk_view_title_changed(ewkView, toImpl(title)->string().utf8().data());
+}
+
+#if ENABLE(WEB_INTENTS)
+static void didReceiveIntentForFrame(WKPageRef page, WKFrameRef frame, WKIntentDataRef intent, WKTypeRef, const void* clientInfo)
+{
+    Evas_Object* ewkView = static_cast<Evas_Object*>(const_cast<void*>(clientInfo));
+    Ewk_Intent* ewkIntent = ewk_intent_new(intent);
+    ewk_view_intent_request_new(ewkView, ewkIntent);
+    ewk_intent_unref(ewkIntent);
+}
+#endif
+
+#if ENABLE(WEB_INTENTS_TAG)
+static void registerIntentServiceForFrame(WKPageRef page, WKFrameRef frame, WKIntentServiceInfoRef serviceInfo, WKTypeRef, const void *clientInfo)
+{
+    Evas_Object* ewkView = static_cast<Evas_Object*>(const_cast<void*>(clientInfo));
+    Ewk_Intent_Service* ewkIntentService = ewk_intent_service_new(serviceInfo);
+    ewk_view_intent_service_register(ewkView, ewkIntentService);
+    ewk_intent_service_unref(ewkIntentService);
+}
+#endif
+
+#if ENABLE(TIZEN_WEBKIT2_SEPERATE_LOAD_PROGRESS)
+static void didStartProgress(WKPageRef page, const void* clientInfo)
+{
+    Evas_Object* ewkView = static_cast<Evas_Object*>(const_cast<void*>(clientInfo));
+    ewk_view_load_progress_started(ewkView);
+}
+#endif
+
+static void didChangeProgress(WKPageRef page, const void* clientInfo)
+{
+    Evas_Object* ewkView = static_cast<Evas_Object*>(const_cast<void*>(clientInfo));
+    ewk_view_load_progress_changed(ewkView, WKPageGetEstimatedProgress(page));
+}
+
+#if ENABLE(TIZEN_WEBKIT2_SEPERATE_LOAD_PROGRESS)
+static void didFinishProgress(WKPageRef page, const void* clientInfo)
+{
+    Evas_Object* ewkView = static_cast<Evas_Object*>(const_cast<void*>(clientInfo));
+    ewk_view_load_progress_finished(ewkView);
+}
+#endif
+
+static void didFinishLoadForFrame(WKPageRef page, WKFrameRef frame, WKTypeRef userData, const void *clientInfo)
+{
+    if (!WKFrameIsMainFrame(frame))
+        return;
+
+    Evas_Object* ewkView = static_cast<Evas_Object*>(const_cast<void*>(clientInfo));
+    ewk_view_load_finished(ewkView);
+}
+
+static void didFailLoadWithErrorForFrame(WKPageRef page, WKFrameRef frame, WKErrorRef error, WKTypeRef, const void *clientInfo)
+{
+    if (!WKFrameIsMainFrame(frame))
+        return;
+
+#if ENABLE(TIZEN_WEBKIT2_LOCAL_IMPLEMENTATION_FOR_ERROR)
+    {
+        Evas_Object* ewkView = static_cast<Evas_Object*>(const_cast<void*>(clientInfo));
+        ewkViewLoadError(ewkView, error);
+        return;
+    }
+#endif
+
+    Evas_Object* ewkView = static_cast<Evas_Object*>(const_cast<void*>(clientInfo));
+    Ewk_Web_Error* ewkError = ewk_web_error_new(error);
+    ewk_view_load_error(ewkView, ewkError);
+    ewk_view_load_finished(ewkView);
+    ewk_web_error_free(ewkError);
+}
+
+static void didStartProvisionalLoadForFrame(WKPageRef page, WKFrameRef frame, WKTypeRef userData, const void* clientInfo)
+{
+    if (!WKFrameIsMainFrame(frame))
+        return;
+
+    Evas_Object* ewkView = static_cast<Evas_Object*>(const_cast<void*>(clientInfo));
+    ewk_view_load_provisional_started(ewkView);
+}
+
+static void didReceiveServerRedirectForProvisionalLoadForFrame(WKPageRef page, WKFrameRef frame, WKTypeRef userData, const void* clientInfo)
+{
+    if (!WKFrameIsMainFrame(frame))
+        return;
+
+    Evas_Object* ewkView = static_cast<Evas_Object*>(const_cast<void*>(clientInfo));
+    ewk_view_load_provisional_redirect(ewkView);
+}
+
+static void didFailProvisionalLoadWithErrorForFrame(WKPageRef page, WKFrameRef frame, WKErrorRef error, WKTypeRef userData, const void* clientInfo)
+{
+    if (!WKFrameIsMainFrame(frame))
+        return;
+
+#if ENABLE(TIZEN_WEBKIT2_LOCAL_IMPLEMENTATION_FOR_ERROR)
+    {
+        Evas_Object* ewkView = static_cast<Evas_Object*>(const_cast<void*>(clientInfo));
+        ewkViewLoadError(ewkView, error);
+        return;
+    }
+#endif
+
+    Evas_Object* ewkView = static_cast<Evas_Object*>(const_cast<void*>(clientInfo));
+    Ewk_Web_Error* ewkError = ewk_web_error_new(error);
+    ewk_view_load_provisional_failed(ewkView, ewkError);
+    ewk_web_error_free(ewkError);
+}
+
+#if ENABLE(TIZEN_ISF_PORT)
+static void willGoToBackForwardListItem(WKPageRef page, WKBackForwardListItemRef, WKTypeRef, const void* clientInfo)
+{
+    Evas_Object* ewkView = static_cast<Evas_Object*>(const_cast<void*>(clientInfo));
+    ewk_view_imf_context_hide(ewkView);
+}
+#endif
+
+#if ENABLE(TIZEN_SIGNAL_APP_BACK_FORWARD_LIST_CHANGED)
+static void didChangeBackForwardList(WKPageRef page, WKBackForwardListItemRef addedItem, WKArrayRef removedItems, const void * clientInfo)
+{
+    Evas_Object* ewkView = static_cast<Evas_Object*>(const_cast<void*>(clientInfo));
+    ewkViewBackForwardListChanged(ewkView);
+}
+#endif
+
+void ewk_view_loader_client_attach(WKPageRef pageRef, Evas_Object* ewkView)
+{
+    WKPageLoaderClient loadClient;
+    memset(&loadClient, 0, sizeof(WKPageLoaderClient));
+    loadClient.version = kWKPageLoaderClientCurrentVersion;
+    loadClient.clientInfo = ewkView;
+    loadClient.didReceiveTitleForFrame = didReceiveTitleForFrame;
+
+#if ENABLE(WEB_INTENTS)
+    loadClient.didReceiveIntentForFrame = didReceiveIntentForFrame;
+#endif
+#if ENABLE(WEB_INTENTS_TAG)
+    loadClient.registerIntentServiceForFrame = registerIntentServiceForFrame;
+#endif
+
+#if OS(TIZEN)
+    loadClient.didCommitLoadForFrame = didCommitLoadForFrame;
+    loadClient.didSameDocumentNavigationForFrame = didSameDocumentNavigationForFrame;
+    loadClient.didFirstVisuallyNonEmptyLayoutForFrame = didFirstVisuallyNonEmptyLayoutForFrame;
+    loadClient.didReceiveAuthenticationChallengeInFrame = didReceiveAuthenticationChallengeInFrame;
+    loadClient.processDidCrash = processDidCrash;
+#endif
+
+#if ENABLE(TIZEN_WEBKIT2_SEPERATE_LOAD_PROGRESS)
+    loadClient.didStartProgress = didStartProgress;
+#else
+    loadClient.didStartProgress = didChangeProgress;
+#endif
+    loadClient.didChangeProgress = didChangeProgress;
+#if ENABLE(TIZEN_WEBKIT2_SEPERATE_LOAD_PROGRESS)
+    loadClient.didFinishProgress = didFinishProgress;
+#else
+    loadClient.didFinishProgress = didChangeProgress;
+#endif
+    loadClient.didFinishLoadForFrame = didFinishLoadForFrame;
+    loadClient.didFailLoadWithErrorForFrame = didFailLoadWithErrorForFrame;
+    loadClient.didStartProvisionalLoadForFrame = didStartProvisionalLoadForFrame;
+    loadClient.didReceiveServerRedirectForProvisionalLoadForFrame = didReceiveServerRedirectForProvisionalLoadForFrame;
+    loadClient.didFailProvisionalLoadWithErrorForFrame = didFailProvisionalLoadWithErrorForFrame;
+#if ENABLE(TIZEN_ISF_PORT)
+    loadClient.willGoToBackForwardListItem = willGoToBackForwardListItem;
+#endif
+#if ENABLE(TIZEN_SIGNAL_APP_BACK_FORWARD_LIST_CHANGED)
+    loadClient.didChangeBackForwardList = didChangeBackForwardList;
+#endif
+    WKPageSetPageLoaderClient(pageRef, &loadClient);
+}
\ No newline at end of file
diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_view_loader_client_private.h b/Source/WebKit2/UIProcess/API/efl/ewk_view_loader_client_private.h
new file mode 100644 (file)
index 0000000..615c019
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+ * Copyright (C) 2012 Intel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef ewk_view_loader_client_private_h
+#define ewk_view_loader_client_private_h
+
+#include <Evas.h>
+#include <WebKit2/WKBase.h>
+
+void ewk_view_loader_client_attach(WKPageRef pageRef, Evas_Object* ewkView);
+
+#endif // ewk_view_loader_client_private_h
  */
 
 #include "config.h"
-#include "PagePolicyClientEfl.h"
 
-#include "EwkViewImpl.h"
 #include "WKFrame.h"
 #include "WKFramePolicyListener.h"
-#include "WebFrameProxy.h"
 #if ENABLE(TIZEN_WEBKIT2_LOCAL_IMPLEMETATION_FOR_NAVIGATION_POLICY)
 #include "ewk_policy_decision.h"
 #else
 #include "ewk_navigation_policy_decision.h"
 #include "ewk_navigation_policy_decision_private.h"
+#include "ewk_view_policy_client_private.h"
 #endif // ENABLE(TIZEN_WEBKIT2_LOCAL_IMPLEMETATION_FOR_NAVIGATION_POLICY)
+#include "ewk_view_private.h"
 #include <WebCore/HTTPStatusCodes.h>
 #include <wtf/text/CString.h>
 
-namespace WebKit {
-
-static inline PagePolicyClientEfl* toPagePolicyClientEfl(const void* clientInfo)
-{
-    return static_cast<PagePolicyClientEfl*>(const_cast<void*>(clientInfo));
-}
+using namespace WebCore;
+using namespace WebKit;
 
 #if ENABLE(TIZEN_WEBKIT2_LOCAL_IMPLEMETATION_FOR_NAVIGATION_POLICY)
-void PagePolicyClientEfl::decidePolicyForNavigationAction(WKPageRef, WKFrameRef frame, WKFrameNavigationType navigationType, WKEventModifiers, WKEventMouseButton, WKURLRequestRef request, WKFramePolicyListenerRef listener, WKTypeRef, const void* clientInfo)
+static void decidePolicyForNavigationAction(WKPageRef page, WKFrameRef frame, WKFrameNavigationType navigationType, WKEventModifiers modifiers, WKEventMouseButton mouseButton, WKURLRequestRef request, WKFramePolicyListenerRef listener, WKTypeRef userData, const void* clientInfo)
 {
-    Evas_Object* ewkView = toPagePolicyClientEfl(clientInfo)->m_viewImpl->view();
+    Evas_Object* ewkView = static_cast<Evas_Object*>(const_cast<void*>(clientInfo));
     Ewk_Policy_Decision* policyDecision = ewkPolicyDecisionCreate(listener, request, frame, 0, navigationType);
     ewkViewPolicyNavigationDecide(ewkView, policyDecision);
 
@@ -57,9 +52,9 @@ void PagePolicyClientEfl::decidePolicyForNavigationAction(WKPageRef, WKFrameRef
         ewk_policy_decision_use(policyDecision);
 }
 
-void PagePolicyClientEfl::decidePolicyForNewWindowAction(WKPageRef, WKFrameRef frame, WKFrameNavigationType navigationType, WKEventModifiers, WKEventMouseButton, WKURLRequestRef request, WKStringRef, WKFramePolicyListenerRef listener, WKTypeRef, const void* clientInfo)
+static void decidePolicyForNewWindowAction(WKPageRef page, WKFrameRef frame, WKFrameNavigationType navigationType, WKEventModifiers modifiers, WKEventMouseButton mouseButton, WKURLRequestRef request, WKStringRef frameName, WKFramePolicyListenerRef listener, WKTypeRef userData, const void* clientInfo)
 {
-    Evas_Object* ewkView = toPagePolicyClientEfl(clientInfo)->m_viewImpl->view();
+    Evas_Object* ewkView = static_cast<Evas_Object*>(const_cast<void*>(clientInfo));
     Ewk_Policy_Decision* policyDecision = ewkPolicyDecisionCreate(listener, request, frame, 0, navigationType);
     ewkViewPolicyNewWindowDecide(ewkView, policyDecision);
 
@@ -67,9 +62,10 @@ void PagePolicyClientEfl::decidePolicyForNewWindowAction(WKPageRef, WKFrameRef f
         ewk_policy_decision_use(policyDecision);
 }
 
-void PagePolicyClientEfl::decidePolicyForResponseCallback(WKPageRef, WKFrameRef frame, WKURLResponseRef response, WKURLRequestRef request, WKFramePolicyListenerRef listener, WKTypeRef, const void* clientInfo)
+static void decidePolicyForResponseCallback(WKPageRef page, WKFrameRef frame, WKURLResponseRef response, WKURLRequestRef request, WKFramePolicyListenerRef listener, WKTypeRef userData, const void* clientInfo)
 {
-    Evas_Object* ewkView = toPagePolicyClientEfl(clientInfo)->m_viewImpl->view();
+    Evas_Object* ewkView = static_cast<Evas_Object*>(const_cast<void*>(clientInfo));
+
     Ewk_Policy_Decision* policyDecision = ewkPolicyDecisionCreate(listener, request, frame, response);
 
     ewkViewPolicyResponseDecide(ewkView, policyDecision);
@@ -78,26 +74,27 @@ void PagePolicyClientEfl::decidePolicyForResponseCallback(WKPageRef, WKFrameRef
         ewk_policy_decision_use(policyDecision);
 }
 #else
-void PagePolicyClientEfl::decidePolicyForNavigationAction(WKPageRef, WKFrameRef, WKFrameNavigationType navigationType, WKEventModifiers modifiers, WKEventMouseButton mouseButton, WKURLRequestRef request, WKFramePolicyListenerRef listener, WKTypeRef /*userData*/, const void* clientInfo)
+static inline Evas_Object* toEwkView(const void* clientInfo)
 {
-    PagePolicyClientEfl* policyClient = toPagePolicyClientEfl(clientInfo);
-
-    RefPtr<Ewk_Navigation_Policy_Decision> decision = Ewk_Navigation_Policy_Decision::create(navigationType, mouseButton, modifiers, request, 0, listener);
-    policyClient->m_viewImpl->informNavigationPolicyDecision(decision.get());
+    return static_cast<Evas_Object*>(const_cast<void*>(clientInfo));
 }
 
-void PagePolicyClientEfl::decidePolicyForNewWindowAction(WKPageRef, WKFrameRef, WKFrameNavigationType navigationType, WKEventModifiers modifiers, WKEventMouseButton mouseButton, WKURLRequestRef request, WKStringRef frameName, WKFramePolicyListenerRef listener, WKTypeRef /*userData*/, const void* clientInfo)
+static void decidePolicyForNavigationAction(WKPageRef page, WKFrameRef frame, WKFrameNavigationType navigationType, WKEventModifiers modifiers, WKEventMouseButton mouseButton, WKURLRequestRef request, WKFramePolicyListenerRef listener, WKTypeRef userData, const void* clientInfo)
 {
-    PagePolicyClientEfl* policyClient = toPagePolicyClientEfl(clientInfo);
-
-    RefPtr<Ewk_Navigation_Policy_Decision> decision = Ewk_Navigation_Policy_Decision::create(navigationType, mouseButton, modifiers, request, toImpl(frameName)->string().utf8().data(), listener);
-    policyClient->m_viewImpl->informNewWindowPolicyDecision(decision.get());
+    Ewk_Navigation_Policy_Decision* decision = ewk_navigation_policy_decision_new(navigationType, mouseButton, modifiers, request, 0, listener);
+    ewk_view_navigation_policy_decision(toEwkView(clientInfo), decision);
+    ewk_navigation_policy_decision_unref(decision);
 }
 
-void PagePolicyClientEfl::decidePolicyForResponseCallback(WKPageRef, WKFrameRef frame, WKURLResponseRef response, WKURLRequestRef, WKFramePolicyListenerRef listener, WKTypeRef /*userData*/, const void* /*clientInfo*/)
+static void decidePolicyForNewWindowAction(WKPageRef page, WKFrameRef frame, WKFrameNavigationType navigationType, WKEventModifiers modifiers, WKEventMouseButton mouseButton, WKURLRequestRef request, WKStringRef frameName, WKFramePolicyListenerRef listener, WKTypeRef userData, const void* clientInfo)
 {
-    using namespace WebCore;
+    Ewk_Navigation_Policy_Decision* decision = ewk_navigation_policy_decision_new(navigationType, mouseButton, modifiers, request, toImpl(frameName)->string().utf8().data(), listener);
+    ewk_view_new_window_policy_decision(toEwkView(clientInfo), decision);
+    ewk_navigation_policy_decision_unref(decision);
+}
 
+static void decidePolicyForResponseCallback(WKPageRef page, WKFrameRef frame, WKURLResponseRef response, WKURLRequestRef, WKFramePolicyListenerRef listener, WKTypeRef userData, const void* clientInfo)
+{
     const ResourceResponse resourceResponse = toImpl(response)->resourceResponse();
 
     // Ignore responses with an HTTP status code of 204 (No Content)
@@ -137,21 +134,15 @@ void PagePolicyClientEfl::decidePolicyForResponseCallback(WKPageRef, WKFrameRef
 }
 #endif // ENABLE(TIZEN_WEBKIT2_LOCAL_IMPLEMETATION_FOR_NAVIGATION_POLICY)
 
-PagePolicyClientEfl::PagePolicyClientEfl(EwkViewImpl* viewImpl)
-    : m_viewImpl(viewImpl)
+void ewk_view_policy_client_attach(WKPageRef pageRef, Evas_Object* ewkView)
 {
-    WKPageRef pageRef = m_viewImpl->wkPage();
-    ASSERT(pageRef);
-
     WKPagePolicyClient policyClient;
     memset(&policyClient, 0, sizeof(WKPagePolicyClient));
     policyClient.version = kWKPagePolicyClientCurrentVersion;
-    policyClient.clientInfo = this;
+    policyClient.clientInfo = ewkView;
     policyClient.decidePolicyForNavigationAction = decidePolicyForNavigationAction;
     policyClient.decidePolicyForNewWindowAction = decidePolicyForNewWindowAction;
     policyClient.decidePolicyForResponse = decidePolicyForResponseCallback;
 
     WKPageSetPagePolicyClient(pageRef, &policyClient);
 }
-
-} // namespace WebKit
diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_view_policy_client_private.h b/Source/WebKit2/UIProcess/API/efl/ewk_view_policy_client_private.h
new file mode 100644 (file)
index 0000000..c67248d
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+ * Copyright (C) 2012 Intel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef ewk_view_policy_client_private_h
+#define ewk_view_policy_client_private_h
+
+#include <Evas.h>
+#include <WebKit2/WKBase.h>
+
+void ewk_view_policy_client_attach(WKPageRef pageRef, Evas_Object* ewkView);
+
+#endif // ewk_view_policy_client_private_h
index b8213fc..f3d16d3 100755 (executable)
 #ifndef ewk_view_private_h
 #define ewk_view_private_h
 
+#include "WebPageProxy.h"
 #include <Evas.h>
 #include <WebKit2/WKBase.h>
 
+namespace WebCore {
+class Cursor;
+class IntRect;
+class IntSize;
+}
+
+typedef struct _Ewk_Download_Job Ewk_Download_Job;
+typedef struct _Ewk_Form_Submission_Request Ewk_Form_Submission_Request;
+typedef struct _Ewk_Url_Request Ewk_Url_Request;
+typedef struct _Ewk_Url_Response Ewk_Url_Response;
+typedef struct _Ewk_Web_Error Ewk_Web_Error;
+typedef struct _Ewk_Web_Resource Ewk_Web_Resource;
+typedef struct _Ewk_Navigation_Policy_Decision Ewk_Navigation_Policy_Decision;
+#if ENABLE(WEB_INTENTS)
+typedef struct _Ewk_Intent Ewk_Intent;
+#endif
+#if ENABLE(WEB_INTENTS_TAG)
+typedef struct _Ewk_Intent_Service Ewk_Intent_Service;
+#endif
+
+void ewk_view_cursor_set(Evas_Object* ewkView, const WebCore::Cursor& cursor);
+void ewk_view_display(Evas_Object* ewkView, const WebCore::IntRect& rect);
+void ewk_view_download_job_cancelled(Evas_Object* ewkView, Ewk_Download_Job*);
+void ewk_view_download_job_failed(Evas_Object* ewkView, Ewk_Download_Job*, Ewk_Web_Error*);
+void ewk_view_download_job_finished(Evas_Object* ewkView, Ewk_Download_Job*);
+void ewk_view_download_job_requested(Evas_Object* ewkView, Ewk_Download_Job*);
+void ewk_view_form_submission_request_new(Evas_Object* ewkView, Ewk_Form_Submission_Request*);
+
+#if ENABLE(TIZEN_WEBKIT2_FORM_DATABASE)
+void ewk_view_form_password_data_fill(Evas_Object* ewkView);
+void ewk_view_form_data_add(Evas_Object* ewkView, WKDictionaryRef& formData, bool isPasswordForm);
+void ewk_view_form_candidate_data_get(Evas_Object* ewkView, const String& name, Vector<String>& candidates);
+void ewk_view_text_change_in_textfield(Evas_Object* ewkView, const String& name, const String& value);
+#endif
+
+void ewk_view_image_data_set(Evas_Object* ewkView, void* imageData, const WebCore::IntSize& size);
+void ewk_view_load_error(Evas_Object* ewkView, const Ewk_Web_Error* error);
+void ewk_view_load_finished(Evas_Object* ewkView);
+#if ENABLE(TIZEN_WEBKIT2_SEPERATE_LOAD_PROGRESS)
+void ewk_view_load_progress_started(Evas_Object* ewkView);
+#endif
+void ewk_view_load_progress_changed(Evas_Object* ewkView, double progress);
+#if ENABLE(TIZEN_WEBKIT2_SEPERATE_LOAD_PROGRESS)
+void ewk_view_load_progress_finished(Evas_Object* ewkView);
+#endif
+void ewk_view_load_provisional_failed(Evas_Object* ewkView, const Ewk_Web_Error* error);
+void ewk_view_load_provisional_redirect(Evas_Object* ewkView);
+void ewk_view_load_provisional_started(Evas_Object* ewkView);
+void ewk_view_navigation_policy_decision(Evas_Object* ewkView, Ewk_Navigation_Policy_Decision* decision);
+void ewk_view_new_window_policy_decision(Evas_Object* ewkView, Ewk_Navigation_Policy_Decision* decision);
+void ewk_view_title_changed(Evas_Object* ewkView, const char* title);
+void ewk_view_resource_load_failed(Evas_Object* ewkView, uint64_t resourceIdentifier, Ewk_Web_Error* error);
+void ewk_view_resource_load_finished(Evas_Object* ewkView, uint64_t resourceIdentifier);
+void ewk_view_resource_load_initiated(Evas_Object* ewkView, uint64_t resourceIdentifier, Ewk_Web_Resource* resource, Ewk_Url_Request* request);
+void ewk_view_resource_load_response(Evas_Object* ewkView, uint64_t resourceIdentifier, Ewk_Url_Response* response);
+void ewk_view_resource_request_sent(Evas_Object* ewkView, uint64_t resourceIdentifier, Ewk_Url_Request* request, Ewk_Url_Response* redirectResponse);
+
 Evas_Object* ewk_view_base_add(Evas* canvas, WKContextRef, WKPageGroupRef);
 
+#if ENABLE(WEB_INTENTS)
+void ewk_view_intent_request_new(Evas_Object* ewkView, const Ewk_Intent* ewkIntent);
+#endif
+#if ENABLE(WEB_INTENTS_TAG)
+void ewk_view_intent_service_register(Evas_Object* ewkView, const Ewk_Intent_Service* ewkIntentService);
+#endif
+
 #if OS(TIZEN)
 #include "WKPage.h"
 #include "WebEvent.h"
@@ -79,6 +144,8 @@ namespace WebCore {
 class IntPoint;
 }
 
+class EwkViewImpl;
+
 namespace WebKit {
 class WebPopupItem;
 class WebPopupMenuProxyEfl;
@@ -88,12 +155,27 @@ class WebColorChooserProxyEfl;
 class PageClientImpl;
 }
 
-typedef struct Ewk_Context Ewk_Context;
+typedef struct _Ewk_Context Ewk_Context;
 
 #if ENABLE(TIZEN_GEOLOCATION)
 typedef struct _Ewk_Geolocation Ewk_Geolocation;
 #endif
 
+WebKit::WebPageProxy* ewk_view_page_get(const Evas_Object* ewkView);
+WebCore::IntSize ewk_view_size_get(const Evas_Object* ewkView);
+
+#if USE(ACCELERATED_COMPOSITING)
+bool ewk_view_accelerated_compositing_mode_enter(const Evas_Object* ewkView);
+bool ewk_view_accelerated_compositing_mode_exit(const Evas_Object* ewkView);
+#endif
+
+#if ENABLE(TIZEN_MULTIPLE_SELECT)
+void ewk_view_popup_menu_request(Evas_Object* ewkView, WebKit::WebPopupMenuProxyEfl* popupMenu, const WebCore::IntRect&, WebCore::TextDirection textDirection, double pageScaleFactor, const Vector<WebKit::WebPopupItem>& items, int32_t selectedIndex, bool);
+#else
+void ewk_view_popup_menu_request(Evas_Object* ewkView, WebKit::WebPopupMenuProxyEfl* popupMenu, const WebCore::IntRect&, WebCore::TextDirection textDirection, double pageScaleFactor, const Vector<WebKit::WebPopupItem>& items, int32_t selectedIndex);
+#endif
+void ewk_view_popup_menu_update(Evas_Object* ewkView, WebCore::TextDirection textDirection, const Vector<WebKit::WebPopupItem>& items, int32_t selectedIndex);
+
 bool ewk_view_focused_node_adjust(Evas_Object* object, Eina_Bool adjustForExternalKeyboard = EINA_FALSE);
 void ewk_view_touch_event_handler_result_set(Evas_Object* ewkView, WebKit::WebEvent::Type type, bool wasHandled);
 
@@ -142,6 +224,7 @@ void ewkViewLoadCommitted(Evas_Object* ewkView);
 #if ENABLE(TIZEN_WEBKIT2_LOCAL_IMPLEMENTATION_FOR_ERROR)
 void ewkViewLoadError(Evas_Object* ewkView, WKErrorRef error);
 #endif
+void ewkViewSetTitleAndURL(Evas_Object* ewkView, const char* title, const char* url);
 void ewkViewDidFirstVisuallyNonEmptyLayout(Evas_Object* ewkView);
 void ewkViewDidReceiveAuthenticationChallenge(Evas_Object* ewkView, Ewk_Auth_Challenge* authChallenge);
 void ewk_view_process_crashed(Evas_Object* ewkView);
@@ -158,6 +241,9 @@ bool ewkViewRunOpenPanel(Evas_Object* ewkView, WKOpenPanelParametersRef paramete
 void ewkViewClosePage(Evas_Object* ewkView);
 WKPageRef ewkViewCreateNewPage(Evas_Object* ewkView);
 JSGlobalContextRef ewkViewGetJavascriptGlobalContext(Evas_Object* ewkView);
+#if ENABLE(TOUCH_EVENTS)
+void ewkViewHandleTouchEvent(Evas_Object* ewkView, Ewk_Touch_Event_Type type);
+#endif
 void ewkViewFormSubmit(Evas_Object* ewkView, Ewk_Form_Data* formData);
 Ewk_Form_Data* ewkFormDataCreate(WKFrameRef frame, WKDictionaryRef values);
 void ewkFormDataDelete(Ewk_Form_Data* formData);
@@ -169,6 +255,8 @@ void ewkViewPolicyNavigationDecide(Evas_Object* ewkView, Ewk_Policy_Decision* po
 void ewkViewPolicyNewWindowDecide(Evas_Object* ewkView, Ewk_Policy_Decision* policyDecision);
 void ewkViewPolicyResponseDecide(Evas_Object* ewkView, Ewk_Policy_Decision* policyDecision);
 
+void ewk_view_text_found(Evas_Object* ewkView, unsigned int matchCount);
+
 void ewkViewSendScrollEvent(Evas_Object* ewkView, int deltaX, int deltaY);
 void ewkViewSendEdgeEvent(Evas_Object* ewkView, const WebCore::IntPoint& scrollPosition, int deltaX, int deltaY);
 void ewkViewClearEdges(Evas_Object* ewkView);
@@ -252,9 +340,27 @@ bool ewkCertificatePolicyDecisionSuspended(Ewk_Certificate_Policy_Decision* cert
 bool ewkCertificatePolicyDecisionDecided(Ewk_Certificate_Policy_Decision* certificatePolicyDecision);
 #endif
 
+#if ENABLE(TIZEN_ISF_PORT)
+Ecore_IMF_Context* ewk_view_imf_context_get(Evas_Object* ewkView);
+Ecore_IMF_Context* ewk_view_imf_context_set(Evas_Object* ewkView, Ecore_IMF_Input_Panel_Layout layout);
+void ewk_view_imf_context_reset(Evas_Object* ewkView);
+void ewk_view_imf_context_hide(Evas_Object* ewkView);
+void ewk_view_imf_context_destroy(Evas_Object* ewkView);
+#endif
+
 void _ewk_view_suspend_painting(Evas_Object* ewkView);
 void _ewk_view_resume_painting(Evas_Object* ewkView);
 
+void ewk_view_fullscreen_enter(Evas_Object* ewkView);
+void ewk_view_fullscreen_exit(Evas_Object* ewkView);
+
+#if ENABLE(TIZEN_INPUT_COLOR_PICKER) // wait for upstream
+#if ENABLE(INPUT_TYPE_COLOR)
+void ewk_view_color_picker_request(Evas_Object* ewkView, int r, int g, int b, int a, WKColorPickerResultListenerRef listener);
+void ewk_view_color_picker_dismiss(Evas_Object* ewkView);
+#endif
+#endif
+
 #if ENABLE(TIZEN_RUNTIME_BACKEND_SELECTION)
 bool ewk_view_is_opengl_backend(Evas_Object* ewkView);
 #endif
@@ -267,15 +373,4 @@ void ewkViewFocusRingHide(Evas_Object* ewkView);
 void ewkViewBackForwardListChanged(Evas_Object *ewkView);
 #endif
 
-#if ENABLE(TIZEN_WEBKIT2_POPUP_INTERNAL)
-void ewk_view_popup_menu_update(Evas_Object* ewkView, WebCore::TextDirection textDirection, const Vector<WebKit::WebPopupItem>& items, int32_t selectedIndex);
-#endif
-
-#if ENABLE(TIZEN_WEBKIT2_FORM_DATABASE)
-void ewk_view_form_password_data_fill(Evas_Object* ewkView);
-void ewk_view_form_data_add(Evas_Object* ewkView, WKDictionaryRef& formData, bool isPasswordForm);
-void ewk_view_form_candidate_data_get(Evas_Object* ewkView, const String& name, Vector<String>& candidates);
-void ewk_view_text_change_in_textfield(Evas_Object* ewkView, const String& name, const String& value);
-#endif
-
 #endif // ewk_view_private_h
diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_view_resource_load_client.cpp b/Source/WebKit2/UIProcess/API/efl/ewk_view_resource_load_client.cpp
new file mode 100755 (executable)
index 0000000..70b40d1
--- /dev/null
@@ -0,0 +1,113 @@
+/*
+ * Copyright (C) 2012 Intel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+
+#include "WKAPICast.h"
+#include "WKFrame.h"
+#include "WKPage.h"
+#include "WKRetainPtr.h"
+#include "WKURL.h"
+#include "WKURLRequest.h"
+#include "WKURLResponse.h"
+#include "ewk_url_request.h"
+#include "ewk_url_request_private.h"
+#include "ewk_url_response.h"
+#include "ewk_url_response_private.h"
+#include "ewk_view_private.h"
+#include "ewk_view_resource_load_client_private.h"
+#include "ewk_web_error.h"
+#include "ewk_web_error_private.h"
+#include "ewk_web_resource.h"
+#include "ewk_web_resource_private.h"
+#include <wtf/text/CString.h>
+
+using namespace WebCore;
+using namespace WebKit;
+
+static inline Evas_Object* toEwkView(const void* clientInfo)
+{
+    return static_cast<Evas_Object*>(const_cast<void*>(clientInfo));
+}
+
+static void didInitiateLoadForResource(WKPageRef, WKFrameRef wkFrame, uint64_t resourceIdentifier, WKURLRequestRef wkRequest, bool pageIsProvisionallyLoading, const void* clientInfo)
+{
+    bool isMainResource = (WKFrameIsMainFrame(wkFrame) && pageIsProvisionallyLoading);
+    WKRetainPtr<WKURLRef> wkUrl(AdoptWK, WKURLRequestCopyURL(wkRequest));
+#if ENABLE(TIZEN_ON_REDIRECTION_REQUESTED)
+    if (!wkUrl.get())
+        return;
+#endif
+    Ewk_Web_Resource* resource = ewk_web_resource_new(toImpl(wkUrl.get())->string().utf8().data(), isMainResource);
+    Ewk_Url_Request* request = ewk_url_request_new(wkRequest);
+    ewk_view_resource_load_initiated(toEwkView(clientInfo), resourceIdentifier, resource, request);
+    ewk_web_resource_unref(resource);
+    ewk_url_request_unref(request);
+}
+
+static void didSendRequestForResource(WKPageRef, WKFrameRef, uint64_t resourceIdentifier, WKURLRequestRef wkRequest, WKURLResponseRef wkRedirectResponse, const void* clientInfo)
+{
+    Ewk_Url_Request* request = ewk_url_request_new(wkRequest);
+    Ewk_Url_Response* redirectResponse = wkRedirectResponse ? ewk_url_response_new(toImpl(wkRedirectResponse)->resourceResponse()) : 0;
+    ewk_view_resource_request_sent(toEwkView(clientInfo), resourceIdentifier, request, redirectResponse);
+    ewk_url_request_unref(request);
+    if (redirectResponse)
+        ewk_url_response_unref(redirectResponse);
+}
+
+static void didReceiveResponseForResource(WKPageRef, WKFrameRef, uint64_t resourceIdentifier, WKURLResponseRef wkResponse, const void* clientInfo)
+{
+    Ewk_Url_Response* response = ewk_url_response_new(toImpl(wkResponse)->resourceResponse());
+    ewk_view_resource_load_response(toEwkView(clientInfo), resourceIdentifier, response);
+    ewk_url_response_unref(response);
+}
+
+static void didFinishLoadForResource(WKPageRef, WKFrameRef, uint64_t resourceIdentifier, const void* clientInfo)
+{
+    ewk_view_resource_load_finished(toEwkView(clientInfo), resourceIdentifier);
+}
+
+static void didFailLoadForResource(WKPageRef, WKFrameRef, uint64_t resourceIdentifier, WKErrorRef wkError, const void* clientInfo)
+{
+    Ewk_Web_Error* ewkError = ewk_web_error_new(wkError);
+    ewk_view_resource_load_failed(toEwkView(clientInfo), resourceIdentifier, ewkError);
+    ewk_view_resource_load_finished(toEwkView(clientInfo), resourceIdentifier);
+    ewk_web_error_free(ewkError);
+}
+
+void ewk_view_resource_load_client_attach(WKPageRef pageRef, Evas_Object* ewkView)
+{
+    WKPageResourceLoadClient wkResourceLoadClient;
+    memset(&wkResourceLoadClient, 0, sizeof(WKPageResourceLoadClient));
+    wkResourceLoadClient.version = kWKPageResourceLoadClientCurrentVersion;
+    wkResourceLoadClient.clientInfo = ewkView;
+    wkResourceLoadClient.didInitiateLoadForResource = didInitiateLoadForResource;
+    wkResourceLoadClient.didSendRequestForResource = didSendRequestForResource;
+    wkResourceLoadClient.didReceiveResponseForResource = didReceiveResponseForResource;
+    wkResourceLoadClient.didFinishLoadForResource = didFinishLoadForResource;
+    wkResourceLoadClient.didFailLoadForResource = didFailLoadForResource;
+
+    WKPageSetPageResourceLoadClient(pageRef, &wkResourceLoadClient);
+}
diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_view_resource_load_client_private.h b/Source/WebKit2/UIProcess/API/efl/ewk_view_resource_load_client_private.h
new file mode 100644 (file)
index 0000000..1f404b9
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+ * Copyright (C) 2012 Intel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef ewk_view_resource_load_client_private_h
+#define ewk_view_resource_load_client_private_h
+
+#include <Evas.h>
+#include <WebKit2/WKBase.h>
+
+void ewk_view_resource_load_client_attach(WKPageRef pageRef, Evas_Object* ewkView);
+
+#endif // ewk_view_resource_load_client_private_h
index b5e3e00..26dbabd 100755 (executable)
 #include "ewk_view_tizen_client.h"
 
 #if OS(TIZEN)
-#include "EwkViewImpl.h"
 #include "WKFrame.h"
 #include "WKPageTizen.h"
 #include "WKString.h"
+#include "ewk_view_private.h"
 #include "ewk_user_media_private.h"
 #include "ewk_view.h"
 #if ENABLE(TIZEN_CERTIFICATE_HANDLING)
@@ -81,7 +81,7 @@ void ewkViewTizenClientAttachClient(Evas_Object* ewkView)
         decidePolicyForCertificateError
     };
 
-    WKPageSetPageTizenClient(toAPI(EwkViewImpl::fromEvasObject(ewkView)->page()), &tizenClient);
+    WKPageSetPageTizenClient(toAPI(ewk_view_page_get(ewkView)), &tizenClient);
 }
 
 #endif // #if OS(TIZEN)
diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_view_ui_client.cpp b/Source/WebKit2/UIProcess/API/efl/ewk_view_ui_client.cpp
new file mode 100644 (file)
index 0000000..8a8e89f
--- /dev/null
@@ -0,0 +1,235 @@
+/*
+   Copyright (C) 2012 Samsung Electronics
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Library General Public
+    License as published by the Free Software Foundation; either
+    version 2 of the License, or (at your option) any later version.
+
+    This library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Library General Public License for more details.
+
+    You should have received a copy of the GNU Library General Public License
+    along with this library; see the file COPYING.LIB.  If not, write to
+    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+    Boston, MA 02110-1301, USA.
+*/
+
+#include "config.h"
+#include "ewk_view_ui_client.h"
+
+#if OS(TIZEN)
+#include "WKGeolocationPermissionRequest.h"
+#include "WKNotificationPermissionRequest.h"
+#include "WKPage.h"
+#include "WKRetainPtr.h"
+#include "WKSecurityOrigin.h"
+#include "ewk_geolocation_private.h"
+#include "ewk_notification.h"
+#include "ewk_notification_private.h"
+#include "ewk_view_private.h"
+#include "ewk_view.h"
+
+#if ENABLE(TIZEN_ISF_PORT)
+#include "NativeWebKeyboardEvent.h"
+#endif
+
+static void close(WKPageRef page, const void* clientInfo)
+{
+    Evas_Object* ewkView = static_cast<Evas_Object*>(const_cast<void*>(clientInfo));
+    ewkViewClosePage(ewkView);
+}
+
+static void decidePolicyForGeolocationPermissionRequest(WKPageRef page, WKFrameRef frame, WKSecurityOriginRef origin, WKGeolocationPermissionRequestRef permissionRequest, const void* clientInfo)
+{
+#if ENABLE(TIZEN_GEOLOCATION)
+    Evas_Object* ewkView = static_cast<Evas_Object*>(const_cast<void*>(clientInfo));
+    Ewk_Geolocation_Permission_Request* geolocationPermissionRequest = ewkGeolocationCreatePermissionRequest(ewkView, permissionRequest, origin);
+    ewkViewRequestGeolocationPermission(ewkView, geolocationPermissionRequest);
+
+    if(!ewkGeolocationIsPermissionRequestSuspended(geolocationPermissionRequest))
+        if(!ewkGeolocationIsPermissionRequestDecided(geolocationPermissionRequest))
+            WKGeolocationPermissionRequestDeny(permissionRequest);
+#endif
+}
+
+static WKPageRef createNewPage(WKPageRef page, WKURLRequestRef urlRequest, WKDictionaryRef features, WKEventModifiers modifiers, WKEventMouseButton mouseButton, const void* clientInfo)
+{
+    Evas_Object* ewkView = static_cast<Evas_Object*>(const_cast<void*>(clientInfo));
+
+    return ewkViewCreateNewPage(ewkView);
+}
+
+static bool runJavaScriptAlert(WKPageRef page, WKStringRef alertText, WKFrameRef frame, const void* clientInfo)
+{
+    return ewkViewRunJavaScriptAlert(static_cast<Evas_Object*>(const_cast<void*>(clientInfo)), alertText);
+}
+
+static bool runJavaScriptConfirm(WKPageRef page, WKStringRef message, WKFrameRef frame, const void *clientInfo)
+{
+    return ewkViewRunJavaScriptConfirm(static_cast<Evas_Object*>(const_cast<void*>(clientInfo)), message);
+}
+
+static bool runJavaScriptPrompt(WKPageRef page, WKStringRef message, WKStringRef defaultValue, WKFrameRef frame, const void *clientInfo)
+{
+    return ewkViewRunJavaScriptPrompt(static_cast<Evas_Object*>(const_cast<void*>(clientInfo)), message, defaultValue);
+}
+
+#if ENABLE(TIZEN_SUPPORT_BEFORE_UNLOAD_CONFIRM_PANEL)
+static bool runBeforeUnloadConfirmPanel(WKPageRef page, WKStringRef message, WKFrameRef frame, const void* clientInfo)
+{
+    return ewk_view_run_before_unload_confirm_panel(static_cast<Evas_Object*>(const_cast<void*>(clientInfo)), message);
+}
+#endif
+
+#if ENABLE(TIZEN_ISF_PORT)
+static void didNotHandleKeyEvent(WKPageRef page, WKNativeEventPtr event, const void *clientInfo)
+{
+    Evas_Object* ewkView = static_cast<Evas_Object*>(const_cast<void*>(clientInfo));
+    Ecore_IMF_Context* imfContext = ewk_view_imf_context_get(ewkView);
+
+    if (!imfContext)
+        return;
+
+    const EvasImfEvent* keyEvent = static_cast<const EvasImfEvent*>(event);
+    if (!keyEvent || keyEvent->type != ECORE_IMF_EVENT_KEY_UP || keyEvent->event.key_up.string[0] != '\r')
+        return;
+
+    if (ecore_imf_context_autocapital_type_get(imfContext) == ECORE_IMF_AUTOCAPITAL_TYPE_NONE)
+        ewk_view_imf_context_hide(ewkView);
+}
+#endif
+
+static bool runOpenPanel(WKPageRef page, WKFrameRef frame, WKOpenPanelParametersRef parameters, WKOpenPanelResultListenerRef listener, const void* clientInfo)
+{
+    return ewkViewRunOpenPanel(static_cast<Evas_Object*>(const_cast<void*>(clientInfo)), parameters, listener);
+}
+
+#if ENABLE(TIZEN_INPUT_COLOR_PICKER) // wait for upstream
+#if ENABLE(INPUT_TYPE_COLOR)
+static void showColorPicker(WKPageRef, WKStringRef initialColor, WKColorPickerResultListenerRef listener, const void* clientInfo)
+{
+    WebCore::Color color = WebCore::Color(WebKit::toWTFString(initialColor));
+    ewk_view_color_picker_request(static_cast<Evas_Object*>(const_cast<void*>(clientInfo)), color.red(), color.green(), color.blue(), color.alpha(), listener);
+}
+
+static void hideColorPicker(WKPageRef, const void* clientInfo)
+{
+    ewk_view_color_picker_dismiss(static_cast<Evas_Object*>(const_cast<void*>(clientInfo)));
+}
+#endif
+#endif
+
+#if ENABLE(TIZEN_SQL_DATABASE)
+static unsigned long long exceededDatabaseQuota(WKPageRef page, WKFrameRef frame, WKSecurityOriginRef origin, WKStringRef databaseName, WKStringRef displayName, unsigned long long currentQuota, unsigned long long currentOriginUsage, unsigned long long currentDatabaseUsage, unsigned long long expectedUsage, const void *clientInfo)
+{
+    Evas_Object* ewkView = static_cast<Evas_Object*>(const_cast<void*>(clientInfo));
+
+    return ewkViewExceededDatabaseQuota(ewkView, origin, databaseName, displayName, currentQuota, currentOriginUsage, currentDatabaseUsage, expectedUsage);
+}
+#endif
+
+#if ENABLE(TIZEN_NOTIFICATIONS)
+static void decidePolicyForNotificationPermissionRequest(WKPageRef page, WKSecurityOriginRef origin, WKNotificationPermissionRequestRef permissionRequest, const void *clientInfo)
+{
+    Evas_Object* ewkView = static_cast<Evas_Object*>(const_cast<void*>(clientInfo));
+    Ewk_Notification_Permission_Request* ewkNotificationPermissionRequest = ewkNotificationCreatePermissionRequest(ewkView, permissionRequest, origin);
+    ewkViewRequestNotificationPermission(ewkView, ewkNotificationPermissionRequest);
+
+    if(!ewkNotificationIsPermissionRequestSuspended(ewkNotificationPermissionRequest))
+        if(!ewkNotificationIsPermissionRequestDecided(ewkNotificationPermissionRequest))
+            WKNotificationPermissionRequestDeny(ewkNotificationGetWKNotificationPermissionRequest(ewkNotificationPermissionRequest));
+}
+#endif
+
+#if ENABLE(TIZEN_VIEWPORT_META_TAG)
+static WKRect getWindowFrame(WKPageRef page, const void* clientInfo)
+{
+    int x, y, w, h;
+    ewkViewGetWindowFrame(static_cast<Evas_Object*>(const_cast<void*>(clientInfo)), &x, &y, &w, &h);
+    return WKRectMake(x, y, w, h);
+}
+#endif
+
+void ewkViewUIClientAttatchClient(Evas_Object* ewkView)
+{
+    EINA_SAFETY_ON_NULL_RETURN(ewkView);
+
+    WKPageUIClient uiClient = {
+        kWKPageUIClientCurrentVersion,
+        ewkView, // clientInfo
+        0, // createNewPage_deprecatedForUseWithV0
+        0, // showPage
+        close,
+        0, // takeFocus
+        0, // focus
+        0, // unfocus
+        runJavaScriptAlert,
+        runJavaScriptConfirm,
+        runJavaScriptPrompt,
+        0, // setStatusText
+        0, // mouseDidMoveOverElement
+        0, // missingPluginButtonClicked
+#if ENABLE(TIZEN_ISF_PORT)
+        didNotHandleKeyEvent,
+#else
+        0, // didNotHandleKeyEvent
+#endif
+        0, // didNotHandleWheelEvent
+        0, // toolbarsAreVisible
+        0, // setToolbarsAreVisible
+        0, // menuBarIsVisible
+        0, // setMenuBarIsVisible
+        0, // statusBarIsVisible
+        0, // setStatusBarIsVisible
+        0, // isResizable
+        0, // setIsResizable
+#if ENABLE(TIZEN_VIEWPORT_META_TAG)
+        getWindowFrame, // getWindowFrame
+#else
+        0, // getWindowFrame
+#endif
+        0, // setWindowFrame
+#if ENABLE(TIZEN_SUPPORT_BEFORE_UNLOAD_CONFIRM_PANEL)
+        runBeforeUnloadConfirmPanel,
+#else
+        0, // runBeforeUnloadConfirmPanel
+#endif
+        0, // didDraw
+        0, // pageDidScroll
+#if ENABLE(TIZEN_SQL_DATABASE)
+        exceededDatabaseQuota, // exceededDatabaseQuota
+#else
+        0, // exceededDatabaseQuota
+#endif
+        runOpenPanel,
+        decidePolicyForGeolocationPermissionRequest,
+        0, // headerHeight
+        0, // footerHeight
+        0, // drawHeader
+        0, // drawFooter
+        0, // printFrame
+        0, // runModal
+        0, // didCompleteRubberBandForMainFrame
+        0, // saveDataToFileInDownloadsFolder
+        0, // shouldInterruptJavaScript
+        createNewPage,
+        0, // mouseDidMoveOverElement
+#if ENABLE(TIZEN_NOTIFICATIONS)
+        decidePolicyForNotificationPermissionRequest, // decidePolicyForNotificationPermissionRequest
+#else
+        0, // decidePolicyForNotificationPermissionRequest
+#endif
+        0, // unavailablePluginButtonClicked
+#if ENABLE(TIZEN_INPUT_COLOR_PICKER)
+        showColorPicker, // showColorPicker
+        hideColorPicker, // hideColorPicker
+#endif
+    };
+
+    WKPageSetPageUIClient(toAPI(ewk_view_page_get(ewkView)), &uiClient);
+}
+#endif // #if OS(TIZEN)
+
diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_view_ui_client.h b/Source/WebKit2/UIProcess/API/efl/ewk_view_ui_client.h
new file mode 100644 (file)
index 0000000..a3bbb0c
--- /dev/null
@@ -0,0 +1,35 @@
+/*
+   Copyright (C) 2012 Samsung Electronics
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Library General Public
+    License as published by the Free Software Foundation; either
+    version 2 of the License, or (at your option) any later version.
+
+    This library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Library General Public License for more details.
+
+    You should have received a copy of the GNU Library General Public License
+    along with this library; see the file COPYING.LIB.  If not, write to
+    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+    Boston, MA 02110-1301, USA.
+*/
+
+#ifndef ewk_view_ui_client_h
+#define ewk_view_ui_client_h
+
+#include <Eina.h>
+#include <Evas.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void ewkViewUIClientAttatchClient(Evas_Object* ewkView);
+
+#ifdef __cplusplus
+}
+#endif
+#endif // ewk_view_ui_client_h
\ No newline at end of file
diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_web_error.cpp b/Source/WebKit2/UIProcess/API/efl/ewk_web_error.cpp
new file mode 100644 (file)
index 0000000..e6e3eb8
--- /dev/null
@@ -0,0 +1,139 @@
+/*
+ * Copyright (C) 2012 Intel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "ewk_web_error.h"
+
+#include "ErrorsEfl.h"
+#include "WKString.h"
+#include "WKURL.h"
+#include "ewk_web_error_private.h"
+#include <WKAPICast.h>
+#include <WKError.h>
+#include <WKRetainPtr.h>
+#include <wtf/text/CString.h>
+
+using namespace WebCore;
+using namespace WebKit;
+
+struct _Ewk_Web_Error {
+    WKRetainPtr<WKErrorRef> wkError;
+
+    const char* url;
+    const char* description;
+
+    _Ewk_Web_Error(WKErrorRef errorRef)
+        : wkError(errorRef)
+        , url(0)
+        , description(0)
+    { }
+
+    ~_Ewk_Web_Error()
+    {
+        eina_stringshare_del(url);
+        eina_stringshare_del(description);
+    }
+};
+
+#define EWK_WEB_ERROR_WK_GET_OR_RETURN(error, wkError_, ...)    \
+    if (!(error)) {                                           \
+        EINA_LOG_CRIT("error is NULL.");                      \
+        return __VA_ARGS__;                                    \
+    }                                                          \
+    if (!(error)->wkError) {                                 \
+        EINA_LOG_CRIT("error->wkError is NULL.");            \
+        return __VA_ARGS__;                                    \
+    }                                                          \
+    WKErrorRef wkError_ = (error)->wkError.get()
+
+void ewk_web_error_free(Ewk_Web_Error* error)
+{
+    EINA_SAFETY_ON_NULL_RETURN(error);
+
+    delete error;
+}
+
+Ewk_Web_Error_Type ewk_web_error_type_get(const Ewk_Web_Error* error)
+{
+    EWK_WEB_ERROR_WK_GET_OR_RETURN(error, wkError, EWK_WEB_ERROR_TYPE_NONE);
+
+    WKRetainPtr<WKStringRef> wkDomain(AdoptWK, WKErrorCopyDomain(wkError));
+    WTF::String errorDomain = toWTFString(wkDomain.get());
+
+    if (errorDomain == errorDomainNetwork)
+        return EWK_WEB_ERROR_TYPE_NETWORK;
+    if (errorDomain == errorDomainPolicy)
+        return EWK_WEB_ERROR_TYPE_POLICY;
+    if (errorDomain == errorDomainPlugin)
+        return EWK_WEB_ERROR_TYPE_PLUGIN;
+    if (errorDomain == errorDomainDownload)
+        return EWK_WEB_ERROR_TYPE_DOWNLOAD;
+    if (errorDomain == errorDomainPrint)
+        return EWK_WEB_ERROR_TYPE_PRINT;
+    return EWK_WEB_ERROR_TYPE_INTERNAL;
+}
+
+const char* ewk_web_error_url_get(const Ewk_Web_Error* error)
+{
+    EWK_WEB_ERROR_WK_GET_OR_RETURN(error, wkError, 0);
+
+    WKRetainPtr<WKURLRef> wkUrl(AdoptWK, WKErrorCopyFailingURL(wkError));
+    Ewk_Web_Error* ewkError = const_cast<Ewk_Web_Error*>(error);
+    eina_stringshare_replace(&ewkError->url, toImpl(wkUrl.get())->string().utf8().data());
+
+    return error->url;
+}
+
+int ewk_web_error_code_get(const Ewk_Web_Error* error)
+{
+    EWK_WEB_ERROR_WK_GET_OR_RETURN(error, wkError, 0);
+
+    return WKErrorGetErrorCode(wkError);
+}
+
+const char* ewk_web_error_description_get(const Ewk_Web_Error* error)
+{
+    EWK_WEB_ERROR_WK_GET_OR_RETURN(error, wkError, 0);
+
+    WKRetainPtr<WKStringRef> wkDescription(AdoptWK, WKErrorCopyLocalizedDescription(wkError));
+    Ewk_Web_Error* ewkError = const_cast<Ewk_Web_Error*>(error);
+    eina_stringshare_replace(&ewkError->description, toImpl(wkDescription.get())->string().utf8().data());
+
+    return error->description;
+}
+
+Eina_Bool ewk_web_error_cancellation_get(const Ewk_Web_Error* error)
+{
+    EWK_WEB_ERROR_WK_GET_OR_RETURN(error, wkError, false);
+
+    return toImpl(wkError)->platformError().isCancellation();
+}
+
+Ewk_Web_Error* ewk_web_error_new(WKErrorRef error)
+{
+    EINA_SAFETY_ON_NULL_RETURN_VAL(error, 0);
+
+    return new Ewk_Web_Error(error);
+}
  */
 
 /**
- * @file    ewk_back_forward_list_item.h
- * @brief   Describes the Ewk Back Forward List Item API.
+ * @file    ewk_web_error.h
+ * @brief   Describes the Web Error API.
  */
 
-#ifndef ewk_back_forward_list_item_h
-#define ewk_back_forward_list_item_h
+#ifndef ewk_web_error_h
+#define ewk_web_error_h
 
 #include <Eina.h>
 
 extern "C" {
 #endif
 
-/** Creates a type name for Ewk_Back_Forward_List_Item */
-typedef struct Ewk_Back_Forward_List_Item Ewk_Back_Forward_List_Item;
+/** Creates a type name for @a Ewk_Web_Error. */
+typedef struct _Ewk_Web_Error Ewk_Web_Error;
+
+/// Creates a type name for Ewk_Web_Error_Type.
+typedef enum {
+    EWK_WEB_ERROR_TYPE_NONE,
+    EWK_WEB_ERROR_TYPE_INTERNAL,
+    EWK_WEB_ERROR_TYPE_NETWORK,
+    EWK_WEB_ERROR_TYPE_POLICY,
+    EWK_WEB_ERROR_TYPE_PLUGIN,
+    EWK_WEB_ERROR_TYPE_DOWNLOAD,
+    EWK_WEB_ERROR_TYPE_PRINT
+} Ewk_Web_Error_Type;
 
 /**
- * Increases the reference count of the given object.
- *
- * @param item the back-forward list item instance to increase the reference count
+ * Frees the given object.
  *
- * @return a pointer to the object on success, @c NULL otherwise.
+ * @param error the error object to free
  */
-EAPI Ewk_Back_Forward_List_Item *ewk_back_forward_list_item_ref(Ewk_Back_Forward_List_Item *item);
+EAPI void ewk_web_error_free(Ewk_Web_Error *error);
 
 /**
- * Decreases the reference count of the given object, possibly freeing it.
+ * Query type for this error.
  *
- * When the reference count reaches 0, the item is freed.
+ * @param error error object to query.
  *
- * @param item the back-forward list item instance to decrease the reference count
+ * @return the error type, that may be @c NULL. This pointer is
+ *         guaranteed to be eina_stringshare, so whenever possible
+ *         save yourself some cpu cycles and use
+ *         eina_stringshare_ref() instead of eina_stringshare_add() or
+ *         strdup().
  */
-EAPI void ewk_back_forward_list_item_unref(Ewk_Back_Forward_List_Item *item);
+EAPI Ewk_Web_Error_Type ewk_web_error_type_get(const Ewk_Web_Error *error);
 
 /**
- * Returns URL of the item.
- *
- * The returned URL may differ from the original URL (For example if the page was redirected).
+ * Query failing URL for this error.
  *
- * @see ewk_back_forward_list_item_original_url_get()
+ * URL that failed loading.
  *
- * @param item the back-forward list item instance
+ * @param error error object to query.
  *
- * @return the URL of the @a item or @c NULL in case of error. This pointer is
+ * @return the URL pointer, that may be @c NULL. This pointer is
  *         guaranteed to be eina_stringshare, so whenever possible
  *         save yourself some cpu cycles and use
  *         eina_stringshare_ref() instead of eina_stringshare_add() or
- *         strdup()
+ *         strdup().
  */
-EAPI const char *ewk_back_forward_list_item_url_get(const Ewk_Back_Forward_List_Item *item);
+EAPI const char *ewk_web_error_url_get(const Ewk_Web_Error *error);
 
 /**
- * Returns title of the item.
+ * Query HTTP error code.
  *
- * @param item the back-forward list item instance
+ * @param error error object to query.
  *
- * @return the title of the @a item or @c NULL in case of error. This pointer is
- *         guaranteed to be eina_stringshare, so whenever possible
- *         save yourself some cpu cycles and use
- *         eina_stringshare_ref() instead of eina_stringshare_add() or
- *         strdup()
+ * @return the HTTP error code.
  */
-EAPI const char *ewk_back_forward_list_item_title_get(const Ewk_Back_Forward_List_Item *item);
+EAPI int ewk_web_error_code_get(const Ewk_Web_Error *error);
 
 /**
- * Returns original URL of the item.
- *
- * @see ewk_back_forward_list_item_url_get()
+ * Query description for this error.
  *
- * @param item the back-forward list item instance
+ * @param error error object to query.
  *
- * @return the original URL of the @a item or @c NULL in case of error. This pointer is
+ * @return the description pointer, that may be @c NULL. This pointer is
  *         guaranteed to be eina_stringshare, so whenever possible
  *         save yourself some cpu cycles and use
  *         eina_stringshare_ref() instead of eina_stringshare_add() or
- *         strdup()
+ *         strdup().
+ */
+EAPI const char *ewk_web_error_description_get(const Ewk_Web_Error *error);
+
+/**
+ * Query if error should be treated as a cancellation.
+ *
+ * @param error error object to query.
+ *
+ * @return @c EINA_TRUE if this error should be treated as a cancellation, @c EINA_FALSE otherwise
  */
-EAPI const char *ewk_back_forward_list_item_original_url_get(const Ewk_Back_Forward_List_Item *item);
+EAPI Eina_Bool ewk_web_error_cancellation_get(const Ewk_Web_Error *error);
 
 #ifdef __cplusplus
 }
 #endif
-#endif // ewk_back_forward_list_item_h
+
+#endif // ewk_web_error_h
similarity index 85%
rename from Tools/EWebLauncher/url_utils.h
rename to Source/WebKit2/UIProcess/API/efl/ewk_web_error_private.h
index bd3c1a0..c9a31e5 100644 (file)
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef url_utils_h
-#define url_utils_h
+#ifndef ewk_web_error_private_h
+#define ewk_web_error_private_h
 
-#ifdef __cplusplus
-extern "C" {
-#endif
+#include <WKError.h>
 
-#include <Eina.h>
+typedef struct _Ewk_Web_Error Ewk_Web_Error;
 
-Eina_Bool has_scheme(const char *url);
-char *url_from_user_input(const char *arg);
+Ewk_Web_Error* ewk_web_error_new(WKErrorRef error);
 
-#ifdef __cplusplus
-}
-#endif
-
-#endif // url_utils_h
+#endif // ewk_web_error_private_h
old mode 100755 (executable)
new mode 100644 (file)
similarity index 51%
rename from Source/WebKit2/UIProcess/efl/FindClientEfl.cpp
rename to Source/WebKit2/UIProcess/API/efl/ewk_web_resource.cpp
index a431acc..e0d728a
@@ -1,5 +1,4 @@
 /*
- * Copyright (C) 2012 Samsung Electronics. All rights reserved.
  * Copyright (C) 2012 Intel Corporation. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  */
 
 #include "config.h"
-#include "FindClientEfl.h"
+#include "ewk_web_resource.h"
 
-#include "EwkViewImpl.h"
-#include "WKPage.h"
+#include "ewk_web_resource_private.h"
+#include <wtf/text/CString.h>
 
-namespace WebKit {
+struct _Ewk_Web_Resource {
+    unsigned int __ref; /**< the reference count of the object */
+    const char* url;
+    bool isMainResource;
 
-static inline FindClientEfl* toFindClientEfl(const void* clientInfo)
+    _Ewk_Web_Resource(const char* _url, bool _isMainResource)
+        : __ref(1)
+         , url(eina_stringshare_add(_url))
+        , isMainResource(_isMainResource)
+    { }
+
+    ~_Ewk_Web_Resource()
+    {
+        ASSERT(!__ref);
+        eina_stringshare_del(url);
+    }
+};
+
+void ewk_web_resource_ref(Ewk_Web_Resource* resource)
 {
-    return static_cast<FindClientEfl*>(const_cast<void*>(clientInfo));
+    EINA_SAFETY_ON_NULL_RETURN(resource);
+
+    ++resource->__ref;
 }
 
-void FindClientEfl::didFindString(WKPageRef, WKStringRef, unsigned matchCount, const void* clientInfo)
+void ewk_web_resource_unref(Ewk_Web_Resource* resource)
 {
-    FindClientEfl* findClient = toFindClientEfl(clientInfo);
-    findClient->m_viewImpl->informTextFound(matchCount);
+    EINA_SAFETY_ON_NULL_RETURN(resource);
+
+    if (--resource->__ref)
+        return;
+
+    delete resource;
 }
 
-void FindClientEfl::didFailToFindString(WKPageRef, WKStringRef, const void* clientInfo)
+const char* ewk_web_resource_url_get(const Ewk_Web_Resource* resource)
 {
-    FindClientEfl* findClient = toFindClientEfl(clientInfo);
-    findClient->m_viewImpl->informTextFound(0);
+    EINA_SAFETY_ON_NULL_RETURN_VAL(resource, 0);
+
+    return resource->url;
 }
 
-FindClientEfl::FindClientEfl(EwkViewImpl* viewImpl)
-    : m_viewImpl(viewImpl)
+/**
+ * @internal
+ * Constructs a Ewk_Web_Resource.
+ */
+Ewk_Web_Resource* ewk_web_resource_new(const char* url, bool isMainResource)
 {
-    WKPageRef pageRef = m_viewImpl->wkPage();
-    ASSERT(pageRef);
-
-    WKPageFindClient findClient;
-    memset(&findClient, 0, sizeof(WKPageFindClient));
-    findClient.version = kWKPageFindClientCurrentVersion;
-    findClient.clientInfo = this;
-    findClient.didFindString = didFindString;
-    findClient.didFailToFindString = didFailToFindString;
-    findClient.didCountStringMatches = didFindString;
-    WKPageSetPageFindClient(pageRef, &findClient);
+    EINA_SAFETY_ON_NULL_RETURN_VAL(url, 0);
+
+    return new Ewk_Web_Resource(url, isMainResource);
 }
 
-} // namespace WebKit
+Eina_Bool ewk_web_resource_main_resource_get(const Ewk_Web_Resource* resource)
+{
+    EINA_SAFETY_ON_NULL_RETURN_VAL(resource, false);
+
+    return resource->isMainResource;
+}
  */
 
 /**
- * @file    ewk_resource.h
+ * @file    ewk_web_resource.h
  * @brief   Describes the Web Resource API.
  */
 
-#ifndef ewk_resource_h
-#define ewk_resource_h
+#ifndef ewk_web_resource_h
+#define ewk_web_resource_h
 
 #include <Eina.h>
 
 extern "C" {
 #endif
 
-/** Creates a type name for @a Ewk_Resource. */
-typedef struct Ewk_Resource Ewk_Resource;
+/** Creates a type name for @a Ewk_Web_Resource. */
+typedef struct _Ewk_Web_Resource Ewk_Web_Resource;
 
 /**
  * Increases the reference count of the given object.
  *
  * @param resource the resource object to increase the reference count
- *
- * @return a pointer to the object on success, @c NULL otherwise.
  */
-EAPI Ewk_Resource *ewk_resource_ref(Ewk_Resource *resource);
+EAPI void ewk_web_resource_ref(Ewk_Web_Resource *resource);
 
 /**
  * Decreases the reference count of the given object, possibly freeing it.
@@ -56,7 +54,7 @@ EAPI Ewk_Resource *ewk_resource_ref(Ewk_Resource *resource);
  *
  * @param resource the resource object to decrease the reference count
  */
-EAPI void ewk_resource_unref(Ewk_Resource *resource);
+EAPI void ewk_web_resource_unref(Ewk_Web_Resource *resource);
 
 /**
  * Query URL for this resource.
@@ -69,7 +67,7 @@ EAPI void ewk_resource_unref(Ewk_Resource *resource);
  *         eina_stringshare_ref() instead of eina_stringshare_add() or
  *         strdup().
  */
-EAPI const char *ewk_resource_url_get(const Ewk_Resource *resource);
+EAPI const char *ewk_web_resource_url_get(const Ewk_Web_Resource *resource);
 
 /**
  * Query if this is the main resource.
@@ -78,10 +76,10 @@ EAPI const char *ewk_resource_url_get(const Ewk_Resource *resource);
  *
  * @return @c EINA_TRUE if this is the main resource, @c EINA_FALSE otherwise
  */
-EAPI Eina_Bool ewk_resource_main_resource_get(const Ewk_Resource *resource);
+EAPI Eina_Bool ewk_web_resource_main_resource_get(const Ewk_Web_Resource *resource);
 
 #ifdef __cplusplus
 }
 #endif
 
-#endif // ewk_resource_h
+#endif // ewk_web_resource_h
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include "config.h"
-#include "ewk_resource.h"
+#ifndef ewk_web_resource_private_h
+#define ewk_web_resource_private_h
 
-#include "ewk_resource_private.h"
-#include <wtf/text/CString.h>
+typedef struct _Ewk_Web_Resource Ewk_Web_Resource;
 
-Ewk_Resource* ewk_resource_ref(Ewk_Resource* resource)
-{
-    EINA_SAFETY_ON_NULL_RETURN_VAL(resource, 0);
+Ewk_Web_Resource* ewk_web_resource_new(const char* uri, bool isMainResource);
 
-    resource->ref();
-
-    return resource;
-}
-
-void ewk_resource_unref(Ewk_Resource* resource)
-{
-    EINA_SAFETY_ON_NULL_RETURN(resource);
-
-    resource->deref();
-}
-
-const char* ewk_resource_url_get(const Ewk_Resource* resource)
-{
-    EINA_SAFETY_ON_NULL_RETURN_VAL(resource, 0);
-
-    return resource->url;
-}
-
-Eina_Bool ewk_resource_main_resource_get(const Ewk_Resource* resource)
-{
-    EINA_SAFETY_ON_NULL_RETURN_VAL(resource, false);
-
-    return resource->isMainResource;
-}
+#endif // ewk_web_resource_private_h
old mode 100755 (executable)
new mode 100644 (file)
index 8a0fe50..c03bf7e
@@ -21,6 +21,7 @@
 #include "EWK2UnitTestBase.h"
 
 #include "EWK2UnitTestEnvironment.h"
+#include <EWebKit2.h>
 #include <Ecore.h>
 #include <glib-object.h>
 #include <wtf/UnusedParam.h>
@@ -37,12 +38,19 @@ extern EWK2UnitTest::EWK2UnitTestEnvironment* environment;
 
 namespace EWK2UnitTest {
 
+static void onLoadFinished(void* userData, Evas_Object* webView, void* eventInfo)
+{
+    UNUSED_PARAM(webView);
+    UNUSED_PARAM(eventInfo);
+
+    bool* loadFinished = static_cast<bool*>(userData);
+    *loadFinished = true;
+}
+
 EWK2UnitTestBase::EWK2UnitTestBase()
     : m_ecoreEvas(0)
     , m_webView(0)
-    , m_ewkViewClass(EWK_VIEW_SMART_CLASS_INIT_NAME_VERSION("Browser_View"))
 {
-    ewk_view_smart_class_set(&m_ewkViewClass);
 }
 
 void EWK2UnitTestBase::SetUp()
@@ -70,8 +78,7 @@ void EWK2UnitTestBase::SetUp()
     ecore_evas_show(m_ecoreEvas);
     Evas* evas = ecore_evas_get(m_ecoreEvas);
 
-    Evas_Smart* smart = evas_smart_class_new(&m_ewkViewClass.sc);
-    m_webView = ewk_view_smart_add(evas, smart, ewk_context_default_get());
+    m_webView = ewk_view_add(evas);
     ewk_view_theme_set(m_webView, environment->defaultTheme());
 
     evas_object_resize(m_webView, width, height);
@@ -89,169 +96,41 @@ void EWK2UnitTestBase::TearDown()
 #endif
 }
 
-bool EWK2UnitTestBase::loadUrlSync(const char* url, double timeoutSeconds)
-{
-    ewk_view_url_set(m_webView, url);
-    return waitUntilLoadFinished(timeoutSeconds);
-}
-
-class CallbackDataTimer {
-public:
-    CallbackDataTimer(double timeoutSeconds, Ecore_Task_Cb callback)
-        : m_done(false)
-        , m_timer(timeoutSeconds >= 0 ? ecore_timer_add(timeoutSeconds, callback, this) : 0)
-        , m_didTimeOut(false)
-    {
-    }
-
-    virtual ~CallbackDataTimer()
-    {
-        if (m_timer)
-            ecore_timer_del(m_timer);
-    }
-
-    bool isDone() const { return m_done; }
-
-    bool setDone()
-    {
-        if (m_timer) {
-            ecore_timer_del(m_timer);
-            m_timer = 0;
-        }
-        m_done = true;
-    }
-
-    bool didTimeOut() const { return m_didTimeOut; }
-
-    void setTimedOut()
-    {
-        m_done = true;
-        m_timer = 0;
-        m_didTimeOut = true;
-    }
-
-protected:
-    bool m_done;
-    Ecore_Timer* m_timer;
-    bool m_didTimeOut;
-};
-
-template <class T>
-class CallbackDataExpectedValue : public CallbackDataTimer {
-public:
-    CallbackDataExpectedValue(const T& expectedValue, double timeoutSeconds, Ecore_Task_Cb callback)
-        : CallbackDataTimer(timeoutSeconds, callback)
-        , m_expectedValue(expectedValue)
-    {
-    }
-
-    const T& expectedValue() const { return m_expectedValue; }
-
-private:
-    T m_expectedValue;
-};
-
-static void onLoadFinished(void* userData, Evas_Object* webView, void* eventInfo)
-{
-    UNUSED_PARAM(webView);
-    UNUSED_PARAM(eventInfo);
-
-    CallbackDataTimer* data = static_cast<CallbackDataTimer*>(userData);
-    data->setDone();
-}
-
-static bool timeOutWhileWaitingUntilLoadFinished(void* userData)
+void EWK2UnitTestBase::loadUrlSync(const char* url)
 {
-    CallbackDataTimer* data = static_cast<CallbackDataTimer*>(userData);
-    data->setTimedOut();
+    bool loadFinished = false;
 
-    return ECORE_CALLBACK_CANCEL;
-}
-
-bool EWK2UnitTestBase::waitUntilLoadFinished(double timeoutSeconds)
-{
-    CallbackDataTimer data(timeoutSeconds, reinterpret_cast<Ecore_Task_Cb>(timeOutWhileWaitingUntilLoadFinished));
-
-    evas_object_smart_callback_add(m_webView, "load,finished", onLoadFinished, &data);
+    evas_object_smart_callback_add(m_webView, "load,finished", onLoadFinished, &loadFinished);
+    ewk_view_url_set(m_webView, url);
 
-    while (!data.isDone())
+    while (!loadFinished)
         ecore_main_loop_iterate();
 
     evas_object_smart_callback_del(m_webView, "load,finished", onLoadFinished);
-
-    return !data.didTimeOut();
 }
 
-static void onTitleChanged(void* userData, Evas_Object* webView, void*)
-{
-    CallbackDataExpectedValue<CString>* data = static_cast<CallbackDataExpectedValue<CString>*>(userData);
-
-    if (strcmp(ewk_view_title_get(webView), data->expectedValue().data()))
-        return;
-
-    data->setDone();
-}
+struct TitleChangedData {
+    CString expectedTitle;
+    bool done;
+};
 
-static bool timeOutWhileWaitingUntilTitleChangedTo(void* userData)
+static void onTitleChanged(void* userData, Evas_Object* webView, void* eventInfo)
 {
-    CallbackDataExpectedValue<CString>* data = static_cast<CallbackDataExpectedValue<CString>*>(userData);
-    data->setTimedOut();
+    TitleChangedData* data = static_cast<TitleChangedData*>(userData);
 
-    return ECORE_CALLBACK_CANCEL;
+    if (!strcmp(ewk_view_title_get(webView), data->expectedTitle.data()))
+        data->done = true;
 }
 
-bool EWK2UnitTestBase::waitUntilTitleChangedTo(const char* expectedTitle, double timeoutSeconds)
+void EWK2UnitTestBase::waitUntilTitleChangedTo(const char* expectedTitle)
 {
-    CallbackDataExpectedValue<CString> data(expectedTitle, timeoutSeconds, reinterpret_cast<Ecore_Task_Cb>(timeOutWhileWaitingUntilTitleChangedTo));
-
+    TitleChangedData data = { expectedTitle, false };
     evas_object_smart_callback_add(m_webView, "title,changed", onTitleChanged, &data);
 
-    while (!data.isDone())
+    while (!data.done)
         ecore_main_loop_iterate();
 
     evas_object_smart_callback_del(m_webView, "title,changed", onTitleChanged);
-
-    return !data.didTimeOut();
-}
-
-static void onURLChanged(void* userData, Evas_Object* webView, void*)
-{
-    CallbackDataExpectedValue<CString>* data = static_cast<CallbackDataExpectedValue<CString>*>(userData);
-
-    if (strcmp(ewk_view_url_get(webView), data->expectedValue().data()))
-        return;
-
-    data->setDone();
-}
-
-static bool timeOutWhileWaitingUntilURLChangedTo(void* userData)
-{
-    CallbackDataExpectedValue<CString>* data = static_cast<CallbackDataExpectedValue<CString>*>(userData);
-    data->setTimedOut();
-
-    return ECORE_CALLBACK_CANCEL;
-}
-
-bool EWK2UnitTestBase::waitUntilURLChangedTo(const char* expectedURL, double timeoutSeconds)
-{
-    CallbackDataExpectedValue<CString> data(expectedURL, timeoutSeconds, reinterpret_cast<Ecore_Task_Cb>(timeOutWhileWaitingUntilURLChangedTo));
-
-    evas_object_smart_callback_add(m_webView, "url,changed", onURLChanged, &data);
-
-    while (!data.isDone())
-        ecore_main_loop_iterate();
-
-    evas_object_smart_callback_del(m_webView, "url,changed", onURLChanged);
-
-    return !data.didTimeOut();
-}
-
-void EWK2UnitTestBase::mouseClick(int x, int y)
-{
-    Evas* evas = evas_object_evas_get(m_webView);
-    evas_event_feed_mouse_move(evas, x, y, 0, 0);
-    evas_event_feed_mouse_down(evas, /* Left */ 1, EVAS_BUTTON_NONE, 0, 0);
-    evas_event_feed_mouse_up(evas, /* Left */ 1, EVAS_BUTTON_NONE, 0, 0);
 }
 
 void EWK2UnitTestBase::mouseDown(int x, int y)
old mode 100755 (executable)
new mode 100644 (file)
index 5de80a1..aef5854
@@ -20,7 +20,6 @@
 #ifndef EWK2UnitTestBase_h
 #define EWK2UnitTestBase_h
 
-#include <EWebKit2.h>
 #include <Ecore_Evas.h>
 #include <Evas.h>
 #include <gtest/gtest.h>
@@ -30,8 +29,6 @@ namespace EWK2UnitTest {
 class EWK2UnitTestBase : public ::testing::Test {
 public:
     Evas_Object* webView() { return m_webView; }
-    Evas* canvas() { return ecore_evas_get(m_ecoreEvas); }
-    Ewk_View_Smart_Class* ewkViewClass() { return &m_ewkViewClass; }
 
 protected:
     EWK2UnitTestBase();
@@ -39,14 +36,9 @@ protected:
     virtual void SetUp();
     virtual void TearDown();
 
-    static const double defaultTimeoutSeconds = 10.0;
+    void loadUrlSync(const char* url);
+    void waitUntilTitleChangedTo(const char* expectedTitle);
 
-    bool loadUrlSync(const char* url, double timeoutSeconds = defaultTimeoutSeconds);
-    bool waitUntilLoadFinished(double timeoutSeconds = defaultTimeoutSeconds);
-    bool waitUntilTitleChangedTo(const char* expectedTitle, double timeoutSeconds = defaultTimeoutSeconds);
-    bool waitUntilURLChangedTo(const char* expectedURL, double timeoutSeconds = defaultTimeoutSeconds);
-
-    void mouseClick(int x, int y);
     void mouseDown(int x, int y);
     void mouseUp(int x, int y);
     void mouseMove(int x, int y);
@@ -57,7 +49,6 @@ protected:
 private:
     Evas_Object* m_webView;
     Ecore_Evas* m_ecoreEvas;
-    Ewk_View_Smart_Class m_ewkViewClass;
 };
 
 } // namespace EWK2UnitTest
old mode 100755 (executable)
new mode 100644 (file)
index c87aa8a..300234d
@@ -20,7 +20,6 @@
 #include "config.h"
 #include "EWK2UnitTestEnvironment.h"
 
-#include <wtf/text/StringBuilder.h>
 #include <wtf/text/StringConcatenate.h>
 
 namespace EWK2UnitTest {
@@ -54,11 +53,6 @@ const char* EWK2UnitTestEnvironment::defaultTheme() const
     return TEST_THEME_DIR"/default.edj";
 }
 
-const char* EWK2UnitTestEnvironment::injectedBundleSample() const
-{
-    return TEST_RESOURCES_DIR "/libewk2UnitTestInjectedBundleSample.so";
-}
-
 CString EWK2UnitTestEnvironment::urlForResource(const char* resource)
 {
 #if ENABLE(TIZEN_WEBKIT2_UNIT_TESTS)
@@ -68,16 +62,4 @@ CString EWK2UnitTestEnvironment::urlForResource(const char* resource)
 #endif
 }
 
-CString EWK2UnitTestEnvironment::pathForResource(const char* resource)
-{
-    StringBuilder builder;
-#if ENABLE(TIZEN_WEBKIT2_UNIT_TESTS)
-    builder.append(m_resourcesPath ? m_resourcesPath : TEST_RESOURCES_DIR "/");
-#else
-    builder.appendLiteral(TEST_RESOURCES_DIR "/");
-#endif
-    builder.append(resource);
-    return builder.toString().utf8();
-}
-
 } // namespace EWK2UnitTest
old mode 100755 (executable)
new mode 100644 (file)
index eb73886..b46e847
@@ -32,9 +32,7 @@ public:
     bool useX11Window() const { return m_useX11Window; }
     const char* defaultTestPageUrl() const;
     const char* defaultTheme() const;
-    const char* injectedBundleSample() const;
     CString urlForResource(const char* resource);
-    CString pathForResource(const char* resource);
 
     virtual unsigned int defaultWidth() const { return m_defaultWidth; }
     virtual unsigned int defaultHeight() const { return m_defaultHeight; }
index 4ef4cf7..52e6af4 100644 (file)
@@ -27,14 +27,14 @@ EWK2UnitTestServer::EWK2UnitTestServer()
     soup_address_resolve_sync(address, 0);
 
     m_soupServer = soup_server_new(SOUP_SERVER_INTERFACE, address, static_cast<char*>(0));
-    m_baseURL = soup_uri_new("http://127.0.0.1/");
-    soup_uri_set_port(m_baseURL, soup_server_get_port(m_soupServer));
+    m_baseURI = soup_uri_new("http://127.0.0.1/");
+    soup_uri_set_port(m_baseURI, soup_server_get_port(m_soupServer));
     g_object_unref(address);
 }
 
 EWK2UnitTestServer::~EWK2UnitTestServer()
 {
-    soup_uri_free(m_baseURL);
+    soup_uri_free(m_baseURI);
     g_object_unref(m_soupServer);
 }
 
@@ -44,13 +44,13 @@ void EWK2UnitTestServer::run(SoupServerCallback serverCallback)
     soup_server_add_handler(m_soupServer, 0, serverCallback, 0, 0);
 }
 
-CString EWK2UnitTestServer::getURLForPath(const char* path) const
+CString EWK2UnitTestServer::getURIForPath(const char* path) const
 {
-    SoupURI* soupURL = soup_uri_new_with_base(m_baseURL, path);
-    char* url = soup_uri_to_string(soupURL, false);
-    CString urlString = url;
-    free(url);
-    soup_uri_free(soupURL);
+    SoupURI* soupURI = soup_uri_new_with_base(m_baseURI, path);
+    char* uri = soup_uri_to_string(soupURI, false);
+    CString uriString = uri;
+    free(uri);
+    soup_uri_free(soupURI);
 
-    return urlString;
+    return uriString;
 }
index b967ce4..3eb146f 100644 (file)
@@ -29,12 +29,14 @@ public:
     EWK2UnitTestServer();
     virtual ~EWK2UnitTestServer();
 
-    CString getURLForPath(const char* path) const;
+    SoupURI* baseURI() const { return m_baseURI; }
+
+    CString getURIForPath(const char* path) const;
     void run(SoupServerCallback);
 
 private:
     SoupServer* m_soupServer;
-    SoupURI* m_baseURL;
+    SoupURI* m_baseURI;
 };
 
 #endif // EWK2UnitTestServer_h
diff --git a/Source/WebKit2/UIProcess/API/efl/tests/resources/blank.ico b/Source/WebKit2/UIProcess/API/efl/tests/resources/blank.ico
deleted file mode 100644 (file)
index ea848b9..0000000
Binary files a/Source/WebKit2/UIProcess/API/efl/tests/resources/blank.ico and /dev/null differ
index 5d1e008..edd81e7 100644 (file)
@@ -1,5 +1,4 @@
 <HTML>
-<title>Default Testing Web Page</title>
 <BODY>
 <H2 align="center">EFL Unit Tests</H2>
 <H2 align="center">Default Testing Web Page</H2>
diff --git a/Source/WebKit2/UIProcess/API/efl/tests/resources/intent-request.html b/Source/WebKit2/UIProcess/API/efl/tests/resources/intent-request.html
deleted file mode 100644 (file)
index 7b06cbe..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-<html>
-<head>
-<title>Web intent request test</title>
-<script type="text/javascript">
-var clickCount = 0;
-
-function buttonClicked() {
-  if (clickCount == 0) {
-    var testIntent = new WebKitIntent(
-                     {"action": "action1",
-                      "type": "mime/type1",
-                      "service": "http://service1.com/",
-                      "extras": {"key1": "value1", "key2": "value2"}});
-    navigator.webkitStartActivity(testIntent);
-  } else if (clickCount == 1) {
-    var testIntent = new WebKitIntent(
-                     {"action": "action2",
-                      "type": "mime/type2",
-                      "suggestions": ["http://service1.com/", "http://service2.com/"]});
-    navigator.webkitStartActivity(testIntent);
-  }
-  clickCount++;
-}
-</script>
-</head>
-<body>
-<input type="button" id="button" value="Start Web Intent" onmouseup="buttonClicked()" style="position: absolute; top: 0px; left: 0px;"/>
-</body>
-</html>
diff --git a/Source/WebKit2/UIProcess/API/efl/tests/resources/intent-service.html b/Source/WebKit2/UIProcess/API/efl/tests/resources/intent-service.html
deleted file mode 100644 (file)
index 1d9fa2a..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-<html>
-<head>
-<title>Web Intent service registration test</title>
-</head>
-  <body>
-    <intent action="action" type="type" title="Title" href="http://example.com/service" disposition="inline"></intent>
-    Registered Intent Service.
-  </body>
-</html>
diff --git a/Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_back_forward_list.cpp b/Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_back_forward_list.cpp
deleted file mode 100644 (file)
index d3903ee..0000000
+++ /dev/null
@@ -1,271 +0,0 @@
-/*
- * Copyright (C) 2012 Intel Corporation. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-
-#include "UnitTestUtils/EWK2UnitTestBase.h"
-#include "UnitTestUtils/EWK2UnitTestEnvironment.h"
-#include "UnitTestUtils/EWK2UnitTestServer.h"
-#include "WKEinaSharedString.h"
-#include <EWebKit2.h>
-#include <gtest/gtest.h>
-#include <wtf/OwnPtr.h>
-#include <wtf/PassOwnPtr.h>
-
-using namespace EWK2UnitTest;
-using namespace WTF;
-
-extern EWK2UnitTestEnvironment* environment;
-
-static const char title1[] = "Page1";
-static const char title2[] = "Page2";
-static const char title3[] = "Page3";
-
-static void serverCallbackNavigation(SoupServer* server, SoupMessage* message, const char* path, GHashTable*, SoupClientContext*, gpointer)
-{
-    if (message->method != SOUP_METHOD_GET) {
-        soup_message_set_status(message, SOUP_STATUS_NOT_IMPLEMENTED);
-        return;
-    }
-
-    soup_message_set_status(message, SOUP_STATUS_OK);
-
-    Eina_Strbuf* body = eina_strbuf_new();
-    eina_strbuf_append_printf(body, "<html><title>%s</title><body>%s</body></html>", path + 1, path + 1);
-    const size_t bodyLength = eina_strbuf_length_get(body);
-    soup_message_body_append(message->response_body, SOUP_MEMORY_TAKE, eina_strbuf_string_steal(body), bodyLength);
-    eina_strbuf_free(body);
-
-    soup_message_body_complete(message->response_body);
-}
-
-static inline void checkItem(Ewk_Back_Forward_List_Item* item, const char* title, const char* url, const char* originalURL)
-{
-    ASSERT_TRUE(item);
-    EXPECT_STREQ(url, ewk_back_forward_list_item_url_get(item));
-    EXPECT_STREQ(title, ewk_back_forward_list_item_title_get(item));
-    EXPECT_STREQ(originalURL, ewk_back_forward_list_item_original_url_get(item));
-}
-
-static inline WKEinaSharedString urlFromTitle(EWK2UnitTestServer* httpServer, const char* title)
-{
-    Eina_Strbuf* path = eina_strbuf_new();
-    eina_strbuf_append_printf(path, "/%s", title);
-    WKEinaSharedString res = httpServer->getURLForPath(eina_strbuf_string_get(path)).data();
-    eina_strbuf_free(path);
-
-    return res;
-}
-
-static inline void freeEinaList(Eina_List* list)
-{
-    void* data = 0;
-    EINA_LIST_FREE(list, data)
-        ewk_back_forward_list_item_unref(static_cast<Ewk_Back_Forward_List_Item*>(data));
-}
-
-TEST_F(EWK2UnitTestBase, ewk_back_forward_list_current_item_get)
-{
-    const char* url = environment->defaultTestPageUrl();
-    loadUrlSync(url);
-    Ewk_Back_Forward_List* backForwardList = ewk_view_back_forward_list_get(webView());
-    ASSERT_TRUE(backForwardList);
-
-    Ewk_Back_Forward_List_Item* currentItem = ewk_back_forward_list_current_item_get(backForwardList);
-    checkItem(currentItem, ewk_view_title_get(webView()), url, url);
-
-    Ewk_Back_Forward_List_Item* anotherCurrentItem = ewk_back_forward_list_current_item_get(backForwardList);
-    ASSERT_EQ(currentItem, anotherCurrentItem);
-}
-
-TEST_F(EWK2UnitTestBase, ewk_back_forward_list_previous_item_get)
-{
-    OwnPtr<EWK2UnitTestServer> httpServer = adoptPtr(new EWK2UnitTestServer);
-    httpServer->run(serverCallbackNavigation);
-
-    WKEinaSharedString url1 = urlFromTitle(httpServer.get(), title1);
-    loadUrlSync(url1);
-    ASSERT_STREQ(ewk_view_title_get(webView()), title1);
-
-    loadUrlSync(urlFromTitle(httpServer.get(), title2));
-    ASSERT_STREQ(ewk_view_title_get(webView()), title2);
-
-    Ewk_Back_Forward_List* backForwardList = ewk_view_back_forward_list_get(webView());
-    ASSERT_TRUE(backForwardList);
-
-    Ewk_Back_Forward_List_Item* previousItem = ewk_back_forward_list_previous_item_get(backForwardList);
-    checkItem(previousItem, title1, url1, url1);
-
-    Ewk_Back_Forward_List_Item* anotherPreviousItem = ewk_back_forward_list_previous_item_get(backForwardList);
-    ASSERT_EQ(previousItem, anotherPreviousItem);
-}
-
-TEST_F(EWK2UnitTestBase, ewk_back_forward_list_next_item_get)
-{
-    OwnPtr<EWK2UnitTestServer> httpServer = adoptPtr(new EWK2UnitTestServer);
-    httpServer->run(serverCallbackNavigation);
-
-    loadUrlSync(urlFromTitle(httpServer.get(), title1));
-    ASSERT_STREQ(ewk_view_title_get(webView()), title1);
-
-    WKEinaSharedString url2 = urlFromTitle(httpServer.get(), title2);
-    loadUrlSync(url2);
-    ASSERT_STREQ(ewk_view_title_get(webView()), title2);
-
-    // Go back to Page1.
-    ewk_view_back(webView());
-    waitUntilTitleChangedTo(title1);
-
-    Ewk_Back_Forward_List* backForwardList = ewk_view_back_forward_list_get(webView());
-    ASSERT_TRUE(backForwardList);
-
-    Ewk_Back_Forward_List_Item* nextItem = ewk_back_forward_list_next_item_get(backForwardList);
-    checkItem(nextItem, title2, url2, url2);
-
-    Ewk_Back_Forward_List_Item* anotherNextItem = ewk_back_forward_list_next_item_get(backForwardList);
-    ASSERT_EQ(nextItem, anotherNextItem);
-}
-
-TEST_F(EWK2UnitTestBase, ewk_back_forward_list_item_at_index_get)
-{
-    OwnPtr<EWK2UnitTestServer> httpServer = adoptPtr(new EWK2UnitTestServer);
-    httpServer->run(serverCallbackNavigation);
-
-    WKEinaSharedString url1 = urlFromTitle(httpServer.get(), title1);
-    loadUrlSync(url1);
-    ASSERT_STREQ(ewk_view_title_get(webView()), title1);
-
-    loadUrlSync(urlFromTitle(httpServer.get(), title2));
-    ASSERT_STREQ(ewk_view_title_get(webView()), title2);
-
-    Ewk_Back_Forward_List* backForwardList = ewk_view_back_forward_list_get(webView());
-    ASSERT_TRUE(backForwardList);
-
-    Ewk_Back_Forward_List_Item* previousItem = ewk_back_forward_list_item_at_index_get(backForwardList, -1);
-    checkItem(previousItem, title1, url1, url1);
-
-    Ewk_Back_Forward_List_Item* anotherPreviousItem = ewk_back_forward_list_item_at_index_get(backForwardList, -1);
-    ASSERT_EQ(previousItem, anotherPreviousItem);
-
-    Ewk_Back_Forward_List_Item* nonExistingItem = ewk_back_forward_list_item_at_index_get(backForwardList, 10);    
-    ASSERT_FALSE(nonExistingItem);
-}
-
-TEST_F(EWK2UnitTestBase, ewk_back_forward_list_count)
-{
-    OwnPtr<EWK2UnitTestServer> httpServer = adoptPtr(new EWK2UnitTestServer);
-    httpServer->run(serverCallbackNavigation);
-
-    loadUrlSync(urlFromTitle(httpServer.get(), title1));
-    ASSERT_STREQ(ewk_view_title_get(webView()), title1);
-
-    loadUrlSync(urlFromTitle(httpServer.get(), title2));
-    ASSERT_STREQ(ewk_view_title_get(webView()), title2);
-
-    Ewk_Back_Forward_List* backForwardList = ewk_view_back_forward_list_get(webView());
-    ASSERT_TRUE(backForwardList);
-
-    EXPECT_EQ(ewk_back_forward_list_count(backForwardList), 2);
-}
-
-TEST_F(EWK2UnitTestBase, ewk_back_forward_list_n_back_items_copy)
-{
-    OwnPtr<EWK2UnitTestServer> httpServer = adoptPtr(new EWK2UnitTestServer);
-    httpServer->run(serverCallbackNavigation);
-
-    WKEinaSharedString url1 = urlFromTitle(httpServer.get(), title1);
-    loadUrlSync(url1);
-    ASSERT_STREQ(ewk_view_title_get(webView()), title1);
-
-    WKEinaSharedString url2 = urlFromTitle(httpServer.get(), title2);
-    loadUrlSync(url2);
-    ASSERT_STREQ(ewk_view_title_get(webView()), title2);
-
-    loadUrlSync(urlFromTitle(httpServer.get(), title3));
-    ASSERT_STREQ(ewk_view_title_get(webView()), title3);
-
-    Ewk_Back_Forward_List* backForwardList = ewk_view_back_forward_list_get(webView());
-    ASSERT_TRUE(backForwardList);
-
-    Eina_List* backList = ewk_back_forward_list_n_back_items_copy(backForwardList, 1);
-    ASSERT_TRUE(backList);
-    ASSERT_EQ(eina_list_count(backList), 1);
-    checkItem(static_cast<Ewk_Back_Forward_List_Item*>(eina_list_nth(backList, 0)), title2, url2, url2);
-    freeEinaList(backList);
-
-    // Check '0' limit.
-    backList = ewk_back_forward_list_n_back_items_copy(backForwardList, 0);
-    ASSERT_FALSE(backList);
-
-    backList = ewk_back_forward_list_n_back_items_copy(backForwardList, -1);
-    ASSERT_TRUE(backList);
-    ASSERT_EQ(eina_list_count(backList), 2);
-    checkItem(static_cast<Ewk_Back_Forward_List_Item*>(eina_list_nth(backList, 0)), title1, url1, url1);
-    checkItem(static_cast<Ewk_Back_Forward_List_Item*>(eina_list_nth(backList, 1)), title2, url2, url2);
-    freeEinaList(backList);
-}
-
-TEST_F(EWK2UnitTestBase, ewk_back_forward_list_n_forward_items_copy)
-{
-    OwnPtr<EWK2UnitTestServer> httpServer = adoptPtr(new EWK2UnitTestServer);
-    httpServer->run(serverCallbackNavigation);
-
-    loadUrlSync(urlFromTitle(httpServer.get(), title1));
-    ASSERT_STREQ(ewk_view_title_get(webView()), title1);
-
-    WKEinaSharedString url2 = urlFromTitle(httpServer.get(), title2);
-    loadUrlSync(url2);
-    ASSERT_STREQ(ewk_view_title_get(webView()), title2);
-
-    WKEinaSharedString url3 = urlFromTitle(httpServer.get(), title3);
-    loadUrlSync(url3);
-    ASSERT_STREQ(ewk_view_title_get(webView()), title3);
-
-    // Go back to Page1.
-    ewk_view_back(webView());
-    waitUntilTitleChangedTo(title2);
-    ewk_view_back(webView());
-    waitUntilTitleChangedTo(title1);
-
-    Ewk_Back_Forward_List* backForwardList = ewk_view_back_forward_list_get(webView());
-    ASSERT_TRUE(backForwardList);
-
-    Eina_List* forwardList = ewk_back_forward_list_n_forward_items_copy(backForwardList, 1);
-    ASSERT_TRUE(forwardList);
-    ASSERT_EQ(eina_list_count(forwardList), 1);
-    checkItem(static_cast<Ewk_Back_Forward_List_Item*>(eina_list_nth(forwardList, 0)), title2, url2, url2);
-    freeEinaList(forwardList);
-
-    // Check '0' limit.
-    forwardList = ewk_back_forward_list_n_forward_items_copy(backForwardList, 0);
-    ASSERT_FALSE(forwardList);
-
-    forwardList = ewk_back_forward_list_n_forward_items_copy(backForwardList, -1);
-    ASSERT_TRUE(forwardList);
-    ASSERT_EQ(eina_list_count(forwardList), 2);
-    checkItem(static_cast<Ewk_Back_Forward_List_Item*>(eina_list_nth(forwardList, 0)), title2, url2, url2);
-    checkItem(static_cast<Ewk_Back_Forward_List_Item*>(eina_list_nth(forwardList, 1)), title3, url3, url3);
-    freeEinaList(forwardList);
-}
old mode 100755 (executable)
new mode 100644 (file)
index 5e4f940..764bd9f
@@ -1,6 +1,5 @@
 /*
  * Copyright (C) 2012 Intel Corporation. All rights reserved.
- * Copyright (C) 2012 Samsung Electronics
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -29,7 +28,6 @@
 #include "UnitTestUtils/EWK2UnitTestBase.h"
 #include "UnitTestUtils/EWK2UnitTestEnvironment.h"
 #include <EWebKit2.h>
-#include <Ecore.h>
 #include <gtest/gtest.h>
 
 using namespace EWK2UnitTest;
@@ -47,18 +45,9 @@ TEST_F(EWK2UnitTestBase, ewk_context_default_get)
 
 TEST_F(EWK2UnitTestBase, ewk_context_cookie_manager_get)
 {
-    Ewk_Context* context = ewk_view_context_get(webView());
-    Ewk_Cookie_Manager* cookieManager = ewk_context_cookie_manager_get(context);
+    Ewk_Cookie_Manager* cookieManager = ewk_context_cookie_manager_get(ewk_context_default_get());
     ASSERT_TRUE(cookieManager);
-    ASSERT_EQ(cookieManager, ewk_context_cookie_manager_get(context));
-}
-
-TEST_F(EWK2UnitTestBase, ewk_context_favicon_database_get)
-{
-    Ewk_Context* context = ewk_view_context_get(webView());
-    Ewk_Favicon_Database* faviconDatabase = ewk_context_favicon_database_get(context);
-    ASSERT_TRUE(faviconDatabase);
-    ASSERT_EQ(faviconDatabase, ewk_context_favicon_database_get(context));
+    ASSERT_EQ(cookieManager, ewk_context_cookie_manager_get(ewk_context_default_get()));
 }
 
 static void schemeRequestCallback(Ewk_Url_Scheme_Request* request, void* userData)
@@ -74,109 +63,7 @@ static void schemeRequestCallback(Ewk_Url_Scheme_Request* request, void* userDat
 
 TEST_F(EWK2UnitTestBase, ewk_context_url_scheme_register)
 {
-    ewk_context_url_scheme_register(ewk_view_context_get(webView()), "fooscheme", schemeRequestCallback, 0);
+    ewk_context_url_scheme_register(ewk_context_default_get(), "fooscheme", schemeRequestCallback, 0);
     loadUrlSync("fooscheme:MyPath");
     ASSERT_STREQ(ewk_view_title_get(webView()), "Foo");
 }
-
-struct VibrationCbData {
-    bool didReceiveVibrateCallback; // Whether the vibration event received.
-    bool didReceiveCancelVibrationCallback; // Whether the cancel vibration event received.
-    unsigned vibrateCalledCount; // Vibrate callbacks count.
-    uint64_t expectedVibrationTime; // Expected vibration time.
-};
-
-static void vibrateCallback(uint64_t vibrationTime, void* userData)
-{
-    VibrationCbData* data = static_cast<VibrationCbData*>(userData);
-    if (vibrationTime == data->expectedVibrationTime)
-        data->didReceiveVibrateCallback = true;
-    data->vibrateCalledCount++;
-}
-
-static void cancelVibrationCallback(void* userData)
-{
-    VibrationCbData* data = static_cast<VibrationCbData*>(userData);
-    data->didReceiveCancelVibrationCallback = true;
-}
-
-static void loadVibrationHTMLString(Evas_Object* webView, const char* vibrationPattern, bool waitForVibrationEvent, VibrationCbData* data)
-{
-    const char* content =
-        "<html><head><script type='text/javascript'>function vibrate() { navigator.vibrate(%s);"
-        " document.title = \"Loaded\"; }</script></head><body onload='vibrate()'></body></html>";
-
-    data->didReceiveVibrateCallback = false;
-    data->didReceiveCancelVibrationCallback = false;
-    data->vibrateCalledCount = 0;
-    Eina_Strbuf* buffer = eina_strbuf_new();
-    eina_strbuf_append_printf(buffer, content, vibrationPattern);
-    ewk_view_html_string_load(webView, eina_strbuf_string_get(buffer), 0, 0);
-    eina_strbuf_free(buffer);
-
-    if (!waitForVibrationEvent)
-        return;
-
-    while (!data->didReceiveVibrateCallback && !data->didReceiveCancelVibrationCallback)
-        ecore_main_loop_iterate();
-}
-
-TEST_F(EWK2UnitTestBase, ewk_context_vibration_client_callbacks_set)
-{
-    VibrationCbData data = { false, false, 0, 5000 };
-    ewk_context_vibration_client_callbacks_set(ewk_view_context_get(webView()), vibrateCallback, cancelVibrationCallback, &data);
-
-    // Vibrate for 5 seconds.
-    loadVibrationHTMLString(webView(), "5000", true, &data);
-    ASSERT_TRUE(data.didReceiveVibrateCallback);
-
-    // Cancel any existing vibrations.
-    loadVibrationHTMLString(webView(), "0", true, &data);
-    ASSERT_TRUE(data.didReceiveCancelVibrationCallback);
-
-    // This case the pattern will cause the device to vibrate for 200 ms, be still for 100 ms, and then vibrate for 5000 ms.
-    loadVibrationHTMLString(webView(), "[200, 100, 5000]", true, &data);
-    ASSERT_EQ(data.vibrateCalledCount, 2);
-    ASSERT_TRUE(data.didReceiveVibrateCallback);
-
-    // Cancel outstanding vibration pattern.
-    loadVibrationHTMLString(webView(), "[0]", true, &data);
-    ASSERT_TRUE(data.didReceiveCancelVibrationCallback);
-
-    // Stop listening for vibration events, by calling the function with null for the callbacks.
-    ewk_context_vibration_client_callbacks_set(ewk_view_context_get(webView()), 0, 0, &data);
-
-    // Make sure we don't receive vibration event.
-    loadVibrationHTMLString(webView(), "[5000]", false, &data);
-    waitUntilTitleChangedTo("Loaded");
-    ASSERT_STREQ(ewk_view_title_get(webView()), "Loaded");
-    ASSERT_FALSE(data.didReceiveVibrateCallback);
-
-    // Make sure we don't receive cancel vibration event.
-    loadVibrationHTMLString(webView(), "0", false, &data);
-    waitUntilTitleChangedTo("Loaded");
-    ASSERT_STREQ(ewk_view_title_get(webView()), "Loaded");
-    ASSERT_FALSE(data.didReceiveCancelVibrationCallback);
-}
-
-TEST_F(EWK2UnitTestBase, ewk_context_new)
-{
-    Ewk_Context* context = ewk_context_new();
-    ASSERT_TRUE(context);
-    ewk_context_unref(context);
-}
-
-TEST_F(EWK2UnitTestBase, ewk_context_new_with_injected_bundle_path)
-{
-    Ewk_Context* context = ewk_context_new_with_injected_bundle_path(environment->injectedBundleSample());
-    ASSERT_TRUE(context);
-    ewk_context_unref(context);
-}
-
-TEST_F(EWK2UnitTestBase, ewk_context_ref)
-{
-    Ewk_Context* context = ewk_context_new();
-    ASSERT_EQ(context, ewk_context_ref(context));
-    ewk_context_unref(context);
-    ewk_context_unref(context);
-}
diff --git a/Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_context_history_callbacks.cpp b/Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_context_history_callbacks.cpp
deleted file mode 100644 (file)
index f60a16c..0000000
+++ /dev/null
@@ -1,183 +0,0 @@
-/*
- * Copyright (C) 2012 Intel Corporation. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-
-#include "UnitTestUtils/EWK2UnitTestBase.h"
-#include "UnitTestUtils/EWK2UnitTestEnvironment.h"
-#include "UnitTestUtils/EWK2UnitTestServer.h"
-#include <EWebKit2.h>
-#include <Ecore.h>
-#include <gtest/gtest.h>
-
-using namespace EWK2UnitTest;
-
-extern EWK2UnitTestEnvironment* environment;
-
-static const char defaultTitle[] = "Default Testing Web Page";
-
-static const char toBeRedirectedPath[] = "/some_page_to_be_redirected";
-static const char redirectionTargetPath[] = "/redirection_target";
-
-static EWK2UnitTestServer* httpServer()
-{
-    static EWK2UnitTestServer* server = 0;
-
-    if (!server)
-        server = new EWK2UnitTestServer;
-
-    return server;
-}
-
-#define DECLARE_INVOKE_FLAG(functionName) \
-    static bool functionName##Invoked = false;
-
-#define WAS_INVOKED(functionName) \
-    if (functionName##Invoked)    \
-        return;                   \
-    functionName##Invoked = true
-
-#define CHECK_WAS_INVOKED(functionName) \
-    ASSERT_TRUE(functionName##Invoked)
-
-DECLARE_INVOKE_FLAG(navigateWithNavigationData)
-DECLARE_INVOKE_FLAG(performClientRedirect)
-DECLARE_INVOKE_FLAG(performServerRedirect)
-DECLARE_INVOKE_FLAG(updateHistoryTitle)
-DECLARE_INVOKE_FLAG(populateVisitedLinks)
-
-static void navigateWithNavigationData(const Evas_Object* view, Ewk_Navigation_Data* navigationData, void* userData)
-{
-    WAS_INVOKED(navigateWithNavigationData);
-
-    EWK2UnitTestBase* unitTest = static_cast<EWK2UnitTestBase*>(userData);
-    ASSERT_TRUE(unitTest);
-    ASSERT_EQ(unitTest->webView(), view);
-    // FIXME: WebFrameLoaderClient sends empty title.
-    // ASSERT_STREQ(defaultTitle, ewk_navigation_data_title_get(navigationData));
-    ASSERT_STREQ(environment->defaultTestPageUrl(), ewk_navigation_data_url_get(navigationData));
-
-    Ewk_Url_Request* request = ewk_navigation_data_original_request_get(navigationData);
-    ASSERT_STREQ("GET", ewk_url_request_http_method_get(request));
-    ASSERT_STREQ(environment->defaultTestPageUrl(), ewk_url_request_url_get(request));
-    ASSERT_EQ(0, ewk_request_cookies_first_party_get(request));
-}
-
-static void performClientRedirect(const Evas_Object* view, const char* sourceUrl, const char* destinationUrl, void* userData)
-{
-    WAS_INVOKED(performClientRedirect);
-
-    EWK2UnitTestBase* unitTest = static_cast<EWK2UnitTestBase*>(userData);
-    ASSERT_TRUE(unitTest);
-    ASSERT_EQ(unitTest->webView(), view);
-    ASSERT_STREQ(environment->urlForResource("redirect_url_to_default.html").data(), sourceUrl);
-    ASSERT_STREQ(environment->defaultTestPageUrl(), destinationUrl);
-}
-
-static void performServerRedirect(const Evas_Object* view, const char* sourceUrl, const char* destinationUrl, void* userData)
-{
-    WAS_INVOKED(performServerRedirect);
-
-    EWK2UnitTestBase* unitTest = static_cast<EWK2UnitTestBase*>(userData);
-    ASSERT_TRUE(unitTest);
-    ASSERT_EQ(unitTest->webView(), view);
-    ASSERT_STREQ(httpServer()->getURLForPath(toBeRedirectedPath).data(), sourceUrl);
-    ASSERT_STREQ(httpServer()->getURLForPath(redirectionTargetPath).data(), destinationUrl);
-}
-
-static void updateHistoryTitle(const Evas_Object* view, const char* title, const char* url, void* userData)
-{
-    WAS_INVOKED(updateHistoryTitle);
-
-    EWK2UnitTestBase* unitTest = static_cast<EWK2UnitTestBase*>(userData);
-    ASSERT_TRUE(unitTest);
-    ASSERT_EQ(unitTest->webView(), view);
-    ASSERT_STREQ(defaultTitle, title);
-    ASSERT_STREQ(environment->defaultTestPageUrl(), url);
-}
-
-static void populateVisitedLinks(void* userData)
-{
-    WAS_INVOKED(populateVisitedLinks);
-
-    EWK2UnitTestBase* unitTest = static_cast<EWK2UnitTestBase*>(userData);
-    ASSERT_TRUE(unitTest);
-}
-
-static void onLoadFinishedForRedirection(void* userData, Evas_Object*, void*)
-{
-    int* countLoadFinished = static_cast<int*>(userData);
-    --(*countLoadFinished);
-}
-
-static void serverCallbackRedirection(SoupServer*, SoupMessage* message, const char* path, GHashTable*, SoupClientContext*, gpointer)
-{
-    if (message->method != SOUP_METHOD_GET) {
-        soup_message_set_status(message, SOUP_STATUS_NOT_IMPLEMENTED);
-        return;
-    }
-
-    if (strcmp(path, redirectionTargetPath)) { // Redirect if 'path' is not equal to 'redirectionTargetPath'.
-        soup_message_set_status(message, SOUP_STATUS_TEMPORARY_REDIRECT);
-        soup_message_headers_append(message->response_headers, "Location", httpServer()->getURLForPath(redirectionTargetPath).data());
-        return;
-    }
-
-    soup_message_set_status(message, SOUP_STATUS_OK);
-    Eina_Strbuf* body = eina_strbuf_new();
-    eina_strbuf_append_printf(body, "<html><title>Redirection Target</title></html>");
-    const size_t bodyLength = eina_strbuf_length_get(body);
-    soup_message_body_append(message->response_body, SOUP_MEMORY_TAKE, eina_strbuf_string_steal(body), bodyLength);
-    eina_strbuf_free(body);
-
-    soup_message_body_complete(message->response_body);
-}
-
-TEST_F(EWK2UnitTestBase, ewk_context_history_callbacks_set)
-{
-    ewk_context_history_callbacks_set(ewk_view_context_get(webView()), navigateWithNavigationData, performClientRedirect, performServerRedirect, updateHistoryTitle, populateVisitedLinks, this);
-
-    // Test navigation.
-    ASSERT_TRUE(loadUrlSync(environment->defaultTestPageUrl()));
-    CHECK_WAS_INVOKED(navigateWithNavigationData);
-    CHECK_WAS_INVOKED(updateHistoryTitle);
-    CHECK_WAS_INVOKED(populateVisitedLinks);
-
-    // Test client redirect.
-    int countLoadFinished = 2;
-    evas_object_smart_callback_add(webView(), "load,finished", onLoadFinishedForRedirection, &countLoadFinished);
-    ewk_view_url_set(webView(), environment->urlForResource("redirect_url_to_default.html").data());
-    while (countLoadFinished)
-        ecore_main_loop_iterate();
-    evas_object_smart_callback_del(webView(), "load,finished", onLoadFinishedForRedirection);
-    CHECK_WAS_INVOKED(performClientRedirect);
-
-    // Test server redirect.
-    httpServer()->run(serverCallbackRedirection);
-
-    ASSERT_TRUE(loadUrlSync(httpServer()->getURLForPath(toBeRedirectedPath).data()));
-    CHECK_WAS_INVOKED(performServerRedirect);
-}
-
old mode 100755 (executable)
new mode 100644 (file)
index d97edea..7dbd496
@@ -65,7 +65,7 @@ static void serverCallback(SoupServer* server, SoupMessage* message, const char*
     soup_message_body_complete(message->response_body);
 }
 
-static void getAcceptPolicyCallback(Ewk_Cookie_Accept_Policy policy, Ewk_Error* error, void* event_info)
+static void getAcceptPolicyCallback(Ewk_Cookie_Accept_Policy policy, Ewk_Web_Error* error, void* event_info)
 {
     ASSERT_FALSE(error);
     Ewk_Cookie_Accept_Policy* ret = static_cast<Ewk_Cookie_Accept_Policy*>(event_info);
@@ -81,7 +81,7 @@ static Ewk_Cookie_Accept_Policy getAcceptPolicy(Ewk_Cookie_Manager* manager)
     return policy;
 }
 
-static void getHostnamesWithCookiesCallback(Eina_List* hostnames, Ewk_Error* error, void* event_info)
+static void getHostnamesWithCookiesCallback(Eina_List* hostnames, Ewk_Web_Error* error, void* event_info)
 {
     ASSERT_FALSE(error);
 
@@ -121,12 +121,12 @@ TEST_F(EWK2UnitTestBase, ewk_cookie_manager_accept_policy)
     OwnPtr<EWK2UnitTestServer> httpServer = adoptPtr(new EWK2UnitTestServer);
     httpServer->run(serverCallback);
 
-    Ewk_Cookie_Manager* cookieManager = ewk_context_cookie_manager_get(ewk_view_context_get(webView()));
+    Ewk_Cookie_Manager* cookieManager = ewk_context_cookie_manager_get(ewk_context_default_get());
     ASSERT_TRUE(cookieManager);
 
     // Default policy is EWK_COOKIE_ACCEPT_POLICY_NO_THIRD_PARTY.
     ASSERT_EQ(getAcceptPolicy(cookieManager), EWK_COOKIE_ACCEPT_POLICY_NO_THIRD_PARTY);
-    loadUrlSync(httpServer->getURLForPath("/index.html").data());
+    loadUrlSync(httpServer->getURIForPath("/index.html").data());
 
     Eina_List* hostnames = getHostnamesWithCookies(cookieManager);
     ASSERT_EQ(eina_list_count(hostnames), 1);
@@ -137,7 +137,7 @@ TEST_F(EWK2UnitTestBase, ewk_cookie_manager_accept_policy)
     // Change policy to EWK_COOKIE_ACCEPT_POLICY_ALWAYS
     ewk_cookie_manager_accept_policy_set(cookieManager, EWK_COOKIE_ACCEPT_POLICY_ALWAYS);
     ASSERT_EQ(getAcceptPolicy(cookieManager), EWK_COOKIE_ACCEPT_POLICY_ALWAYS);
-    loadUrlSync(httpServer->getURLForPath("/index.html").data());
+    loadUrlSync(httpServer->getURIForPath("/index.html").data());
 
     hostnames = getHostnamesWithCookies(cookieManager);
     ASSERT_EQ(eina_list_count(hostnames), 2);
@@ -148,7 +148,8 @@ TEST_F(EWK2UnitTestBase, ewk_cookie_manager_accept_policy)
 
     // Change policy to EWK_COOKIE_ACCEPT_POLICY_NEVER
     ewk_cookie_manager_accept_policy_set(cookieManager, EWK_COOKIE_ACCEPT_POLICY_NEVER);
-    loadUrlSync(httpServer->getURLForPath("/index.html").data());
+    ASSERT_EQ(getAcceptPolicy(cookieManager), EWK_COOKIE_ACCEPT_POLICY_NEVER);
+    loadUrlSync(httpServer->getURIForPath("/index.html").data());
     ASSERT_EQ(countHostnamesWithCookies(cookieManager), 0);
 }
 
@@ -163,7 +164,7 @@ TEST_F(EWK2UnitTestBase, ewk_cookie_manager_changes_watch)
     OwnPtr<EWK2UnitTestServer> httpServer = adoptPtr(new EWK2UnitTestServer);
     httpServer->run(serverCallback);
 
-    Ewk_Cookie_Manager* cookieManager = ewk_context_cookie_manager_get(ewk_view_context_get(webView()));
+    Ewk_Cookie_Manager* cookieManager = ewk_context_cookie_manager_get(ewk_context_default_get());
     ASSERT_TRUE(cookieManager);
 
     ewk_cookie_manager_accept_policy_set(cookieManager, EWK_COOKIE_ACCEPT_POLICY_ALWAYS);
@@ -174,7 +175,7 @@ TEST_F(EWK2UnitTestBase, ewk_cookie_manager_changes_watch)
     ewk_cookie_manager_changes_watch(cookieManager, onCookiesChanged, &cookiesChanged);
 
     // Check for cookie changes notifications
-    loadUrlSync(httpServer->getURLForPath("/index.html").data());
+    loadUrlSync(httpServer->getURIForPath("/index.html").data());
 
     while (!cookiesChanged)
         ecore_main_loop_iterate();
@@ -189,7 +190,7 @@ TEST_F(EWK2UnitTestBase, ewk_cookie_manager_changes_watch)
     // Stop watching for notifications
     ewk_cookie_manager_changes_watch(cookieManager, 0, 0);
     cookiesChanged = false;
-    loadUrlSync(httpServer->getURLForPath("/index.html").data());
+    loadUrlSync(httpServer->getURIForPath("/index.html").data());
     ASSERT_EQ(countHostnamesWithCookies(cookieManager), 2);
     ASSERT_FALSE(cookiesChanged);
 
@@ -203,7 +204,7 @@ TEST_F(EWK2UnitTestBase, ewk_cookie_manager_changes_watch)
     ASSERT_TRUE(mktemp(textStorage2));
 
     ewk_cookie_manager_persistent_storage_set(cookieManager, textStorage1, EWK_COOKIE_PERSISTENT_STORAGE_TEXT);
-    loadUrlSync(httpServer->getURLForPath("/index.html").data());
+    loadUrlSync(httpServer->getURIForPath("/index.html").data());
     ASSERT_EQ(countHostnamesWithCookies(cookieManager), 2);
 
     cookiesChanged = false;
@@ -226,13 +227,13 @@ TEST_F(EWK2UnitTestBase, ewk_cookie_manager_cookies_delete)
     OwnPtr<EWK2UnitTestServer> httpServer = adoptPtr(new EWK2UnitTestServer);
     httpServer->run(serverCallback);
 
-    Ewk_Cookie_Manager* cookieManager = ewk_context_cookie_manager_get(ewk_view_context_get(webView()));
+    Ewk_Cookie_Manager* cookieManager = ewk_context_cookie_manager_get(ewk_context_default_get());
     ASSERT_TRUE(cookieManager);
 
     ewk_cookie_manager_accept_policy_set(cookieManager, EWK_COOKIE_ACCEPT_POLICY_ALWAYS);
     ASSERT_EQ(getAcceptPolicy(cookieManager), EWK_COOKIE_ACCEPT_POLICY_ALWAYS);
 
-    loadUrlSync(httpServer->getURLForPath("/index.html").data());
+    loadUrlSync(httpServer->getURIForPath("/index.html").data());
     Eina_List* hostnames = getHostnamesWithCookies(cookieManager);
     ASSERT_EQ(eina_list_count(hostnames), 2);
     freeHostNames(hostnames);
@@ -249,7 +250,7 @@ TEST_F(EWK2UnitTestBase, ewk_cookie_manager_cookies_delete)
     ASSERT_EQ(countHostnamesWithCookies(cookieManager), 0);
 
     // Get all cookies again
-    loadUrlSync(httpServer->getURLForPath("/index.html").data());
+    loadUrlSync(httpServer->getURIForPath("/index.html").data());
     ASSERT_EQ(countHostnamesWithCookies(cookieManager), 2);
 
     // Clear all cookies
@@ -268,7 +269,7 @@ TEST_F(EWK2UnitTestBase, ewk_cookie_manager_permanent_storage)
     char sqliteStorage[] = "/tmp/sqlite-cookie.XXXXXX";
     ASSERT_TRUE(mktemp(sqliteStorage));
 
-    Ewk_Cookie_Manager* cookieManager = ewk_context_cookie_manager_get(ewk_view_context_get(webView()));
+    Ewk_Cookie_Manager* cookieManager = ewk_context_cookie_manager_get(ewk_context_default_get());
     ASSERT_TRUE(cookieManager);
 
     ewk_cookie_manager_accept_policy_set(cookieManager, EWK_COOKIE_ACCEPT_POLICY_ALWAYS);
@@ -278,14 +279,14 @@ TEST_F(EWK2UnitTestBase, ewk_cookie_manager_permanent_storage)
     ewk_cookie_manager_persistent_storage_set(cookieManager, textStorage, EWK_COOKIE_PERSISTENT_STORAGE_TEXT);
     ASSERT_EQ(countHostnamesWithCookies(cookieManager), 0);
 
-    loadUrlSync(httpServer->getURLForPath("/index.html").data());
+    loadUrlSync(httpServer->getURIForPath("/index.html").data());
     ASSERT_EQ(countHostnamesWithCookies(cookieManager), 2);
 
     // SQLite storage using a new file.
     ewk_cookie_manager_persistent_storage_set(cookieManager, sqliteStorage, EWK_COOKIE_PERSISTENT_STORAGE_SQLITE);
     ASSERT_EQ(countHostnamesWithCookies(cookieManager), 0);
 
-    loadUrlSync(httpServer->getURLForPath("/index.html").data());
+    loadUrlSync(httpServer->getURIForPath("/index.html").data());
     ASSERT_EQ(countHostnamesWithCookies(cookieManager), 2);
 
     // Text storage using an existing file.
index 8a35c3d..c9452dc 100644 (file)
@@ -131,7 +131,7 @@ static void on_download_cancelled(void* userData, Evas_Object* webview, void* ev
 static void on_download_failed(void* userData, Evas_Object* webview, void* eventInfo)
 {
     Ewk_Download_Job_Error* downloadError = static_cast<Ewk_Download_Job_Error*>(eventInfo);
-    fprintf(stderr, "Download error: %s\n", ewk_error_description_get(downloadError->error));
+    fprintf(stderr, "Download error: %s\n", ewk_web_error_description_get(downloadError->error));
     ecore_main_loop_quit();
     FAIL();
 }
@@ -159,7 +159,7 @@ TEST_F(EWK2UnitTestBase, ewk_download)
     char destinationPath[] = "/tmp/pdf-file.XXXXXX";
     ASSERT_TRUE(mktemp(destinationPath));
 
-    CString fileUrl = httpServer->getURLForPath(testFilePath);
+    CString fileUrl = httpServer->getURIForPath(testFilePath);
 
     DownloadTestData userData = { fileUrl.data(), destinationPath };
     ASSERT_FALSE(fileExists(destinationPath));
diff --git a/Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_eina_shared_string.cpp b/Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_eina_shared_string.cpp
deleted file mode 100644 (file)
index c820239..0000000
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- * Copyright (C) 2012 Intel Corporation. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-
-#include "UnitTestUtils/EWK2UnitTestBase.h"
-#include "UnitTestUtils/EWK2UnitTestEnvironment.h"
-#include "WKEinaSharedString.h"
-#include <EWebKit2.h>
-#include <Ecore.h>
-#include <WebKit2/WKString.h>
-#include <WebKit2/WKURL.h>
-#include <gtest/gtest.h>
-
-using namespace EWK2UnitTest;
-
-extern EWK2UnitTestEnvironment* environment;
-
-// Use macro here instead of global variables in order not to have always the same pointers.
-#define testString "I'm test string!"
-#define anotherTestString "I'm another test string!"
-#define testUrl "file:///path/somewhere"
-
-static inline void checkString(const WKEinaSharedString& string, const char* pattern)
-{
-    ASSERT_EQ(string.isNull(), pattern ? false : true);
-    ASSERT_EQ(string.length(), pattern ? strlen(pattern) : 0); // Compare length.
-    ASSERT_EQ(string, pattern); // Compare values. Check '==' operator with WKEinaSharedString and plain string.
-    ASSERT_STREQ(string, pattern); // Compare values. Check 'const char*' operator.
-}
-
-TEST_F(EWK2UnitTestBase, constructEmpty)
-{
-    WKEinaSharedString emptyString;
-    checkString(emptyString, 0);
-}
-
-TEST_F(EWK2UnitTestBase, constructFromPlainString)
-{
-    WKEinaSharedString emptyString(testString);
-    checkString(emptyString, testString);
-}
-
-TEST_F(EWK2UnitTestBase, constructFromWKString)
-{
-    WKEinaSharedString string(AdoptWK, WKStringCreateWithUTF8CString(testString));
-    checkString(string, testString);
-}
-
-TEST_F(EWK2UnitTestBase, constructFromWKURL)
-{
-    WKEinaSharedString string(AdoptWK, WKURLCreateWithUTF8CString(testUrl));
-    checkString(string, testUrl);
-}
-
-TEST_F(EWK2UnitTestBase, constructFromEinaStringShare)
-{
-    WKEinaSharedString string(WKEinaSharedString::adopt(eina_stringshare_add(testString)));
-    checkString(string, testString);
-
-    string = WKEinaSharedString::adopt(eina_stringshare_add(anotherTestString));
-    checkString(string, anotherTestString);
-
-    string = string;
-    checkString(string, anotherTestString);
-}
-
-TEST_F(EWK2UnitTestBase, costructCopy)
-{
-    WKEinaSharedString string(testString);
-    WKEinaSharedString copyString(string);
-    checkString(string, testString);
-    checkString(copyString, testString);
-    ASSERT_EQ(string, copyString); // Check '==' operator with two instances of WKEinaSharedString.
-}
-
-TEST_F(EWK2UnitTestBase, comparisonOperators)
-{
-    WKEinaSharedString string(testString);
-    WKEinaSharedString sameString(testString);
-    WKEinaSharedString anotherString(anotherTestString);
-
-    ASSERT_EQ(string, sameString); // Check '==' operator with two instances of WKEinaSharedString.
-    ASSERT_NE(string, anotherString); // Check '!=' operator with two instances of WKEinaSharedString.
-
-    const char* explicitlySharedString = eina_stringshare_add(testString);
-    ASSERT_EQ(static_cast<const char*>(string), explicitlySharedString); // Compare pointers.
-    ASSERT_STREQ(string, explicitlySharedString); // Compare values.
-    eina_stringshare_del(explicitlySharedString);
-
-    ASSERT_EQ(string, string); // Self-comparison.
-}
-
-TEST_F(EWK2UnitTestBase, assignmentOperators)
-{
-    WKEinaSharedString string;
-
-    string = testString;
-    checkString(string, testString);
-
-    WKEinaSharedString anotherString(anotherTestString);
-    string = anotherString;
-    checkString(string, anotherTestString);
-    ASSERT_EQ(string, anotherString);
-
-    string = string; // Check that self-assignment does not break WKEinaSharedString internal data.
-    checkString(string, anotherTestString);
-}
diff --git a/Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_favicon_database.cpp b/Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_favicon_database.cpp
deleted file mode 100644 (file)
index 7a57b91..0000000
+++ /dev/null
@@ -1,169 +0,0 @@
-/*
- * Copyright (C) 2012 Intel Corporation. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-
-#include "UnitTestUtils/EWK2UnitTestBase.h"
-#include "UnitTestUtils/EWK2UnitTestEnvironment.h"
-#include "UnitTestUtils/EWK2UnitTestServer.h"
-#include "WKEinaSharedString.h"
-#include <EWebKit2.h>
-#include <Ecore.h>
-#include <wtf/OwnPtr.h>
-#include <wtf/PassOwnPtr.h>
-
-using namespace EWK2UnitTest;
-
-extern EWK2UnitTestEnvironment* environment;
-
-static void serverCallback(SoupServer* httpServer, SoupMessage* message, const char* path, GHashTable*, SoupClientContext*, gpointer)
-{
-    if (message->method != SOUP_METHOD_GET) {
-        soup_message_set_status(message, SOUP_STATUS_NOT_IMPLEMENTED);
-        return;
-    }
-
-    if (!strcmp(path, "/favicon.ico")) {
-        CString faviconPath = environment->pathForResource("blank.ico");
-        Eina_File* f = eina_file_open(faviconPath.data(), false);
-        if (!f) {
-            soup_message_set_status(message, SOUP_STATUS_NOT_FOUND);
-            soup_message_body_complete(message->response_body);
-            return;
-        }
-
-        size_t fileSize = eina_file_size_get(f);
-
-        void* contents = eina_file_map_all(f, EINA_FILE_POPULATE);
-        if (!contents) {
-            soup_message_set_status(message, SOUP_STATUS_NOT_FOUND);
-            soup_message_body_complete(message->response_body);
-            return;
-        }
-
-        soup_message_body_append(message->response_body, SOUP_MEMORY_COPY, contents, fileSize);
-        soup_message_set_status(message, SOUP_STATUS_OK);
-        soup_message_body_complete(message->response_body);
-
-        eina_file_map_free(f, contents);
-        eina_file_close(f);
-        return;
-    }
-
-    const char contents[] = "<html><body>favicon test</body></html>";
-    soup_message_set_status(message, SOUP_STATUS_OK);
-    soup_message_body_append(message->response_body, SOUP_MEMORY_COPY, contents, strlen(contents));
-    soup_message_body_complete(message->response_body);
-}
-
-static void onIconChanged(void* userData, Evas_Object*, void* eventInfo)
-{
-    bool* iconChanged = static_cast<bool*>(userData);
-    *iconChanged = true;
-}
-
-TEST_F(EWK2UnitTestBase, ewk_favicon_database_url_get)
-{
-    OwnPtr<EWK2UnitTestServer> httpServer = adoptPtr(new EWK2UnitTestServer);
-    httpServer->run(serverCallback);
-
-    bool iconChanged = false;
-    evas_object_smart_callback_add(webView(), "icon,changed", onIconChanged, &iconChanged);
-
-    // We need to load the page first to ensure the icon data will be
-    // in the database in case there's an associated favicon.
-    ASSERT_TRUE(loadUrlSync(httpServer->getURLForPath("/").data()));
-
-    while (!iconChanged)
-        ecore_main_loop_iterate();
-
-    ASSERT_TRUE(iconChanged);
-    evas_object_smart_callback_del(webView(), "icon,changed", onIconChanged);
-
-    // Check the API retrieving a favicon URL.
-    Ewk_Context* context = ewk_view_context_get(webView());
-    Ewk_Favicon_Database* faviconDatabase = ewk_context_favicon_database_get(context);
-    ASSERT_TRUE(faviconDatabase);
-
-    CString expectedFaviconURL = httpServer->getURLForPath("/favicon.ico");
-    WKEinaSharedString iconURL = ewk_favicon_database_icon_url_get(faviconDatabase, ewk_view_url_get(webView()));
-    EXPECT_STREQ(expectedFaviconURL.data(), iconURL);
-
-    const char* viewIconURL = ewk_view_icon_url_get(webView());
-    EXPECT_STREQ(expectedFaviconURL.data(), viewIconURL);
-}
-
-static void onIconDataReady(const char* page_url, Evas_Object* icon, void* event_info)
-{
-    Evas_Object** returnIcon = static_cast<Evas_Object**>(event_info);
-    if (icon)
-        evas_object_ref(icon);
-    *returnIcon = icon;
-}
-
-struct IconRequestData {
-    Evas_Object* view;
-    Evas_Object* icon;
-};
-
-static void requestFaviconData(void* userData, Evas_Object*, void* eventInfo)
-{
-    IconRequestData* data = static_cast<IconRequestData*>(userData);
-
-    // Check the API retrieving a valid favicon.
-    Ewk_Context* context = ewk_view_context_get(data->view);
-    Ewk_Favicon_Database* faviconDatabase = ewk_context_favicon_database_get(context);
-    ASSERT_TRUE(faviconDatabase);
-
-    Evas* evas = evas_object_evas_get(data->view);
-    ASSERT_TRUE(ewk_favicon_database_async_icon_get(faviconDatabase, ewk_view_url_get(data->view), evas, onIconDataReady, &data->icon));
-}
-
-TEST_F(EWK2UnitTestBase, ewk_favicon_database_async_icon_get)
-{
-    OwnPtr<EWK2UnitTestServer> httpServer = adoptPtr(new EWK2UnitTestServer);
-    httpServer->run(serverCallback);
-
-    IconRequestData data = { webView(), 0 };
-    evas_object_smart_callback_add(webView(), "icon,changed", requestFaviconData, &data);
-
-    // We need to load the page first to ensure the icon data will be
-    // in the database in case there's an associated favicon.
-    ASSERT_TRUE(loadUrlSync(httpServer->getURLForPath("/").data()));
-
-    while (!data.icon)
-        ecore_main_loop_iterate();
-
-    ASSERT_TRUE(data.icon);
-    evas_object_smart_callback_del(webView(), "icon,changed", requestFaviconData);
-
-    // It is a 16x16 favicon.
-    int width, height;
-    evas_object_image_size_get(data.icon, &width, &height);
-    EXPECT_EQ(16, width);
-    EXPECT_EQ(16, height);
-
-    evas_object_unref(data.icon);
-}
diff --git a/Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_intents.cpp b/Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_intents.cpp
deleted file mode 100644 (file)
index fdf7fdf..0000000
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * Copyright (C) 2012 Intel Corporation. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-
-#include "UnitTestUtils/EWK2UnitTestBase.h"
-#include "UnitTestUtils/EWK2UnitTestEnvironment.h"
-#include "UnitTestUtils/EWK2UnitTestServer.h"
-#include <EWebKit2.h>
-#include <Ecore.h>
-
-using namespace EWK2UnitTest;
-
-extern EWK2UnitTestEnvironment* environment;
-
-static void onIntentServiceRegistration(void* userData, Evas_Object*, void* eventInfo)
-{
-    bool* intentRegistered = static_cast<bool*>(userData);
-    ASSERT_FALSE(*intentRegistered);
-    *intentRegistered = true;
-
-    Ewk_Intent_Service* service = static_cast<Ewk_Intent_Service*>(eventInfo);
-    ASSERT_TRUE(service);
-    EXPECT_STREQ(ewk_intent_service_action_get(service), "action");
-    EXPECT_STREQ(ewk_intent_service_type_get(service), "type");
-    EXPECT_STREQ(ewk_intent_service_title_get(service), "Title");
-    EXPECT_STREQ(ewk_intent_service_href_get(service), "http://example.com/service");
-    EXPECT_STREQ(ewk_intent_service_disposition_get(service), "inline");
-}
-
-TEST_F(EWK2UnitTestBase, ewk_intent_service_registration)
-{
-    bool intentRegistered = false;
-    evas_object_smart_callback_add(webView(), "intent,service,register", onIntentServiceRegistration, &intentRegistered);
-    loadUrlSync(environment->urlForResource("intent-service.html").data());
-    evas_object_smart_callback_del(webView(), "intent,service,register", onIntentServiceRegistration);
-    ASSERT_TRUE(intentRegistered);
-}
-
-int stringSortCb(const void* d1, const void* d2)
-{
-    return strcmp(static_cast<const char*>(d1), static_cast<const char*>(d2));
-}
-
-static void onIntentReceived(void* userData, Evas_Object*, void* eventInfo)
-{
-    unsigned* intentReceivedCount = static_cast<unsigned*>(userData);
-    ASSERT_GE(*intentReceivedCount, 0);
-    ASSERT_LE(*intentReceivedCount, 1);
-    ++(*intentReceivedCount);
-
-    Ewk_Intent* intent = static_cast<Ewk_Intent*>(eventInfo);
-    ASSERT_TRUE(intent);
-
-    if (*intentReceivedCount == 1) {
-        // First intent.
-        EXPECT_STREQ(ewk_intent_action_get(intent), "action1");
-        EXPECT_STREQ(ewk_intent_type_get(intent), "mime/type1");
-        EXPECT_STREQ(ewk_intent_service_get(intent), "http://service1.com/");
-        EXPECT_STREQ(ewk_intent_extra_get(intent, "key1"), "value1");
-        EXPECT_STREQ(ewk_intent_extra_get(intent, "key2"), "value2");
-    } else {
-        // Second intent.
-        EXPECT_STREQ(ewk_intent_action_get(intent), "action2");
-        EXPECT_STREQ(ewk_intent_type_get(intent), "mime/type2");
-        Eina_List* suggestions = ewk_intent_suggestions_get(intent);
-        ASSERT_TRUE(suggestions);
-        ASSERT_EQ(eina_list_count(suggestions), 2);
-        // We need to sort the suggestions since Intent is using a HashSet internally.
-        suggestions = eina_list_sort(suggestions, 2, stringSortCb);
-        EXPECT_STREQ(static_cast<const char*>(eina_list_nth(suggestions, 0)), "http://service1.com/");
-        EXPECT_STREQ(static_cast<const char*>(eina_list_nth(suggestions, 1)), "http://service2.com/");
-    }
-}
-
-TEST_F(EWK2UnitTestBase, ewk_intent_request)
-{
-    unsigned intentReceivedCount = 0;
-    evas_object_smart_callback_add(webView(), "intent,request,new", onIntentReceived, &intentReceivedCount);
-    loadUrlSync(environment->urlForResource("intent-request.html").data());
-
-    // A user gesture is required for the intent to start.
-    mouseClick(5, 5);
-    while (intentReceivedCount != 1)
-        ecore_main_loop_iterate();
-    ASSERT_EQ(intentReceivedCount, 1);
-
-    // Generate a second intent request.
-    mouseClick(5, 5);
-    while (intentReceivedCount != 2)
-        ecore_main_loop_iterate();
-    ASSERT_EQ(intentReceivedCount, 2);
-    evas_object_smart_callback_del(webView(), "intent,request,new", onIntentReceived);
-}
old mode 100755 (executable)
new mode 100644 (file)
index dd0a6e7..9119bd1
 
 using namespace EWK2UnitTest;
 
-TEST_F(EWK2UnitTestBase, ewk_settings_fullscreen_enabled)
-{
-    Ewk_Settings* settings = ewk_view_settings_get(webView());
-
-#if ENABLE(FULLSCREEN_API)
-    ASSERT_TRUE(ewk_settings_fullscreen_enabled_get(settings));
-
-    ASSERT_TRUE(ewk_settings_fullscreen_enabled_set(settings, EINA_TRUE));
-    ASSERT_TRUE(ewk_settings_fullscreen_enabled_get(settings));
-
-    ASSERT_TRUE(ewk_settings_fullscreen_enabled_set(settings, EINA_FALSE));
-    ASSERT_FALSE(ewk_settings_fullscreen_enabled_get(settings));
-#else
-    ASSERT_FALSE(ewk_settings_fullscreen_enabled_get(settings));
-
-    ASSERT_FALSE(ewk_settings_fullscreen_enabled_set(settings, EINA_TRUE));
-    ASSERT_FALSE(ewk_settings_fullscreen_enabled_get(settings));
-
-    ASSERT_FALSE(ewk_settings_fullscreen_enabled_set(settings, EINA_FALSE));
-    ASSERT_FALSE(ewk_settings_fullscreen_enabled_get(settings));
-#endif
-}
-
 TEST_F(EWK2UnitTestBase, ewk_settings_javascript_enabled)
 {
     Ewk_Settings* settings = ewk_view_settings_get(webView());
old mode 100755 (executable)
new mode 100644 (file)
index b8d797f..1d3062f
 using namespace EWK2UnitTest;
 
 extern EWK2UnitTestEnvironment* environment;
-bool fullScreenCallbackCalled;
-
-TEST_F(EWK2UnitTestBase, ewk_view_type_check)
-{
-    ASSERT_FALSE(ewk_view_context_get(0));
-
-    Evas_Object* rectangle = evas_object_rectangle_add(canvas());
-    ASSERT_FALSE(ewk_view_url_set(rectangle, 0));
-}
 
 static void onLoadFinishedForRedirection(void* userData, Evas_Object*, void*)
 {
@@ -117,13 +108,13 @@ TEST_F(EWK2UnitTestBase, ewk_view_navigation)
     httpServer->run(serverCallbackNavigation);
 
     // Visit Page1
-    loadUrlSync(httpServer->getURLForPath("/Page1").data());
+    loadUrlSync(httpServer->getURIForPath("/Page1").data());
     ASSERT_STREQ(ewk_view_title_get(webView()), "Page1");
     ASSERT_FALSE(ewk_view_back_possible(webView()));
     ASSERT_FALSE(ewk_view_forward_possible(webView()));
 
     // Visit Page2
-    loadUrlSync(httpServer->getURLForPath("/Page2").data());
+    loadUrlSync(httpServer->getURIForPath("/Page2").data());
     ASSERT_STREQ(ewk_view_title_get(webView()), "Page2");
     ASSERT_TRUE(ewk_view_back_possible(webView()));
     ASSERT_FALSE(ewk_view_forward_possible(webView()));
@@ -204,474 +195,6 @@ TEST_F(EWK2UnitTestBase, ewk_view_form_submission_request)
     evas_object_smart_callback_del(webView(), "form,submission,request", onFormAboutToBeSubmitted);
 }
 
-static inline void checkBasicPopupMenuItem(Ewk_Popup_Menu_Item* item, const char* title, bool enabled)
-{
-    EXPECT_EQ(ewk_popup_menu_item_type_get(item), EWK_POPUP_MENU_ITEM);
-    EXPECT_STREQ(ewk_popup_menu_item_text_get(item), title);
-    EXPECT_EQ(ewk_popup_menu_item_enabled_get(item), enabled);
-}
-
-static Eina_Bool showPopupMenu(Ewk_View_Smart_Data* smartData, Eina_Rectangle, Ewk_Text_Direction, double, Eina_List* list, int selectedIndex)
-{
-    EXPECT_EQ(selectedIndex, 2);
-
-    Ewk_Popup_Menu_Item* item = static_cast<Ewk_Popup_Menu_Item*>(eina_list_nth(list, 0));
-    checkBasicPopupMenuItem(item, "first", true);
-    EXPECT_EQ(ewk_popup_menu_item_text_direction_get(item), EWK_TEXT_DIRECTION_LEFT_TO_RIGHT);
-    EXPECT_STREQ(ewk_popup_menu_item_tooltip_get(item), "");
-    EXPECT_STREQ(ewk_popup_menu_item_accessibility_text_get(item), "");
-    EXPECT_FALSE(ewk_popup_menu_item_is_label_get(item));
-    EXPECT_FALSE(ewk_popup_menu_item_selected_get(item));
-
-    item = static_cast<Ewk_Popup_Menu_Item*>(eina_list_nth(list, 1));
-    checkBasicPopupMenuItem(item, "second", false);
-    EXPECT_EQ(ewk_popup_menu_item_enabled_get(item), false);
-
-    item = static_cast<Ewk_Popup_Menu_Item*>(eina_list_nth(list, 2));
-    checkBasicPopupMenuItem(item, "third", true);
-    EXPECT_EQ(ewk_popup_menu_item_text_direction_get(item), EWK_TEXT_DIRECTION_RIGHT_TO_LEFT);
-    EXPECT_STREQ(ewk_popup_menu_item_tooltip_get(item), "tooltip");
-    EXPECT_STREQ(ewk_popup_menu_item_accessibility_text_get(item), "aria");
-    EXPECT_TRUE(ewk_popup_menu_item_selected_get(item));
-
-    item = static_cast<Ewk_Popup_Menu_Item*>(eina_list_nth(list, 3));
-    checkBasicPopupMenuItem(item, "label", false);
-    EXPECT_TRUE(ewk_popup_menu_item_is_label_get(item));
-
-    item = static_cast<Ewk_Popup_Menu_Item*>(eina_list_nth(list, 4));
-    checkBasicPopupMenuItem(item, "    forth", true);
-
-    item = static_cast<Ewk_Popup_Menu_Item*>(eina_list_nth(list, 5));
-    EXPECT_EQ(ewk_popup_menu_item_type_get(item), EWK_POPUP_MENU_UNKNOWN);
-    EXPECT_STREQ(ewk_popup_menu_item_text_get(item), 0);
-
-    EXPECT_TRUE(ewk_view_popup_menu_select(smartData->self, 0));
-    return true;
-}
-
-TEST_F(EWK2UnitTestBase, ewk_view_popup_menu_select)
-{
-    const char* selectHTML =
-        "<!doctype html><body><select onchange=\"document.title=this.value;\">"
-        "<option>first</option><option disabled>second</option><option selected dir=\"rtl\" title=\"tooltip\" aria-label=\"aria\">third</option>"
-        "<optgroup label=\"label\"><option>forth</option></optgroup>"
-        "</select></body>";
-
-    ewkViewClass()->popup_menu_show = showPopupMenu;
-
-    ewk_view_html_string_load(webView(), selectHTML, "file:///", 0);
-    waitUntilLoadFinished();
-    mouseClick(30, 20);
-    waitUntilTitleChangedTo("first");
-
-    EXPECT_TRUE(ewk_view_popup_menu_close(webView()));
-    EXPECT_FALSE(ewk_view_popup_menu_select(webView(), 0));
-}
-
-TEST_F(EWK2UnitTestBase, ewk_view_settings_get)
-{
-    Ewk_Settings* settings = ewk_view_settings_get(webView());
-    ASSERT_TRUE(settings);
-    ASSERT_EQ(settings, ewk_view_settings_get(webView()));
-}
-
-TEST_F(EWK2UnitTestBase, ewk_view_mouse_events_enabled)
-{
-    ASSERT_TRUE(ewk_view_mouse_events_enabled_set(webView(), EINA_TRUE));
-    ASSERT_TRUE(ewk_view_mouse_events_enabled_get(webView()));
-
-    ASSERT_TRUE(ewk_view_mouse_events_enabled_set(webView(), 2));
-    ASSERT_TRUE(ewk_view_mouse_events_enabled_get(webView()));
-
-    ASSERT_TRUE(ewk_view_mouse_events_enabled_set(webView(), EINA_FALSE));
-    ASSERT_FALSE(ewk_view_mouse_events_enabled_get(webView()));
-}
-
-static Eina_Bool fullScreenCallback(Ewk_View_Smart_Data* smartData)
-{
-    fullScreenCallbackCalled = true;
-    return false;
-}
-
-static void checkFullScreenProperty(Evas_Object* webView, bool expectedState)
-{
-    if (environment->useX11Window()) {
-        Ewk_View_Smart_Data* smartData = static_cast<Ewk_View_Smart_Data*>(evas_object_smart_data_get(webView));
-        Ecore_Evas* ecoreEvas = ecore_evas_ecore_evas_get(smartData->base.evas);
-        bool windowState = false;
-        while (((windowState = ecore_evas_fullscreen_get(ecoreEvas)) != expectedState))
-            ecore_main_loop_iterate();
-        ASSERT_TRUE(expectedState == windowState);
-    }
-}
-
-TEST_F(EWK2UnitTestBase, ewk_view_full_screen_enter)
-{
-    const char fullscreenHTML[] =
-        "<!doctype html><head><script>function makeFullScreen(){"
-        "var div = document.getElementById(\"fullscreen\");"
-        "div.webkitRequestFullScreen();"
-        "document.title = \"fullscreen entered\";"
-        "}</script></head>"
-        "<body><div id=\"fullscreen\" style=\"width:100px; height:100px\" onclick=\"makeFullScreen()\"></div></body>";
-
-    ewkViewClass()->fullscreen_enter = fullScreenCallback;
-
-    ewk_view_html_string_load(webView(), fullscreenHTML, "file:///", 0);
-    waitUntilLoadFinished();
-    mouseClick(50, 50);
-    waitUntilTitleChangedTo("fullscreen entered");
-    ASSERT_TRUE(fullScreenCallbackCalled);
-    checkFullScreenProperty(webView(), true);
-}
-
-TEST_F(EWK2UnitTestBase, ewk_view_full_screen_exit)
-{
-    const char fullscreenHTML[] =
-        "<!doctype html><head><script>function makeFullScreenAndExit(){"
-        "var div = document.getElementById(\"fullscreen\");"
-        "div.webkitRequestFullScreen();"
-        "document.webkitCancelFullScreen();"
-        "document.title = \"fullscreen exited\";"
-        "}</script></head>"
-        "<body><div id=\"fullscreen\" style=\"width:100px; height:100px\" onclick=\"makeFullScreenAndExit()\"></div></body>";
-
-    ewkViewClass()->fullscreen_exit = fullScreenCallback;
-
-    ewk_view_html_string_load(webView(), fullscreenHTML, "file:///", 0);
-    waitUntilLoadFinished();
-    mouseClick(50, 50);
-    waitUntilTitleChangedTo("fullscreen exited");
-    ASSERT_TRUE(fullScreenCallbackCalled);
-    checkFullScreenProperty(webView(), false);
-}
-
-static struct {
-    const char* expectedMessage;
-    bool called;
-} alertCallbackData;
-
-static struct {
-    const char* expectedMessage;
-    bool result;
-    bool called;
-} confirmCallbackData;
-
-static struct {
-    const char* expectedMessage;
-    const char* expectedDefaultValue;
-    const char* result;
-    bool called;
-} promptCallbackData;
-
-static void checkAlert(Ewk_View_Smart_Data*, const char* message)
-{
-    alertCallbackData.called = true;
-    EXPECT_STREQ(message, alertCallbackData.expectedMessage);
-}
-
-TEST_F(EWK2UnitTestBase, ewk_view_run_javascript_alert)
-{
-    ewkViewClass()->run_javascript_alert = checkAlert;
-
-    const char* alertHTML = "<!doctype html><body onload=\"alert('Alert message');\"></body>";
-    alertCallbackData.expectedMessage = "Alert message";
-    alertCallbackData.called = false;
-    ewk_view_html_string_load(webView(), alertHTML, 0, 0);
-    waitUntilLoadFinished();
-    EXPECT_EQ(alertCallbackData.called, true);
-
-    alertHTML = "<!doctype html><body onload=\"alert('');\"></body>";
-    alertCallbackData.expectedMessage = "";
-    alertCallbackData.called = false;
-    ewk_view_html_string_load(webView(), alertHTML, 0, 0);
-    waitUntilLoadFinished();
-    EXPECT_EQ(alertCallbackData.called, true);
-
-    alertHTML = "<!doctype html><body onload=\"alert(null);\"></body>";
-    alertCallbackData.expectedMessage = "null";
-    alertCallbackData.called = false;
-    ewk_view_html_string_load(webView(), alertHTML, 0, 0);
-    waitUntilLoadFinished();
-    EXPECT_EQ(alertCallbackData.called, true);
-
-    alertHTML = "<!doctype html><body onload=\"alert();\"></body>";
-    alertCallbackData.expectedMessage = "undefined";
-    alertCallbackData.called = false;
-    ewk_view_html_string_load(webView(), alertHTML, 0, 0);
-    waitUntilLoadFinished();
-    EXPECT_EQ(alertCallbackData.called, true);
-
-    ewkViewClass()->run_javascript_alert = 0;
-
-    alertCallbackData.called = false;
-    ewk_view_html_string_load(webView(), alertHTML, 0, 0);
-    waitUntilLoadFinished();
-    EXPECT_EQ(alertCallbackData.called, false);
-}
-
-static Eina_Bool checkConfirm(Ewk_View_Smart_Data*, const char* message)
-{
-    confirmCallbackData.called = true;
-    EXPECT_STREQ(message, confirmCallbackData.expectedMessage);
-    return confirmCallbackData.result;
-}
-
-TEST_F(EWK2UnitTestBase, ewk_view_run_javascript_confirm)
-{
-    ewkViewClass()->run_javascript_confirm = checkConfirm;
-
-    const char* confirmHTML = "<!doctype html><body onload=\"document.title = confirm('Confirm message');\"></body>";
-    confirmCallbackData.expectedMessage = "Confirm message";
-    confirmCallbackData.result = true;
-    confirmCallbackData.called = false;
-    ewk_view_html_string_load(webView(), confirmHTML, 0, 0);
-    waitUntilTitleChangedTo("true");
-    EXPECT_STREQ(ewk_view_title_get(webView()), "true");
-    EXPECT_EQ(confirmCallbackData.called, true);
-
-    confirmCallbackData.expectedMessage = "Confirm message";
-    confirmCallbackData.result = false;
-    confirmCallbackData.called = false;
-    ewk_view_html_string_load(webView(), confirmHTML, 0, 0);
-    waitUntilTitleChangedTo("false");
-    EXPECT_STREQ(ewk_view_title_get(webView()), "false");
-    EXPECT_EQ(confirmCallbackData.called, true);
-
-    confirmHTML = "<!doctype html><body onload=\"document.title = confirm('');\"></body>";
-    confirmCallbackData.expectedMessage = "";
-    confirmCallbackData.result = true;
-    confirmCallbackData.called = false;
-    ewk_view_html_string_load(webView(), confirmHTML, 0, 0);
-    waitUntilTitleChangedTo("true");
-    EXPECT_STREQ(ewk_view_title_get(webView()), "true");
-    EXPECT_EQ(confirmCallbackData.called, true);
-
-    confirmHTML = "<!doctype html><body onload=\"document.title = confirm(null);\"></body>";
-    confirmCallbackData.expectedMessage = "null";
-    confirmCallbackData.result = true;
-    confirmCallbackData.called = false;
-    ewk_view_html_string_load(webView(), confirmHTML, 0, 0);
-    waitUntilTitleChangedTo("true");
-    EXPECT_STREQ(ewk_view_title_get(webView()), "true");
-    EXPECT_EQ(confirmCallbackData.called, true);
-
-    confirmHTML = "<!doctype html><body onload=\"document.title = confirm();\"></body>";
-    confirmCallbackData.expectedMessage = "undefined";
-    confirmCallbackData.result = true;
-    confirmCallbackData.called = false;
-    ewk_view_html_string_load(webView(), confirmHTML, 0, 0);
-    waitUntilTitleChangedTo("true");
-    EXPECT_STREQ(ewk_view_title_get(webView()), "true");
-    EXPECT_EQ(confirmCallbackData.called, true);
-
-    ewkViewClass()->run_javascript_confirm = 0;
-
-    confirmCallbackData.called = false;
-    ewk_view_html_string_load(webView(), confirmHTML, 0, 0);
-    waitUntilTitleChangedTo("false");
-    EXPECT_STREQ(ewk_view_title_get(webView()), "false");
-    EXPECT_EQ(confirmCallbackData.called, false);
-}
-
-static const char* checkPrompt(Ewk_View_Smart_Data*, const char* message, const char* defaultValue)
-{
-    promptCallbackData.called = true;
-    EXPECT_STREQ(message, promptCallbackData.expectedMessage);
-    EXPECT_STREQ(defaultValue, promptCallbackData.expectedDefaultValue);
-
-    if (!promptCallbackData.result)
-        return 0;
-
-    return eina_stringshare_add(promptCallbackData.result);
-}
-
-TEST_F(EWK2UnitTestBase, ewk_view_run_javascript_prompt)
-{
-    static const char promptMessage[] = "Prompt message";
-    static const char promptResult[] = "Prompt result";
-
-    ewkViewClass()->run_javascript_prompt = checkPrompt;
-
-    const char* promptHTML = "<!doctype html><body onload=\"document.title = prompt('Prompt message', 'Prompt default value');\"></body>";
-    promptCallbackData.expectedMessage = promptMessage;
-    promptCallbackData.expectedDefaultValue = "Prompt default value";
-    promptCallbackData.result = promptResult;
-    promptCallbackData.called = false;
-    ewk_view_html_string_load(webView(), promptHTML, 0, 0);
-    waitUntilTitleChangedTo(promptResult);
-    EXPECT_STREQ(ewk_view_title_get(webView()), promptResult);
-    EXPECT_EQ(promptCallbackData.called, true);
-
-    promptHTML = "<!doctype html><body onload=\"document.title = prompt('Prompt message', '');\"></body>";
-    promptCallbackData.expectedMessage = promptMessage;
-    promptCallbackData.expectedDefaultValue = "";
-    promptCallbackData.result = promptResult;
-    promptCallbackData.called = false;
-    ewk_view_html_string_load(webView(), promptHTML, 0, 0);
-    waitUntilTitleChangedTo(promptResult);
-    EXPECT_STREQ(ewk_view_title_get(webView()), promptResult);
-    EXPECT_EQ(promptCallbackData.called, true);
-
-    promptHTML = "<!doctype html><body onload=\"document.title = prompt('Prompt message');\"></body>";
-    promptCallbackData.expectedMessage = promptMessage;
-    promptCallbackData.expectedDefaultValue = "";
-    promptCallbackData.result = promptResult;
-    promptCallbackData.called = false;
-    ewk_view_html_string_load(webView(), promptHTML, 0, 0);
-    waitUntilTitleChangedTo(promptResult);
-    EXPECT_STREQ(ewk_view_title_get(webView()), promptResult);
-    EXPECT_EQ(promptCallbackData.called, true);
-
-    promptHTML = "<!doctype html><body onload=\"document.title = prompt('');\"></body>";
-    promptCallbackData.expectedMessage = "";
-    promptCallbackData.expectedDefaultValue = "";
-    promptCallbackData.result = promptResult;
-    promptCallbackData.called = false;
-    ewk_view_html_string_load(webView(), promptHTML, 0, 0);
-    waitUntilTitleChangedTo(promptResult);
-    EXPECT_STREQ(ewk_view_title_get(webView()), promptResult);
-    EXPECT_EQ(promptCallbackData.called, true);
-
-    promptHTML = "<!doctype html><body onload=\"document.title = prompt();\"></body>";
-    promptCallbackData.expectedMessage = "undefined";
-    promptCallbackData.expectedDefaultValue = "";
-    promptCallbackData.result = promptResult;
-    promptCallbackData.called = false;
-    ewk_view_html_string_load(webView(), promptHTML, 0, 0);
-    waitUntilTitleChangedTo(promptResult);
-    EXPECT_STREQ(ewk_view_title_get(webView()), promptResult);
-    EXPECT_EQ(promptCallbackData.called, true);
-
-    promptHTML = "<html><head><title>Default title</title></head>"
-                 "<body onload=\"var promptResult = prompt('Prompt message');"
-                 "if (promptResult == null) document.title='null';"
-                 "else document.title = promptResult;\"></body></html>";
-    promptCallbackData.expectedMessage = promptMessage;
-    promptCallbackData.expectedDefaultValue = "";
-    promptCallbackData.result = "";
-    promptCallbackData.called = false;
-    ewk_view_html_string_load(webView(), promptHTML, 0, 0);
-    waitUntilTitleChangedTo("");
-    EXPECT_STREQ(ewk_view_title_get(webView()), "");
-    EXPECT_EQ(promptCallbackData.called, true);
-
-    promptCallbackData.expectedMessage = promptMessage;
-    promptCallbackData.expectedDefaultValue = "";
-    promptCallbackData.result = 0;
-    promptCallbackData.called = false;
-    ewk_view_html_string_load(webView(), promptHTML, 0, 0);
-    waitUntilTitleChangedTo("null");
-    EXPECT_STREQ(ewk_view_title_get(webView()), "null");
-    EXPECT_EQ(promptCallbackData.called, true);
-
-    ewkViewClass()->run_javascript_prompt = 0;
-
-    promptCallbackData.called = false;
-    ewk_view_html_string_load(webView(), promptHTML, 0, 0);
-    waitUntilTitleChangedTo("null");
-    EXPECT_STREQ(ewk_view_title_get(webView()), "null");
-    EXPECT_EQ(promptCallbackData.called, false);
-}
-
-#if ENABLE(INPUT_TYPE_COLOR)
-static const int initialRed = 0x12;
-static const int initialGreen = 0x34;
-static const int initialBlue = 0x56;
-static const int initialAlpha = 0xff;
-static const int changedRed = 0x98;
-static const int changedGreen = 0x76;
-static const int changedBlue = 0x54;
-static const int changedAlpha = 0xff;
-
-static bool isColorPickerShown = false;
-
-static void onColorPickerDone(void* userData, Evas_Object*, void*)
-{
-    bool* handled = static_cast<bool*>(userData);
-
-    *handled = true;
-}
-
-static unsigned char setColorPickerColor(void* data)
-{
-    Ewk_View_Smart_Data* smartData = static_cast<Ewk_View_Smart_Data*>(data);
-
-    // 3. Change color to changed color.
-    EXPECT_TRUE(ewk_view_color_picker_color_set(smartData->self, changedRed, changedGreen, changedBlue, changedAlpha));
-
-    evas_object_smart_callback_call(smartData->self, "input,type,color,request", 0);
-
-    return 0;
-}
-
-static Eina_Bool showColorPicker(Ewk_View_Smart_Data* smartData, int r, int g, int b, int a)
-{
-    static bool isFirstRun = true;
-
-    isColorPickerShown = true;
-
-    if (isFirstRun) {
-        // 1. Check initial value from html file.
-        EXPECT_EQ(r, initialRed);
-        EXPECT_EQ(g, initialGreen);
-        EXPECT_EQ(b, initialBlue);
-        EXPECT_EQ(a, initialAlpha);
-
-        isFirstRun = false;
-    } else {
-        // 4. Input values should be same as changed color.
-        EXPECT_EQ(r, changedRed);
-        EXPECT_EQ(g, changedGreen);
-        EXPECT_EQ(b, changedBlue);
-        EXPECT_EQ(a, changedAlpha);
-    }
-
-    // 2. Return after making a color picker.
-    ecore_timer_add(0.0, setColorPickerColor, smartData);
-    return true;
-}
-
-static Eina_Bool hideColorPicker(Ewk_View_Smart_Data*)
-{
-    // Test color picker is shown.
-    EXPECT_TRUE(isColorPickerShown);
-    isColorPickerShown = false;
-}
-
-TEST_F(EWK2UnitTestBase, ewk_view_color_picker_color_set)
-{
-    Ewk_View_Smart_Class* api = ewkViewClass();
-    api->input_picker_color_request = showColorPicker;
-    api->input_picker_color_dismiss = hideColorPicker;
-
-    loadUrlSync("data:text/html,<input type='color' value='#123456'>");
-
-    // Click input element.
-    mouseClick(30, 20);
-
-    bool handled = false;
-    evas_object_smart_callback_add(webView(), "input,type,color,request", onColorPickerDone, &handled);
-    while (!handled)
-        ecore_main_loop_iterate();
-
-    // Click input element again.
-    mouseClick(30, 20);
-
-    handled = false;
-    while (!handled)
-        ecore_main_loop_iterate();
-    evas_object_smart_callback_del(webView(), "input,type,color,request", onColorPickerDone);
-}
-#endif // ENABLE(INPUT_TYPE_COLOR)
-
-TEST_F(EWK2UnitTestBase, ewk_view_context_get)
-{
-    Ewk_Context* context = ewk_view_context_get(webView());
-    ASSERT_TRUE(context);
-    ASSERT_EQ(context, ewk_view_context_get(webView()));
-}
-
 TEST_F(EWK2UnitTestBase, ewk_view_feed_touch_event)
 {
     Eina_List* points = 0;
@@ -698,93 +221,6 @@ TEST_F(EWK2UnitTestBase, ewk_view_feed_touch_event)
     eina_list_free(points);
 }
 
-static void onTextFound(void* userData, Evas_Object*, void* eventInfo)
-{
-    int* result = static_cast<int*>(userData);
-    unsigned* matchCount = static_cast<unsigned*>(eventInfo);
-
-    *result = *matchCount;
-}
-
-TEST_F(EWK2UnitTestBase, ewk_view_text_find)
-{
-    const char textFindHTML[] =
-        "<!DOCTYPE html>"
-        "<body>"
-        "apple apple apple banana banana coconut"
-        "</body>";
-    ewk_view_html_string_load(webView(), textFindHTML, 0, 0);
-    waitUntilLoadFinished();
-
-    int matchCount = -1;
-    evas_object_smart_callback_add(webView(), "text,found", onTextFound, &matchCount);
-
-    ewk_view_text_find(webView(), "apple", EWK_FIND_OPTIONS_SHOW_OVERLAY, 100);
-    while (matchCount < 0)
-        ecore_main_loop_iterate();
-    EXPECT_EQ(3, matchCount);
-
-    matchCount = -1;
-    ewk_view_text_find(webView(), "mango", EWK_FIND_OPTIONS_SHOW_OVERLAY, 100);
-    while (matchCount < 0)
-        ecore_main_loop_iterate();
-    EXPECT_EQ(0, matchCount);
-
-    evas_object_smart_callback_del(webView(), "text,found", onTextFound);
-}
-
-TEST_F(EWK2UnitTestBase, ewk_view_text_matches_count)
-{
-    const char textFindHTML[] =
-        "<!DOCTYPE html>"
-        "<body>"
-        "apple Apple apple apple banana bananaApple banana coconut"
-        "</body>";
-    ewk_view_html_string_load(webView(), textFindHTML, 0, 0);
-    waitUntilLoadFinished();
-
-    int matchCount = -1;
-    evas_object_smart_callback_add(webView(), "text,found", onTextFound, &matchCount);
-
-    ewk_view_text_matches_count(webView(), "apple", EWK_FIND_OPTIONS_NONE, 100);
-    while (matchCount < 0)
-        ecore_main_loop_iterate();
-    EXPECT_EQ(3, matchCount);
-
-    matchCount = -1;
-    ewk_view_text_matches_count(webView(), "apple", EWK_FIND_OPTIONS_CASE_INSENSITIVE, 100);
-    while (matchCount < 0)
-        ecore_main_loop_iterate();
-    EXPECT_EQ(5, matchCount);
-
-    matchCount = -1;
-    ewk_view_text_matches_count(webView(), "Apple", EWK_FIND_OPTIONS_AT_WORD_STARTS, 100);
-    while (matchCount < 0)
-        ecore_main_loop_iterate();
-    EXPECT_EQ(1, matchCount);
-
-    matchCount = -1;
-    ewk_view_text_matches_count(webView(), "Apple", EWK_FIND_OPTIONS_TREAT_MEDIAL_CAPITAL_AS_WORD_START, 100);
-    while (matchCount < 0)
-        ecore_main_loop_iterate();
-    EXPECT_EQ(2, matchCount);
-
-    matchCount = -1;
-    ewk_view_text_matches_count(webView(), "mango", EWK_FIND_OPTIONS_NONE, 100);
-    while (matchCount < 0)
-        ecore_main_loop_iterate();
-    EXPECT_EQ(0, matchCount);
-
-    // If we have more matches than allowed, -1 is returned as a matched count.
-    matchCount = -2;
-    ewk_view_text_matches_count(webView(), "apple", EWK_FIND_OPTIONS_NONE, 2);
-    while (matchCount < -1)
-        ecore_main_loop_iterate();
-    EXPECT_EQ(-1, matchCount);
-
-    evas_object_smart_callback_del(webView(), "text,found", onTextFound);
-}
-
 TEST_F(EWK2UnitTestBase, ewk_view_touch_events_enabled)
 {
 #if ENABLE(TIZEN_WEBKIT2_UNIT_TESTS)
@@ -832,3 +268,10 @@ TEST_F(EWK2UnitTestBase, ewk_view_touch_events_enabled)
     ASSERT_TRUE(ewk_view_touch_events_enabled_set(webView(), false));
     ASSERT_FALSE(ewk_view_touch_events_enabled_get(webView()));
 }
+
+TEST_F(EWK2UnitTestBase, ewk_view_settings_get)
+{
+    Ewk_Settings* settings = ewk_view_settings_get(webView());
+    ASSERT_TRUE(settings);
+    ASSERT_EQ(settings, ewk_view_settings_get(webView()));
+}
old mode 100755 (executable)
new mode 100644 (file)
index 2981c57..e3acb9d
@@ -104,8 +104,9 @@ ClipData clipList[CLIP_TYPE_MAX];
 static Eina_Bool clientMessageCallback(void* data, int type, void* event);
 #endif
 
-ClipboardHelper::ClipboardHelper(EwkViewImpl* viewImpl)
-    : m_viewImpl(viewImpl)
+ClipboardHelper::ClipboardHelper(Evas_Object* ewkView, PageClientImpl* pageClient)
+    : m_ewkView(ewkView)
+    , m_pageClient(pageClient)
 #if ENABLE(TIZEN_WEBKIT2_CONTEXT_MENU_CLIPBOARD)
     , m_selectionClearHandler(0)
     , m_selectionNotifyHandler(0)
@@ -213,7 +214,7 @@ void ClipboardHelper::setData(const String& data, const String& type)
     else if (type == "Markup")
         dataType = ecore_x_atom_get("text/html;charset=utf-8");
     else if (type == "Image") {
-        elm_cnp_selection_set(elm_object_parent_widget_get(m_viewImpl->view()), ELM_SEL_TYPE_CLIPBOARD,
+        elm_cnp_selection_set(elm_object_parent_widget_get(m_ewkView), ELM_SEL_TYPE_CLIPBOARD,
                               ELM_SEL_FORMAT_IMAGE, data.utf8().data(), data.length() + 1);
         return;
     }
@@ -223,7 +224,7 @@ void ClipboardHelper::setData(const String& data, const String& type)
 
 void ClipboardHelper::clear()
 {
-    elm_object_cnp_selection_clear(elm_object_parent_widget_get(m_viewImpl->view()), ELM_SEL_TYPE_CLIPBOARD);
+    elm_object_cnp_selection_clear(elm_object_parent_widget_get(m_ewkView), ELM_SEL_TYPE_CLIPBOARD);
 }
 
 void ClipboardHelper::processResult(const String& data, const String& type)
@@ -246,7 +247,7 @@ Eina_Bool clientMessageCallback(void* data, int type, void* event)
         return ECORE_CALLBACK_PASS_ON;
 
     if (!strcmp("SET_OWNER", ev->data.b)) {
-        clipboardHelper->openClipboardWindow(clipboardHelper->page()->editorState().isContentRichlyEditable);
+        clipboardHelper->openClipboardWindow(clipboardHelper->pageClient()->page()->editorState().isContentRichlyEditable);
     }
 
     return ECORE_CALLBACK_PASS_ON;
@@ -254,7 +255,7 @@ Eina_Bool clientMessageCallback(void* data, int type, void* event)
 
 static void pasteSelectedClipboardItem(const String& data, const String& type, ClipboardHelper* clipboardHelper)
 {
-    clipboardHelper->page()->executePasteFromClipboardItem(data, type);
+    clipboardHelper->pageClient()->page()->executePasteFromClipboardItem(data, type);
 
     clipboardHelper->connectClipboardWindow();
 }
@@ -536,7 +537,7 @@ bool ClipboardHelper::sendCbhmMessage(String message)
     Ecore_X_Window xCbhmWin = getCbhmWindow();
     Ecore_X_Atom xAtomCbhmMsg = ecore_x_atom_get("CBHM_MSG");
 
-    Evas_Object* parent = elm_object_parent_widget_get(m_viewImpl->view());
+    Evas_Object* parent = elm_object_parent_widget_get(m_ewkView);
     Ecore_X_Window xWin = ecore_evas_gl_x11_window_get(ecore_evas_ecore_evas_get(evas_object_evas_get(parent)));
     if (!xWin)
         xWin = ecore_evas_software_x11_window_get(ecore_evas_ecore_evas_get(evas_object_evas_get(parent)));
@@ -589,10 +590,10 @@ void ClipboardHelper::openClipboardWindow(bool isContentRichlyEditable)
 
     connectClipboardWindow();
 
-    evas_object_smart_callback_call(m_viewImpl->view(), "clipboard,opened", 0);
+    evas_object_smart_callback_call(m_ewkView, "clipboard,opened", 0);
 
 #if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION)
-    m_viewImpl->pageClient->updateTextSelectionHandlesAndContextMenu(false);
+    m_pageClient->updateTextSelectionHandlesAndContextMenu(false);
 #endif
 }
 
@@ -611,7 +612,7 @@ bool ClipboardHelper::isClipboardWindowOpened()
 
 void ClipboardHelper::connectClipboardWindow()
 {
-    ecore_x_selection_secondary_set(elm_win_xwindow_get(elm_object_parent_widget_get(m_viewImpl->view())), "",1);
+    ecore_x_selection_secondary_set(elm_win_xwindow_get(elm_object_parent_widget_get(m_ewkView)), "",1);
 }
 
 void ClipboardHelper::clearClipboardSelectionHandler()
@@ -752,17 +753,17 @@ void ClipboardHelper::pasteClipboardLastItem(bool isContentEditable)
 
     switch(format) {
     case ELM_SEL_FORMAT_TEXT:
-        page()->didSelectPasteMenuFromContextMenu(clipboardData, String("PlainText"));
+        pageClient()->page()->didSelectPasteMenuFromContextMenu(clipboardData, String("PlainText"));
         break;
     case ELM_SEL_FORMAT_HTML:
     case ELM_SEL_FORMAT_MARKUP:
-        page()->didSelectPasteMenuFromContextMenu(clipboardData, String("Markup"));
+        pageClient()->page()->didSelectPasteMenuFromContextMenu(clipboardData, String("Markup"));
         break;
     case ELM_SEL_FORMAT_IMAGE:
-        page()->didSelectPasteMenuFromContextMenu(clipboardData, String("Image"));
+        pageClient()->page()->didSelectPasteMenuFromContextMenu(clipboardData, String("Image"));
         break;
     default:
-        page()->didSelectPasteMenuFromContextMenu(String(""), String("PlainText"));
+        pageClient()->page()->didSelectPasteMenuFromContextMenu(String(""), String("PlainText"));
         break;
     }
 }
old mode 100755 (executable)
new mode 100644 (file)
index 8d09bf2..c286ac9
@@ -26,8 +26,6 @@
 #ifndef ClipboardHelper_h
 #define ClipboardHelper_h
 
-#include "EwkViewImpl.h"
-
 #include <wtf/Deque.h>
 #include <wtf/PassOwnPtr.h>
 #include <wtf/RefCounted.h>
@@ -41,6 +39,8 @@
 
 namespace WebKit {
 
+class PageClientImpl;
+
 typedef void (*ClipboardDataResultFunction)(const String&, const String&, void*);
 
 class ClipboardCallback : public RefCounted<ClipboardCallback> {
@@ -77,9 +77,9 @@ private:
 
 class ClipboardHelper {
 public:
-    static PassOwnPtr<ClipboardHelper> create(EwkViewImpl* viewImpl)
+    static PassOwnPtr<ClipboardHelper> create(Evas_Object* ewkView, PageClientImpl* pageClient)
     {
-        return adoptPtr(new ClipboardHelper(viewImpl));
+        return adoptPtr(new ClipboardHelper(ewkView, pageClient));
     }
     ~ClipboardHelper();
 
@@ -99,20 +99,19 @@ public:
     void processResult(const String& data, const String& type);
     void pasteClipboardLastItem(bool isContentEditable);
 
-    PageClientImpl* pageClient() { return m_viewImpl->pageClient.get(); }
+    PageClientImpl* pageClient() { return m_pageClient; }
 
 #if ENABLE(TIZEN_WEBKIT2_CONTEXT_MENU_CLIPBOARD)
     void openClipboardWindow(bool isContentRichlyEditable);
     bool isClipboardWindowOpened();
     void connectClipboardWindow();
     void clearClipboardSelectionHandler();
-    Evas_Object* ewkView() { return m_viewImpl->view(); }
-    WebPageProxy* page() { return m_viewImpl->page(); }
+    Evas_Object* ewkView() { return m_ewkView; }
     bool getSelectedCbhmItem(Ecore_X_Atom* pDataType);
 #endif
 
 private:
-    ClipboardHelper(EwkViewImpl*);
+    ClipboardHelper(Evas_Object* ewkView, PageClientImpl* pageClient);
 
 #if ENABLE(TIZEN_WEBKIT2_CONTEXT_MENU_CLIPBOARD)
     void initializeAtomList();
@@ -123,7 +122,8 @@ private:
     bool retrieveClipboardItem(int index, int* format, String* pData);
 #endif
 
-    EwkViewImpl* m_viewImpl;
+    Evas_Object* m_ewkView;
+    PageClientImpl* m_pageClient;
 
     Deque<RefPtr<ClipboardCallback> > m_callbackQueue;
     Mutex m_callbackQueueLock;
old mode 100755 (executable)
new mode 100644 (file)
index 1054f84..8e814e9
 #if ENABLE(TIZEN_DRAG_SUPPORT)
 #include "Drag.h"
 
-#include "EwkViewImpl.h"
 #include "ewk_view.h"
 #include <WebCore/DragActions.h>
 #include <WebCore/DragData.h>
 #include <WebCore/DragSession.h>
 #include <wtf/text/CString.h>
 
+
 using namespace WebCore;
 
 namespace WebKit {
 
-Drag::Drag(EwkViewImpl* viewImpl)
-      : m_viewImpl(viewImpl)
+Drag::Drag(WebPageProxy* page)
+      : m_page(page)
       , m_isDragMode(false)
       , m_dragStorageName("Drag")
       , m_dragData(0)
 {
-    ASSERT(viewImpl);
+    ASSERT(viewWidget);
 
-    m_Handle = new DragHandle(viewImpl->view(), EDJE_DIR"/Drag.edj", "drag_support", this);
+    m_Handle = new DragHandle(m_page->viewWidget(), EDJE_DIR"/Drag.edj", "drag_support", this);
 }
 
 Drag::~Drag()
@@ -57,9 +57,9 @@ Drag::~Drag()
 
 WebFrameProxy* Drag::focusedOrMainFrame()
 {
-    WebFrameProxy* frame = m_viewImpl->page()->focusedFrame();
+    WebFrameProxy* frame = m_page->focusedFrame();
     if(!frame)
-        frame = m_viewImpl->page()->mainFrame();
+        frame = m_page->mainFrame();
 
     return frame;
 }
@@ -74,14 +74,14 @@ void Drag::setDragMode(bool isDragMode)
 
 void Drag::hide()
 {
-    IntPoint viewPoint = m_viewImpl->transformFromScene().mapPoint(m_Handle->position());
+    IntPoint viewPoint = EwkViewImpl::fromEvasObject(m_page->viewWidget())->transformFromScene().mapPoint(m_Handle->position());
 
     DragData* dragData = new DragData(m_dragData->platformData(), viewPoint,
         viewPoint, m_dragData->draggingSourceOperationMask(), m_dragData->flags());
 
-    m_viewImpl->page()->dragExited(dragData ,m_dragStorageName);
+    m_page->dragExited(dragData ,m_dragStorageName);
     m_Handle->hide();
-    m_viewImpl->page()->dragEnded(viewPoint, viewPoint, m_dragData->draggingSourceOperationMask());
+    m_page->dragEnded(viewPoint, viewPoint, m_dragData->draggingSourceOperationMask());
 }
 
 void Drag::Show()
@@ -93,14 +93,14 @@ void Drag::Show()
 // handle callbacks
 void Drag::handleMouseMove(DragHandle* handle)
 {
-    IntPoint viewPoint = m_viewImpl->transformFromScene().mapPoint(handle->position());
+    IntPoint viewPoint = EwkViewImpl::fromEvasObject(m_page->viewWidget())->transformFromScene().mapPoint(handle->position());
 
     DragData* dragData = new DragData(m_dragData->platformData(), viewPoint,
         viewPoint, m_dragData->draggingSourceOperationMask(), m_dragData->flags());
 
-    m_viewImpl->page()->dragUpdated(dragData ,m_dragStorageName);
+    m_page->dragUpdated(dragData ,m_dragStorageName);
 
-    DragSession dragSession = m_viewImpl->page()->dragSession();
+    DragSession dragSession = m_page->dragSession();
     if (dragSession.operation != DragSourceActionNone)
         handle->updateHandleIcon(true);
      else
@@ -112,19 +112,19 @@ void Drag::handleMouseMove(DragHandle* handle)
 
 void Drag::handleMouseUp(DragHandle* handle)
 {
-    IntPoint viewPoint = m_viewImpl->transformFromScene().mapPoint(handle->position());
+    IntPoint viewPoint = EwkViewImpl::fromEvasObject(m_page->viewWidget())->transformFromScene().mapPoint(handle->position());
 
     DragData* dragData = new DragData(m_dragData->platformData(), viewPoint,
         viewPoint, m_dragData->draggingSourceOperationMask(), m_dragData->flags());
 
-    m_viewImpl->page()->dragUpdated(dragData ,m_dragStorageName);
+    m_page->dragUpdated(dragData ,m_dragStorageName);
 
-    DragSession dragSession = m_viewImpl->page()->dragSession();
+    DragSession dragSession = m_page->dragSession();
     if (dragSession.operation != DragSourceActionNone) {
-        m_viewImpl->page()->performDrag(dragData, m_dragStorageName);
+        m_page->performDrag(dragData, m_dragStorageName);
         setDragMode(false);
         m_Handle->hide();
-        m_viewImpl->page()->dragEnded(viewPoint, viewPoint, m_dragData->draggingSourceOperationMask());
+        m_page->dragEnded(viewPoint, viewPoint, m_dragData->draggingSourceOperationMask());
     }
     delete(dragData);
 }
old mode 100755 (executable)
new mode 100644 (file)
index 9fd59f6..1dd5355
@@ -34,8 +34,6 @@
 #include <WebCore/IntPoint.h>
 #include <wtf/PassOwnPtr.h>
 
-class EwkViewImpl;
-
 namespace WebKit {
 
 class DragHandle;
@@ -43,9 +41,9 @@ class PageClientImpl;
 
 class Drag {
 public:
-    static PassOwnPtr<Drag> create(EwkViewImpl* viewImpl)
+    static PassOwnPtr<Drag> create(WebPageProxy* page)
     {
-        return adoptPtr(new Drag(viewImpl));
+        return adoptPtr(new Drag(page));
     }
     ~Drag();
 
@@ -61,15 +59,16 @@ public:
 
     friend class PageClientImpl;
 private:
-    Drag(EwkViewImpl*);
+    Drag(WebPageProxy*);
     void hide();
     void Show();
     WebFrameProxy* focusedOrMainFrame();
 
 private:
-    EwkViewImpl* m_viewImpl;
+    Evas_Object* m_object;
     DragHandle* m_Handle;
 
+    WebPageProxy* m_page;
     bool m_isDragMode;
     String m_dragStorageName;
     WebCore::DragData* m_dragData;
old mode 100755 (executable)
new mode 100644 (file)
index 4d9e43a..2d6de3b
@@ -31,8 +31,8 @@ using namespace WebKit;
 
 const double Flick::s_scrollSpeedFactor = 10;
 
-Flick::Flick(EwkViewImpl* viewImpl)
-    : m_viewImpl(viewImpl)
+Flick::Flick(Evas_Object* viewWidget)
+    : m_viewWidget(viewWidget)
     , m_velocity()
     , m_flickIndex(0)
     , m_flickAnimator(0)
@@ -66,7 +66,7 @@ void Flick::stop()
         m_flickAnimator = 0;
 
 #if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION)
-        PageClientImpl* pageClientImpl = m_viewImpl->pageClient.get();
+        PageClientImpl* pageClientImpl = ewkViewGetPageClient(m_viewWidget);
         EINA_SAFETY_ON_NULL_RETURN(pageClientImpl);
         pageClientImpl->updateTextSelectionHandlesAndContextMenu(true);
 #endif
@@ -114,7 +114,7 @@ bool Flick::process()
     if (m_flickIndex > m_flickDuration) {
         m_flickAnimator = 0;
 #if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION)
-        PageClientImpl* pageClientImpl = m_viewImpl->pageClient.get();
+        PageClientImpl* pageClientImpl = ewkViewGetPageClient(m_viewWidget);
         EINA_SAFETY_ON_NULL_RETURN_VAL(pageClientImpl, false);
         pageClientImpl->updateTextSelectionHandlesAndContextMenu(true);
 #endif
@@ -124,12 +124,12 @@ bool Flick::process()
         if (!deltaX && !deltaY)
             return true;
 
-        PageClientImpl* pageClientImpl = m_viewImpl->pageClient.get();
+        PageClientImpl* pageClientImpl = ewkViewGetPageClient(m_viewWidget);
         EINA_SAFETY_ON_NULL_RETURN_VAL(pageClientImpl, true);
-        ewkViewSendScrollEvent(m_viewImpl->view(), deltaX, deltaY);
+        ewkViewSendScrollEvent(m_viewWidget, deltaX, deltaY);
         IntPoint scrollPosition = pageClientImpl->scrollPosition();
-        WKPageScrollBy(toAPI(m_viewImpl->page()), toAPI(IntSize(deltaX, deltaY)));
-        ewkViewSendEdgeEvent(m_viewImpl->view(), scrollPosition, deltaX, deltaY);
+        WKPageScrollBy(toAPI(pageClientImpl->page()), toAPI(IntSize(deltaX, deltaY)));
+        ewkViewSendEdgeEvent(m_viewWidget, scrollPosition, deltaX, deltaY);
 #if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION)
         pageClientImpl->updateTextSelectionHandlesAndContextMenu(false);
 #endif
@@ -139,8 +139,8 @@ bool Flick::process()
         int scrollY;
         int scrollWidth;
         int scrollHeight;
-        ewk_view_scroll_pos_get(m_viewImpl->view(), &scrollX, &scrollY);
-        ewk_view_scroll_size_get(m_viewImpl->view(), &scrollWidth, &scrollHeight);
+        ewk_view_scroll_pos_get(m_viewWidget, &scrollX, &scrollY);
+        ewk_view_scroll_size_get(m_viewWidget, &scrollWidth, &scrollHeight);
         if ((!deltaX || (deltaX < 0 && scrollX == 0) || (deltaX > 0 && scrollX >= scrollWidth))
             && (!deltaY || (deltaY < 0 && scrollY == 0) || (deltaY > 0 && scrollY >= scrollHeight))) {
 #if ENABLE(TIZEN_CSS_OVERFLOW_SCROLL_ACCELERATION)
@@ -173,7 +173,7 @@ Eina_Bool Flick::scrollToAnimatorCallback(void* data)
 Eina_Bool Flick::scrollToAnimator()
 {
     int scrollX, scrollY;
-    ewk_view_scroll_pos_get(m_viewImpl->view(), &scrollX, &scrollY);
+    ewk_view_scroll_pos_get(m_viewWidget, &scrollX, &scrollY);
     int remainX = m_scrollToPosition.x() - scrollX;
     int remainY = m_scrollToPosition.y() - scrollY;
 
@@ -183,7 +183,7 @@ Eina_Bool Flick::scrollToAnimator()
             m_scrollAnimator = 0;
         }
 #if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION)
-        PageClientImpl* pageClientImpl = m_viewImpl->pageClient.get();
+        PageClientImpl* pageClientImpl = ewkViewGetPageClient(m_viewWidget);
         EINA_SAFETY_ON_NULL_RETURN_VAL(pageClientImpl, false);
         pageClientImpl->updateTextSelectionHandlesAndContextMenu(true);
 #endif
@@ -197,11 +197,11 @@ Eina_Bool Flick::scrollToAnimator()
     int deltaX = (remainX > 0) ? ceilf(remainX * scrollRatio) : floorf(remainX * scrollRatio);
     int deltaY = (remainY > 0) ? ceilf(remainY * scrollRatio) : floorf(remainY * scrollRatio);
 
-    PageClientImpl* pageClientImpl = m_viewImpl->pageClient.get();
+    PageClientImpl* pageClientImpl = ewkViewGetPageClient(m_viewWidget);
     EINA_SAFETY_ON_NULL_RETURN_VAL(pageClientImpl, true);
-    ewkViewSendScrollEvent(m_viewImpl->view(), deltaX, deltaY);
-    WKPageScrollBy(toAPI(m_viewImpl->page()), toAPI(IntSize(deltaX, deltaY)));
-    ewkViewSendEdgeEvent(m_viewImpl->view(), IntPoint(scrollX, scrollY), deltaX, deltaY);
+    ewkViewSendScrollEvent(m_viewWidget, deltaX, deltaY);
+    WKPageScrollBy(toAPI(pageClientImpl->page()), toAPI(IntSize(deltaX, deltaY)));
+    ewkViewSendEdgeEvent(m_viewWidget, IntPoint(scrollX, scrollY), deltaX, deltaY);
 #if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION)
     pageClientImpl->updateTextSelectionHandlesAndContextMenu(false);
 #endif
old mode 100755 (executable)
new mode 100644 (file)
index db75926..9e22025
 #include <WebCore/IntPoint.h>
 #include <wtf/PassOwnPtr.h>
 
-class EwkViewImpl;
-
 class Flick {
 public:
-    static PassOwnPtr<Flick> create(EwkViewImpl* viewImpl)
+    static PassOwnPtr<Flick> create(Evas_Object* viewWidget)
     {
-        return adoptPtr(new Flick(viewImpl));
+        return adoptPtr(new Flick(viewWidget));
     }
     ~Flick();
 
@@ -46,12 +44,12 @@ private:
     static Eina_Bool scrollToAnimatorCallback(void* data);
 
 private:
-    explicit Flick(EwkViewImpl*);
+    explicit Flick(Evas_Object*);
     bool process();
     Eina_Bool scrollToAnimator();
 
 private:
-    EwkViewImpl* m_viewImpl;
+    Evas_Object* m_viewWidget;
     WebCore::IntPoint m_velocity;
     int m_flickIndex;
     int m_flickDuration;
index 902cef0..7a5b8ef 100755 (executable)
@@ -23,6 +23,7 @@
 #include "EwkViewImpl.h"
 #if ENABLE(TIZEN_WEBKIT2_FOCUS_RING)
 #include "PageClientImpl.h"
+#include "ewk_view_private.h"
 
 using namespace WebKit;
 using namespace WebCore;
@@ -30,12 +31,13 @@ using namespace WebCore;
 const int FocusRing::s_imageOuterWidth = 4;
 const int FocusRing::s_imageInnerWidth = 2;
 
-FocusRing::FocusRing(EwkViewImpl* viewImpl)
-    : m_viewImpl(viewImpl)
+FocusRing::FocusRing(Evas_Object* viewWidget)
+    : m_viewWidget(viewWidget)
     , m_focusRingObject(0)
     , m_isImageDrawing(false)
     , m_showTimer(0)
 {
+    m_viewImpl = EwkViewImpl::fromEvasObject(m_viewWidget);
 }
 
 FocusRing::~FocusRing()
@@ -83,7 +85,7 @@ void FocusRing::show(const IntRect& rect, const bool includeOnlyImage)
     if (rect.isEmpty())
         m_showTimer = 0;
 
-    PageClientImpl* pageClientImpl = m_viewImpl->pageClient.get();
+    PageClientImpl* pageClientImpl = ewkViewGetPageClient(m_viewWidget);
     EINA_SAFETY_ON_NULL_RETURN(pageClientImpl);
 
     IntRect focusRingRect(rect);
@@ -92,7 +94,7 @@ void FocusRing::show(const IntRect& rect, const bool includeOnlyImage)
     if (rect.isEmpty()) {
 #if ENABLE(TIZEN_WEBKIT2_HIT_TEST)
         IntPoint contentsPosition = m_viewImpl->transformFromScene().mapPoint(m_position);
-        WebHitTestResult::Data hitTestResultData = m_viewImpl->page()->hitTestResultAtPoint(contentsPosition);
+        WebHitTestResult::Data hitTestResultData = pageClientImpl->page()->hitTestResultAtPoint(contentsPosition);
         if (hitTestResultData.focusedRect.isEmpty())
             return;
 
@@ -109,7 +111,7 @@ void FocusRing::show(const IntRect& rect, const bool includeOnlyImage)
     focusRingRect = m_viewImpl->transformToScene().mapRect(focusRingRect);
 
     Evas_Coord_Rectangle viewGeometry;
-    evas_object_geometry_get(m_viewImpl->view(), &viewGeometry.x, &viewGeometry.y, &viewGeometry.w, &viewGeometry.h);
+    evas_object_geometry_get(m_viewWidget, &viewGeometry.x, &viewGeometry.y, &viewGeometry.w, &viewGeometry.h);
     IntRect viewRect(viewGeometry.x, viewGeometry.y, viewGeometry.w, viewGeometry.h);
     focusRingRect.intersect(viewRect);
     if (focusRingRect.isEmpty()) {
@@ -124,15 +126,15 @@ void FocusRing::show(const IntRect& rect, const bool includeOnlyImage)
         evas_object_hide(m_focusRingObject);
     else {
         if (!m_isImageDrawing)
-            m_focusRingObject = evas_object_rectangle_add(evas_object_evas_get(m_viewImpl->view()));
+            m_focusRingObject = evas_object_rectangle_add(evas_object_evas_get(m_viewWidget));
         else {
-            m_focusRingObject = evas_object_image_add(evas_object_evas_get(m_viewImpl->view()));
+            m_focusRingObject = evas_object_image_add(evas_object_evas_get(m_viewWidget));
             evas_object_image_file_set(m_focusRingObject, SCREEN_READER_FOCUS_RING_IMAGE_PATH, 0);
             int border = s_imageOuterWidth + s_imageInnerWidth;
             evas_object_image_border_set(m_focusRingObject, border, border, border, border);
         }
 
-        evas_object_smart_member_add(m_focusRingObject, m_viewImpl->view());
+        evas_object_smart_member_add(m_focusRingObject, m_viewWidget);
         evas_object_repeat_events_set(m_focusRingObject, true);
     }
 
@@ -213,7 +215,7 @@ IntPoint FocusRing::centerPointInScreen()
 
     IntPoint point(m_rect.center());
     Evas_Coord x, y;
-    evas_object_geometry_get(m_viewImpl->view(), &x, &y, 0, 0);
+    evas_object_geometry_get(m_viewWidget, &x, &y, 0, 0);
     point.move(x, y);
 
     return point;
index a4684b2..dda8e27 100755 (executable)
@@ -32,9 +32,9 @@ class EwkViewImpl;
 
 class FocusRing {
 public:
-    static PassOwnPtr<FocusRing> create(EwkViewImpl* viewImpl)
+    static PassOwnPtr<FocusRing> create(Evas_Object* viewWidget)
     {
-        return adoptPtr(new FocusRing(viewImpl));
+        return adoptPtr(new FocusRing(viewWidget));
     }
     ~FocusRing();
 
@@ -58,9 +58,10 @@ private:
     static const int s_imageInnerWidth;
 
 private:
-    FocusRing(EwkViewImpl* viewImpl);
+    FocusRing(Evas_Object* viewWidget);
     void internalShow(bool, const WebCore::IntRect&);
 
+    Evas_Object* m_viewWidget;
     EwkViewImpl* m_viewImpl;
 
     Evas_Object* m_focusRingObject;
old mode 100755 (executable)
new mode 100644 (file)
index 5d0e292..fbae4ed
 #if ENABLE(TIZEN_WEBKIT2_FORM_DATABASE)
 #include "FormDataCandidate.h"
 
-#include "EwkViewImpl.h"
 #include <wtf/text/CString.h>
 
+
 using namespace WebCore;
 
 namespace WebKit {
 
-FormDataCandidate::FormDataCandidate(EwkViewImpl* viewImpl)
-    : m_viewImpl(viewImpl)
+FormDataCandidate::FormDataCandidate(WebPageProxy* page)
+    : m_page(page)
     , m_isShowing(false)
 {
-    m_popup = new FormDataCandidatePopup(m_viewImpl->view(), EDJE_DIR"/FormDataCandidate.edj", "formdata_list", this);
+    m_popup = new FormDataCandidatePopup(m_page->viewWidget(), EDJE_DIR"/FormDataCandidate.edj", "formdata_list", this);
 }
 
 FormDataCandidate::~FormDataCandidate()
@@ -60,19 +60,18 @@ void FormDataCandidate::updateFormData(const Vector<String>& data) {
 void FormDataCandidate::show(const WebCore::IntRect& rect)
 {
     m_isShowing = true;
-    m_nodeRect = m_viewImpl->transformToScene().mapRect(rect);
-    m_popup->updateFormDataPopup(m_nodeRect, m_viewImpl->page()->scaleFactor());
+    m_nodeRect = EwkViewImpl::fromEvasObject(m_page->viewWidget())->transformToScene().mapRect(rect);
+    m_popup->updateFormDataPopup(m_nodeRect, m_page->scaleFactor());
     m_popup->move(m_nodeRect);
     m_popup->show();
 }
 
 void FormDataCandidate::setValueForInputElement(String& value)
 {
-    m_viewImpl->page()->setFocusedInputElementValue(value);
+    m_page->setFocusedInputElementValue(value);
     hide();
     m_candidateValue = emptyString();
 }
-
 } // namespace WebKit
 
 #endif // TIZEN_WEBKIT2_FORM_DATABASE
old mode 100755 (executable)
new mode 100644 (file)
index e3c0642..9055fff
 #include <WebCore/IntRect.h>
 #include <wtf/PassOwnPtr.h>
 
-class EwkViewImpl;
-
 namespace WebKit {
 
 class FormDataCandidatePopup;
 
 class FormDataCandidate {
 public:
-    static PassOwnPtr<FormDataCandidate> create(EwkViewImpl* viewImpl)
+    static PassOwnPtr<FormDataCandidate> create(WebPageProxy* page)
     {
-        return adoptPtr(new FormDataCandidate(viewImpl));
+        return adoptPtr(new FormDataCandidate(page));
     }
     ~FormDataCandidate();
 
@@ -57,10 +55,11 @@ public:
     String getCandidateValue() { return m_candidateValue; }
 
 private:
-    explicit FormDataCandidate(EwkViewImpl*);
+    explicit FormDataCandidate(WebPageProxy*);
 
-    EwkViewImpl* m_viewImpl;
+    Evas_Object* m_object;
     FormDataCandidatePopup* m_popup;
+    WebPageProxy* m_page;
     bool m_isShowing;
     WebCore::IntRect m_nodeRect;
     String m_candidateValue;
index fa85bfe..f1572a8 100755 (executable)
@@ -55,10 +55,10 @@ GestureClient::GestureClient(EwkViewImpl* viewImpl)
     , m_isPanScheduled(false)
     , m_isFlickScheduled(false)
     , m_viewImpl(viewImpl)
-    , m_pan(Pan::create(viewImpl))
-    , m_flick(Flick::create(viewImpl))
-    , m_smartZoom(SmartZoom::create(viewImpl))
-    , m_zoom(Zoom::create(viewImpl))
+    , m_pan(Pan::create(viewImpl->view()))
+    , m_flick(Flick::create(viewImpl->view()))
+    , m_smartZoom(SmartZoom::create(viewImpl->view()))
+    , m_zoom(Zoom::create(viewImpl->view()))
 {
 }
 
@@ -200,12 +200,12 @@ void GestureClient::endTap(const IntPoint& position)
 #if ENABLE(TIZEN_LINK_MAGNIFIER)
     if (ewk_settings_link_magnifier_enabled_get(ewk_view_settings_get(m_viewImpl->view()))) {
         int areaSize = elm_config_finger_size_get() / 2;
-        m_viewImpl->page()->getLinkMagnifierRect(tapPosition, IntSize(areaSize, areaSize));
+        pageClientImpl->page()->getLinkMagnifierRect(tapPosition, IntSize(areaSize, areaSize));
         return;
     }
 #endif
     WebGestureEvent gesture(WebEvent::GestureSingleTap, tapPosition, IntPoint(tapPosition.x() + viewPosition.x, tapPosition.y() + viewPosition.y), WebEvent::Modifiers(0), timestamp, fingerSize, FloatPoint(0, 0));
-    m_viewImpl->page()->handleGestureEvent(gesture);
+    pageClientImpl->page()->handleGestureEvent(gesture);
 #endif
 }
 
@@ -214,14 +214,14 @@ void GestureClient::showContextMenu(const IntPoint& position)
     if (!m_isGestureEnabled)
         return;
 
-    PageClientImpl* pageClientImpl = m_viewImpl->pageClient.get();
+    PageClientImpl* pageClientImpl = ewkViewGetPageClient(m_viewImpl->view());
     EINA_SAFETY_ON_NULL_RETURN(pageClientImpl);
 
-    Ewk_View_Smart_Data* smartData = static_cast<Ewk_View_Smart_Data*>(evas_object_smart_data_get(m_viewImpl->view()));
+    Ewk_View_Smart_Data* smartData = static_cast<Ewk_View_Smart_Data*>(evas_object_smart_data_get(pageClientImpl->viewWidget()));
     if (!smartData || !smartData->api || !smartData->api->mouse_down)
         return;
 
-    Evas* evas = evas_object_evas_get(m_viewImpl->view());
+    Evas* evas = evas_object_evas_get(pageClientImpl->viewWidget());
 
     // Send mouse down event to show context menu.
     // We do not need to send a corresponding mouse release because in case of
@@ -307,7 +307,7 @@ void GestureClient::endDoubleTap(const IntPoint& position)
     PageClientImpl* pageClientImpl = ewkViewGetPageClient(m_viewImpl->view());
 
 #if ENABLE(TIZEN_WEBKIT2_TEXT_ZOOM)
-    if (!pageClientImpl || m_viewImpl->page()->pageGroup()->preferences()->textZoomEnabled())
+    if (!pageClientImpl || pageClientImpl->page()->pageGroup()->preferences()->textZoomEnabled())
         return;
 #endif
 
index 3d7a2e3..d50a5dc 100755 (executable)
@@ -41,7 +41,7 @@ LinkMagnifierProxy& LinkMagnifierProxy::linkMagnifier()
 }
 
 LinkMagnifierProxy::LinkMagnifierProxy()
-    : m_viewImpl(0)
+    : m_pageClient(0)
     , m_popup(0)
     , m_image(0)
     , m_scaleFactor(1)
@@ -56,9 +56,9 @@ LinkMagnifierProxy::~LinkMagnifierProxy()
         evas_object_del(m_popup);
 }
 
-void LinkMagnifierProxy::show(EwkViewImpl* viewImpl, const IntPoint& position, const IntRect& rect)
+void LinkMagnifierProxy::show(PageClientImpl* pageClient, const IntPoint& position, const IntRect& rect)
 {
-    Evas_Object* viewWidget = viewImpl->view();
+    Evas_Object* viewWidget = pageClient->viewWidget();
 
     if (!m_popup) {
         Evas_Object* topWidget = elm_object_top_widget_get(elm_object_parent_widget_get(viewWidget));
@@ -73,14 +73,14 @@ void LinkMagnifierProxy::show(EwkViewImpl* viewImpl, const IntPoint& position, c
     if (isShowing())
         elm_ctxpopup_dismiss(m_popup);
 
-    m_viewImpl = viewImpl;
+    m_pageClient = pageClient;
 
-    AffineTransform transform(m_viewImpl->transformToScene());
+    AffineTransform transform(EwkViewImpl::fromEvasObject(m_pageClient->viewWidget())->transformToScene());
     IntPoint tapPosition(transform.mapPoint(position));
     IntRect candidatesRect(transform.mapRect(rect));
 
     Evas_Coord_Rectangle viewRect;
-    evas_object_geometry_get(m_viewImpl->view(), &viewRect.x, &viewRect.y, &viewRect.w, &viewRect.h);
+    evas_object_geometry_get(m_pageClient->viewWidget(), &viewRect.x, &viewRect.y, &viewRect.w, &viewRect.h);
     tapPosition.move(-viewRect.x, -viewRect.y);
     candidatesRect.move(-viewRect.x, -viewRect.y);
 
@@ -89,7 +89,7 @@ void LinkMagnifierProxy::show(EwkViewImpl* viewImpl, const IntPoint& position, c
     if (candidatesRect.y() < 0)
         candidatesRect.shiftYEdgeTo(0);
 
-    m_scaleFactor = 4 / m_viewImpl->pageClient->scaleFactor();
+    m_scaleFactor = 4 / m_pageClient->scaleFactor();
     const int maximumContextPopupWidth = 620;
     IntSize limitSize(maximumContextPopupWidth, (viewRect.h / 2 < tapPosition.y()) ? tapPosition.y() : viewRect.h - tapPosition.y());
     limitSize.scale(0.9 / m_scaleFactor);
@@ -115,7 +115,7 @@ void LinkMagnifierProxy::show(EwkViewImpl* viewImpl, const IntPoint& position, c
         candidatesRect.setHeight(limitSize.height());
     }
 
-    RefPtr<WebImage> webImage = m_viewImpl->page()->createSnapshot(candidatesRect, m_scaleFactor);
+    RefPtr<WebImage> webImage = m_pageClient->page()->createSnapshot(candidatesRect, m_scaleFactor);
     if (!webImage || !webImage->bitmap())
         return;
     RefPtr<cairo_surface_t> cairoSurface = webImage->bitmap()->createCairoSurface();
@@ -141,7 +141,7 @@ void LinkMagnifierProxy::show(EwkViewImpl* viewImpl, const IntPoint& position, c
     m_position = candidatesRect.location();
     m_position.move(viewRect.x, viewRect.y);
 
-    ewk_view_suspend(m_viewImpl->view());
+    ewk_view_suspend(m_pageClient->viewWidget());
 }
 
 void LinkMagnifierProxy::hide()
@@ -154,11 +154,11 @@ void LinkMagnifierProxy::hide()
 
 void LinkMagnifierProxy::clear()
 {
-    if (!m_viewImpl)
+    if (!m_pageClient)
         return;
 
-    ewk_view_resume(m_viewImpl->view());
-    m_viewImpl = 0;
+    ewk_view_resume(m_pageClient->viewWidget());
+    m_pageClient = 0;
 
     evas_object_hide(m_popup);
     elm_object_content_unset(m_popup);
@@ -182,9 +182,9 @@ void LinkMagnifierProxy::mouseUp(void*, Evas*, Evas_Object* image, void* eventIn
 
     IntPoint position(linkMagnifier.m_position.x() + (upEvent->canvas.x - imagePosition.x) / linkMagnifier.m_scaleFactor,
                       linkMagnifier.m_position.y() + (upEvent->canvas.y - imagePosition.y) / linkMagnifier.m_scaleFactor);
-    position = linkMagnifier.m_viewImpl->transformFromScene().mapPoint(position);
+    position = EwkViewImpl::fromEvasObject(linkMagnifier.m_pageClient->viewWidget())->transformFromScene().mapPoint(position);
 
-    linkMagnifier.m_viewImpl->page()->openLink(position);
+    linkMagnifier.m_pageClient->page()->openLink(position);
     linkMagnifier.hide();
 }
 
index 1cf7125..6b250da 100755 (executable)
 
 #if ENABLE(TIZEN_LINK_MAGNIFIER)
 
+#include "PageClientImpl.h"
+
 #include <Evas.h>
 #include <WebCore/IntPoint.h>
 
-class EwkViewImpl;
-
 namespace WebKit {
 
 class LinkMagnifierProxy {
@@ -40,7 +40,7 @@ public:
     static LinkMagnifierProxy& linkMagnifier();
     ~LinkMagnifierProxy();
 
-    void show(EwkViewImpl*, const WebCore::IntPoint&, const WebCore::IntRect&);
+    void show(PageClientImpl*, const WebCore::IntPoint&, const WebCore::IntRect&);
     void hide();
 
 private:
@@ -52,7 +52,7 @@ private:
     static void mouseUp(void*, Evas*, Evas_Object*, void*);
     static void dismissed(void*, Evas_Object*, void*);
 
-    EwkViewImpl* m_viewImpl;
+    PageClientImpl* m_pageClient;
     Evas_Object* m_popup;
     Evas_Object* m_image;
     float m_scaleFactor;
old mode 100755 (executable)
new mode 100644 (file)
index b26c2e7..7cb14b8
@@ -26,8 +26,6 @@
 #include "config.h"
 #include "OfflinePageSave.h"
 
-#include "EwkViewImpl.h"
-
 #if ENABLE(TIZEN_OFFLINE_PAGE_SAVE)
 #include <WebCore/FileSystem.h>
 
@@ -35,8 +33,9 @@ using namespace WebCore;
 
 namespace WebKit {
 
-OfflinePageSave::OfflinePageSave(EwkViewImpl* viewImpl)
-    : m_viewImpl(viewImpl)
+OfflinePageSave::OfflinePageSave(Evas_Object* viewWidget, WebPageProxy* page)
+    : m_view(viewWidget)
+    , m_page(page)
     , m_didErrorOccured(false)
 {
 }
@@ -47,18 +46,18 @@ OfflinePageSave::~OfflinePageSave()
 
 void OfflinePageSave::savePageError()
 {
-    evas_object_smart_callback_call(m_viewImpl->view(), "pageSave,error", 0);
+    evas_object_smart_callback_call(m_view, "pageSave,error", 0);
 }
 
 void OfflinePageSave::savePageFinished()
 {
-    evas_object_smart_callback_call(m_viewImpl->view(), "pageSave,success", 0);
+    evas_object_smart_callback_call(m_view, "pageSave,success", 0);
 }
 
 void OfflinePageSave::startOfflinePageSave(String& path, String& url, String& title)
 {
     if (path.isEmpty()) {
-        evas_object_smart_callback_call(m_viewImpl->view(), "pageSave,error", 0);
+        evas_object_smart_callback_call(m_view, "pageSave,error", 0);
         return;
     }
 
@@ -67,7 +66,7 @@ void OfflinePageSave::startOfflinePageSave(String& path, String& url, String& ti
 
     m_pageSaveDirectoryPath = path;
     m_subresourceDirectoryName = subresourceFolderName;
-    m_viewImpl->page()->startOfflinePageSave(subresourceFolderName);
+    m_page->startOfflinePageSave(subresourceFolderName);
 
 }
 
@@ -75,7 +74,7 @@ void OfflinePageSave::saveSubresourcesData(Vector<WebSubresourceTizen>& subresou
 {
     if (m_didErrorOccured) {
         Vector<String> files = listDirectory(m_pageSaveDirectoryPath, String("*.html"));
-        for (size_t i = 0; i < files.size(); ++i)
+        for (int i = 0; i < files.size(); ++i)
             deleteFile(files[i].utf8().data());
 
         savePageError();
@@ -87,10 +86,10 @@ void OfflinePageSave::saveSubresourcesData(Vector<WebSubresourceTizen>& subresou
     if (!fileExists(subresourceDirectory))
         makeAllDirectories(subresourceDirectory);
 
-    for (size_t i = 0; i < subresourceData.size(); ++i) {
+    for (int i = 0; i < subresourceData.size(); ++i) {
         String fullPath = pathByAppendingComponent(m_pageSaveDirectoryPath, subresourceData[i].m_fileName);
         size_t lastIndexOfSlash = fullPath.reverseFind('/');
-        if (lastIndexOfSlash != notFound)
+        if (lastIndexOfSlash != -1)
             makeAllDirectories(fullPath.substring(0, lastIndexOfSlash));
 
         PlatformFileHandle fileHandle = openFile(fullPath, OpenForWrite);
@@ -115,7 +114,7 @@ void OfflinePageSave::saveSerializedHTMLDataForMainPage(const String& serialized
         makeAllDirectories(m_pageSaveDirectoryPath);
 
     size_t lastIndexOfSlash = fullPath.reverseFind('/');
-    if (lastIndexOfSlash != notFound)
+    if (lastIndexOfSlash != -1)
         makeAllDirectories(fullPath.substring(0, lastIndexOfSlash));
 
     PlatformFileHandle fileHandle = openFile(fullPath, OpenForWrite);
@@ -157,5 +156,4 @@ void OfflinePageSave::extractProperDirectoryName(String& directoryName, String&
 }
 
 } // namespace WebKit
-
 #endif // TIZEN_OFFLINE_PAGE_SAVE
old mode 100755 (executable)
new mode 100644 (file)
index 5689bab..9318bab
 #include <wtf/PassOwnPtr.h>
 #include "KURL.h"
 
-class EwkViewImpl;
-
 namespace WebKit {
 
 class OfflinePageSave {
 public:
-    static PassOwnPtr<OfflinePageSave> create(EwkViewImpl* viewImpl)
+    static PassOwnPtr<OfflinePageSave> create(Evas_Object* viewWidget, WebPageProxy* page)
     {
-        return adoptPtr(new OfflinePageSave(viewImpl));
+        return adoptPtr(new OfflinePageSave(viewWidget, page));
     }
     ~OfflinePageSave();
 
@@ -49,18 +47,19 @@ public:
     void saveSubresourcesData(Vector<WebSubresourceTizen>& subresourceData);
 
 private:
-    OfflinePageSave(EwkViewImpl*);
+    OfflinePageSave(Evas_Object*, WebPageProxy*);
 
     void savePageFinished();
     void savePageError();
 
     void extractProperDirectoryName(String& directoryName, String& title, String& url);
 
-    EwkViewImpl* m_viewImpl;
-
     String m_pageSaveDirectoryPath;
     String m_subresourceDirectoryName;
     bool m_didErrorOccured;
+
+    WebPageProxy* m_page;
+    Evas_Object* m_view;
 };
 
 } // namespace WebKit
index aec51af..f5ce019 100755 (executable)
@@ -32,8 +32,8 @@
 using namespace WebCore;
 using namespace WebKit;
 
-Pan::Pan(EwkViewImpl* viewImpl)
-    : m_viewImpl(viewImpl)
+Pan::Pan(Evas_Object* ewkView)
+    : m_ewkView(ewkView)
     , m_panAnimator(0)
     , m_lastPoint()
     , m_currentPoint()
@@ -41,9 +41,10 @@ Pan::Pan(EwkViewImpl* viewImpl)
     , m_smoothAlgorithm(SmoothAlgorithm::create())
 #endif
 {
+    m_viewImpl = EwkViewImpl::fromEvasObject(m_ewkView);
 #if ENABLE(TIZEN_GESTURE_FEATURE)
-    evas_object_event_callback_add(m_viewImpl->view(), EVAS_CALLBACK_MOUSE_DOWN, onMouseDown, this);
-    evas_object_event_callback_add(m_viewImpl->view(), EVAS_CALLBACK_MOUSE_MOVE, onMouseMove, this);
+    evas_object_event_callback_add(m_ewkView, EVAS_CALLBACK_MOUSE_DOWN, onMouseDown, this);
+    evas_object_event_callback_add(m_ewkView, EVAS_CALLBACK_MOUSE_MOVE, onMouseMove, this);
 #endif
 }
 
@@ -52,8 +53,8 @@ Pan::~Pan()
     if (m_panAnimator)
         ecore_animator_del(m_panAnimator);
 #if ENABLE(TIZEN_GESTURE_FEATURE)
-    evas_object_event_callback_del(m_viewImpl->view(), EVAS_CALLBACK_MOUSE_DOWN, onMouseDown);
-    evas_object_event_callback_del(m_viewImpl->view(), EVAS_CALLBACK_MOUSE_MOVE, onMouseMove);
+    evas_object_event_callback_del(m_ewkView, EVAS_CALLBACK_MOUSE_DOWN, onMouseDown);
+    evas_object_event_callback_del(m_ewkView, EVAS_CALLBACK_MOUSE_MOVE, onMouseMove);
 #endif
 }
 
@@ -62,14 +63,14 @@ void Pan::start(const IntPoint& point)
     if (m_panAnimator)
         return;
 
-    PageClientImpl* pageClientImpl = m_viewImpl->pageClient.get();
+    PageClientImpl* pageClientImpl = ewkViewGetPageClient(m_ewkView);
     EINA_SAFETY_ON_NULL_RETURN(pageClientImpl);
 
 #if ENABLE(TIZEN_CSS_OVERFLOW_SCROLL_ACCELERATION)
     pageClientImpl->findScrollableNode(point);
 #endif
 
-    ewkViewClearEdges(m_viewImpl->view());
+    ewkViewClearEdges(pageClientImpl->viewWidget());
     // Below statement means the update() was not called before start().
     if (m_lastPoint == IntPoint::zero())
         m_lastPoint = point;
@@ -97,7 +98,7 @@ void Pan::stop()
         m_panAnimator = 0;
 
 #if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION)
-    PageClientImpl* pageClientImpl = m_viewImpl->pageClient.get();
+    PageClientImpl* pageClientImpl = ewkViewGetPageClient(m_ewkView);
     EINA_SAFETY_ON_NULL_RETURN(pageClientImpl);
     pageClientImpl->updateTextSelectionHandlesAndContextMenu(true);
 #endif
@@ -119,22 +120,22 @@ void Pan::process()
     int deltaX = m_lastPoint.x() - m_currentPoint.x();
     int deltaY = m_lastPoint.y() - m_currentPoint.y();
 
-    PageClientImpl* pageClientImpl = m_viewImpl->pageClient.get();
+    PageClientImpl* pageClientImpl = ewkViewGetPageClient(m_ewkView);
     EINA_SAFETY_ON_NULL_RETURN(pageClientImpl);
 
     if (!deltaX && !deltaY)
         return;
 
-    ewkViewSendScrollEvent(m_viewImpl->view(), deltaX, deltaY);
-    if (ewk_view_horizontal_panning_hold_get(m_viewImpl->view()))
+    ewkViewSendScrollEvent(m_ewkView, deltaX, deltaY);
+    if (ewk_view_horizontal_panning_hold_get(m_ewkView))
         deltaX = 0;
-    if (ewk_view_vertical_panning_hold_get(m_viewImpl->view()))
+    if (ewk_view_vertical_panning_hold_get(m_ewkView))
         deltaY = 0;
 
     // Get scrollPosition before scrolling.
     IntPoint scrollPosition = pageClientImpl->scrollPosition();
-    if (WKPageScrollBy(toAPI(m_viewImpl->page()), toAPI(IntSize(deltaX, deltaY))))
-        ewkViewSendEdgeEvent(m_viewImpl->view(), scrollPosition, deltaX, deltaY);
+    if (WKPageScrollBy(toAPI(pageClientImpl->page()), toAPI(IntSize(deltaX, deltaY))))
+        ewkViewSendEdgeEvent(pageClientImpl->viewWidget(), scrollPosition, deltaX, deltaY);
 #if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION)
     pageClientImpl->updateTextSelectionHandlesAndContextMenu(false, true);
 #endif
old mode 100755 (executable)
new mode 100644 (file)
index 9ef9927..f889859
@@ -35,9 +35,9 @@ class EwkViewImpl;
 
 class Pan {
 public:
-    static PassOwnPtr<Pan> create(EwkViewImpl* ewkImpl)
+    static PassOwnPtr<Pan> create(Evas_Object* ewkView)
     {
-        return adoptPtr(new Pan(ewkImpl));
+        return adoptPtr(new Pan(ewkView));
     }
     ~Pan();
 
@@ -56,9 +56,10 @@ private:
 #endif
 
 private:
-    explicit Pan(EwkViewImpl*);
+    explicit Pan(Evas_Object*);
     void process();
 
+    Evas_Object* m_ewkView;
     EwkViewImpl* m_viewImpl;
     Ecore_Animator* m_panAnimator;
     WebCore::IntPoint m_lastPoint;
index 8eb34de..5ea544b 100755 (executable)
@@ -28,8 +28,8 @@
 
 #if ENABLE(TIZEN_SCREEN_READER)
 
-#include "EwkViewImpl.h"
 #include "PageClientImpl.h"
+#include "ewk_view_private.h"
 
 #include <Ecore_X.h>
 
@@ -76,20 +76,22 @@ void ScreenReaderProxy::setEnabled(bool enabled)
         m_ttsHandle = 0;
 
         for (size_t i = 0; i < m_viewSet.size(); ++i) {
-            m_viewSet[i]->page()->clearScreenReader();
-            m_viewSet[i]->focusRing->setImageDrawing(false);
+            PageClientImpl* pageClientImpl = ewkViewGetPageClient(m_viewSet[i]);
+            pageClientImpl->page()->clearScreenReader();
+
+            ewkViewGetFocusRing(m_viewSet[i])->setImageDrawing(false);
         }
     }
 }
 
-void ScreenReaderProxy::addView(EwkViewImpl* viewImpl)
+void ScreenReaderProxy::addView(Evas_Object* ewkView)
 {
-    m_viewSet.append(viewImpl);
+    m_viewSet.append(ewkView);
 }
 
-void ScreenReaderProxy::removeView(EwkViewImpl* viewImpl)
+void ScreenReaderProxy::removeView(Evas_Object* ewkView)
 {
-    size_t remove = m_viewSet.find(viewImpl);
+    size_t remove = m_viewSet.find(ewkView);
     ASSERT(remove != notFound);
     m_viewSet.remove(remove);
 }
@@ -112,10 +114,10 @@ void ScreenReaderProxy::setText(const String& text)
     }
 }
 
-EwkViewImpl* ScreenReaderProxy::getView(const unsigned int window)
+Evas_Object* ScreenReaderProxy::getView(const unsigned int window)
 {
     for (size_t i = 0; i < m_viewSet.size(); ++i) {
-        Ecore_Evas* ee = ecore_evas_ecore_evas_get(evas_object_evas_get(m_viewSet[i]->view()));
+        Ecore_Evas* ee = ecore_evas_ecore_evas_get(evas_object_evas_get(m_viewSet[i]));
         Ecore_X_Window viewWindow = ecore_evas_software_x11_window_get(ee);
         if (!viewWindow)
             viewWindow = ecore_evas_gl_x11_window_get(ee);
@@ -126,29 +128,30 @@ EwkViewImpl* ScreenReaderProxy::getView(const unsigned int window)
     return 0;
 }
 
-bool ScreenReaderProxy::executeCommand(EwkViewImpl* viewImpl, unsigned command, int data1, int data2)
+bool ScreenReaderProxy::executeCommand(Evas_Object* ewkView, unsigned command, int data1, int data2)
 {
+    PageClientImpl* pageClientImpl = ewkViewGetPageClient(ewkView);
     setEnabled(true);
 
     if (command == ECORE_X_ATOM_E_ILLUME_ACCESS_ACTION_NEXT || command == ECORE_X_ATOM_E_ILLUME_ACCESS_ACTION_READ_NEXT) {
-        if (!viewImpl->page()->moveScreenReaderFocus(true))
+        if (!pageClientImpl->page()->moveScreenReaderFocus(true))
             return false;
     } else if (command == ECORE_X_ATOM_E_ILLUME_ACCESS_ACTION_PREV || command == ECORE_X_ATOM_E_ILLUME_ACCESS_ACTION_READ_PREV) {
-        if (!viewImpl->page()->moveScreenReaderFocus(false))
+        if (!pageClientImpl->page()->moveScreenReaderFocus(false))
             return false;
     } else if (command == ECORE_X_ATOM_E_ILLUME_ACCESS_ACTION_READ) {
-        IntPoint localPoint = viewImpl->transformFromScene().mapPoint(IntPoint(data1, data2));
-        viewImpl->page()->moveScreenReaderFocusByPoint(localPoint);
+        IntPoint localPoint = EwkViewImpl::fromEvasObject(ewkView)->transformFromScene().mapPoint(IntPoint(data1, data2));
+        pageClientImpl->page()->moveScreenReaderFocusByPoint(localPoint);
     } else if (command == ECORE_X_ATOM_E_ILLUME_ACCESS_ACTION_ACTIVATE) {
-        IntPoint point(viewImpl->focusRing->centerPointInScreen());
+        IntPoint point(ewkViewGetFocusRing(ewkView)->centerPointInScreen());
         if (point.x() < 0 || point.y() < 0)
             return false;
 
-        point = viewImpl->transformFromScene().mapPoint(point);
-        viewImpl->page()->raiseTapEvent(point);
+        point = EwkViewImpl::fromEvasObject(ewkView)->transformFromScene().mapPoint(point);
+        pageClientImpl->page()->raiseTapEvent(point);
     }
 
-    viewImpl->focusRing->setImageDrawing(true);
+    ewkViewGetFocusRing(ewkView)->setImageDrawing(true);
     return true;
 }
 
@@ -163,11 +166,11 @@ Eina_Bool ScreenReaderProxy::eventHandler(void* data, int type, void* event)
     } else if (e->message_type != ECORE_X_ATOM_E_ILLUME_ACCESS_CONTROL)
         return ECORE_CALLBACK_PASS_ON;
 
-    EwkViewImpl* viewImpl = screenReader().getView(static_cast<unsigned int>(e->data.l[0]));
-    if (!viewImpl)
+    Evas_Object* ewkView = screenReader().getView(static_cast<unsigned int>(e->data.l[0]));
+    if (!ewkView)
         return ECORE_CALLBACK_PASS_ON;
 
-    bool result = screenReader().executeCommand(viewImpl, static_cast<Ecore_X_Atom>(e->data.l[1]), e->data.l[2], e->data.l[3]);
+    bool result = screenReader().executeCommand(ewkView, static_cast<Ecore_X_Atom>(e->data.l[1]), e->data.l[2], e->data.l[3]);
     return result ? ECORE_CALLBACK_DONE : ECORE_CALLBACK_PASS_ON;
 }
 
index eef7f3f..edc241b 100755 (executable)
@@ -33,8 +33,6 @@
 #include <tts.h>
 #include <wtf/Vector.h>
 
-class EwkViewImpl;
-
 namespace WebKit {
 
 class ScreenReaderProxy {
@@ -45,23 +43,23 @@ public:
 
     bool isEnabled() { return m_isEnabled; }
 
-    void addView(EwkViewImpl*);
-    void removeView(EwkViewImpl*);
+    void addView(Evas_Object*);
+    void removeView(Evas_Object*);
     void setText(const String&);
 
-    bool executeCommand(EwkViewImpl*, unsigned, int, int);
+    bool executeCommand(Evas_Object*, unsigned, int, int);
 
 private:
     ScreenReaderProxy();
 
     void setEnabled(bool);
 
-    EwkViewImpl* getView(const unsigned int);
+    Evas_Object* getView(const unsigned int);
 
     static Eina_Bool eventHandler(void*, int, void*);
     static void didTTSStateChanged(tts_h, tts_state_e, tts_state_e, void*);
 
-    Vector<EwkViewImpl*> m_viewSet;
+    Vector<Evas_Object*> m_viewSet;
 
     bool m_isEnabled;
     Ecore_Event_Handler* m_eventHandler;
old mode 100755 (executable)
new mode 100644 (file)
index 22aa787..388303f
@@ -22,6 +22,7 @@
 
 #include "EwkViewImpl.h"
 #include "PageClientImpl.h"
+#include "ewk_view_private.h"
 
 #if ENABLE(TOUCH_ADJUSTMENT)
 #include <Elementary.h>
@@ -34,12 +35,13 @@ using namespace std;
 const float SmartZoom::s_cosine[s_numberOfCosineValue] =
 { 1.0f, 0.99f, 0.96f, 0.93f, 0.88f, 0.82f, 0.75f, 0.67f, 0.59f, 0.5f, 0.41f, 0.33f, 0.25f, 0.18f, 0.12f, 0.07f, 0.01f };
 
-SmartZoom::SmartZoom(EwkViewImpl* viewImpl)
-    : m_viewImpl(viewImpl)
+SmartZoom::SmartZoom(Evas_Object* viewWidget)
+    : m_viewWidget(viewWidget)
     , m_scaleAnimator()
     , m_scaleIndex(0)
     , m_isStarted(false)
 {
+    m_viewImpl = EwkViewImpl::fromEvasObject(m_viewWidget);
 }
 
 SmartZoom::~SmartZoom()
@@ -51,9 +53,9 @@ void SmartZoom::start(int x, int y)
 {
     m_isStarted = true;
 
-    PageClientImpl* pageClientImpl = m_viewImpl->pageClient.get();
+    PageClientImpl* pageClientImpl = ewkViewGetPageClient(m_viewWidget);
     EINA_SAFETY_ON_NULL_RETURN(pageClientImpl);
-    EINA_SAFETY_ON_NULL_RETURN(m_viewImpl->page());
+    EINA_SAFETY_ON_NULL_RETURN(pageClientImpl->page());
 
     IntPoint position = m_viewImpl->transformFromScene().mapPoint(IntPoint(x, y));
     IntSize fingerSize;
@@ -63,9 +65,9 @@ void SmartZoom::start(int x, int y)
 #endif
 
     if (fabs(pageClientImpl->scaleFactor() - pageClientImpl->viewportConstraints().minimumScale) < numeric_limits<float>::epsilon())
-        m_viewImpl->page()->findZoomableAreaForPoint(position, fingerSize);
+        pageClientImpl->page()->findZoomableAreaForPoint(position, fingerSize);
     else
-        setZoomableArea(position, IntRect(IntPoint(), m_viewImpl->page()->contentsSize()));
+        setZoomableArea(position, IntRect(IntPoint(), pageClientImpl->page()->contentsSize()));
 }
 
 void SmartZoom::setZoomableArea(const IntPoint& target, const IntRect& area)
@@ -76,13 +78,13 @@ void SmartZoom::setZoomableArea(const IntPoint& target, const IntRect& area)
     if (area.isEmpty())
         return;
 
-    PageClientImpl* pageClientImpl = m_viewImpl->pageClient.get();
+    PageClientImpl* pageClientImpl = ewkViewGetPageClient(m_viewWidget);
     EINA_SAFETY_ON_NULL_RETURN(pageClientImpl);
-    EINA_SAFETY_ON_NULL_RETURN(m_viewImpl->page());
+    EINA_SAFETY_ON_NULL_RETURN(pageClientImpl->page());
 
     FloatRect targetRect = area;
     targetRect.inflateX(s_widthMargin);
-    FloatRect viewportRect(FloatPoint(), m_viewImpl->page()->viewSize());
+    FloatRect viewportRect(FloatPoint(), pageClientImpl->page()->viewSize());
     float targetScale = pageClientImpl->adjustScaleWithViewport(viewportRect.width() / targetRect.width());
 
     FloatRect newContentsRect(targetRect.center(), FloatSize(viewportRect.width() / targetScale, viewportRect.height() / targetScale));
@@ -103,7 +105,7 @@ void SmartZoom::setZoomableArea(const IntPoint& target, const IntRect& area)
     process();
 #else
     IntPoint scrollPosition(m_targetRect.x() * targetScale, m_targetRect.y() * targetScale);
-    m_viewImpl->page()->scale(targetScale, scrollPosition);
+    pageClientImpl->page()->scale(targetScale, scrollPosition);
 #endif
 }
 
@@ -114,13 +116,13 @@ void SmartZoom::stop()
     if (m_scaleAnimator) {
         ecore_animator_del(m_scaleAnimator);
 
-        PageClientImpl* pageClientImpl = m_viewImpl->pageClient.get();
+        PageClientImpl* pageClientImpl = ewkViewGetPageClient(m_viewWidget);
         EINA_SAFETY_ON_NULL_RETURN(pageClientImpl);
-        EINA_SAFETY_ON_NULL_RETURN(m_viewImpl->page());
+        EINA_SAFETY_ON_NULL_RETURN(pageClientImpl->page());
 
-        float scaleFactor = m_viewImpl->page()->viewSize().width() / m_targetRect.width();
+        float scaleFactor = pageClientImpl->page()->viewSize().width() / m_targetRect.width();
         IntPoint scrollPosition(m_targetRect.x() * scaleFactor, m_targetRect.y() * scaleFactor);
-        m_viewImpl->page()->scale(scaleFactor, scrollPosition);
+        pageClientImpl->page()->scale(scaleFactor, scrollPosition);
         m_scaleAnimator = 0;
     }
 }
@@ -132,9 +134,9 @@ Eina_Bool SmartZoom::scaleAnimatorCallback(void* data)
 
 bool SmartZoom::process()
 {
-    PageClientImpl* pageClientImpl = m_viewImpl->pageClient.get();
+    PageClientImpl* pageClientImpl = ewkViewGetPageClient(m_viewWidget);
     EINA_SAFETY_ON_NULL_RETURN_VAL(pageClientImpl, false);
-    EINA_SAFETY_ON_NULL_RETURN_VAL(m_viewImpl->page(), false);
+    EINA_SAFETY_ON_NULL_RETURN_VAL(pageClientImpl->page(), false);
 
     FloatRect rect;
     float multiplier = s_cosine[m_scaleIndex--];
@@ -143,9 +145,9 @@ bool SmartZoom::process()
     rect.setWidth(m_baseRect.width() + (m_targetRect.width() - m_baseRect.width()) * multiplier);
     rect.setHeight(m_baseRect.height() + (m_targetRect.height() - m_baseRect.height()) * multiplier);
 
-    float scaleFactor = m_viewImpl->page()->viewSize().width() / rect.width();
+    float scaleFactor = pageClientImpl->page()->viewSize().width() / rect.width();
     IntPoint scrollPosition(rect.x() * scaleFactor, rect.y() * scaleFactor);
-    m_viewImpl->page()->scaleImage(scaleFactor, scrollPosition);
+    pageClientImpl->page()->scaleImage(scaleFactor, scrollPosition);
 
     if (m_scaleIndex < 0)
         stop();
old mode 100755 (executable)
new mode 100644 (file)
index ef03200..bd60293
@@ -34,9 +34,9 @@ class EwkViewImpl;
 
 class SmartZoom {
 public:
-    static PassOwnPtr<SmartZoom> create(EwkViewImpl* viewImpl)
+    static PassOwnPtr<SmartZoom> create(Evas_Object* viewWidget)
     {
-        return adoptPtr(new SmartZoom(viewImpl));
+        return adoptPtr(new SmartZoom(viewWidget));
     }
     ~SmartZoom();
 
@@ -52,9 +52,10 @@ private:
     static Eina_Bool scaleAnimatorCallback(void*);
 
 private:
-    explicit SmartZoom(EwkViewImpl*);
+    explicit SmartZoom(Evas_Object*);
     bool process();
 
+    Evas_Object* m_viewWidget;
     EwkViewImpl* m_viewImpl;
     Ecore_Animator* m_scaleAnimator;
     WebCore::FloatRect m_baseRect;
old mode 100755 (executable)
new mode 100644 (file)
index 7f9b7b9..a653683
@@ -29,7 +29,6 @@
 #include "TextSelection.h"
 
 #include "EditorState.h"
-#include "EwkViewImpl.h"
 #include "NativeWebMouseEvent.h"
 #include "ewk_view.h"
 #include <Elementary.h>
@@ -38,8 +37,10 @@ using namespace WebCore;
 
 namespace WebKit {
 
-TextSelection::TextSelection(EwkViewImpl* viewImpl)
-      : m_viewImpl(viewImpl)
+TextSelection::TextSelection(Evas_Object* viewWidget, WebPageProxy* page, PageClientImpl* pageClient)
+      : m_object(viewWidget)
+      , m_page(page)
+      , m_pageClient(pageClient)
       , m_isTextSelectionDowned(false)
       , m_isTextSelectionMode(false)
       , m_moveAnimator(0)
@@ -47,6 +48,8 @@ TextSelection::TextSelection(EwkViewImpl* viewImpl)
 {
     ASSERT(viewWidget);
 
+    m_viewImpl = EwkViewImpl::fromEvasObject(m_object);
+
     const Eina_List* defaultThemeList = elm_theme_list_get(0);
 
     const Eina_List* l;
@@ -55,17 +58,17 @@ TextSelection::TextSelection(EwkViewImpl* viewImpl)
         char* themePath = elm_theme_list_item_path_get((const char*)theme, 0);
 
         if (themePath) {
-            m_leftHandle = new TextSelectionHandle(m_viewImpl->view(), themePath, "elm/entry/selection/block_handle_left", true, this);
-            m_rightHandle = new TextSelectionHandle(m_viewImpl->view(), themePath, "elm/entry/selection/block_handle_right", false, this);
+            m_leftHandle = new TextSelectionHandle(m_object, themePath, "elm/entry/selection/block_handle_left", true, this);
+            m_rightHandle = new TextSelectionHandle(m_object, themePath, "elm/entry/selection/block_handle_right", false, this);
 
             free(themePath);
             break;
         }
     }
 
-    m_magnifier = new TextSelectionMagnifier(m_viewImpl);
+    m_magnifier = new TextSelectionMagnifier(m_object, page, pageClient);
 
-    evas_object_event_callback_add(m_viewImpl->view(), EVAS_CALLBACK_MOUSE_UP, onMouseUp, this);
+    evas_object_event_callback_add(m_object, EVAS_CALLBACK_MOUSE_UP, onMouseUp, this);
 }
 
 TextSelection::~TextSelection()
@@ -78,39 +81,39 @@ TextSelection::~TextSelection()
 
     delete m_magnifier;
 
-    evas_object_event_callback_del(m_viewImpl->view(), EVAS_CALLBACK_MOUSE_UP, onMouseUp);
+    evas_object_event_callback_del(m_object, EVAS_CALLBACK_MOUSE_UP, onMouseUp);
 }
 
 void TextSelection::update()
 {
-    EditorState editorState = m_viewImpl->page()->editorState();
+    EditorState editorState = m_page->editorState();
     if (editorState.updateEditorRectOnly)
         return;
 
     if (isTextSelectionMode()) {
         if (!editorState.selectionIsRange) {
-            if (editorState.isContentEditable && !evas_object_focus_get(m_viewImpl->view())) {
+            if (editorState.isContentEditable && !evas_object_focus_get(m_object)) {
                 WebCore::IntRect caretRect;
-                m_viewImpl->page()->getCaretPosition(caretRect);
+                m_page->getCaretPosition(caretRect);
                 if (!caretRect.isEmpty())
                     return;
             } else {
                 WebCore::IntRect leftRect;
                 WebCore::IntRect rightRect;
-                if (isTextSelectionDowned() || m_viewImpl->page()->getSelectionHandlers(leftRect, rightRect))
+                if (isTextSelectionDowned() || m_page->getSelectionHandlers(leftRect, rightRect))
                     return;
 
                 setIsTextSelectionMode(false);
             }
 #if ENABLE(TIZEN_WEBKIT2_GET_TEXT_STYLE_FOR_SELECTION)
-            m_viewImpl->page()->getTextStyleStateForSelection();
+            m_page->getTextStyleStateForSelection();
 #endif
         } else {
             if (!isTextSelectionDowned() && !isTextSelectionHandleDowned()) {
                 updateHandlers();
                 showContextMenu();
 #if ENABLE(TIZEN_WEBKIT2_GET_TEXT_STYLE_FOR_SELECTION)
-                m_viewImpl->page()->getTextStyleStateForSelection();
+                m_page->getTextStyleStateForSelection();
 #endif
             }
         }
@@ -119,9 +122,9 @@ void TextSelection::update()
     else {
         if (editorState.isContentEditable && !editorState.selectionIsRange) {
             WebCore::IntRect caretRect;
-            m_viewImpl->page()->getCaretPosition(caretRect);
+            m_page->getCaretPosition(caretRect);
             if (!caretRect.isEmpty()) {
-                m_viewImpl->page()->getTextStyleStateForSelection();
+                m_page->getTextStyleStateForSelection();
             }
         }
     }
@@ -143,11 +146,11 @@ void TextSelection::setIsTextSelectionMode(bool isTextSelectionMode)
 
 void TextSelection::clear()
 {
-    EditorState editorState = m_viewImpl->page()->editorState();
+    EditorState editorState = m_page->editorState();
     if (!editorState.selectionIsRange)
         return;
 
-    m_viewImpl->page()->selectionRangeClear();
+    m_page->selectionRangeClear();
 }
 
 void TextSelection::hide()
@@ -160,7 +163,7 @@ void TextSelection::hide()
 void TextSelection::updateHandlers()
 {
     WebCore::IntRect leftRect, rightRect;
-    if (!m_viewImpl->page()->getSelectionHandlers(leftRect, rightRect))
+    if (!m_page->getSelectionHandlers(leftRect, rightRect))
         return;
 
     m_lastLeftHandleRect = leftRect;
@@ -170,7 +173,7 @@ void TextSelection::updateHandlers()
     WebCore::IntPoint leftEvasPoint = toEvasTransform.mapPoint(leftRect.minXMaxYCorner());
     WebCore::IntPoint rightEvasPoint = toEvasTransform.mapPoint(rightRect.maxXMaxYCorner());
 
-    EditorState editorState = m_viewImpl->page()->editorState();
+    EditorState editorState = m_page->editorState();
     if (editorState.isContentEditable) {
         m_leftHandle->hide();
         m_rightHandle->hide();
@@ -180,7 +183,7 @@ void TextSelection::updateHandlers()
         WebCore::IntPoint editorRightEvasPoint = toEvasTransform.mapPoint(editorRect.maxXMaxYCorner());
         int webViewX, webViewY, webViewWidth, webViewHeight;
 
-        evas_object_geometry_get(m_viewImpl->view(), &webViewX, &webViewY, &webViewWidth, &webViewHeight);
+        evas_object_geometry_get(m_object, &webViewX, &webViewY, &webViewWidth, &webViewHeight);
         if ((editorLeftEvasPoint.x() <= leftEvasPoint.x() && editorLeftEvasPoint.y() <= leftEvasPoint.y())
             && (webViewX <= leftEvasPoint.x() && webViewY <= leftEvasPoint.y())) {
                 m_leftHandle->move(leftEvasPoint);
@@ -228,7 +231,7 @@ void TextSelection::showContextMenu()
     if (!isEnabled())
         return;
 
-    EditorState editorState = m_viewImpl->page()->editorState();
+    EditorState editorState = m_page->editorState();
     if (!editorState.selectionIsRange && !editorState.isContentEditable)
         return;
 
@@ -238,15 +241,15 @@ void TextSelection::showContextMenu()
 #endif
     if (editorState.selectionIsRange) {
         WebCore::IntRect leftRect, rightRect;
-        if (!m_viewImpl->page()->getSelectionHandlers(leftRect, rightRect))
+        if (!m_page->getSelectionHandlers(leftRect, rightRect))
             return;
 
 #if ENABLE(TIZEN_WEBKIT2_TILED_BACKING_STORE)
         // Checking if this point is in viewport area. If the calcualated
         // point/Left/Right point are in view port then draw else do not draw the
         // context menu. Only draw the selection points.
-        FloatRect unscaledRect = FloatRect(m_viewImpl->pageClient->visibleContentRect());
-        unscaledRect.scale(1 / m_viewImpl->pageClient->scaleFactor());
+        FloatRect unscaledRect = FloatRect(m_pageClient->visibleContentRect());
+        unscaledRect.scale(1 / m_pageClient->scaleFactor());
         IntRect viewportRect = enclosingIntRect(unscaledRect);
 
         WebCore::IntPoint visiblePoint = leftRect.center();
@@ -270,7 +273,7 @@ void TextSelection::showContextMenu()
 #endif
     } else if (editorState.isContentEditable) {
         WebCore::IntRect caretRect;
-        m_viewImpl->page()->getCaretPosition(caretRect);
+        m_page->getCaretPosition(caretRect);
 
         if (caretRect.isEmpty())
             return;
@@ -287,12 +290,12 @@ void TextSelection::showContextMenu()
 
     // show context menu if its in viewport else do not show the contextmenu
 
-    Ewk_View_Smart_Data* smartData = static_cast<Ewk_View_Smart_Data*>(evas_object_smart_data_get(m_viewImpl->view()));
+    Ewk_View_Smart_Data* smartData = static_cast<Ewk_View_Smart_Data*>(evas_object_smart_data_get(m_object));
     if (!smartData || !smartData->api || !smartData->api->mouse_down || !smartData->api->mouse_up)
         return;
 
     point = m_viewImpl->transformToScene().mapPoint(point);
-    Evas* evas = evas_object_evas_get(m_viewImpl->view());
+    Evas* evas = evas_object_evas_get(m_object);
 
     // send mouse down.
     Evas_Event_Mouse_Down mouseDown;
@@ -328,18 +331,18 @@ void TextSelection::hideContextMenu()
     if (!isEnabled())
         return;
 
-    m_viewImpl->page()->hideContextMenu();
+    m_page->hideContextMenu();
 }
 
 void TextSelection::setLeftSelectionToEvasPoint(const IntPoint& evasPoint)
 {
-    m_viewImpl->page()->setLeftSelection(m_viewImpl->transformFromScene().mapPoint(evasPoint));
+    m_page->setLeftSelection(m_viewImpl->transformFromScene().mapPoint(evasPoint));
     updateHandlers();
 }
 
 void TextSelection::setRightSelectionToEvasPoint(const IntPoint& evasPoint)
 {
-    m_viewImpl->page()->setRightSelection(m_viewImpl->transformFromScene().mapPoint(evasPoint));
+    m_page->setRightSelection(m_viewImpl->transformFromScene().mapPoint(evasPoint));
     updateHandlers();
 }
 
@@ -347,11 +350,11 @@ void TextSelection::setRightSelectionToEvasPoint(const IntPoint& evasPoint)
 void TextSelection::handleMouseDown(TextSelectionHandle* handle, const IntPoint& /*position*/)
 {
     WebCore::IntPoint basePosition;
-    EditorState editorState = m_viewImpl->page()->editorState();
+    EditorState editorState = m_page->editorState();
 
     if (editorState.selectionIsRange) {
         WebCore::IntRect leftRect, rightRect;
-        if (!m_viewImpl->page()->getSelectionHandlers(leftRect, rightRect)) {
+        if (!m_page->getSelectionHandlers(leftRect, rightRect)) {
             clear();
             return;
         }
@@ -388,7 +391,7 @@ void TextSelection::handleMouseUp(TextSelectionHandle* /* handle */, const IntPo
     hideMagnifier();
     showContextMenu();
 #if ENABLE(TIZEN_WEBKIT2_GET_TEXT_STYLE_FOR_SELECTION)
-    m_viewImpl->page()->getTextStyleStateForSelection();
+    m_page->getTextStyleStateForSelection();
 #endif
 }
 
@@ -443,7 +446,7 @@ Eina_Bool TextSelection::moveAnimatorCallback(void* data)
     TextSelection* textSelection = static_cast<TextSelection*>(data);
 
     Evas_Coord_Point point;
-    evas_pointer_canvas_xy_get(evas_object_evas_get(textSelection->m_viewImpl->view()), &point.x, &point.y);
+    evas_pointer_canvas_xy_get(evas_object_evas_get(textSelection->m_object), &point.x, &point.y);
     textSelection->textSelectionMove(IntPoint(point.x, point.y));
 
     return ECORE_CALLBACK_RENEW;
@@ -456,7 +459,7 @@ bool TextSelection::textSelectionDown(const IntPoint& point, bool isStartedTextS
     setIsTextSelectionMode(false);
 
     IntPoint contentsPoint = m_viewImpl->transformFromScene().mapPoint(point);
-    bool result = m_viewImpl->page()->selectClosestWord(contentsPoint, isStartedTextSelectionFromOutside);
+    bool result = m_page->selectClosestWord(contentsPoint, isStartedTextSelectionFromOutside);
     if (!result)
         return false;
 
@@ -483,15 +486,15 @@ void TextSelection::textSelectionMove(const IntPoint& point, bool isStartedTextS
     }
 
     WebCore::IntPoint viewPoint = m_viewImpl->transformFromScene().mapPoint(point);
-    EditorState editorState = m_viewImpl->page()->editorState();
+    EditorState editorState = m_page->editorState();
     if (editorState.isContentEditable) {
         IntRect mapRect = m_viewImpl->transformToScene().mapRect(editorState.editorRect);
         if(mapRect.contains(point)) {
-            m_viewImpl->page()->selectClosestWord(viewPoint, isStartedTextSelectionFromOutside);
+            m_page->selectClosestWord(viewPoint, isStartedTextSelectionFromOutside);
             updateMagnifier(point);
         }
     } else {
-        m_viewImpl->page()->selectClosestWord(viewPoint, isStartedTextSelectionFromOutside);
+        m_page->selectClosestWord(viewPoint, isStartedTextSelectionFromOutside);
         updateMagnifier(point);
     }
     showMagnifier();
@@ -507,7 +510,7 @@ void TextSelection::textSelectionUp(const IntPoint& point, bool isStartedTextSel
     setIsTextSelectionDowned(false);
     hideMagnifier();
 
-    EditorState editorState = m_viewImpl->page()->editorState();
+    EditorState editorState = m_page->editorState();
     if (editorState.selectionIsRange || editorState.isContentEditable) {
         if (editorState.selectionIsRange)
             updateHandlers();
@@ -517,7 +520,7 @@ void TextSelection::textSelectionUp(const IntPoint& point, bool isStartedTextSel
         setIsTextSelectionMode(false);
 
 #if ENABLE(TIZEN_WEBKIT2_GET_TEXT_STYLE_FOR_SELECTION)
-    m_viewImpl->page()->getTextStyleStateForSelection();
+    m_page->getTextStyleStateForSelection();
 #endif
 }
 
@@ -564,12 +567,12 @@ void TextSelection::textSelectionHandleUp()
 
 bool TextSelection::isEnabled()
 {
-    return ewk_settings_text_selection_enabled_get(ewk_view_settings_get(m_viewImpl->view()));
+    return ewk_settings_text_selection_enabled_get(ewk_view_settings_get(m_object));
 }
 
 bool TextSelection::isAutomaticClearEnabled()
 {
-    return ewk_settings_clear_text_selection_automatically_get(ewk_view_settings_get(m_viewImpl->view()));
+    return ewk_settings_clear_text_selection_automatically_get(ewk_view_settings_get(m_object));
 }
 
 void TextSelection::requestToShow()
@@ -590,7 +593,7 @@ Eina_Bool TextSelection::showTimerCallback(void* data)
 void TextSelection::showHandlesAndContextMenu()
 {
     WebCore::IntRect leftRect, rightRect;
-    if (m_viewImpl->page()->getSelectionHandlers(leftRect, rightRect)) {
+    if (m_page->getSelectionHandlers(leftRect, rightRect)) {
         if ((leftRect == m_lastLeftHandleRect) && (rightRect == m_lastRightHandleRect)) {
             if (m_showTimer) {
                 ecore_timer_del(m_showTimer);
index e0711ab..ca3a706 100644 (file)
@@ -48,9 +48,9 @@ class PageClientImpl;
 
 class TextSelection {
 public:
-    static PassOwnPtr<TextSelection> create(EwkViewImpl* viewImpl)
+    static PassOwnPtr<TextSelection> create(Evas_Object* evas, WebPageProxy* page, PageClientImpl* pageClient)
     {
-        return adoptPtr(new TextSelection(viewImpl));
+        return adoptPtr(new TextSelection(evas, page, pageClient));
     }
     ~TextSelection();
 
@@ -67,6 +67,7 @@ public:
     void textSelectionMove(const WebCore::IntPoint& point, bool isStaredTextSelectionFromOutside = false);
     void textSelectionUp(const WebCore::IntPoint& point, bool isStaredTextSelectionFromOutside = false);
 
+
     // handle callback
     void handleMouseDown(TextSelectionHandle* handle, const WebCore::IntPoint& position);
     void handleMouseMove(TextSelectionHandle* handle, const WebCore::IntPoint& position);
@@ -83,7 +84,7 @@ public:
 
     friend class PageClientImpl; // to allow hideHandlers() call while zooming
 private:
-    TextSelection(EwkViewImpl*);
+    TextSelection(Evas_Object*, WebPageProxy*, PageClientImpl*);
     void clear();
     void hide();
     void updateHandlers();
@@ -110,10 +111,13 @@ private:
     void showHandlesAndContextMenu();
 
 private:
+    Evas_Object* m_object;
     EwkViewImpl* m_viewImpl;
     TextSelectionHandle* m_leftHandle;
     TextSelectionHandle* m_rightHandle;
     TextSelectionMagnifier* m_magnifier;
+    WebPageProxy* m_page;
+    PageClientImpl* m_pageClient;
     bool m_isTextSelectionDowned;
     bool m_isTextSelectionMode;
     Ecore_Animator* m_moveAnimator;
index ff57eab..3bf643a 100755 (executable)
@@ -38,14 +38,16 @@ using namespace WebCore;
 
 namespace WebKit {
 
-TextSelectionMagnifier::TextSelectionMagnifier(EwkViewImpl* viewImpl)
-    : m_viewImpl(viewImpl)
-    , m_image(0)
-    , m_magnifier(0)
-    , m_magnifierBackground(0)
-    , m_magnifierFrame(0)
-    , m_width(300)
-    , m_height(100)
+TextSelectionMagnifier::TextSelectionMagnifier(Evas_Object* object, WebPageProxy* page, PageClientImpl* pageClient)
+    : m_object(object),
+      m_image(0),
+      m_magnifier(0),
+      m_magnifierBackground(0),
+      m_magnifierFrame(0),
+      m_width(300),
+      m_height(100),
+      m_page(page),
+      m_pageClient(pageClient)
 {
 }
 
@@ -59,9 +61,9 @@ TextSelectionMagnifier::~TextSelectionMagnifier()
 void TextSelectionMagnifier::update(const IntPoint& point)
 {
     if (!m_magnifier) {
-        Evas_Object* topWidget = elm_object_top_widget_get(elm_object_parent_widget_get(m_viewImpl->view()));
+        Evas_Object* topWidget = elm_object_top_widget_get(elm_object_parent_widget_get(m_object));
         if (!topWidget)
-            topWidget = m_viewImpl->view();
+            topWidget = m_object;
 
         m_magnifier = elm_layout_add(topWidget);
         elm_layout_file_set(m_magnifier, EDJE_DIR"/Magnifier.edj", "magnifier");
@@ -75,7 +77,7 @@ void TextSelectionMagnifier::update(const IntPoint& point)
     m_magnifierFrame = elm_frame_add(m_magnifier);
 
     int viewX, viewY, viewWidth, viewHeight;
-    evas_object_geometry_get(m_viewImpl->view(), &viewX, &viewY, &viewWidth, &viewHeight);
+    evas_object_geometry_get(m_pageClient->viewWidget(), &viewX, &viewY, &viewWidth, &viewHeight);
 
     float zoomLevel = 1.5f;
     IntRect rect(point.x() - viewX - (ceil(m_width/zoomLevel)/2), point.y() - viewY - (ceil(m_height/zoomLevel)/2), ceil(m_width/zoomLevel), ceil(m_height/zoomLevel));
@@ -92,7 +94,7 @@ void TextSelectionMagnifier::update(const IntPoint& point)
     if (overSize > 0)
         rect.setY(rect.y() - overSize);
 
-    RefPtr<WebImage> webImage = m_viewImpl->page()->createSnapshot(rect, zoomLevel);
+    RefPtr<WebImage> webImage = m_page->createSnapshot(rect, zoomLevel);
     if (!webImage || !webImage->bitmap())
         return;
     RefPtr<cairo_surface_t> cairoSurface = webImage->bitmap()->createCairoSurface();
@@ -102,7 +104,7 @@ void TextSelectionMagnifier::update(const IntPoint& point)
     if (m_image)
         evas_object_del(m_image);
 
-    m_image = ewk_util_image_from_cairo_surface_add(evas_object_evas_get(m_viewImpl->view()), cairoSurface.get());
+    m_image = ewk_util_image_from_cairo_surface_add(evas_object_evas_get(m_object), cairoSurface.get());
     evas_object_size_hint_min_set(m_image, m_width, m_height);
     evas_object_resize(m_image, m_width, m_height);
     evas_object_image_filled_set(m_image, true);
index 2a60db6..65d5237 100755 (executable)
 #include <Evas.h>
 #include <WebCore/IntPoint.h>
 
-class EwkViewImpl;
-
 namespace WebKit {
 
 class PageClientImpl;
 
 class TextSelectionMagnifier {
 public:
-    TextSelectionMagnifier(EwkViewImpl*);
+    TextSelectionMagnifier(Evas_Object* object, WebPageProxy* page, PageClientImpl* pageClient);
     ~TextSelectionMagnifier();
 
     void show();
@@ -52,13 +50,15 @@ public:
     bool isVisible();
 
 private:
-    EwkViewImpl* m_viewImpl;
+    Evas_Object* m_object;
     Evas_Object* m_image;
     Evas_Object* m_magnifier;
     Evas_Object* m_magnifierBackground;
     Evas_Object* m_magnifierFrame;
     int m_width;
     int m_height;
+    WebPageProxy* m_page;
+    PageClientImpl* m_pageClient;
 };
 
 } // namespace WebKit
old mode 100755 (executable)
new mode 100644 (file)
index d7d7eb3..31d8508
@@ -20,8 +20,8 @@
 #include "config.h"
 #include "Zoom.h"
 
-#include "EwkViewImpl.h"
 #include "PageClientImpl.h"
+#include "ewk_view_private.h"
 
 #if ENABLE(TIZEN_WEBKIT2_TEXT_ZOOM)
 #include "WebPageGroup.h"
@@ -52,8 +52,8 @@ static int getPointDistanceSquare(const IntPoint& point1, const IntPoint& point2
     return xDistance * xDistance + yDistance * yDistance;
 }
 
-Zoom::Zoom(EwkViewImpl* viewImpl)
-    : m_viewImpl(viewImpl)
+Zoom::Zoom(Evas_Object* viewWidget)
+    : m_viewWidget(viewWidget)
     , m_isZooming(false)
     , m_isZoomInformationUpdated(false)
     , m_baseScaleFactor(0)
@@ -76,7 +76,7 @@ Zoom::~Zoom()
 
 void Zoom::start(const IntPoint& centerPoint, const IntPoint& viewLocation)
 {
-    PageClientImpl* pageClientImpl = m_viewImpl->pageClient.get();
+    PageClientImpl* pageClientImpl = ewkViewGetPageClient(m_viewWidget);
     EINA_SAFETY_ON_NULL_RETURN(pageClientImpl);
     m_isZooming = true;
     m_isZoomInformationUpdated = false;
@@ -86,7 +86,7 @@ void Zoom::start(const IntPoint& centerPoint, const IntPoint& viewLocation)
     m_newScrollPosition = m_baseScrollPosition = pageClientImpl->scrollPosition();
     m_centerPoint = centerPoint;
     int viewX, viewY;
-    evas_object_geometry_get(m_viewImpl->view(), &viewX, &viewY, 0, 0);
+    evas_object_geometry_get(m_viewWidget, &viewX, &viewY, 0, 0);
     m_viewLocation = IntPoint(viewX, viewY);
 
     m_basisPoint.setX(centerPoint.x() - m_viewLocation.x());
@@ -97,7 +97,7 @@ void Zoom::start(const IntPoint& centerPoint, const IntPoint& viewLocation)
     m_zoomAnimator = ecore_animator_add(zoomAnimatorCallback, this);
 
     // Notify that zoom is started.
-    evas_object_smart_callback_call(m_viewImpl->view(), "zoom,started", 0);
+    evas_object_smart_callback_call(m_viewWidget, "zoom,started", 0);
 }
 
 void Zoom::stop()
@@ -110,11 +110,11 @@ void Zoom::update(const double zoom, const IntPoint& centerPoint)
     if (!m_isZooming)
         start(centerPoint, IntPoint());
 
-    PageClientImpl* pageClientImpl = m_viewImpl->pageClient.get();
+    PageClientImpl* pageClientImpl = ewkViewGetPageClient(m_viewWidget);
     EINA_SAFETY_ON_NULL_RETURN(pageClientImpl);
 #if ENABLE(TIZEN_WEBKIT2_TEXT_ZOOM)
     double newScaleFactor = m_baseScaleFactor * zoom;
-    if (!m_viewImpl->page()->pageGroup()->preferences()->textZoomEnabled())
+    if (!pageClientImpl->page()->pageGroup()->preferences()->textZoomEnabled())
         newScaleFactor = pageClientImpl->adjustScaleWithViewport(newScaleFactor);
 #else
     double newScaleFactor = pageClientImpl->adjustScaleWithViewport(m_baseScaleFactor * zoom);
@@ -135,17 +135,17 @@ void Zoom::realStop()
         ecore_animator_del(m_zoomAnimator);
         m_zoomAnimator = 0;
 
-        PageClientImpl* pageClientImpl = m_viewImpl->pageClient.get();
-        m_viewImpl->page()->scaleImage(m_newScaleFactor, m_newScrollPosition);
+        PageClientImpl* pageClientImpl = ewkViewGetPageClient(m_viewWidget);
+        pageClientImpl->page()->scaleImage(m_newScaleFactor, m_newScrollPosition);
         EINA_SAFETY_ON_NULL_RETURN(pageClientImpl);
 
 #if ENABLE(TIZEN_WEBKIT2_TEXT_ZOOM)
-        if (m_viewImpl->page()->pageGroup()->preferences()->textZoomEnabled()) {
-            double textScaleFactor = pageClientImpl->adjustScaleWithViewport(m_viewImpl->page()->textZoomFactor() * (m_newScaleFactor / m_baseScaleFactor));
-            m_viewImpl->page()->scale(m_baseScaleFactor, m_baseScrollPosition);
-            m_viewImpl->page()->setTextZoomFactor(textScaleFactor);
+        if (pageClientImpl->page()->pageGroup()->preferences()->textZoomEnabled()) {
+            double textScaleFactor = pageClientImpl->adjustScaleWithViewport(pageClientImpl->page()->textZoomFactor() * (m_newScaleFactor / m_baseScaleFactor));
+            pageClientImpl->page()->scale(m_baseScaleFactor, m_baseScrollPosition);
+            pageClientImpl->page()->setTextZoomFactor(textScaleFactor);
         } else
-            m_viewImpl->page()->scale(m_newScaleFactor, m_newScrollPosition);
+            pageClientImpl->page()->scale(m_newScaleFactor, m_newScrollPosition);
 #endif
 
 #if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION)
@@ -154,7 +154,7 @@ void Zoom::realStop()
     }
 
     // Notify that zoom is finished.
-    evas_object_smart_callback_call(m_viewImpl->view(), "zoom,finished", 0);
+    evas_object_smart_callback_call(m_viewWidget, "zoom,finished", 0);
 }
 
 Eina_Bool Zoom::zoomAnimatorCallback(void* data)
@@ -186,9 +186,9 @@ void Zoom::process()
     m_newScrollPosition.setX(m_newScrollPosition.x() + m_basisPoint.x() - (m_centerPoint.x() - m_viewLocation.x()));
     m_newScrollPosition.setY(m_newScrollPosition.y() + m_basisPoint.y() - (m_centerPoint.y() - m_viewLocation.y()));
 
-    PageClientImpl* pageClientImpl = m_viewImpl->pageClient.get();
+    PageClientImpl* pageClientImpl = ewkViewGetPageClient(m_viewWidget);
     EINA_SAFETY_ON_NULL_RETURN(pageClientImpl);
-    m_viewImpl->page()->scaleImage(m_currentScaleFactor, m_newScrollPosition);
+    pageClientImpl->page()->scaleImage(m_currentScaleFactor, m_newScrollPosition);
 
 #if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION)
     pageClientImpl->updateTextSelectionHandlesAndContextMenu(false);
old mode 100755 (executable)
new mode 100644 (file)
index d607b2a..d811e02
 #include <WebCore/IntPoint.h>
 #include <wtf/PassOwnPtr.h>
 
-class EwkViewImpl;
-
 class Zoom {
 public:
-    static PassOwnPtr<Zoom> create(EwkViewImpl* viewImpl)
+    static PassOwnPtr<Zoom> create(Evas_Object* viewWidget)
     {
-        return adoptPtr(new Zoom(viewImpl));
+        return adoptPtr(new Zoom(viewWidget));
     }
     ~Zoom();
 
@@ -46,11 +44,11 @@ private:
     static Eina_Bool zoomAnimatorCallback(void*);
 
 private:
-    explicit Zoom(EwkViewImpl* viewImpl);
+    explicit Zoom(Evas_Object* viewWidget);
     void realStop();
     void process();
 
-    EwkViewImpl* m_viewImpl;
+    Evas_Object* m_viewWidget;
     bool m_isZooming;
     bool m_isZoomInformationUpdated;
     double m_baseScaleFactor;
diff --git a/Source/WebKit2/UIProcess/API/gtk/WebKitFaviconDatabase.cpp b/Source/WebKit2/UIProcess/API/gtk/WebKitFaviconDatabase.cpp
deleted file mode 100644 (file)
index 206f1d1..0000000
+++ /dev/null
@@ -1,402 +0,0 @@
-/*
- * Copyright (C) 2012 Igalia S.L.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2,1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include "config.h"
-#include "WebKitFaviconDatabase.h"
-
-#include "WebKitFaviconDatabasePrivate.h"
-#include "WebKitPrivate.h"
-#include <WebCore/FileSystem.h>
-#include <WebCore/Image.h>
-#include <WebCore/IntSize.h>
-#include <WebCore/RefPtrCairo.h>
-#include <glib/gi18n-lib.h>
-#include <wtf/MainThread.h>
-#include <wtf/gobject/GRefPtr.h>
-#include <wtf/text/CString.h>
-
-using namespace WebKit;
-
-enum {
-    ICON_READY,
-
-    LAST_SIGNAL
-};
-
-static guint signals[LAST_SIGNAL] = { 0, };
-
-typedef Vector<GRefPtr<GSimpleAsyncResult> > PendingIconRequestVector;
-typedef HashMap<String, PendingIconRequestVector*> PendingIconRequestMap;
-
-struct _WebKitFaviconDatabasePrivate {
-    RefPtr<WebIconDatabase> iconDatabase;
-    PendingIconRequestMap pendingIconRequests;
-};
-
-G_DEFINE_TYPE(WebKitFaviconDatabase, webkit_favicon_database, G_TYPE_OBJECT)
-
-static void closeIconDatabaseIfNeeded(WebKitFaviconDatabase* database)
-{
-    WebKitFaviconDatabasePrivate* priv = database->priv;
-    if (priv->iconDatabase->isOpen())
-        priv->iconDatabase->close();
-}
-
-static void webkit_favicon_database_init(WebKitFaviconDatabase* manager)
-{
-    WebKitFaviconDatabasePrivate* priv = G_TYPE_INSTANCE_GET_PRIVATE(manager, WEBKIT_TYPE_FAVICON_DATABASE, WebKitFaviconDatabasePrivate);
-    manager->priv = priv;
-    new (priv) WebKitFaviconDatabasePrivate();
-}
-
-static void webkitFaviconDatabaseFinalize(GObject* object)
-{
-    WebKitFaviconDatabase* database = WEBKIT_FAVICON_DATABASE(object);
-
-    closeIconDatabaseIfNeeded(database);
-    database->priv->~WebKitFaviconDatabasePrivate();
-
-    G_OBJECT_CLASS(webkit_favicon_database_parent_class)->finalize(object);
-}
-
-static void webkit_favicon_database_class_init(WebKitFaviconDatabaseClass* faviconDatabaseClass)
-{
-    GObjectClass* gObjectClass = G_OBJECT_CLASS(faviconDatabaseClass);
-    gObjectClass->finalize = webkitFaviconDatabaseFinalize;
-
-    /**
-     * WebKitFaviconDatabase::favicon-ready:
-     * @database: the object on which the signal is emitted
-     * @page_uri: the URI of the Web page containing the icon.
-     *
-     * This signal gets emitted when the favicon of @page_uri is
-     * ready. This means that the favicon's data is ready to be used
-     * by the application, either because it has been loaded from the
-     * network, if it's the first time it gets retrieved, or because
-     * it has been already imported from the icon database.
-     */
-    signals[ICON_READY] =
-        g_signal_new("favicon-ready",
-                     G_TYPE_FROM_CLASS(faviconDatabaseClass),
-                     G_SIGNAL_RUN_LAST,
-                     0, 0, 0,
-                     g_cclosure_marshal_VOID__STRING,
-                     G_TYPE_NONE, 1,
-                     G_TYPE_STRING);
-
-    g_type_class_add_private(faviconDatabaseClass, sizeof(WebKitFaviconDatabasePrivate));
-}
-
-struct GetFaviconSurfaceAsyncData {
-    GRefPtr<WebKitFaviconDatabase> faviconDatabase;
-    String pageURL;
-    RefPtr<cairo_surface_t> icon;
-    GRefPtr<GCancellable> cancellable;
-    unsigned long cancelledId;
-
-    ~GetFaviconSurfaceAsyncData()
-    {
-        if (cancelledId)
-            g_cancellable_disconnect(cancellable.get(), cancelledId);
-    }
-};
-WEBKIT_DEFINE_ASYNC_DATA_STRUCT(GetFaviconSurfaceAsyncData)
-
-static cairo_surface_t* getIconSurfaceSynchronously(WebKitFaviconDatabase* database, const String& pageURL)
-{
-    ASSERT(isMainThread());
-
-    // The exact size we pass is irrelevant to the iconDatabase code.
-    // We must pass something greater than 0x0 to get an icon.
-    WebCore::NativeImagePtr icon = database->priv->iconDatabase->nativeImageForPageURL(pageURL, WebCore::IntSize(1, 1));
-    if (!icon)
-        return 0;
-
-    return icon ? icon->surface() : 0;
-}
-
-static void deletePendingIconRequests(WebKitFaviconDatabase* database, PendingIconRequestVector* requests, const String& pageURL)
-{
-    database->priv->pendingIconRequests.remove(pageURL);
-    delete requests;
-}
-
-static void processPendingIconsForURI(WebKitFaviconDatabase* database, const String& pageURL)
-{
-    PendingIconRequestVector* icons = database->priv->pendingIconRequests.get(pageURL);
-    if (!icons)
-        return;
-
-    for (size_t i = 0; i < icons->size(); ++i) {
-        GSimpleAsyncResult* result = icons->at(i).get();
-        GetFaviconSurfaceAsyncData* data = static_cast<GetFaviconSurfaceAsyncData*>(g_simple_async_result_get_op_res_gpointer(result));
-        data->icon = getIconSurfaceSynchronously(database, pageURL);
-
-        g_simple_async_result_complete(result);
-    }
-    deletePendingIconRequests(database, icons, pageURL);
-}
-
-static void iconDataReadyForPageURLCallback(WKIconDatabaseRef wkIconDatabase, WKURLRef wkPageURL, const void* clientInfo)
-{
-    ASSERT(isMainThread());
-
-    WebKitFaviconDatabase* database = WEBKIT_FAVICON_DATABASE(clientInfo);
-    String pageURLString = toImpl(wkPageURL)->string();
-
-    database->priv->iconDatabase->retainIconForPageURL(pageURLString);
-    processPendingIconsForURI(database, pageURLString);
-    g_signal_emit(database, signals[ICON_READY], 0, pageURLString.utf8().data());
-}
-
-WebKitFaviconDatabase* webkitFaviconDatabaseCreate(WebIconDatabase* iconDatabase)
-{
-    WebKitFaviconDatabase* faviconDatabase = WEBKIT_FAVICON_DATABASE(g_object_new(WEBKIT_TYPE_FAVICON_DATABASE, NULL));
-    faviconDatabase->priv->iconDatabase = iconDatabase;
-
-    WKIconDatabaseClient wkIconDatabaseClient = {
-        kWKIconDatabaseClientCurrentVersion,
-        faviconDatabase, // clientInfo
-        0, // didChangeIconForPageURLCallback
-        0, // didRemoveAllIconsCallback
-        iconDataReadyForPageURLCallback,
-    };
-    WKIconDatabaseSetIconDatabaseClient(toAPI(iconDatabase), &wkIconDatabaseClient);
-    return faviconDatabase;
-}
-
-static PendingIconRequestVector* getOrCreatePendingIconRequests(WebKitFaviconDatabase* database, const String& pageURL)
-{
-    PendingIconRequestVector* icons = database->priv->pendingIconRequests.get(pageURL);
-    if (!icons) {
-        icons = new PendingIconRequestVector;
-        database->priv->pendingIconRequests.set(pageURL, icons);
-    }
-
-    return icons;
-}
-
-static void getIconSurfaceCancelled(void* userData)
-{
-    GSimpleAsyncResult* result = static_cast<GSimpleAsyncResult*>(userData);
-
-    // Get the data we might need and complete the request.
-    GetFaviconSurfaceAsyncData* data = static_cast<GetFaviconSurfaceAsyncData*>(g_simple_async_result_get_op_res_gpointer(result));
-    WebKitFaviconDatabase* database = data->faviconDatabase.get();
-    String pageURL = data->pageURL;
-
-    g_simple_async_result_complete(result);
-
-    PendingIconRequestVector* icons = database->priv->pendingIconRequests.get(pageURL);
-    if (!icons)
-        return;
-
-    size_t itemIndex = icons->find(result);
-    if (itemIndex != notFound)
-        icons->remove(itemIndex);
-    if (icons->isEmpty())
-        deletePendingIconRequests(database, icons, pageURL);
-}
-
-static void getIconSurfaceCancelledCallback(GCancellable* cancellable, GSimpleAsyncResult* result)
-{
-    // Handle cancelled in a in idle since it might be called from any thread.
-    callOnMainThread(getIconSurfaceCancelled, result);
-}
-
-static void setErrorForAsyncResult(GSimpleAsyncResult* result, WebKitFaviconDatabaseError error, const String& pageURL = String())
-{
-    ASSERT(result);
-
-    switch (error) {
-    case WEBKIT_FAVICON_DATABASE_ERROR_NOT_INITIALIZED:
-        g_simple_async_result_set_error(result, WEBKIT_FAVICON_DATABASE_ERROR, error, _("Favicons database not initialized yet"));
-        break;
-
-    case WEBKIT_FAVICON_DATABASE_ERROR_FAVICON_NOT_FOUND:
-        g_simple_async_result_set_error(result, WEBKIT_FAVICON_DATABASE_ERROR, error, _("Page %s does not have a favicon"), pageURL.utf8().data());
-        break;
-
-    default:
-        ASSERT_NOT_REACHED();
-    }
-}
-
-GQuark webkit_favicon_database_error_quark(void)
-{
-    return g_quark_from_static_string("WebKitFaviconDatabaseError");
-}
-
-/**
- * webkit_favicon_database_get_favicon:
- * @database: a #WebKitFaviconDatabase
- * @page_uri: URI of the page for which we want to retrieve the favicon
- * @cancellable: (allow-none): A #GCancellable or %NULL.
- * @callback: (scope async): A #GAsyncReadyCallback to call when the request is
- *            satisfied or %NULL if you don't care about the result.
- * @user_data: (closure): The data to pass to @callback.
- *
- * Asynchronously obtains a #cairo_surface_t of the favicon for the
- * given page URI. It returns the cached icon if it's in the database
- * asynchronously waiting for the icon to be read from the database.
- *
- * This is an asynchronous method. When the operation is finished, callback will
- * be invoked. You can then call webkit_favicon_database_get_favicon_finish()
- * to get the result of the operation.
- */
-void webkit_favicon_database_get_favicon(WebKitFaviconDatabase* database, const gchar* pageURI, GCancellable* cancellable, GAsyncReadyCallback callback, gpointer userData)
-{
-    g_return_if_fail(WEBKIT_IS_FAVICON_DATABASE(database));
-    g_return_if_fail(pageURI);
-
-    GRefPtr<GSimpleAsyncResult> result = adoptGRef(g_simple_async_result_new(G_OBJECT(database), callback, userData, reinterpret_cast<gpointer>(webkit_favicon_database_get_favicon)));
-    GetFaviconSurfaceAsyncData* data = createGetFaviconSurfaceAsyncData();
-    g_simple_async_result_set_op_res_gpointer(result.get(), data, reinterpret_cast<GDestroyNotify>(destroyGetFaviconSurfaceAsyncData));
-    data->faviconDatabase = database;
-    data->pageURL = String::fromUTF8(pageURI);
-    data->cancellable = cancellable;
-    if (cancellable) {
-        data->cancelledId =
-            g_cancellable_connect(cancellable, G_CALLBACK(getIconSurfaceCancelledCallback), result.get(), 0);
-        g_simple_async_result_set_check_cancellable(result.get(), cancellable);
-    }
-
-    WebKitFaviconDatabasePrivate* priv = database->priv;
-    WebIconDatabase* iconDatabaseImpl = priv->iconDatabase.get();
-    if (!iconDatabaseImpl->isOpen()) {
-        setErrorForAsyncResult(result.get(), WEBKIT_FAVICON_DATABASE_ERROR_NOT_INITIALIZED);
-        g_simple_async_result_complete_in_idle(result.get());
-        return;
-    }
-
-    if (data->pageURL.isEmpty() || data->pageURL.startsWith("about:")) {
-        setErrorForAsyncResult(result.get(), WEBKIT_FAVICON_DATABASE_ERROR_FAVICON_NOT_FOUND, data->pageURL);
-        g_simple_async_result_complete_in_idle(result.get());
-        return;
-    }
-
-    // We ask for the icon directly. If we don't get the icon data now,
-    // we'll be notified later (even if the database is still importing icons).
-    data->icon = getIconSurfaceSynchronously(database, data->pageURL);
-
-    // If there's not a valid icon, but there's an iconURL registered,
-    // or it's still not registered but the import process hasn't
-    // finished yet, we need to wait for iconDataReadyForPage to be
-    // called before making and informed decision.
-    String iconURLForPageURL;
-    iconDatabaseImpl->synchronousIconURLForPageURL(data->pageURL, iconURLForPageURL);
-    if (!data->icon && (!iconURLForPageURL.isEmpty() || !iconDatabaseImpl->isUrlImportCompleted())) {
-        PendingIconRequestVector* icons = getOrCreatePendingIconRequests(database, data->pageURL);
-        ASSERT(icons);
-        icons->append(result);
-        return;
-    }
-
-    // If we reached this point without a valid icon, which means that
-    // there's no iconURL registered for this pageURI and the
-    // urlImport process has already finished, or do have a valid icon
-    // but it's an empty image, that means there's no favicon.
-    if (!data->icon || !cairo_image_surface_get_data(data->icon.get()))
-        setErrorForAsyncResult(result.get(), WEBKIT_FAVICON_DATABASE_ERROR_FAVICON_NOT_FOUND, data->pageURL);
-
-    // Complete the asynchronous process;
-    g_simple_async_result_complete_in_idle(result.get());
-}
-
-/**
- * webkit_favicon_database_get_favicon_finish:
- * @database: a #WebKitFaviconDatabase
- * @result: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to webkit_favicon_database_get_favicon()
- * @error: (allow-none): Return location for error or %NULL.
- *
- * Finishes an operation started with webkit_favicon_database_get_favicon().
- *
- * Returns: (transfer full): a new reference to a #cairo_surface_t, or
- * %NULL in case of error.
- */
-cairo_surface_t* webkit_favicon_database_get_favicon_finish(WebKitFaviconDatabase* database, GAsyncResult* result, GError** error)
-{
-    GSimpleAsyncResult* simpleResult = G_SIMPLE_ASYNC_RESULT(result);
-    g_warn_if_fail(g_simple_async_result_get_source_tag(simpleResult) == webkit_favicon_database_get_favicon);
-
-    if (g_simple_async_result_propagate_error(simpleResult, error))
-        return 0;
-
-    GetFaviconSurfaceAsyncData* data = static_cast<GetFaviconSurfaceAsyncData*>(g_simple_async_result_get_op_res_gpointer(simpleResult));
-    ASSERT(data);
-
-    if (data->icon)
-        return cairo_surface_reference(data->icon.get());
-
-    // If the icon is not available at this stage, investigate why
-    // and come up with a descriptive, and hopefully helpful, error.
-    String iconURLForPageURL;
-    database->priv->iconDatabase->synchronousIconURLForPageURL(data->pageURL, iconURLForPageURL);
-
-    if (iconURLForPageURL.isEmpty()) {
-        // If there's no icon URL in the database at this point, we can
-        // conclude there's no favicon at all for the requested page URL.
-        g_set_error(error, WEBKIT_FAVICON_DATABASE_ERROR, WEBKIT_FAVICON_DATABASE_ERROR_FAVICON_NOT_FOUND,
-                    _("Page %s does not have a favicon"), data->pageURL.utf8().data());
-    } else {
-        // If the icon URL is known it obviously means that the icon data
-        // hasn't been retrieved yet, so report that it's 'unknown'.
-        g_set_error(error, WEBKIT_FAVICON_DATABASE_ERROR, WEBKIT_FAVICON_DATABASE_ERROR_FAVICON_UNKNOWN,
-                    _("Unknown favicon for page %s"), data->pageURL.utf8().data());
-    }
-
-    return 0;
-}
-
-/**
- * webkit_favicon_database_get_favicon_uri:
- * @database: a #WebKitFaviconDatabase
- * @page_uri: URI of the page containing the icon
- *
- * Obtains the URI of the favicon for the given @page_uri.
- *
- * Returns: a newly allocated URI for the favicon, or %NULL if the
- * database doesn't have a favicon for @page_uri.
- */
-gchar* webkit_favicon_database_get_favicon_uri(WebKitFaviconDatabase* database, const gchar* pageURL)
-{
-    g_return_val_if_fail(WEBKIT_IS_FAVICON_DATABASE(database), 0);
-    g_return_val_if_fail(pageURL, 0);
-    ASSERT(isMainThread());
-
-    String iconURLForPageURL;
-    database->priv->iconDatabase->synchronousIconURLForPageURL(String::fromUTF8(pageURL), iconURLForPageURL);
-    if (iconURLForPageURL.isEmpty())
-        return 0;
-
-    return g_strdup(iconURLForPageURL.utf8().data());
-}
-
-/**
- * webkit_favicon_database_clear:
- * @database: a #WebKitFaviconDatabase
- *
- * Clears all icons from the database.
- */
-void webkit_favicon_database_clear(WebKitFaviconDatabase* database)
-{
-    g_return_if_fail(WEBKIT_IS_FAVICON_DATABASE(database));
-
-    database->priv->iconDatabase->removeAllIcons();
-}
diff --git a/Source/WebKit2/UIProcess/API/gtk/WebKitFaviconDatabase.h b/Source/WebKit2/UIProcess/API/gtk/WebKitFaviconDatabase.h
deleted file mode 100644 (file)
index 811a8e6..0000000
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Copyright (C) 2012 Igalia S.L.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2,1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#if !defined(__WEBKIT2_H_INSIDE__) && !defined(WEBKIT2_COMPILATION)
-#error "Only <webkit2/webkit2.h> can be included directly."
-#endif
-
-#ifndef WebKitFaviconDatabase_h
-#define WebKitFaviconDatabase_h
-
-#include <cairo.h>
-#include <gio/gio.h>
-#include <glib-object.h>
-#include <webkit2/WebKitDefines.h>
-
-G_BEGIN_DECLS
-
-#define WEBKIT_TYPE_FAVICON_DATABASE            (webkit_favicon_database_get_type())
-#define WEBKIT_FAVICON_DATABASE(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj), WEBKIT_TYPE_FAVICON_DATABASE, WebKitFaviconDatabase))
-#define WEBKIT_IS_FAVICON_DATABASE(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj), WEBKIT_TYPE_FAVICON_DATABASE))
-#define WEBKIT_FAVICON_DATABASE_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass),  WEBKIT_TYPE_FAVICON_DATABASE, WebKitFaviconDatabaseClass))
-#define WEBKIT_IS_FAVICON_DATABASE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),  WEBKIT_TYPE_FAVICON_DATABASE))
-#define WEBKIT_FAVICON_DATABASE_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj),  WEBKIT_TYPE_FAVICON_DATABASE, WebKitFaviconDatabaseClass))
-#define WEBKIT_FAVICON_DATABASE_ERROR           (webkit_favicon_database_error_quark())
-
-typedef struct _WebKitFaviconDatabase        WebKitFaviconDatabase;
-typedef struct _WebKitFaviconDatabaseClass   WebKitFaviconDatabaseClass;
-typedef struct _WebKitFaviconDatabasePrivate WebKitFaviconDatabasePrivate;
-
-struct _WebKitFaviconDatabase {
-    GObject parent;
-
-    WebKitFaviconDatabasePrivate *priv;
-};
-
-struct _WebKitFaviconDatabaseClass {
-    GObjectClass parent_class;
-};
-
-/**
- * WebKitFaviconDatabaseError:
- * @WEBKIT_FAVICON_DATABASE_ERROR_NOT_INITIALIZED: The #WebKitFaviconDatabase has not been initialized yet
- * @WEBKIT_FAVICON_DATABASE_ERROR_FAVICON_NOT_FOUND: There is not an icon available for the requested URL
- * @WEBKIT_FAVICON_DATABASE_ERROR_FAVICON_UNKNOWN: There might be an icon for the requested URL, but its data is unknown at the moment
- *
- * Enum values used to denote the various errors related to the #WebKitFaviconDatabase.
- **/
-typedef enum {
-    WEBKIT_FAVICON_DATABASE_ERROR_NOT_INITIALIZED,
-    WEBKIT_FAVICON_DATABASE_ERROR_FAVICON_NOT_FOUND,
-    WEBKIT_FAVICON_DATABASE_ERROR_FAVICON_UNKNOWN
-} WebKitFaviconDatabaseError;
-
-WEBKIT_API GQuark
-webkit_favicon_database_error_quark        (void);
-
-WEBKIT_API GType
-webkit_favicon_database_get_type           (void);
-
-WEBKIT_API void
-webkit_favicon_database_get_favicon        (WebKitFaviconDatabase *database,
-                                            const gchar           *page_uri,
-                                            GCancellable          *cancellable,
-                                            GAsyncReadyCallback    callback,
-                                            gpointer               user_data);
-WEBKIT_API cairo_surface_t *
-webkit_favicon_database_get_favicon_finish (WebKitFaviconDatabase *database,
-                                            GAsyncResult          *result,
-                                            GError               **error);
-WEBKIT_API gchar *
-webkit_favicon_database_get_favicon_uri    (WebKitFaviconDatabase *database,
-                                            const gchar           *page_uri);
-WEBKIT_API void
-webkit_favicon_database_clear              (WebKitFaviconDatabase *database);
-
-G_END_DECLS
-
-#endif
diff --git a/Source/WebKit2/UIProcess/API/gtk/WebKitFaviconDatabasePrivate.h b/Source/WebKit2/UIProcess/API/gtk/WebKitFaviconDatabasePrivate.h
deleted file mode 100644 (file)
index 78bdd66..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright (C) 2012 Igalia S.L.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifndef WebKitFaviconDatabasePrivate_h
-#define WebKitFaviconDatabasePrivate_h
-
-#include "WebIconDatabase.h"
-#include "WebKitFaviconDatabase.h"
-
-using namespace WebKit;
-
-WebKitFaviconDatabase* webkitFaviconDatabaseCreate(WebIconDatabase*);
-
-#endif // WebKitFaviconDatabasePrivate_h
index 6585fe3..aa8a71b 100644 (file)
@@ -34,7 +34,6 @@
 #include <WebKit2/WKGeolocationManager.h>
 #include <WebKit2/WKGeolocationPermissionRequest.h>
 #include <WebKit2/WKGeolocationPosition.h>
-#include <WebKit2/WKIconDatabase.h>
 #include <WebKit2/WKInspector.h>
 #include <WebKit2/WKInspectorClientGtk.h>
 #include <WebKit2/WKRetainPtr.h>
index b6c77f6..8ea09f2 100644 (file)
 
 using namespace WebKit;
 
-static void didReceiveURIRequest(WKSoupRequestManagerRef soupRequestManagerRef, WKURLRef urlRef, WKPageRef initiatingPageRef, uint64_t requestID, const void* clientInfo)
+static void didReceiveURIRequest(WKSoupRequestManagerRef soupRequestManagerRef, WKURLRef urlRef, uint64_t requestID, const void* clientInfo)
 {
     WebKitWebContext* webContext = WEBKIT_WEB_CONTEXT(clientInfo);
-    GRefPtr<WebKitURISchemeRequest> request = adoptGRef(webkitURISchemeRequestCreate(webContext, soupRequestManagerRef, urlRef, initiatingPageRef, requestID));
+    GRefPtr<WebKitURISchemeRequest> request = adoptGRef(webkitURISchemeRequestCreate(webContext, soupRequestManagerRef, urlRef, requestID));
     webkitWebContextReceivedURIRequest(webContext, request.get());
 }
 
index e69831f..e62c1fa 100644 (file)
@@ -22,8 +22,6 @@
 
 #include "WebKitURISchemeRequestPrivate.h"
 #include "WebKitWebContextPrivate.h"
-#include "WebKitWebView.h"
-#include "WebPageProxy.h"
 #include <WebCore/GOwnPtrSoup.h>
 #include <libsoup/soup.h>
 #include <wtf/gobject/GRefPtr.h>
@@ -38,7 +36,6 @@ G_DEFINE_TYPE(WebKitURISchemeRequest, webkit_uri_scheme_request, G_TYPE_OBJECT)
 struct _WebKitURISchemeRequestPrivate {
     WebKitWebContext* webContext;
     WKRetainPtr<WKSoupRequestManagerRef> wkRequestManager;
-    WKRetainPtr<WKPageRef> wkInitiatingPage;
     uint64_t requestID;
     CString uri;
     GOwnPtr<SoupURI> soupURI;
@@ -71,13 +68,12 @@ static void webkit_uri_scheme_request_class_init(WebKitURISchemeRequestClass* re
     g_type_class_add_private(requestClass, sizeof(WebKitURISchemeRequestPrivate));
 }
 
-WebKitURISchemeRequest* webkitURISchemeRequestCreate(WebKitWebContext* webContext, WKSoupRequestManagerRef wkRequestManager, WKURLRef wkURL, WKPageRef wkInitiatingPage, uint64_t requestID)
+WebKitURISchemeRequest* webkitURISchemeRequestCreate(WebKitWebContext* webContext, WKSoupRequestManagerRef wkRequestManager, WKURLRef wkURL, uint64_t requestID)
 {
     WebKitURISchemeRequest* request = WEBKIT_URI_SCHEME_REQUEST(g_object_new(WEBKIT_TYPE_URI_SCHEME_REQUEST, NULL));
     request->priv->webContext = webContext;
     request->priv->wkRequestManager = wkRequestManager;
     request->priv->uri = toImpl(wkURL)->string().utf8();
-    request->priv->wkInitiatingPage = wkInitiatingPage;
     request->priv->requestID = requestID;
     return request;
 }
@@ -142,21 +138,6 @@ const char* webkit_uri_scheme_request_get_path(WebKitURISchemeRequest* request)
     return request->priv->soupURI->path;
 }
 
-/**
- * webkit_uri_scheme_request_get_web_view:
- * @request: a #WebKitURISchemeRequest
- *
- * Get the #WebKitWebView that initiated the request.
- *
- * Returns: (transfer none): the #WebKitWebView that initiated @request.
- */
-WebKitWebView* webkit_uri_scheme_request_get_web_view(WebKitURISchemeRequest* request)
-{
-    g_return_val_if_fail(WEBKIT_IS_URI_SCHEME_REQUEST(request), 0);
-
-    return WEBKIT_WEB_VIEW(toImpl(request->priv->wkInitiatingPage.get())->viewWidget());
-}
-
 static void webkitURISchemeRequestReadCallback(GInputStream* inputStream, GAsyncResult* result, WebKitURISchemeRequest* schemeRequest)
 {
     GRefPtr<WebKitURISchemeRequest> request = adoptGRef(schemeRequest);
index 9ead507..34f2144 100644 (file)
@@ -51,25 +51,22 @@ struct _WebKitURISchemeRequestClass {
 };
 
 WEBKIT_API GType
-webkit_uri_scheme_request_get_type     (void);
+webkit_uri_scheme_request_get_type   (void);
 
 WEBKIT_API const gchar *
-webkit_uri_scheme_request_get_scheme   (WebKitURISchemeRequest *request);
+webkit_uri_scheme_request_get_scheme (WebKitURISchemeRequest *request);
 
 WEBKIT_API const gchar *
-webkit_uri_scheme_request_get_uri      (WebKitURISchemeRequest *request);
+webkit_uri_scheme_request_get_uri    (WebKitURISchemeRequest *request);
 
 WEBKIT_API const gchar *
-webkit_uri_scheme_request_get_path     (WebKitURISchemeRequest *request);
-
-WEBKIT_API WebKitWebView *
-webkit_uri_scheme_request_get_web_view (WebKitURISchemeRequest *request);
+webkit_uri_scheme_request_get_path   (WebKitURISchemeRequest *request);
 
 WEBKIT_API void
-webkit_uri_scheme_request_finish       (WebKitURISchemeRequest *request,
-                                        GInputStream           *stream,
-                                        gint64                  stream_length,
-                                        const gchar            *mime_type);
+webkit_uri_scheme_request_finish     (WebKitURISchemeRequest *request,
+                                      GInputStream           *stream,
+                                      gint64                  stream_length,
+                                      const gchar            *mime_type);
 
 G_END_DECLS
 
index b7c011f..149813d 100644 (file)
@@ -25,7 +25,7 @@
 #include "WebKitWebContext.h"
 #include <WebKit2/WKSoupRequestManager.h>
 
-WebKitURISchemeRequest* webkitURISchemeRequestCreate(WebKitWebContext*, WKSoupRequestManagerRef, WKURLRef, WKPageRef, uint64_t requestID);
+WebKitURISchemeRequest* webkitURISchemeRequestCreate(WebKitWebContext*, WKSoupRequestManagerRef, WKURLRef, uint64_t requestID);
 uint64_t webkitURISchemeRequestGetID(WebKitURISchemeRequest*);
 void webkitURISchemeRequestCancel(WebKitURISchemeRequest*);
 
old mode 100755 (executable)
new mode 100644 (file)
index 5cd6e07..aba35f7
@@ -24,7 +24,6 @@
 #include "WebKitCookieManagerPrivate.h"
 #include "WebKitDownloadClient.h"
 #include "WebKitDownloadPrivate.h"
-#include "WebKitFaviconDatabasePrivate.h"
 #include "WebKitGeolocationProvider.h"
 #include "WebKitPluginPrivate.h"
 #include "WebKitPrivate.h"
@@ -33,7 +32,6 @@
 #include "WebKitURISchemeRequestPrivate.h"
 #include "WebKitWebContextPrivate.h"
 #include <WebCore/FileSystem.h>
-#include <WebCore/IconDatabase.h>
 #include <wtf/HashMap.h>
 #include <wtf/OwnPtr.h>
 #include <wtf/gobject/GOwnPtr.h>
@@ -71,7 +69,6 @@ struct _WebKitWebContextPrivate {
     WKRetainPtr<WKContextRef> context;
 
     GRefPtr<WebKitCookieManager> cookieManager;
-    GRefPtr<WebKitFaviconDatabase> faviconDatabase;
     WKRetainPtr<WKSoupRequestManagerRef> requestManager;
     URISchemeHandlerMap uriSchemeHandlers;
     URISchemeRequestMap uriSchemeRequests;
@@ -81,7 +78,6 @@ struct _WebKitWebContextPrivate {
 #if ENABLE(SPELLCHECK)
     OwnPtr<WebKitTextChecker> textChecker;
 #endif
-    CString faviconDatabasePath;
 };
 
 static guint signals[LAST_SIGNAL] = { 0, };
@@ -300,94 +296,6 @@ WebKitCookieManager* webkit_web_context_get_cookie_manager(WebKitWebContext* con
 }
 
 /**
- * webkit_web_context_set_favicon_database_directory:
- * @context: a #WebKitWebContext
- * @path: (allow-none): an absolute path to the icon database
- * directory or %NULL to use the defaults
- *
- * Set the directory path to be used to store the favicons database
- * for @context on disk. Passing %NULL as @path means using the
- * default directory for the platform (see g_get_user_data_dir()).
- *
- * If you want to use a different path for the favicon database, this
- * method must be called before the database is created by
- * webkit_web_context_get_favicon_database(). Note that a
- * #WebKitWebView could use the favicon database, so this should also
- * be called before loading any web page.
- *
- * This function is expected to be called only once, further calls for
- * the same instance of #WebKitWebContext after calling
- * webkit_web_context_get_favicon_database() won't cause any effect.
- */
-void webkit_web_context_set_favicon_database_directory(WebKitWebContext* context, const gchar* path)
-{
-    g_return_if_fail(WEBKIT_IS_WEB_CONTEXT(context));
-    // Calling this method twice is a programming error.
-    g_return_if_fail(!context->priv->faviconDatabase);
-
-    if (path)
-        context->priv->faviconDatabasePath = WebCore::filenameToString(path).utf8();
-}
-
-/**
- * webkit_web_context_get_favicon_database_path:
- * @context: a #WebKitWebContext
- *
- * Get the directory path being used to store the favicons database
- * for @context. This function will always return the same path after
- * having called webkit_web_context_get_favicon_database() for the
- * first time. See webkit_web_context_set_favicon_database_directory()
- * for more details.
- *
- * Returns: (transfer none): the path of the directory of the favicons
- * database associated with @context.
- */
-const gchar* webkit_web_context_get_favicon_database_directory(WebKitWebContext *context)
-{
-    g_return_val_if_fail(WEBKIT_IS_WEB_CONTEXT(context), 0);
-
-    WebKitWebContextPrivate* priv = context->priv;
-    // Use default if a different path has not been previously set.
-    if (priv->faviconDatabasePath.isNull())
-        priv->faviconDatabasePath = toImpl(priv->context.get())->iconDatabasePath().utf8();
-
-    return priv->faviconDatabasePath.data();
-}
-
-/**
- * webkit_web_context_get_favicon_database:
- * @context: a #WebKitWebContext
- *
- * Get the #WebKitFaviconDatabase associated with @context. If you
- * want the database to be stored in a directory other than the default
- * one, you need to call
- * webkit_web_context_set_favicon_database_directory() before the first
- * time you use this function.
- *
- * Returns: (transfer none): the #WebKitFaviconDatabase of @context.
- */
-WebKitFaviconDatabase* webkit_web_context_get_favicon_database(WebKitWebContext* context)
-{
-    g_return_val_if_fail(WEBKIT_IS_WEB_CONTEXT(context), 0);
-
-    WebKitWebContextPrivate* priv = context->priv;
-    if (priv->faviconDatabase)
-        return priv->faviconDatabase.get();
-
-    // Build the full path to the icon database file on disk.
-    GOwnPtr<gchar> faviconDatabasePath(g_build_filename(webkit_web_context_get_favicon_database_directory(context),
-                                                        WebCore::IconDatabase::defaultDatabaseFilename().utf8().data(),
-                                                        NULL));
-
-    // Calling the setter in WebContext will cause the icon database to be opened.
-    WebContext* webContext = toImpl(priv->context.get());
-    webContext->setIconDatabasePath(WebCore::filenameToString(faviconDatabasePath.get()));
-    priv->faviconDatabase = adoptGRef(webkitFaviconDatabaseCreate(webContext->iconDatabase()));
-
-    return priv->faviconDatabase.get();
-}
-
-/**
  * webkit_web_context_set_additional_plugins_directory:
  * @context: a #WebKitWebContext
  * @directory: the directory to add
old mode 100755 (executable)
new mode 100644 (file)
index da08471..358f617
@@ -28,7 +28,6 @@
 #include <webkit2/WebKitCookieManager.h>
 #include <webkit2/WebKitDefines.h>
 #include <webkit2/WebKitDownload.h>
-#include <webkit2/WebKitFaviconDatabase.h>
 #include <webkit2/WebKitURISchemeRequest.h>
 
 G_BEGIN_DECLS
@@ -114,15 +113,6 @@ webkit_web_context_download_uri                     (WebKitWebContext
 WEBKIT_API WebKitCookieManager *
 webkit_web_context_get_cookie_manager               (WebKitWebContext              *context);
 
-WEBKIT_API WebKitFaviconDatabase *
-webkit_web_context_get_favicon_database             (WebKitWebContext              *context);
-
-WEBKIT_API void
-webkit_web_context_set_favicon_database_directory   (WebKitWebContext              *context,
-                                                     const gchar                   *path);
-WEBKIT_API const gchar *
-webkit_web_context_get_favicon_database_directory   (WebKitWebContext              *context);
-
 WEBKIT_API void
 webkit_web_context_set_additional_plugins_directory (WebKitWebContext              *context,
                                                      const gchar                   *directory);
index 946c6f9..6aac7c8 100644 (file)
@@ -30,7 +30,6 @@
     <xi:include href="xml/WebKitPrintOperation.xml"/>
     <xi:include href="xml/WebKitWebResource.xml"/>
     <xi:include href="xml/WebKitError.xml"/>
-    <xi:include href="xml/WebKitFaviconDatabase.xml"/>
     <xi:include href="xml/WebKitFileChooserRequest.xml"/>
     <xi:include href="xml/WebKitFindController.xml"/>
     <xi:include href="xml/WebKitCookieManager.xml"/>
old mode 100755 (executable)
new mode 100644 (file)
index 7eb9f51..73f09d5
@@ -30,9 +30,6 @@ webkit_web_context_set_cache_model
 webkit_web_context_clear_cache
 webkit_web_context_download_uri
 webkit_web_context_get_cookie_manager
-webkit_web_context_get_favicon_database
-webkit_web_context_set_favicon_database_directory
-webkit_web_context_get_favicon_database_directory
 webkit_web_context_set_additional_plugins_directory
 webkit_web_context_get_plugins
 webkit_web_context_get_plugins_finish
@@ -590,31 +587,6 @@ webkit_javascript_error_quark
 </SECTION>
 
 <SECTION>
-<FILE>WebKitFaviconDatabase</FILE>
-WebKitFaviconDatabase
-WEBKIT_FAVICON_DATABASE_ERROR
-WebKitFaviconDatabaseError
-webkit_favicon_database_get_favicon
-webkit_favicon_database_get_favicon_finish
-webkit_favicon_database_get_favicon_uri
-webkit_favicon_database_clear
-
-<SUBSECTION Standard>
-WebKitFaviconDatabaseClass
-WEBKIT_TYPE_FAVICON_DATABASE
-WEBKIT_FAVICON_DATABASE
-WEBKIT_IS_FAVICON_DATABASE
-WEBKIT_FAVICON_DATABASE_CLASS
-WEBKIT_IS_FAVICON_DATABASE_CLASS
-WEBKIT_FAVICON_DATABASE_GET_CLASS
-
-<SUBSECTION Private>
-WebKitFaviconDatabasePrivate
-webkit_favicon_database_get_type
-webkit_favicon_database_error_quark
-</SECTION>
-
-<SECTION>
 <FILE>WebKitFileChooserRequest</FILE>
 WebKitFileChooserRequest
 webkit_file_chooser_request_get_mime_types
@@ -758,7 +730,6 @@ WebKitURISchemeRequest
 webkit_uri_scheme_request_get_scheme
 webkit_uri_scheme_request_get_uri
 webkit_uri_scheme_request_get_path
-webkit_uri_scheme_request_get_web_view
 webkit_uri_scheme_request_finish
 
 <SUBSECTION Standard>
index 8555af5..3fadf40 100644 (file)
@@ -11,7 +11,6 @@ TEST_PROGS += \
        Programs/WebKit2APITests/TestResources \
        Programs/WebKit2APITests/TestSSL \
        Programs/WebKit2APITests/TestWebKitVersion \
-       Programs/WebKit2APITests/TestWebKitFaviconDatabase \
        Programs/WebKit2APITests/TestWebKitFindController \
        Programs/WebKit2APITests/TestWebKitPolicyClient \
        Programs/WebKit2APITests/TestWebKitSettings \
@@ -142,12 +141,6 @@ Programs_WebKit2APITests_TestPrinting_CPPFLAGS = $(webkit2_tests_cppflags) $(GTK
 Programs_WebKit2APITests_TestPrinting_LDADD = $(webkit2_tests_ldadd) $(GTK_UNIX_PRINTING_LIBS)
 Programs_WebKit2APITests_TestPrinting_LDFLAGS = $(webkit2_tests_ldflags)
 
-Programs_WebKit2APITests_TestWebKitFaviconDatabase_SOURCES = \
-       Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitFaviconDatabase.cpp
-Programs_WebKit2APITests_TestWebKitFaviconDatabase_CPPFLAGS = $(webkit2_tests_cppflags)
-Programs_WebKit2APITests_TestWebKitFaviconDatabase_LDADD = $(webkit2_tests_ldadd)
-Programs_WebKit2APITests_TestWebKitFaviconDatabase_LDFLAGS = $(webkit2_tests_ldflags)
-
 Programs_WebKit2APITests_TestWebKitFindController_SOURCES = \
        Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitFindController.cpp
 Programs_WebKit2APITests_TestWebKitFindController_CPPFLAGS = $(webkit2_tests_cppflags)
diff --git a/Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitFaviconDatabase.cpp b/Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitFaviconDatabase.cpp
deleted file mode 100644 (file)
index 2ff0666..0000000
+++ /dev/null
@@ -1,204 +0,0 @@
-/*
- * Copyright (C) 2012 Igalia S.L.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2,1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include "config.h"
-
-#include "WebKitTestServer.h"
-#include "WebViewTest.h"
-#include <glib/gstdio.h>
-#include <libsoup/soup.h>
-#include <wtf/gobject/GOwnPtr.h>
-
-static WebKitTestServer* kServer;
-static char* kTempDirectory;
-
-class FaviconDatabaseTest: public WebViewTest {
-public:
-    MAKE_GLIB_TEST_FIXTURE(FaviconDatabaseTest);
-
-    FaviconDatabaseTest()
-        : m_webContext(webkit_web_context_get_default())
-        , m_favicon(0)
-        , m_error(0)
-        , m_iconReadySignalReceived(false)
-    {
-    }
-
-    ~FaviconDatabaseTest()
-    {
-        WebKitFaviconDatabase* database = webkit_web_context_get_favicon_database(m_webContext);
-        g_signal_handlers_disconnect_matched(database, G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, this);
-    }
-
-    static void iconReadyCallback(WebKitFaviconDatabase* database, const char* pageURI, FaviconDatabaseTest* test)
-    {
-        g_assert_cmpstr(webkit_web_view_get_uri(test->m_webView), ==, pageURI);
-        test->m_iconReadySignalReceived = true;
-    }
-
-    static void getFaviconCallback(GObject* sourceObject, GAsyncResult* result, void* data)
-    {
-        FaviconDatabaseTest* test = static_cast<FaviconDatabaseTest*>(data);
-        WebKitFaviconDatabase* database = webkit_web_context_get_favicon_database(test->m_webContext);
-
-        test->m_error.clear();
-        test->m_favicon = webkit_favicon_database_get_favicon_finish(database, result, &test->m_error.outPtr());
-        g_main_loop_quit(test->m_mainLoop);
-    }
-
-    void askForIconAndWaitUntilReady()
-    {
-        WebKitFaviconDatabase* database = webkit_web_context_get_favicon_database(m_webContext);
-        webkit_favicon_database_get_favicon(database, kServer->getURIForPath("/").data(), 0, getFaviconCallback, this);
-
-        g_signal_connect(database, "favicon-ready", G_CALLBACK(iconReadyCallback), this);
-
-        g_main_loop_run(m_mainLoop);
-    }
-
-    void askAndWaitForFavicon(const char* pageURI)
-    {
-        WebKitFaviconDatabase* database = webkit_web_context_get_favicon_database(m_webContext);
-        webkit_favicon_database_get_favicon(database, pageURI, 0, getFaviconCallback, this);
-        g_main_loop_run(m_mainLoop);
-    }
-
-    WebKitWebContext* m_webContext;
-    cairo_surface_t* m_favicon;
-    GOwnPtr<GError> m_error;
-    bool m_iconReadySignalReceived;
-};
-
-static void
-serverCallback(SoupServer* server, SoupMessage* message, const char* path, GHashTable* query, SoupClientContext* context, void* data)
-{
-    if (message->method != SOUP_METHOD_GET) {
-        soup_message_set_status(message, SOUP_STATUS_NOT_IMPLEMENTED);
-        return;
-    }
-    soup_message_set_status(message, SOUP_STATUS_OK);
-
-    char* contents;
-    gsize length;
-    if (g_str_equal(path, "/favicon.ico")) {
-        GOwnPtr<char> pathToFavicon(g_build_filename(Test::getWebKit1TestResoucesDir().data(), "blank.ico", NULL));
-        g_file_get_contents(pathToFavicon.get(), &contents, &length, 0);
-    } else if (g_str_equal(path, "/nofavicon/favicon.ico")) {
-        soup_message_set_status(message, SOUP_STATUS_NOT_FOUND);
-        soup_message_body_complete(message->response_body);
-        return;
-    } else {
-        contents = g_strdup("<html><body>test</body></html>");
-        length = strlen(contents);
-    }
-
-    soup_message_body_append(message->response_body, SOUP_MEMORY_TAKE, contents, length);
-    soup_message_body_complete(message->response_body);
-}
-
-static void testSetDirectory(FaviconDatabaseTest* test, gconstpointer)
-{
-    webkit_web_context_set_favicon_database_directory(test->m_webContext, kTempDirectory);
-    g_assert_cmpstr(kTempDirectory, ==, webkit_web_context_get_favicon_database_directory(test->m_webContext));
-}
-
-static void testClearDatabase(FaviconDatabaseTest* test, gconstpointer)
-{
-    WebKitFaviconDatabase* database = webkit_web_context_get_favicon_database(test->m_webContext);
-    webkit_favicon_database_clear(database);
-
-    GOwnPtr<char> iconURI(webkit_favicon_database_get_favicon_uri(database, kServer->getURIForPath("/").data()));
-    g_assert(!iconURI);
-}
-
-static void testGetFavicon(FaviconDatabaseTest* test, gconstpointer)
-{
-    // We need to load the page first to ensure the icon data will be
-    // in the database in case there's an associated favicon.
-    test->loadURI(kServer->getURIForPath("/").data());
-    test->waitUntilLoadFinished();
-
-    // Check the WebKitFaviconDatabase::icon-ready signal.
-    test->m_iconReadySignalReceived = false;
-    test->askForIconAndWaitUntilReady();
-    g_assert(test->m_iconReadySignalReceived);
-
-    // Check the API retrieving a valid favicon.
-    test->askAndWaitForFavicon(kServer->getURIForPath("/").data());
-    g_assert(test->m_favicon);
-    g_assert(!test->m_error);
-
-    // Check that width and height match those from blank.ico (16x16 favicon).
-    g_assert_cmpint(cairo_image_surface_get_width(test->m_favicon), ==, 16);
-    g_assert_cmpint(cairo_image_surface_get_height(test->m_favicon), ==, 16);
-    cairo_surface_destroy(test->m_favicon);
-
-    // Check the API retrieving an invalid favicon.
-    test->loadURI(kServer->getURIForPath("/nofavicon").data());
-    test->waitUntilLoadFinished();
-
-    test->askAndWaitForFavicon(kServer->getURIForPath("/nofavicon/").data());
-    g_assert(!test->m_favicon);
-    g_assert(test->m_error && (test->m_error->code & WEBKIT_FAVICON_DATABASE_ERROR_FAVICON_NOT_FOUND));
-}
-
-static void testGetFaviconURI(FaviconDatabaseTest* test, gconstpointer)
-{
-    WebKitFaviconDatabase* database = webkit_web_context_get_favicon_database(test->m_webContext);
-
-    const char* baseURI = kServer->getURIForPath("/").data();
-    GOwnPtr<char> iconURI(webkit_favicon_database_get_favicon_uri(database, baseURI));
-    g_assert_cmpstr(iconURI.get(), ==, kServer->getURIForPath("/favicon.ico").data());
-}
-
-static void deleteDatabaseFiles()
-{
-    if (!g_file_test(kTempDirectory, G_FILE_TEST_IS_DIR))
-        return;
-
-    GOwnPtr<char> filename(g_build_filename(kTempDirectory, "WebpageIcons.db", NULL));
-    g_unlink(filename.get());
-
-    filename.set(g_build_filename(kTempDirectory, "WebpageIcons.db-journal", NULL));
-    g_unlink(filename.get());
-
-    g_rmdir(kTempDirectory);
-}
-
-void beforeAll()
-{
-    // Start a soup server for testing.
-    kServer = new WebKitTestServer();
-    kServer->run(serverCallback);
-
-    kTempDirectory = g_dir_make_tmp("WebKit2Tests-XXXXXX", 0);
-    g_assert(kTempDirectory);
-
-    // Add tests to the suite.
-    FaviconDatabaseTest::add("WebKitFaviconDatabase", "set-directory", testSetDirectory);
-    FaviconDatabaseTest::add("WebKitFaviconDatabase", "get-favicon", testGetFavicon);
-    FaviconDatabaseTest::add("WebKitFaviconDatabase", "get-favicon-uri", testGetFaviconURI);
-    FaviconDatabaseTest::add("WebKitFaviconDatabase", "clear-database", testClearDatabase);
-}
-
-void afterAll()
-{
-    delete kServer;
-    deleteDatabaseFiles();
-}
index 97b8316..89dec88 100644 (file)
@@ -143,8 +143,6 @@ public:
         test->m_uriSchemeRequest = request;
         test->assertObjectIsDeletedWhenTestFinishes(G_OBJECT(request));
 
-        g_assert(webkit_uri_scheme_request_get_web_view(request) == test->m_webView);
-
         GRefPtr<GInputStream> inputStream = adoptGRef(g_memory_input_stream_new());
         test->assertObjectIsDeletedWhenTestFinishes(G_OBJECT(inputStream.get()));
 
index 417b42f..116dafc 100644 (file)
@@ -34,7 +34,6 @@
 #include <webkit2/WebKitEditingCommands.h>
 #include <webkit2/WebKitEnumTypes.h>
 #include <webkit2/WebKitError.h>
-#include <webkit2/WebKitFaviconDatabase.h>
 #include <webkit2/WebKitFileChooserRequest.h>
 #include <webkit2/WebKitFindController.h>
 #include <webkit2/WebKitFormSubmissionRequest.h>
index f9cefd0..f144e96 100755 (executable)
@@ -126,17 +126,18 @@ public:
     virtual void didChangeContentsSize(const WebCore::IntSize&) = 0;
     virtual void didFindZoomableArea(const WebCore::IntPoint&, const WebCore::IntRect&) = 0;
     virtual void didReceiveMessageFromNavigatorQtObject(const String&) = 0;
+    virtual void updateTextInputState() = 0;
     virtual void handleAuthenticationRequiredRequest(const String& hostname, const String& realm, const String& prefilledUsername, String& username, String& password) = 0;
     virtual void handleCertificateVerificationRequest(const String& hostname, bool& ignoreErrors) = 0;
     virtual void handleProxyAuthenticationRequiredRequest(const String& hostname, uint16_t port, const String& prefilledUsername, String& username, String& password) = 0;
 #endif // PLATFORM(QT).
 
 #if OS(TIZEN)
+    virtual void updateTextInputState() = 0;
     virtual void didFindZoomableArea(const WebCore::IntPoint&, const WebCore::IntRect&) = 0;
 #endif // #if OS(TIZEN)
 
 #if PLATFORM(QT) || PLATFORM(EFL)
-    virtual void updateTextInputState() = 0;
     virtual void handleDownloadRequest(DownloadProxy*) = 0;
 #endif // PLATFORM(QT) || PLATFORM(EFL)
 
index 63c44c6..a649b1a 100644 (file)
@@ -184,11 +184,6 @@ void WebIconDatabase::getLoadDecisionForIconURL(const String& iconURL, uint64_t
     m_webContext->sendToAllProcesses(Messages::WebIconDatabaseProxy::ReceivedIconLoadDecision((int)decision, callbackID));
 }
 
-void WebIconDatabase::didReceiveIconForPageURL(const String& pageURL)
-{
-    notifyIconDataReadyForPageURL(pageURL);
-}
-
 Image* WebIconDatabase::imageForPageURL(const String& pageURL, const WebCore::IntSize& iconSize)
 {
     if (!m_webContext || !m_iconDatabaseImpl || !m_iconDatabaseImpl->isOpen() || pageURL.isEmpty())
@@ -212,11 +207,6 @@ bool WebIconDatabase::isOpen()
     return m_iconDatabaseImpl && m_iconDatabaseImpl->isOpen();
 }
 
-bool WebIconDatabase::isUrlImportCompleted()
-{
-    return m_urlImportCompleted;
-}
-
 void WebIconDatabase::removeAllIcons()
 {
 #if ENABLE(TIZEN_WEBKIT2_PATCH_FOR_TC)
@@ -259,7 +249,7 @@ void WebIconDatabase::didImportIconURLForPageURL(const String& pageURL)
 
 void WebIconDatabase::didImportIconDataForPageURL(const String& pageURL)
 {
-    notifyIconDataReadyForPageURL(pageURL);
+    didChangeIconForPageURL(pageURL);
 }
 
 void WebIconDatabase::didChangeIconForPageURL(const String& pageURL)
@@ -315,10 +305,4 @@ void WebIconDatabase::didReceiveSyncMessage(CoreIPC::Connection* connection, Cor
     didReceiveSyncWebIconDatabaseMessage(connection, messageID, decoder, reply);
 }
 
-void WebIconDatabase::notifyIconDataReadyForPageURL(const String& pageURL)
-{
-    m_iconDatabaseClient.iconDataReadyForPageURL(this, WebURL::create(pageURL).get());
-    didChangeIconForPageURL(pageURL);
-}
-
 } // namespace WebKit
index b725405..d808ef0 100644 (file)
@@ -77,12 +77,10 @@ public:
     void synchronousLoadDecisionForIconURL(const String&, int&) const;
     
     void getLoadDecisionForIconURL(const String&, uint64_t callbackID);
-    void didReceiveIconForPageURL(const String&);
 
     WebCore::Image* imageForPageURL(const String&, const WebCore::IntSize& iconSize = WebCore::IntSize(32, 32));
     WebCore::NativeImagePtr nativeImageForPageURL(const String&, const WebCore::IntSize& iconSize = WebCore::IntSize(32, 32));
     bool isOpen();
-    bool isUrlImportCompleted();
 
     void removeAllIcons();
     void checkIntegrityBeforeOpening();
@@ -108,7 +106,6 @@ private:
 
     void didReceiveWebIconDatabaseMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*);
     void didReceiveSyncWebIconDatabaseMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*, OwnPtr<CoreIPC::ArgumentEncoder>&);
-    void notifyIconDataReadyForPageURL(const String&);
 
     WebContext* m_webContext;
     
index 400adb0..b68a0a7 100644 (file)
@@ -32,5 +32,4 @@ messages -> WebIconDatabase {
     SynchronousLoadDecisionForIconURL(WTF::String iconURL) -> (int loadDecision)
     
     GetLoadDecisionForIconURL(WTF::String iconURL, uint64_t callbackID)
-    DidReceiveIconForPageURL(WTF::String pageURL)
 }
index 4fbfd3c..e0de366 100644 (file)
@@ -47,12 +47,4 @@ void WebIconDatabaseClient::didRemoveAllIcons(WebIconDatabase* iconDatabase)
     m_client.didRemoveAllIcons(toAPI(iconDatabase),  m_client.clientInfo);
 }
 
-void WebIconDatabaseClient::iconDataReadyForPageURL(WebIconDatabase* iconDatabase, WebURL* url)
-{
-    if (!m_client.iconDataReadyForPageURL)
-        return;
-
-    m_client.iconDataReadyForPageURL(toAPI(iconDatabase), toAPI(url), m_client.clientInfo);
-}
-
 } // namespace WebKit
index 5fe2fea..801ec12 100644 (file)
@@ -39,7 +39,6 @@ class WebIconDatabaseClient : public APIClient<WKIconDatabaseClient, kWKIconData
 public:
     void didChangeIconForPageURL(WebIconDatabase*, WebURL*);
     void didRemoveAllIcons(WebIconDatabase*);
-    void iconDataReadyForPageURL(WebIconDatabase*, WebURL*);
 };
 
 } // namespace WebKit
index 2d86888..44d5a3d 100755 (executable)
 #include "ArgumentCodersGtk.h"
 #endif
 
-#if USE(SOUP)
-#include "WebSoupRequestManagerProxy.h"
-#endif
-
 #if ENABLE(TIZEN_DRAG_SUPPORT)
 #include "ArgumentCodersTizen.h"
 #endif
 #endif
 
 #if ENABLE(TIZEN_ISF_PORT) || ENABLE(TIZEN_GESTURE)
-#include "EwkViewImpl.h"
-#include "InputMethodContextEfl.h"
+#include "ewk_view_private.h"
 #endif
 
 // This controls what strategy we use for mouse wheel coalescing.
@@ -1248,7 +1243,7 @@ void WebPageProxy::handleGestureEvent(const WebGestureEvent& event)
 
 #if ENABLE(TIZEN_ISF_PORT)
     if (event.type() == WebEvent::GestureSingleTap)
-        EwkViewImpl::fromEvasObject(viewWidget())->inputMethodContext()->resetIMFContext();
+        ewk_view_imf_context_reset(viewWidget());
 #endif
 
 #if ENABLE(TIZEN_WEBKIT2_ROTATION_WHILE_JAVASCRIPT_POPUP)
@@ -3261,7 +3256,7 @@ void WebPageProxy::editorStateChanged(const EditorState& editorState)
 
 #if PLATFORM(MAC)
     m_pageClient->updateTextInputState(couldChangeSecureInputState);
-#elif PLATFORM(QT) || PLATFORM(EFL)
+#elif PLATFORM(QT) || ENABLE(TIZEN_ISF_PORT)
     m_pageClient->updateTextInputState();
 #endif
 }
@@ -4595,13 +4590,6 @@ void WebPageProxy::dictationAlternatives(uint64_t dictationContext, Vector<Strin
 
 #endif // PLATFORM(MAC)
 
-#if USE(SOUP)
-void WebPageProxy::didReceiveURIRequest(String uriString, uint64_t requestID)
-{
-    m_process->context()->soupRequestManagerProxy()->didReceiveURIRequest(uriString, this, requestID);
-}
-#endif
-
 #if ENABLE(TIZEN_PAGE_VISIBILITY_API)
 void WebPageProxy::setPageVisibility(WebCore::PageVisibilityState pageVisibilityState, bool isInitialState)
 {
index cab30af..fa89756 100755 (executable)
@@ -470,12 +470,6 @@ public:
 
     HWND nativeWindow() const;
 #endif
-#if PLATFORM(EFL)
-    void handleInputMethodKeydown(bool& handled);
-    void confirmComposition(const String&);
-    void setComposition(const String&, Vector<WebCore::CompositionUnderline>&, int);
-    void cancelComposition();
-#endif
 #if PLATFORM(GTK)
     GtkWidget* viewWidget();
 #endif
@@ -484,9 +478,12 @@ public:
 #endif
 
 #if OS(TIZEN)
+    void confirmComposition(const String&);
 #if ENABLE(TIZEN_REDUCE_KEY_LAGGING)
     static Eina_Bool pageContentResumeTimerFired(void* data);
 #endif
+    void setComposition(const String&, Vector<WebCore::CompositionUnderline>&, int);
+    void handleInputMethodKeydown(bool&);
 #if ENABLE(TIZEN_TEXT_CARET_HANDLING_WK2)
     void setCaretPosition(const WebCore::IntPoint&);
     void getCaretPosition(WebCore::IntRect&);
@@ -1343,10 +1340,6 @@ private:
 #endif
 #endif // PLATFORM(MAC)
 
-#if USE(SOUP)
-    void didReceiveURIRequest(String uriString, uint64_t requestID);
-#endif
-
     void clearLoadDependentCallbacks();
 
     void performDragControllerAction(DragControllerAction, WebCore::DragData*, const String& dragStorageName, const SandboxExtension::Handle&, const SandboxExtension::HandleArray&);
index d56a1d1..3878e96 100755 (executable)
@@ -81,13 +81,10 @@ messages -> WebPageProxy {
     DidBlockInsecurePluginVersion(WTF::String mimeType, WTF::String urlString)
     SetCanShortCircuitHorizontalWheelEvents(bool canShortCircuitHorizontalWheelEvents)
 
-#if PLATFORM(EFL)
-    HandleInputMethodKeydown() -> (bool handled)
-#endif
-
 #if PLATFORM(EFL) && OS(TIZEN)
     DidChangeScrollPositionForMainFrame(WebCore::IntPoint scrollPosition)
     DidChangeContentsSize(WebCore::IntSize newSize)
+    HandleInputMethodKeydown() -> (bool handled)
     UpdateFormNavigation(int length, int position)
     FocusedNodeChanged(WebCore::IntRect focusedNodeRect)
 #endif
@@ -423,11 +420,6 @@ messages -> WebPageProxy {
     SaveRecentSearches(WTF::String name, Vector<String> searchItems)
     LoadRecentSearches(WTF::String name) -> (Vector<String> result)
 
-#if USE(SOUP)
-    # Soup custom URI request messages
-    DidReceiveURIRequest(WTF::String uriString, uint64_t requestID);
-#endif
-
 #if ENABLE(TIZEN_CLIPBOARD) || ENABLE(TIZEN_PASTEBOARD)
     SetClipboardData(WTF::String data, WTF::String type)
     ClearClipboardData()
old mode 100755 (executable)
new mode 100644 (file)
index 8db1178..f0a1ea2
@@ -34,7 +34,7 @@
 #include <cairo/cairo.h>
 
 #if PLATFORM(EFL)
-#include "EwkViewImpl.h"
+#include "ewk_view_private.h"
 #endif
 
 using namespace WebCore;
@@ -70,9 +70,8 @@ void BackingStore::incorporateUpdate(ShareableBitmap* bitmap, const UpdateInfo&
     }
 
 #if PLATFORM(EFL)
-    // Update ewk_view with new backingStore image.
-    EwkViewImpl* viewImpl = EwkViewImpl::fromEvasObject(m_webPageProxy->viewWidget());
-    viewImpl->setImageData(cairo_image_surface_get_data(m_backingStore->cairoSurface()), m_size);
+    // Update evas_object_image's data and size.
+    ewk_view_image_data_set(m_webPageProxy->viewWidget(), cairo_image_surface_get_data(m_backingStore->cairoSurface()), m_size);
 #endif
 }
 
diff --git a/Source/WebKit2/UIProcess/efl/ContextHistoryClientEfl.cpp b/Source/WebKit2/UIProcess/efl/ContextHistoryClientEfl.cpp
deleted file mode 100644 (file)
index 1ada763..0000000
+++ /dev/null
@@ -1,144 +0,0 @@
-/*
- * Copyright (C) 2012 Intel Corporation. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "ContextHistoryClientEfl.h"
-
-#include "DownloadProxy.h"
-#include "EwkViewImpl.h"
-#include "WKAPICast.h"
-#include "WKContext.h"
-#include "WKEinaSharedString.h"
-#include "WKString.h"
-#include "ewk_context_private.h"
-#include "ewk_navigation_data.h"
-#include "ewk_navigation_data_private.h"
-#include "ewk_url_response.h"
-#include "ewk_url_response_private.h"
-
-namespace WebKit {
-
-static inline const ContextHistoryClientEfl* toContextHistoryClientEfl(const void* clientInfo)
-{
-    ASSERT(clientInfo);
-    return static_cast<const ContextHistoryClientEfl*>(clientInfo);
-}
-
-void ContextHistoryClientEfl::didNavigateWithNavigationData(WKContextRef, WKPageRef page, WKNavigationDataRef navigationData, WKFrameRef, const void* clientInfo)
-{
-    const ContextHistoryClientEfl* historyClient = toContextHistoryClientEfl(clientInfo);
-
-    if (!historyClient->m_navigate)
-        return;
-
-    RefPtr<Ewk_Navigation_Data> navigationDataEwk = Ewk_Navigation_Data::create(navigationData);
-    historyClient->m_navigate(EwkViewImpl::viewFromPageViewMap(page), navigationDataEwk.get(), historyClient->m_userData);
-}
-
-void ContextHistoryClientEfl::didPerformClientRedirect(WKContextRef, WKPageRef page, WKURLRef sourceURL, WKURLRef destinationURL, WKFrameRef, const void* clientInfo)
-{
-    const ContextHistoryClientEfl* historyClient = toContextHistoryClientEfl(clientInfo);
-
-    if (!historyClient->m_clientRedirect)
-        return;
-
-    WKEinaSharedString sourceURLString(sourceURL);
-    WKEinaSharedString destinationURLString(destinationURL);
-
-    historyClient->m_clientRedirect(EwkViewImpl::viewFromPageViewMap(page), sourceURLString, destinationURLString, historyClient->m_userData);
-}
-
-void ContextHistoryClientEfl::didPerformServerRedirect(WKContextRef, WKPageRef page, WKURLRef sourceURL, WKURLRef destinationURL, WKFrameRef, const void* clientInfo)
-{
-    const ContextHistoryClientEfl* historyClient = toContextHistoryClientEfl(clientInfo);
-
-    if (!historyClient->m_serverRedirect)
-        return;
-
-    WKEinaSharedString sourceURLString(sourceURL);
-    WKEinaSharedString destinationURLString(destinationURL);
-
-    historyClient->m_serverRedirect(EwkViewImpl::viewFromPageViewMap(page), sourceURLString, destinationURLString, historyClient->m_userData);
-}
-
-void ContextHistoryClientEfl::didUpdateHistoryTitle(WKContextRef, WKPageRef page, WKStringRef title, WKURLRef URL, WKFrameRef, const void* clientInfo)
-{
-    const ContextHistoryClientEfl* historyClient = toContextHistoryClientEfl(clientInfo);
-
-    if (!historyClient->m_titleUpdated)
-        return;
-
-    WKEinaSharedString titleString(title);
-    WKEinaSharedString stringURL(URL);
-
-    historyClient->m_titleUpdated(EwkViewImpl::viewFromPageViewMap(page), titleString, stringURL, historyClient->m_userData);
-}
-
-void ContextHistoryClientEfl::populateVisitedLinks(WKContextRef, const void* clientInfo)
-{
-    const ContextHistoryClientEfl* historyClient = toContextHistoryClientEfl(clientInfo);
-
-    if (!historyClient->m_populateVisitedLinks)
-        return;
-
-    historyClient->m_populateVisitedLinks(historyClient->m_userData);
-}
-
-ContextHistoryClientEfl::ContextHistoryClientEfl(WKContextRef context)
-    : m_userData(0)
-    , m_navigate(0)
-    , m_clientRedirect(0)
-    , m_serverRedirect(0)
-    , m_titleUpdated(0)
-    , m_populateVisitedLinks(0)
-{
-    ASSERT(context);
-
-    WKContextHistoryClient wkHistoryClient;
-    memset(&wkHistoryClient, 0, sizeof(WKContextHistoryClient));
-
-    wkHistoryClient.version = kWKContextHistoryClientCurrentVersion;
-    wkHistoryClient.clientInfo = this;
-
-    wkHistoryClient.didNavigateWithNavigationData = didNavigateWithNavigationData;
-    wkHistoryClient.didPerformClientRedirect = didPerformClientRedirect;
-    wkHistoryClient.didPerformServerRedirect = didPerformServerRedirect;
-    wkHistoryClient.didUpdateHistoryTitle = didUpdateHistoryTitle;
-    wkHistoryClient.populateVisitedLinks = populateVisitedLinks;
-
-    WKContextSetHistoryClient(context, &wkHistoryClient);
-}
-
-void ContextHistoryClientEfl::setCallbacks(Ewk_History_Navigation_Cb navigate, Ewk_History_Client_Redirection_Cb clientRedirect, Ewk_History_Server_Redirection_Cb serverRedirect, Ewk_History_Title_Update_Cb titleUpdate, Ewk_History_Populate_Visited_Links_Cb populateVisitedLinks, void* data)
-{
-    m_navigate = navigate;
-    m_clientRedirect = clientRedirect;
-    m_serverRedirect = serverRedirect;
-    m_titleUpdated = titleUpdate;
-    m_populateVisitedLinks = populateVisitedLinks;
-    m_userData = data;
-}
-
-} // namespace WebKit
diff --git a/Source/WebKit2/UIProcess/efl/ContextHistoryClientEfl.h b/Source/WebKit2/UIProcess/efl/ContextHistoryClientEfl.h
deleted file mode 100644 (file)
index 3203256..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright (C) 2012 Intel Corporation. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef ContextHistoryClientEfl_h
-#define ContextHistoryClientEfl_h
-
-#include "ewk_context.h"
-#include <WebKit2/WKBase.h>
-#include <wtf/PassOwnPtr.h>
-
-namespace WebKit {
-
-class ContextHistoryClientEfl {
-public:
-    static PassOwnPtr<ContextHistoryClientEfl> create(WKContextRef context)
-    {
-        return adoptPtr(new ContextHistoryClientEfl(context));
-    }
-
-    void setCallbacks(Ewk_History_Navigation_Cb, Ewk_History_Client_Redirection_Cb, Ewk_History_Server_Redirection_Cb, Ewk_History_Title_Update_Cb, Ewk_History_Populate_Visited_Links_Cb, void*);
-
-private:
-    explicit ContextHistoryClientEfl(WKContextRef);
-
-    static void didNavigateWithNavigationData(WKContextRef, WKPageRef, WKNavigationDataRef, WKFrameRef, const void*);
-    static void didPerformClientRedirect(WKContextRef, WKPageRef, WKURLRef sourceURL, WKURLRef, WKFrameRef, const void*);
-    static void didPerformServerRedirect(WKContextRef, WKPageRef, WKURLRef sourceURL, WKURLRef, WKFrameRef, const void*);
-    static void didUpdateHistoryTitle(WKContextRef, WKPageRef, WKStringRef, WKURLRef, WKFrameRef, const void*);
-    static void populateVisitedLinks(WKContextRef, const void*);
-
-    void* m_userData;
-    Ewk_History_Navigation_Cb m_navigate;
-    Ewk_History_Client_Redirection_Cb m_clientRedirect;
-    Ewk_History_Server_Redirection_Cb m_serverRedirect;
-    Ewk_History_Title_Update_Cb m_titleUpdated;
-    Ewk_History_Populate_Visited_Links_Cb m_populateVisitedLinks;
-};
-
-} // namespace WebKit
-
-#endif // ContextHistoryClientEfl_h
diff --git a/Source/WebKit2/UIProcess/efl/DownloadManagerEfl.cpp b/Source/WebKit2/UIProcess/efl/DownloadManagerEfl.cpp
deleted file mode 100755 (executable)
index a38ddb4..0000000
+++ /dev/null
@@ -1,183 +0,0 @@
-/*
- * Copyright (C) 2012 Intel Corporation. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "DownloadManagerEfl.h"
-
-#include "DownloadProxy.h"
-#include "EwkViewImpl.h"
-#include "WKContext.h"
-#include "WKString.h"
-#include "ewk_context_private.h"
-#include "ewk_error_private.h"
-
-#if OS(TIZEN) && ENABLE(TIZEN_USING_EXTERNAL_DOWNLOAD_CLIENT)
-#include "WKDownload.h"
-#include "WKRetainPtr.h"
-#endif
-
-namespace WebKit {
-
-static inline DownloadManagerEfl* toDownloadManagerEfl(const void* clientInfo)
-{
-    return static_cast<DownloadManagerEfl*>(const_cast<void*>(clientInfo));
-}
-
-#if OS(TIZEN) && ENABLE(TIZEN_USING_EXTERNAL_DOWNLOAD_CLIENT)
-// FIMXE : This macro should be unified or modified according to Tizen macro policy.
-// WebKit opensource does not have any concept for external download module, but, Tizen needs it.
-// So, localizing this patch is helpless situation unless WebKit supports the concept or we contribute it.
-// If policy for Tizen macro and ewk local API are determined, this patch should be took care of according to them.
-void DownloadManagerEfl::didStart(WKContextRef, WKDownloadRef wkDownload, const void* clientInfo)
-{
-    WebCore::ResourceRequest request = toImpl(wkDownload)->request();
-    WKRetainPtr<WKStringRef> downloadUrlString = adoptWK(WKStringCreateWithUTF8CString(request.url().string().utf8().data()));
-
-    WKDownloadCancel(wkDownload);
-
-    toDownloadManagerEfl(clientInfo)->m_context->didStartDownload(downloadUrlString.get());
-}
-#else
-WKStringRef DownloadManagerEfl::decideDestinationWithSuggestedFilename(WKContextRef, WKDownloadRef wkDownload, WKStringRef filename, bool* /*allowOverwrite*/, const void* clientInfo)
-{
-    Ewk_Download_Job* download = toDownloadManagerEfl(clientInfo)->downloadJob(toImpl(wkDownload)->downloadID());
-    ASSERT(download);
-
-    download->setSuggestedFileName(toImpl(filename)->string().utf8().data());
-
-    // We send the new download signal on the Ewk_View only once we have received the response
-    // and the suggested file name.
-    download->viewImpl()->informDownloadJobRequested(download);
-
-    // DownloadSoup expects the destination to be a URL.
-    String destination = ASCIILiteral("file://") + String::fromUTF8(download->destination());
-
-    return WKStringCreateWithUTF8CString(destination.utf8().data());
-}
-
-void DownloadManagerEfl::didReceiveResponse(WKContextRef, WKDownloadRef wkDownload, WKURLResponseRef wkResponse, const void* clientInfo)
-{
-    Ewk_Download_Job* download = toDownloadManagerEfl(clientInfo)->downloadJob(toImpl(wkDownload)->downloadID());
-    ASSERT(download);
-    download->setResponse(Ewk_Url_Response::create(wkResponse));
-}
-
-void DownloadManagerEfl::didCreateDestination(WKContextRef, WKDownloadRef wkDownload, WKStringRef /*path*/, const void* clientInfo)
-{
-    Ewk_Download_Job* download = toDownloadManagerEfl(clientInfo)->downloadJob(toImpl(wkDownload)->downloadID());
-    ASSERT(download);
-
-    download->setState(EWK_DOWNLOAD_JOB_STATE_DOWNLOADING);
-}
-
-void DownloadManagerEfl::didReceiveData(WKContextRef, WKDownloadRef wkDownload, uint64_t length, const void* clientInfo)
-{
-    Ewk_Download_Job* download = toDownloadManagerEfl(clientInfo)->downloadJob(toImpl(wkDownload)->downloadID());
-    ASSERT(download);
-    download->incrementReceivedData(length);
-}
-
-void DownloadManagerEfl::didFail(WKContextRef, WKDownloadRef wkDownload, WKErrorRef error, const void* clientInfo)
-{
-    DownloadManagerEfl* downloadManager = toDownloadManagerEfl(clientInfo);
-    uint64_t downloadId = toImpl(wkDownload)->downloadID();
-    Ewk_Download_Job* download = downloadManager->downloadJob(downloadId);
-    ASSERT(download);
-
-    OwnPtr<Ewk_Error> ewkError = Ewk_Error::create(error);
-    download->setState(EWK_DOWNLOAD_JOB_STATE_FAILED);
-    download->viewImpl()->informDownloadJobFailed(download, ewkError.get());
-    downloadManager->unregisterDownloadJob(downloadId);
-}
-
-void DownloadManagerEfl::didCancel(WKContextRef, WKDownloadRef wkDownload, const void* clientInfo)
-{
-    DownloadManagerEfl* downloadManager = toDownloadManagerEfl(clientInfo);
-    uint64_t downloadId = toImpl(wkDownload)->downloadID();
-    Ewk_Download_Job* download = downloadManager->downloadJob(downloadId);
-    ASSERT(download);
-
-    download->setState(EWK_DOWNLOAD_JOB_STATE_CANCELLED);
-    download->viewImpl()->informDownloadJobCancelled(download);
-    downloadManager->unregisterDownloadJob(downloadId);
-}
-
-void DownloadManagerEfl::didFinish(WKContextRef, WKDownloadRef wkDownload, const void* clientInfo)
-{
-    DownloadManagerEfl* downloadManager = toDownloadManagerEfl(clientInfo);
-    uint64_t downloadId = toImpl(wkDownload)->downloadID();
-    Ewk_Download_Job* download = downloadManager->downloadJob(downloadId);
-    ASSERT(download);
-
-    download->setState(EWK_DOWNLOAD_JOB_STATE_FINISHED);
-    download->viewImpl()->informDownloadJobFinished(download);
-    downloadManager->unregisterDownloadJob(downloadId);
-}
-#endif // OS(TIZEN) && ENABLE(TIZEN_USING_EXTERNAL_DOWNLOAD_CLIENT)
-
-DownloadManagerEfl::DownloadManagerEfl(Ewk_Context* context)
-    : m_context(context)
-{
-    WKContextDownloadClient wkDownloadClient;
-    memset(&wkDownloadClient, 0, sizeof(WKContextDownloadClient));
-
-    wkDownloadClient.version = kWKContextDownloadClientCurrentVersion;
-    wkDownloadClient.clientInfo = this;
-#if OS(TIZEN) && ENABLE(TIZEN_USING_EXTERNAL_DOWNLOAD_CLIENT)
-    wkDownloadClient.didStart = didStart;
-#else
-    wkDownloadClient.didCancel = didCancel;
-    wkDownloadClient.decideDestinationWithSuggestedFilename = decideDestinationWithSuggestedFilename;
-    wkDownloadClient.didCreateDestination = didCreateDestination;
-    wkDownloadClient.didReceiveResponse = didReceiveResponse;
-    wkDownloadClient.didReceiveData = didReceiveData;
-    wkDownloadClient.didFail = didFail;
-    wkDownloadClient.didFinish = didFinish;
-#endif
-
-    WKContextSetDownloadClient(context->wkContext(), &wkDownloadClient);
-}
-
-void DownloadManagerEfl::registerDownload(DownloadProxy* download, EwkViewImpl* viewImpl)
-{
-    uint64_t downloadId = download->downloadID();
-    if (m_downloadJobs.contains(downloadId))
-        return;
-
-    RefPtr<Ewk_Download_Job> ewkDownload = Ewk_Download_Job::create(download, viewImpl);
-    m_downloadJobs.add(downloadId, ewkDownload);
-}
-
-Ewk_Download_Job* DownloadManagerEfl::downloadJob(uint64_t id) const
-{
-    return m_downloadJobs.get(id).get();
-}
-
-void DownloadManagerEfl::unregisterDownloadJob(uint64_t id)
-{
-    m_downloadJobs.remove(id);
-}
-
-} // namespace WebKit
diff --git a/Source/WebKit2/UIProcess/efl/DownloadManagerEfl.h b/Source/WebKit2/UIProcess/efl/DownloadManagerEfl.h
deleted file mode 100755 (executable)
index 2b2b875..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Copyright (C) 2012 Intel Corporation. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef DownloadManagerEfl_h
-#define DownloadManagerEfl_h
-
-#include "ewk_download_job_private.h"
-#include <wtf/HashMap.h>
-#include <wtf/PassOwnPtr.h>
-#include <wtf/RefPtr.h>
-
-class Ewk_Context;
-class Ewk_Download_Job;
-
-namespace WebKit {
-
-class DownloadManagerEfl {
-public:
-    static PassOwnPtr<DownloadManagerEfl> create(Ewk_Context* context)
-    {
-        return adoptPtr(new DownloadManagerEfl(context));
-    }
-
-    void registerDownload(DownloadProxy*, EwkViewImpl*);
-
-private:
-    DownloadManagerEfl(Ewk_Context*);
-
-    Ewk_Download_Job* downloadJob(uint64_t id) const;
-    void unregisterDownloadJob(uint64_t id);
-
-#if OS(TIZEN) && ENABLE(TIZEN_USING_EXTERNAL_DOWNLOAD_CLIENT)
-    static void didStart(WKContextRef, WKDownloadRef wkDownload, const void* clientInfo);
-#else
-    static WKStringRef decideDestinationWithSuggestedFilename(WKContextRef, WKDownloadRef, WKStringRef filename, bool* allowOverwrite, const void* clientInfo);
-    static void didReceiveResponse(WKContextRef, WKDownloadRef, WKURLResponseRef, const void* clientInfo);
-    static void didCreateDestination(WKContextRef, WKDownloadRef, WKStringRef path, const void* clientInfo);
-    static void didReceiveData(WKContextRef, WKDownloadRef, uint64_t length, const void* clientInfo);
-    static void didFail(WKContextRef, WKDownloadRef, WKErrorRef, const void* clientInfo);
-    static void didCancel(WKContextRef, WKDownloadRef, const void* clientInfo);
-    static void didFinish(WKContextRef, WKDownloadRef, const void* clientInfo);
-#endif
-
-    Ewk_Context* m_context;
-    HashMap<uint64_t, RefPtr<Ewk_Download_Job> > m_downloadJobs;
-};
-
-} // namespace WebKit
-
-#endif // DownloadManagerEfl_h
diff --git a/Source/WebKit2/UIProcess/efl/FormClientEfl.h b/Source/WebKit2/UIProcess/efl/FormClientEfl.h
deleted file mode 100755 (executable)
index 65d2cc3..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (C) 2012 Intel Corporation. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef FormClientEfl_h
-#define FormClientEfl_h
-
-#include <WebKit2/WKBase.h>
-#include <wtf/PassOwnPtr.h>
-
-class EwkViewImpl;
-
-namespace WebKit {
-
-class FormClientEfl {
-public:
-    static PassOwnPtr<FormClientEfl> create(EwkViewImpl* viewImpl)
-    {
-        return adoptPtr(new FormClientEfl(viewImpl));
-    }
-
-private:
-    explicit FormClientEfl(EwkViewImpl*);
-
-#if ENABLE(TIZEN_WEBKIT2_FORM_DATABASE)
-    static void willSubmitForm(WKPageRef, WKFrameRef, WKFrameRef, WKDictionaryRef, bool, WKTypeRef, WKFormSubmissionListenerRef, const void*);
-#else
-    static void willSubmitForm(WKPageRef, WKFrameRef, WKFrameRef, WKDictionaryRef values, WKTypeRef userData, WKFormSubmissionListenerRef, const void* clientInfo);
-#endif
-
-    EwkViewImpl* m_viewImpl;
-};
-
-} // namespace WebKit
-
-#endif // FormClientEfl_h
diff --git a/Source/WebKit2/UIProcess/efl/InputMethodContextEfl.cpp b/Source/WebKit2/UIProcess/efl/InputMethodContextEfl.cpp
deleted file mode 100755 (executable)
index cbb8209..0000000
+++ /dev/null
@@ -1,390 +0,0 @@
-/*
-   Copyright (C) 2011 Samsung Electronics
-   Copyright (C) 2012 Intel Corporation. All rights reserved.
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Library General Public
-    License as published by the Free Software Foundation; either
-    version 2 of the License, or (at your option) any later version.
-
-    This library is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-    Library General Public License for more details.
-
-    You should have received a copy of the GNU Library General Public License
-    along with this library; see the file COPYING.LIB.  If not, write to
-    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-    Boston, MA 02110-1301, USA.
-*/
-
-#include "config.h"
-#include "InputMethodContextEfl.h"
-
-#include "EwkViewImpl.h"
-#include "WebPageProxy.h"
-#include <Ecore_Evas.h>
-#include <Ecore_IMF_Evas.h>
-
-using namespace WebCore;
-
-namespace WebKit {
-
-InputMethodContextEfl::InputMethodContextEfl(EwkViewImpl* viewImpl, PassOwnPtr<Ecore_IMF_Context> context)
-    : m_viewImpl(viewImpl)
-    , m_context(context)
-    , m_focused(false)
-{
-    ASSERT(context);
-#if ENABLE(TIZEN_ISF_PORT)
-    initializeIMFContext(m_context.get(), ECORE_IMF_INPUT_PANEL_LAYOUT_NORMAL);
-#else
-    ecore_imf_context_event_callback_add(m_context.get(), ECORE_IMF_CALLBACK_PREEDIT_CHANGED, onIMFPreeditSequenceChanged, this);
-    ecore_imf_context_event_callback_add(m_context.get(), ECORE_IMF_CALLBACK_COMMIT, onIMFInputSequenceComplete, this);
-#endif
-}
-
-InputMethodContextEfl::~InputMethodContextEfl()
-{
-}
-
-#if ENABLE(TIZEN_ISF_PORT)
-void InputMethodContextEfl::onIMFInputPanelStateChanged(void* data, Ecore_IMF_Context*, int state)
-{
-    InputMethodContextEfl* inputMethodContext = static_cast<InputMethodContextEfl*>(data);
-    if (!inputMethodContext->m_viewImpl->page()->focusedFrame() || !inputMethodContext->m_focused)
-        return;
-
-    if (state == ECORE_IMF_INPUT_PANEL_STATE_HIDE)
-        evas_object_smart_callback_call(inputMethodContext->m_viewImpl->view(), "editorclient,ime,closed", 0);
-    else if (state == ECORE_IMF_INPUT_PANEL_STATE_SHOW)
-        evas_object_smart_callback_call(inputMethodContext->m_viewImpl->view(), "editorclient,ime,opened", 0);
-}
-
-void InputMethodContextEfl::onIMFInputPanelGeometryChanged(void* data, Ecore_IMF_Context*, int value)
-{
-    InputMethodContextEfl* inputMethodContext = static_cast<InputMethodContextEfl*>(data);
-    if (!inputMethodContext->m_viewImpl->page()->focusedFrame() || !inputMethodContext->m_focused)
-        return;
-
-    Eina_Rectangle rect;
-    ecore_imf_context_input_panel_geometry_get(inputMethodContext->m_context.get(), &rect.x, &rect.y, &rect.w, &rect.h);
-    evas_object_smart_callback_call(inputMethodContext->m_viewImpl->view(), "inputmethod,changed", &rect);
-}
-
-void InputMethodContextEfl::onIMFCandidatePanelStateChanged(void* data, Ecore_IMF_Context*, int state)
-{
-    InputMethodContextEfl* inputMethodContext = static_cast<InputMethodContextEfl*>(data);
-    if (!inputMethodContext->m_viewImpl->page()->focusedFrame() || !inputMethodContext->m_focused)
-        return;
-
-    if (state == ECORE_IMF_CANDIDATE_PANEL_SHOW)
-        evas_object_smart_callback_call(inputMethodContext->m_viewImpl->view(), "editorclient,candidate,opened", 0);
-    else
-        evas_object_smart_callback_call(inputMethodContext->m_viewImpl->view(), "editorclient,candidate,closed", 0);
-}
-
-void InputMethodContextEfl::onIMFCandidatePanelGeometryChanged(void* data, Ecore_IMF_Context*, int)
-{
-    InputMethodContextEfl* inputMethodContext = static_cast<InputMethodContextEfl*>(data);
-    if (!inputMethodContext->m_viewImpl->page()->focusedFrame() || !inputMethodContext->m_focused)
-        return;
-
-    Eina_Rectangle rect;
-    ecore_imf_context_candidate_panel_geometry_get(inputMethodContext->m_context.get(), &rect.x, &rect.y, &rect.w, &rect.h);
-    evas_object_smart_callback_call(inputMethodContext->m_viewImpl->view(), "editorclient,candidate,changed", &rect);
-}
-
-Eina_Bool InputMethodContextEfl::onIMFRetrieveSurrounding(void* data, Ecore_IMF_Context*, char** text, int* offset)
-{
-    InputMethodContextEfl* inputMethodContext = static_cast<InputMethodContextEfl*>(data);
-    if (!inputMethodContext->m_viewImpl->page()->focusedFrame() || !inputMethodContext->m_focused || (!text && !offset))
-        return false;
-
-    String surroundingText;
-    int cursorOffset;
-    inputMethodContext->m_viewImpl->page()->getSurroundingTextAndCursorOffset(surroundingText, cursorOffset);
-
-    if (text) {
-        CString utf8Text(surroundingText.utf8());
-        size_t length = utf8Text.length();
-
-        *text = static_cast<char*>(malloc((length + 1) * sizeof(char)));
-        if (!(*text))
-            return false;
-
-        if (length)
-            strncpy(*text, utf8Text.data(), length);
-        (*text)[length] = 0;
-    }
-
-    if (offset)
-        *offset = cursorOffset;
-
-    return true;
-}
-
-void InputMethodContextEfl::onIMFDeleteSurrounding(void* data, Ecore_IMF_Context*, void* eventInfo)
-{
-    InputMethodContextEfl* inputMethodContext = static_cast<InputMethodContextEfl*>(data);
-    if (!eventInfo || !inputMethodContext->m_viewImpl->page()->focusedFrame() || !inputMethodContext->m_focused)
-        return;
-
-    Ecore_IMF_Event_Delete_Surrounding* event = static_cast<Ecore_IMF_Event_Delete_Surrounding*>(eventInfo);
-    inputMethodContext->m_viewImpl->page()->deleteSurroundingText(event->offset, event->n_chars);
-}
-
-void InputMethodContextEfl::onIMFInputSequenceComplete(void* data, Ecore_IMF_Context*, void* eventInfo)
-{
-    InputMethodContextEfl* inputMethodContext = static_cast<InputMethodContextEfl*>(data);
-    if (!eventInfo || !inputMethodContext->m_focused)
-        return;
-
-    inputMethodContext->m_viewImpl->pageClient->imContextCommitted(inputMethodContext->m_context.get(), static_cast<char*>(eventInfo));
-}
-
-void InputMethodContextEfl::onIMFPreeditSequenceChanged(void* data, Ecore_IMF_Context*, void*)
-{
-    InputMethodContextEfl* inputMethodContext = static_cast<InputMethodContextEfl*>(data);
-    if (!inputMethodContext->m_viewImpl->page()->focusedFrame() || !inputMethodContext->m_focused)
-        return;
-
-    inputMethodContext->m_viewImpl->pageClient->imContextPreeditChanged(inputMethodContext->m_context.get());
-}
-#else
-void InputMethodContextEfl::onIMFInputSequenceComplete(void* data, Ecore_IMF_Context*, void* eventInfo)
-{
-    InputMethodContextEfl* inputMethodContext = static_cast<InputMethodContextEfl*>(data);
-    if (!eventInfo || !inputMethodContext->m_focused)
-        return;
-
-    inputMethodContext->m_viewImpl->page()->confirmComposition(String::fromUTF8(static_cast<char*>(eventInfo)));
-}
-
-void InputMethodContextEfl::onIMFPreeditSequenceChanged(void* data, Ecore_IMF_Context* context, void*)
-{
-    InputMethodContextEfl* inputMethodContext = static_cast<InputMethodContextEfl*>(data);
-
-    if (!inputMethodContext->m_viewImpl->page()->focusedFrame() || !inputMethodContext->m_focused)
-        return;
-
-    char* buffer = 0;
-    ecore_imf_context_preedit_string_get(context, &buffer, 0);
-    if (!buffer)
-        return;
-
-    String preeditString = String::fromUTF8(buffer);
-    free(buffer);
-    Vector<CompositionUnderline> underlines;
-    underlines.append(CompositionUnderline(0, preeditString.length(), Color(0, 0, 0), false));
-    inputMethodContext->m_viewImpl->page()->setComposition(preeditString, underlines, 0);
-}
-#endif
-
-PassOwnPtr<Ecore_IMF_Context> InputMethodContextEfl::createIMFContext(Evas* canvas)
-{
-    const char* defaultContextID = ecore_imf_context_default_id_get();
-    if (!defaultContextID)
-        return nullptr;
-
-    OwnPtr<Ecore_IMF_Context> imfContext = adoptPtr(ecore_imf_context_add(defaultContextID));
-    if (!imfContext)
-        return nullptr;
-
-    Ecore_Evas* ecoreEvas = ecore_evas_ecore_evas_get(canvas);
-    ecore_imf_context_client_window_set(imfContext.get(), reinterpret_cast<void*>(ecore_evas_window_get(ecoreEvas)));
-    ecore_imf_context_client_canvas_set(imfContext.get(), canvas);
-
-    return imfContext.release();
-}
-
-void InputMethodContextEfl::handleMouseUpEvent(const Evas_Event_Mouse_Up*)
-{
-    ecore_imf_context_reset(m_context.get());
-}
-
-void InputMethodContextEfl::handleKeyDownEvent(const Evas_Event_Key_Down* downEvent, bool* isFiltered)
-{
-    Ecore_IMF_Event inputMethodEvent;
-    ecore_imf_evas_event_key_down_wrap(const_cast<Evas_Event_Key_Down*>(downEvent), &inputMethodEvent.key_down);
-
-    *isFiltered = ecore_imf_context_filter_event(m_context.get(), ECORE_IMF_EVENT_KEY_DOWN, &inputMethodEvent);
-}
-
-void InputMethodContextEfl::updateTextInputState()
-{
-    if (!m_context)
-        return;
-
-    const EditorState& editor = m_viewImpl->page()->editorState();
-
-    if (editor.isContentEditable) {
-        if (m_focused)
-            return;
-
-        ecore_imf_context_reset(m_context.get());
-        ecore_imf_context_focus_in(m_context.get());
-        m_focused = true;
-    } else {
-        if (!m_focused)
-            return;
-
-        if (editor.hasComposition)
-            m_viewImpl->page()->cancelComposition();
-
-        m_focused = false;
-        ecore_imf_context_reset(m_context.get());
-        ecore_imf_context_focus_out(m_context.get());
-    }
-}
-
-#if ENABLE(TIZEN_ISF_PORT)
-void InputMethodContextEfl::initializeIMFContext(Ecore_IMF_Context* context, Ecore_IMF_Input_Panel_Layout layout)
-{
-    ecore_imf_context_input_panel_enabled_set(context, false);
-    ecore_imf_context_input_panel_event_callback_add(context, ECORE_IMF_INPUT_PANEL_STATE_EVENT, onIMFInputPanelStateChanged, this);
-    ecore_imf_context_input_panel_event_callback_add(context, ECORE_IMF_INPUT_PANEL_GEOMETRY_EVENT, onIMFInputPanelGeometryChanged, this);
-    ecore_imf_context_input_panel_event_callback_add(context, ECORE_IMF_CANDIDATE_PANEL_STATE_EVENT, onIMFCandidatePanelStateChanged, this);
-    ecore_imf_context_input_panel_event_callback_add(context, ECORE_IMF_CANDIDATE_PANEL_GEOMETRY_EVENT, onIMFCandidatePanelGeometryChanged, this);
-    ecore_imf_context_retrieve_surrounding_callback_set(context, onIMFRetrieveSurrounding, this);
-    ecore_imf_context_event_callback_add(context, ECORE_IMF_CALLBACK_DELETE_SURROUNDING, onIMFDeleteSurrounding, this);
-    ecore_imf_context_event_callback_add(context, ECORE_IMF_CALLBACK_PREEDIT_CHANGED, onIMFPreeditSequenceChanged, this);
-    ecore_imf_context_event_callback_add(context, ECORE_IMF_CALLBACK_COMMIT, onIMFInputSequenceComplete, this);
-    ecore_imf_context_input_panel_layout_set(m_context.get(), layout);
-}
-
-void InputMethodContextEfl::setType(const String& type)
-{
-    Ecore_IMF_Input_Panel_Layout layout;
-    if (type == "number")
-        layout = ECORE_IMF_INPUT_PANEL_LAYOUT_NUMBER;
-    else if (type == "email")
-        layout = ECORE_IMF_INPUT_PANEL_LAYOUT_EMAIL;
-    else if (type == "url")
-        layout = ECORE_IMF_INPUT_PANEL_LAYOUT_URL;
-    else if (type == "tel")
-        layout = ECORE_IMF_INPUT_PANEL_LAYOUT_PHONENUMBER;
-    else if (type == "password")
-        layout = ECORE_IMF_INPUT_PANEL_LAYOUT_PASSWORD;
-    else
-        layout = ECORE_IMF_INPUT_PANEL_LAYOUT_NORMAL;
-
-    if (m_contextList.contains(layout)) {
-        revertIMFContext();
-        m_context = m_contextList.take(layout);
-    } else if (!m_context || ecore_imf_context_input_panel_layout_get(m_context.get()) != layout) {
-        OwnPtr<Ecore_IMF_Context> context = createIMFContext(evas_object_evas_get(m_viewImpl->view()));
-        if (!m_context)
-            return;
-        revertIMFContext();
-        m_context = context.release();
-        initializeIMFContext(m_context.get(), layout);
-    }
-
-    if (type == "password" || type == "plugin")
-        ecore_imf_context_prediction_allow_set(m_context.get(), false);
-    else
-        ecore_imf_context_prediction_allow_set(m_context.get(), true);
-
-    if (type.isEmpty() || type == "textarea")
-        ecore_imf_context_autocapital_type_set(m_context.get(), ECORE_IMF_AUTOCAPITAL_TYPE_SENTENCE);
-    else
-        ecore_imf_context_autocapital_type_set(m_context.get(), ECORE_IMF_AUTOCAPITAL_TYPE_NONE);
-}
-
-void InputMethodContextEfl::showIMFContext()
-{
-    if (!m_context)
-        return;
-
-    ecore_imf_context_focus_in(m_context.get());
-    ecore_imf_context_input_panel_show(m_context.get());
-    ecore_imf_context_cursor_position_set(m_context.get(), m_viewImpl->page()->getCursorOffset());
-}
-
-void InputMethodContextEfl::setIMFContextCursorPosition(int position)
-{
-    if (!m_context)
-        return;
-
-    ecore_imf_context_cursor_position_set(m_context.get(), position);
-}
-
-void InputMethodContextEfl::setIMData(const String& data)
-{
-    if (!m_context)
-        return;
-
-    CString utf8Data = data.utf8();
-    ecore_imf_context_input_panel_imdata_set(m_context.get(), utf8Data.data(), utf8Data.length());
-}
-
-bool InputMethodContextEfl::isShow()
-{
-    return (m_context && m_focused && ecore_imf_context_input_panel_state_get(m_context.get()) != ECORE_IMF_INPUT_PANEL_STATE_HIDE);
-}
-
-Ecore_IMF_Autocapital_Type InputMethodContextEfl::autoCapitalType()
-{
-    return (m_context ? ecore_imf_context_autocapital_type_get(m_context.get()) : ECORE_IMF_AUTOCAPITAL_TYPE_NONE);
-}
-
-void InputMethodContextEfl::onFocusIn()
-{
-    if (!m_context || !m_focused)
-        return;
-
-    ecore_imf_context_focus_in(m_context.get());
-    ecore_imf_context_input_panel_show(m_context.get());
-}
-
-void InputMethodContextEfl::onFocusOut()
-{
-    if (!m_context || !m_focused)
-        return;
-
-    ecore_imf_context_input_panel_hide(m_context.get());
-    ecore_imf_context_focus_out(m_context.get());
-}
-
-void InputMethodContextEfl::revertIMFContext()
-{
-    if (!m_context)
-        return;
-
-    PassOwnPtr<Ecore_IMF_Context> imfContext = m_context.release();
-    m_contextList.add(ecore_imf_context_input_panel_layout_get(imfContext.get()), imfContext);
-}
-
-void InputMethodContextEfl::resetIMFContext()
-{
-    if (!m_context)
-        return;
-
-    ecore_imf_context_reset(m_context.get());
-
-    if (ecore_imf_context_input_panel_state_get(m_context.get()) == ECORE_IMF_INPUT_PANEL_STATE_HIDE)
-        revertIMFContext();
-}
-
-void InputMethodContextEfl::hideIMFContext()
-{
-    if (!m_context)
-        return;
-
-    if (ecore_imf_context_input_panel_state_get(m_context.get()) != ECORE_IMF_INPUT_PANEL_STATE_HIDE) {
-        ecore_imf_context_reset(m_context.get());
-        ecore_imf_context_input_panel_hide(m_context.get());
-        ecore_imf_context_focus_out(m_context.get());
-    }
-
-    revertIMFContext();
-}
-
-void InputMethodContextEfl::destroyIMFContextList()
-{
-    m_contextList.clear();
-}
-#endif
-
-}
diff --git a/Source/WebKit2/UIProcess/efl/InputMethodContextEfl.h b/Source/WebKit2/UIProcess/efl/InputMethodContextEfl.h
deleted file mode 100755 (executable)
index 9963603..0000000
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
-   Copyright (C) 2011 Samsung Electronics
-   Copyright (C) 2012 Intel Corporation. All rights reserved.
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Library General Public
-    License as published by the Free Software Foundation; either
-    version 2 of the License, or (at your option) any later version.
-
-    This library is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-    Library General Public License for more details.
-
-    You should have received a copy of the GNU Library General Public License
-    along with this library; see the file COPYING.LIB.  If not, write to
-    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-    Boston, MA 02110-1301, USA.
-*/
-
-#ifndef InputMethodContextEfl_h
-#define InputMethodContextEfl_h
-
-#include <Ecore_IMF.h>
-#include <Evas.h>
-#include <wtf/OwnPtr.h>
-#include <wtf/PassOwnPtr.h>
-
-class EwkViewImpl;
-
-namespace WebKit {
-
-class WebPageProxy;
-
-class InputMethodContextEfl {
-public:
-    static PassOwnPtr<InputMethodContextEfl> create(EwkViewImpl* viewImpl, Evas* canvas)
-    {
-        OwnPtr<Ecore_IMF_Context> context = createIMFContext(canvas);
-        if (!context)
-            return nullptr;
-
-        return adoptPtr(new InputMethodContextEfl(viewImpl, context.release()));
-    }
-    ~InputMethodContextEfl();
-
-    void handleMouseUpEvent(const Evas_Event_Mouse_Up* upEvent);
-    void handleKeyDownEvent(const Evas_Event_Key_Down* downEvent, bool* isFiltered);
-    void updateTextInputState();
-
-#if ENABLE(TIZEN_ISF_PORT)
-    void setType(const String&);
-    void showIMFContext();
-    void setIMFContextCursorPosition(int);
-    void setIMData(const String&);
-    bool isShow();
-    Ecore_IMF_Autocapital_Type autoCapitalType();
-    void onFocusIn();
-    void onFocusOut();
-    void revertIMFContext();
-    void resetIMFContext();
-    void hideIMFContext();
-    void destroyIMFContextList();
-#endif
-
-private:
-    InputMethodContextEfl(EwkViewImpl*, PassOwnPtr<Ecore_IMF_Context>);
-
-    static PassOwnPtr<Ecore_IMF_Context> createIMFContext(Evas* canvas);
-    static void onIMFInputSequenceComplete(void* data, Ecore_IMF_Context*, void* eventInfo);
-    static void onIMFPreeditSequenceChanged(void* data, Ecore_IMF_Context*, void* eventInfo);
-
-#if ENABLE(TIZEN_ISF_PORT)
-    void initializeIMFContext(Ecore_IMF_Context*, Ecore_IMF_Input_Panel_Layout);
-
-    static void onIMFInputPanelStateChanged(void*, Ecore_IMF_Context*, int);
-    static void onIMFInputPanelGeometryChanged(void*, Ecore_IMF_Context*, int);
-    static void onIMFCandidatePanelStateChanged(void*, Ecore_IMF_Context*, int);
-    static void onIMFCandidatePanelGeometryChanged(void*, Ecore_IMF_Context*, int);
-    static Eina_Bool onIMFRetrieveSurrounding(void*, Ecore_IMF_Context*, char**, int*);
-    static void onIMFDeleteSurrounding(void*, Ecore_IMF_Context*, void*);
-
-    HashMap<int, OwnPtr<Ecore_IMF_Context> > m_contextList;
-#endif
-
-    EwkViewImpl* m_viewImpl;
-    OwnPtr<Ecore_IMF_Context> m_context;
-    bool m_focused;
-};
-
-} // namespace WebKit
-
-#endif // InputMethodContextEfl_h
diff --git a/Source/WebKit2/UIProcess/efl/PageLoadClientEfl.cpp b/Source/WebKit2/UIProcess/efl/PageLoadClientEfl.cpp
deleted file mode 100755 (executable)
index a98c8a9..0000000
+++ /dev/null
@@ -1,285 +0,0 @@
-/*
- * Copyright (C) 2012 Intel Corporation. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "PageLoadClientEfl.h"
-
-#include "EwkViewImpl.h"
-#include "WKAPICast.h"
-#include "WKFrame.h"
-#include "WKPage.h"
-#include "ewk_back_forward_list_private.h"
-#include "ewk_error_private.h"
-#include "ewk_intent_private.h"
-#include "ewk_intent_service_private.h"
-#include "ewk_view.h"
-
-#if OS(TIZEN)
-#include "WKRetainPtr.h"
-#include "ewk_auth_challenge.h"
-#include "ewk_auth_challenge_private.h"
-#endif
-
-using namespace WebKit;
-
-namespace WebKit {
-
-static inline PageLoadClientEfl* toPageLoadClientEfl(const void* clientInfo)
-{
-    return static_cast<PageLoadClientEfl*>(const_cast<void*>(clientInfo));
-}
-
-void PageLoadClientEfl::didReceiveTitleForFrame(WKPageRef, WKStringRef title, WKFrameRef frame, WKTypeRef, const void* clientInfo)
-{
-    if (!WKFrameIsMainFrame(frame))
-        return;
-
-    EwkViewImpl* viewImpl = toPageLoadClientEfl(clientInfo)->viewImpl();
-    viewImpl->informTitleChange(toImpl(title)->string());
-}
-
-#if ENABLE(WEB_INTENTS)
-void PageLoadClientEfl::didReceiveIntentForFrame(WKPageRef, WKFrameRef, WKIntentDataRef intent, WKTypeRef, const void* clientInfo)
-{
-    EwkViewImpl* viewImpl = toPageLoadClientEfl(clientInfo)->viewImpl();
-    RefPtr<Ewk_Intent> ewkIntent = Ewk_Intent::create(intent);
-    viewImpl->informIntentRequest(ewkIntent.get());
-}
-#endif
-
-#if ENABLE(WEB_INTENTS_TAG)
-void PageLoadClientEfl::registerIntentServiceForFrame(WKPageRef, WKFrameRef, WKIntentServiceInfoRef serviceInfo, WKTypeRef, const void* clientInfo)
-{
-    EwkViewImpl* viewImpl = toPageLoadClientEfl(clientInfo)->viewImpl();
-    RefPtr<Ewk_Intent_Service> ewkIntentService = Ewk_Intent_Service::create(serviceInfo);
-    viewImpl->informIntentServiceRegistration(ewkIntentService.get());
-}
-#endif
-
-void PageLoadClientEfl::didChangeProgress(WKPageRef page, const void* clientInfo)
-{
-    EwkViewImpl* viewImpl = toPageLoadClientEfl(clientInfo)->viewImpl();
-    viewImpl->informLoadProgress(WKPageGetEstimatedProgress(page));
-}
-
-void PageLoadClientEfl::didFinishLoadForFrame(WKPageRef, WKFrameRef frame, WKTypeRef /*userData*/, const void* clientInfo)
-{
-    if (!WKFrameIsMainFrame(frame))
-        return;
-
-    EwkViewImpl* viewImpl = toPageLoadClientEfl(clientInfo)->viewImpl();
-    viewImpl->informLoadFinished();
-}
-
-void PageLoadClientEfl::didFailLoadWithErrorForFrame(WKPageRef, WKFrameRef frame, WKErrorRef error, WKTypeRef, const void* clientInfo)
-{
-    if (!WKFrameIsMainFrame(frame))
-        return;
-
-    EwkViewImpl* viewImpl = toPageLoadClientEfl(clientInfo)->viewImpl();
-#if ENABLE(TIZEN_WEBKIT2_LOCAL_IMPLEMENTATION_FOR_ERROR)
-    {
-        ewkViewLoadError(viewImpl->view(), error);
-        return;
-    }
-#endif
-    OwnPtr<Ewk_Error> ewkError = Ewk_Error::create(error);
-    viewImpl->informLoadError(ewkError.get());
-    viewImpl->informLoadFinished();
-}
-
-void PageLoadClientEfl::didStartProvisionalLoadForFrame(WKPageRef, WKFrameRef frame, WKTypeRef /*userData*/, const void* clientInfo)
-{
-    if (!WKFrameIsMainFrame(frame))
-        return;
-
-    EwkViewImpl* viewImpl = toPageLoadClientEfl(clientInfo)->viewImpl();
-    viewImpl->informProvisionalLoadStarted();
-}
-
-void PageLoadClientEfl::didReceiveServerRedirectForProvisionalLoadForFrame(WKPageRef, WKFrameRef frame, WKTypeRef /*userData*/, const void* clientInfo)
-{
-    if (!WKFrameIsMainFrame(frame))
-        return;
-
-    EwkViewImpl* viewImpl = toPageLoadClientEfl(clientInfo)->viewImpl();
-    viewImpl->informProvisionalLoadRedirect();
-}
-
-void PageLoadClientEfl::didFailProvisionalLoadWithErrorForFrame(WKPageRef, WKFrameRef frame, WKErrorRef error, WKTypeRef, const void* clientInfo)
-{
-    if (!WKFrameIsMainFrame(frame))
-        return;
-
-    EwkViewImpl* viewImpl = toPageLoadClientEfl(clientInfo)->viewImpl();
-#if ENABLE(TIZEN_WEBKIT2_LOCAL_IMPLEMENTATION_FOR_ERROR)
-    {
-        ewkViewLoadError(viewImpl->view(), error);
-        return;
-    }
-#endif
-    OwnPtr<Ewk_Error> ewkError = Ewk_Error::create(error);
-    viewImpl->informProvisionalLoadFailed(ewkError.get());
-}
-
-void PageLoadClientEfl::didChangeBackForwardList(WKPageRef, WKBackForwardListItemRef addedItem, WKArrayRef removedItems, const void* clientInfo)
-{
-    EwkViewImpl* viewImpl = toPageLoadClientEfl(clientInfo)->viewImpl();
-    ASSERT(viewImpl);
-
-    Ewk_Back_Forward_List* list = ewk_view_back_forward_list_get(viewImpl->view());
-    ASSERT(list);
-    list->update(addedItem, removedItems);
-
-    viewImpl->informBackForwardListChange();
-
-#if ENABLE(TIZEN_SIGNAL_APP_BACK_FORWARD_LIST_CHANGED)
-    ewkViewBackForwardListChanged(viewImpl->view());
-#endif
-}
-
-void PageLoadClientEfl::didSameDocumentNavigationForFrame(WKPageRef, WKFrameRef frame, WKSameDocumentNavigationType, WKTypeRef, const void* clientInfo)
-{
-    if (!WKFrameIsMainFrame(frame))
-        return;
-
-    EwkViewImpl* viewImpl = toPageLoadClientEfl(clientInfo)->viewImpl();
-    viewImpl->informURLChange();
-#if OS(TIZEN)
-    viewImpl->informTitleChange(viewImpl->page()->pageTitle());
-#endif
-}
-
-#if OS(TIZEN)
-void PageLoadClientEfl::didCommitLoadForFrame(WKPageRef page, WKFrameRef frame, WKTypeRef userData, const void* clientInfo)
-{
-    if (!WKFrameIsMainFrame(frame))
-        return;
-
-    Evas_Object* ewkView = toPageLoadClientEfl(clientInfo)->viewImpl()->view();
-    ewkViewLoadCommitted(ewkView);
-}
-
-void PageLoadClientEfl::didFirstVisuallyNonEmptyLayoutForFrame(WKPageRef page, WKFrameRef frame, WKTypeRef userData, const void* clientInfo)
-{
-    if (!WKFrameIsMainFrame(frame))
-        return;
-
-    Evas_Object* ewkView = toPageLoadClientEfl(clientInfo)->viewImpl()->view();
-    ewkViewDidFirstVisuallyNonEmptyLayout(ewkView);
-}
-
-void PageLoadClientEfl::didReceiveAuthenticationChallengeInFrame(WKPageRef page, WKFrameRef frame, WKAuthenticationChallengeRef authenticationChallenge, const void* clientInfo)
-{
-    if (!WKFrameIsMainFrame(frame))
-        return;
-
-    Evas_Object* ewkView = toPageLoadClientEfl(clientInfo)->viewImpl()->view();
-    Ewk_Auth_Challenge* authChallenge = ewkAuthChallengeCreate(authenticationChallenge);
-    ewkViewDidReceiveAuthenticationChallenge(ewkView, authChallenge);
-
-    if (!ewkAuthChallengeDecided(authChallenge) && !ewkAuthChallengeSuspended(authChallenge))
-        ewk_auth_challenge_credential_cancel(authChallenge);
-}
-
-void PageLoadClientEfl::processDidCrash(WKPageRef page, const void* clientInfo)
-{
-    Evas_Object* ewkView = toPageLoadClientEfl(clientInfo)->viewImpl()->view();
-    ewk_view_process_crashed(ewkView);
-}
-
-#if ENABLE(TIZEN_WEBKIT2_SEPERATE_LOAD_PROGRESS)
-void PageLoadClientEfl::didStartProgress(WKPageRef page, const void* clientInfo)
-{
-    EwkViewImpl* viewImpl = toPageLoadClientEfl(clientInfo)->viewImpl();
-    viewImpl->informLoadProgressStarted();
-}
-
-void PageLoadClientEfl::didFinishProgress(WKPageRef page, const void* clientInfo)
-{
-    EwkViewImpl* viewImpl = toPageLoadClientEfl(clientInfo)->viewImpl();
-    viewImpl->informLoadProgressFinished();
-}
-#endif
-
-#if ENABLE(TIZEN_ISF_PORT)
-void PageLoadClientEfl::willGoToBackForwardListItem(WKPageRef page, WKBackForwardListItemRef, WKTypeRef, const void* clientInfo)
-{
-    EwkViewImpl* viewImpl = toPageLoadClientEfl(clientInfo)->viewImpl();
-    InputMethodContextEfl* inputMethodContext = viewImpl->inputMethodContext();
-    if (inputMethodContext)
-        inputMethodContext->hideIMFContext();
-}
-#endif
-#endif // #if OS(TIZEN)
-
-PageLoadClientEfl::PageLoadClientEfl(EwkViewImpl* viewImpl)
-    : m_viewImpl(viewImpl)
-{
-    WKPageRef pageRef = m_viewImpl->wkPage();
-    ASSERT(pageRef);
-
-    WKPageLoaderClient loadClient;
-    memset(&loadClient, 0, sizeof(WKPageLoaderClient));
-    loadClient.version = kWKPageLoaderClientCurrentVersion;
-    loadClient.clientInfo = this;
-    loadClient.didReceiveTitleForFrame = didReceiveTitleForFrame;
-#if ENABLE(WEB_INTENTS)
-    loadClient.didReceiveIntentForFrame = didReceiveIntentForFrame;
-#endif
-#if ENABLE(WEB_INTENTS_TAG)
-    loadClient.registerIntentServiceForFrame = registerIntentServiceForFrame;
-#endif
-#if ENABLE(TIZEN_WEBKIT2_SEPERATE_LOAD_PROGRESS)
-    loadClient.didStartProgress = didStartProgress;
-#else
-    loadClient.didStartProgress = didChangeProgress;
-#endif
-    loadClient.didChangeProgress = didChangeProgress;
-#if ENABLE(TIZEN_WEBKIT2_SEPERATE_LOAD_PROGRESS)
-    loadClient.didFinishProgress = didFinishProgress;
-#else
-    loadClient.didFinishProgress = didChangeProgress;
-#endif
-    loadClient.didFinishLoadForFrame = didFinishLoadForFrame;
-    loadClient.didFailLoadWithErrorForFrame = didFailLoadWithErrorForFrame;
-    loadClient.didStartProvisionalLoadForFrame = didStartProvisionalLoadForFrame;
-    loadClient.didReceiveServerRedirectForProvisionalLoadForFrame = didReceiveServerRedirectForProvisionalLoadForFrame;
-    loadClient.didFailProvisionalLoadWithErrorForFrame = didFailProvisionalLoadWithErrorForFrame;
-    loadClient.didChangeBackForwardList = didChangeBackForwardList;
-    loadClient.didSameDocumentNavigationForFrame = didSameDocumentNavigationForFrame;
-#if OS(TIZEN)
-    loadClient.didCommitLoadForFrame = didCommitLoadForFrame;
-    loadClient.didFirstVisuallyNonEmptyLayoutForFrame = didFirstVisuallyNonEmptyLayoutForFrame;
-    loadClient.didReceiveAuthenticationChallengeInFrame = didReceiveAuthenticationChallengeInFrame;
-    loadClient.processDidCrash = processDidCrash;
-#if ENABLE(TIZEN_ISF_PORT)
-    loadClient.willGoToBackForwardListItem = willGoToBackForwardListItem;
-#endif
-#endif
-    WKPageSetPageLoaderClient(pageRef, &loadClient);
-}
-
-} // namespace WebKit
diff --git a/Source/WebKit2/UIProcess/efl/PageLoadClientEfl.h b/Source/WebKit2/UIProcess/efl/PageLoadClientEfl.h
deleted file mode 100755 (executable)
index e84eb25..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Copyright (C) 2012 Intel Corporation. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef PageLoadClientEfl_h
-#define PageLoadClientEfl_h
-
-#include "WKPageLoadTypes.h"
-#include <WebKit2/WKBase.h>
-#include <wtf/PassOwnPtr.h>
-
-class EwkViewImpl;
-
-namespace WebKit {
-
-class PageLoadClientEfl {
-public:
-    static PassOwnPtr<PageLoadClientEfl> create(EwkViewImpl* viewImpl)
-    {
-        return adoptPtr(new PageLoadClientEfl(viewImpl));
-    }
-
-private:
-    explicit PageLoadClientEfl(EwkViewImpl*);
-
-    inline EwkViewImpl* viewImpl() const { return m_viewImpl; }
-
-    static void didReceiveTitleForFrame(WKPageRef, WKStringRef title, WKFrameRef, WKTypeRef, const void* clientInfo);
-#if ENABLE(WEB_INTENTS)
-    static void didReceiveIntentForFrame(WKPageRef, WKFrameRef, WKIntentDataRef, WKTypeRef, const void* clientInfo);
-#endif
-#if ENABLE(WEB_INTENTS_TAG)
-    static void registerIntentServiceForFrame(WKPageRef, WKFrameRef, WKIntentServiceInfoRef, WKTypeRef, const void* clientInfo);
-#endif
-    static void didChangeProgress(WKPageRef, const void* clientInfo);
-    static void didFinishLoadForFrame(WKPageRef, WKFrameRef, WKTypeRef userData, const void* clientInfo);
-    static void didFailLoadWithErrorForFrame(WKPageRef, WKFrameRef, WKErrorRef, WKTypeRef userData, const void* clientInfo);
-    static void didStartProvisionalLoadForFrame(WKPageRef, WKFrameRef, WKTypeRef userData, const void* clientInfo);
-    static void didReceiveServerRedirectForProvisionalLoadForFrame(WKPageRef, WKFrameRef, WKTypeRef userData, const void* clientInfo);
-    static void didFailProvisionalLoadWithErrorForFrame(WKPageRef, WKFrameRef, WKErrorRef, WKTypeRef userData, const void* clientInfo);
-    static void didChangeBackForwardList(WKPageRef, WKBackForwardListItemRef addedItem, WKArrayRef removedItems, const void* clientInfo);
-    static void didSameDocumentNavigationForFrame(WKPageRef, WKFrameRef, WKSameDocumentNavigationType, WKTypeRef, const void* clientInfo);
-
-#if OS(TIZEN)
-    static void didCommitLoadForFrame(WKPageRef page, WKFrameRef frame, WKTypeRef userData, const void* clientInfo);
-    static void didFirstVisuallyNonEmptyLayoutForFrame(WKPageRef page, WKFrameRef frame, WKTypeRef userData, const void* clientInfo);
-    static void didReceiveAuthenticationChallengeInFrame(WKPageRef page, WKFrameRef frame, WKAuthenticationChallengeRef authenticationChallenge, const void* clientInfo);
-    static void processDidCrash(WKPageRef page, const void* clientInfo);
-#if ENABLE(TIZEN_WEBKIT2_SEPERATE_LOAD_PROGRESS)
-    static void didStartProgress(WKPageRef page, const void* clientInfo);
-    static void didFinishProgress(WKPageRef page, const void* clientInfo);
-#endif
-#if ENABLE(TIZEN_ISF_PORT)
-    static void willGoToBackForwardListItem(WKPageRef page, WKBackForwardListItemRef, WKTypeRef, const void* clientInfo);
-#endif
-#endif
-
-    EwkViewImpl* m_viewImpl;
-};
-
-} // namespace WebKit
-
-#endif // PageLoadClientEfl_h
diff --git a/Source/WebKit2/UIProcess/efl/PagePolicyClientEfl.h b/Source/WebKit2/UIProcess/efl/PagePolicyClientEfl.h
deleted file mode 100644 (file)
index 68d9a9e..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (C) 2012 Intel Corporation. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef PagePolicyClientEfl_h
-#define PagePolicyClientEfl_h
-
-#include "WKEvent.h"
-#include "WKPageLoadTypes.h"
-#include <WebKit2/WKBase.h>
-#include <wtf/PassOwnPtr.h>
-
-class EwkViewImpl;
-
-namespace WebKit {
-
-class PagePolicyClientEfl {
-public:
-    static PassOwnPtr<PagePolicyClientEfl> create(EwkViewImpl* viewImpl)
-    {
-        return adoptPtr(new PagePolicyClientEfl(viewImpl));
-    }
-
-private:
-    explicit PagePolicyClientEfl(EwkViewImpl*);
-
-    static void decidePolicyForNavigationAction(WKPageRef, WKFrameRef, WKFrameNavigationType, WKEventModifiers, WKEventMouseButton, WKURLRequestRef, WKFramePolicyListenerRef, WKTypeRef, const void*);
-    static void decidePolicyForNewWindowAction(WKPageRef, WKFrameRef, WKFrameNavigationType, WKEventModifiers, WKEventMouseButton, WKURLRequestRef, WKStringRef, WKFramePolicyListenerRef, WKTypeRef, const void*);
-    static void decidePolicyForResponseCallback(WKPageRef, WKFrameRef, WKURLResponseRef, WKURLRequestRef, WKFramePolicyListenerRef, WKTypeRef, const void*);
-
-    EwkViewImpl* m_viewImpl;
-};
-
-} // namespace WebKit
-
-#endif // PagePolicyClientEfl_h
diff --git a/Source/WebKit2/UIProcess/efl/PageUIClientEfl.cpp b/Source/WebKit2/UIProcess/efl/PageUIClientEfl.cpp
deleted file mode 100755 (executable)
index 6162676..0000000
+++ /dev/null
@@ -1,274 +0,0 @@
-/*
- * Copyright (C) 2012 Samsung Electronics. All rights reserved.
- * Copyright (C) 2012 Intel Corporation. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "PageUIClientEfl.h"
-
-#include "EwkViewImpl.h"
-#include "WKAPICast.h"
-#include "WKEvent.h"
-#include "WKString.h"
-#include <Ecore_Evas.h>
-#include <WebCore/Color.h>
-
-#if OS(TIZEN)
-#include "WKGeolocationPermissionRequest.h"
-#include "WKNotificationPermissionRequest.h"
-#include "WKPage.h"
-#include "WKRetainPtr.h"
-#include "WKSecurityOrigin.h"
-#include "ewk_geolocation_private.h"
-#include "ewk_notification.h"
-#include "ewk_notification_private.h"
-#include "ewk_view_private.h"
-#include "ewk_view.h"
-
-#if ENABLE(TIZEN_ISF_PORT)
-#include "NativeWebKeyboardEvent.h"
-#endif
-#endif
-
-namespace WebKit {
-
-static inline PageUIClientEfl* toPageUIClientEfl(const void* clientInfo)
-{
-    return static_cast<PageUIClientEfl*>(const_cast<void*>(clientInfo));
-}
-
-void PageUIClientEfl::closePage(WKPageRef, const void* clientInfo)
-{
-    toPageUIClientEfl(clientInfo)->m_viewImpl->closePage();
-}
-
-WKPageRef PageUIClientEfl::createNewPage(WKPageRef, WKURLRequestRef, WKDictionaryRef, WKEventModifiers, WKEventMouseButton, const void* clientInfo)
-{
-    return toPageUIClientEfl(clientInfo)->m_viewImpl->createNewPage();
-}
-
-#if OS(TIZEN)
-bool PageUIClientEfl::runJavaScriptAlert(WKPageRef, WKStringRef alertText, WKFrameRef, const void* clientInfo)
-{
-    return ewkViewRunJavaScriptAlert(toPageUIClientEfl(clientInfo)->m_viewImpl->view(), alertText);
-}
-
-bool PageUIClientEfl::runJavaScriptConfirm(WKPageRef, WKStringRef message, WKFrameRef, const void* clientInfo)
-{
-    return ewkViewRunJavaScriptConfirm(toPageUIClientEfl(clientInfo)->m_viewImpl->view(), message);
-}
-
-bool PageUIClientEfl::runJavaScriptPrompt(WKPageRef, WKStringRef message, WKStringRef defaultValue, WKFrameRef, const void* clientInfo)
-{
-    return ewkViewRunJavaScriptPrompt(toPageUIClientEfl(clientInfo)->m_viewImpl->view(), message, defaultValue);
-}
-#else
-void PageUIClientEfl::runJavaScriptAlert(WKPageRef, WKStringRef alertText, WKFrameRef, const void* clientInfo)
-{
-    toPageUIClientEfl(clientInfo)->m_viewImpl->requestJSAlertPopup(WKEinaSharedString(alertText));
-}
-
-bool PageUIClientEfl::runJavaScriptConfirm(WKPageRef, WKStringRef message, WKFrameRef, const void* clientInfo)
-{
-    return toPageUIClientEfl(clientInfo)->m_viewImpl->requestJSConfirmPopup(WKEinaSharedString(message));
-}
-
-WKStringRef PageUIClientEfl::runJavaScriptPrompt(WKPageRef, WKStringRef message, WKStringRef defaultValue, WKFrameRef, const void* clientInfo)
-{
-    WKEinaSharedString value = toPageUIClientEfl(clientInfo)->m_viewImpl->requestJSPromptPopup(WKEinaSharedString(message), WKEinaSharedString(defaultValue));
-    return value ? WKStringCreateWithUTF8CString(value) : 0;
-}
-#endif
-
-#if ENABLE(INPUT_TYPE_COLOR)
-void PageUIClientEfl::showColorPicker(WKPageRef, WKStringRef initialColor, WKColorPickerResultListenerRef listener, const void* clientInfo)
-{
-    PageUIClientEfl* pageUIClient = toPageUIClientEfl(clientInfo);
-    WebCore::Color color = WebCore::Color(WebKit::toWTFString(initialColor));
-    pageUIClient->m_viewImpl->requestColorPicker(color.red(), color.green(), color.blue(), color.alpha(), listener);
-}
-
-void PageUIClientEfl::hideColorPicker(WKPageRef, const void* clientInfo)
-{
-    PageUIClientEfl* pageUIClient = toPageUIClientEfl(clientInfo);
-    pageUIClient->m_viewImpl->dismissColorPicker();
-}
-#endif
-
-#if ENABLE(SQL_DATABASE)
-#if ENABLE(TIZEN_SQL_DATABASE)
-unsigned long long PageUIClientEfl::exceededDatabaseQuota(WKPageRef, WKFrameRef, WKSecurityOriginRef origin, WKStringRef databaseName, WKStringRef displayName, unsigned long long currentQuota, unsigned long long currentOriginUsage, unsigned long long currentDatabaseUsage, unsigned long long expectedUsage, const void* clientInfo)
-{
-    return ewkViewExceededDatabaseQuota(toPageUIClientEfl(clientInfo)->m_viewImpl->view(), origin, databaseName, displayName, currentQuota, currentOriginUsage, currentDatabaseUsage, expectedUsage);
-}
-#else
-unsigned long long PageUIClientEfl::exceededDatabaseQuota(WKPageRef, WKFrameRef, WKSecurityOriginRef, WKStringRef databaseName, WKStringRef displayName, unsigned long long currentQuota, unsigned long long currentOriginUsage, unsigned long long currentDatabaseUsage, unsigned long long expectedUsage, const void* clientInfo)
-{
-    EwkViewImpl* viewImpl = toPageUIClientEfl(clientInfo)->m_viewImpl;
-    return viewImpl->informDatabaseQuotaReached(toImpl(databaseName)->string(), toImpl(displayName)->string(), currentQuota, currentOriginUsage, currentDatabaseUsage, expectedUsage);
-}
-#endif
-#endif
-
-void PageUIClientEfl::focus(WKPageRef, const void* clientInfo)
-{
-    evas_object_focus_set(toPageUIClientEfl(clientInfo)->m_viewImpl->view(), true);
-}
-
-void PageUIClientEfl::unfocus(WKPageRef, const void* clientInfo)
-{
-    evas_object_focus_set(toPageUIClientEfl(clientInfo)->m_viewImpl->view(), false);
-}
-
-void PageUIClientEfl::takeFocus(WKPageRef, WKFocusDirection, const void* clientInfo)
-{
-    // FIXME: this is only a partial implementation.
-    evas_object_focus_set(toPageUIClientEfl(clientInfo)->m_viewImpl->view(), false);
-}
-
-WKRect PageUIClientEfl::getWindowFrame(WKPageRef, const void* clientInfo)
-{
-    int x, y, width, height;
-
-#if ENABLE(TIZEN_VIEWPORT_META_TAG)
-    ewkViewGetWindowFrame(static_cast<Evas_Object*>(const_cast<void*>(clientInfo)), &x, &y, &width, &height);
-    return WKRectMake(x, y, width, height);
-#endif
-    Ecore_Evas* ee = ecore_evas_ecore_evas_get(evas_object_evas_get(toPageUIClientEfl(clientInfo)->m_viewImpl->view()));
-    ecore_evas_request_geometry_get(ee, &x, &y, &width, &height);
-
-    return WKRectMake(x, y, width, height);
-}
-
-void PageUIClientEfl::setWindowFrame(WKPageRef, WKRect frame, const void* clientInfo)
-{
-    Ecore_Evas* ee = ecore_evas_ecore_evas_get(evas_object_evas_get(toPageUIClientEfl(clientInfo)->m_viewImpl->view()));
-    ecore_evas_move_resize(ee, frame.origin.x, frame.origin.y, frame.size.width, frame.size.height);
-}
-
-#if OS(TIZEN)
-#if ENABLE(TIZEN_ISF_PORT)
-void PageUIClientEfl::didNotHandleKeyEvent(WKPageRef page, WKNativeEventPtr event, const void* clientInfo)
-{
-    EwkViewImpl* viewImpl = toPageUIClientEfl(clientInfo)->m_viewImpl;
-    InputMethodContextEfl* inputMethodContext = viewImpl->inputMethodContext();
-
-    if (!inputMethodContext)
-        return;
-
-    const EvasImfEvent* keyEvent = static_cast<const EvasImfEvent*>(event);
-    if (!keyEvent || keyEvent->type != ECORE_IMF_EVENT_KEY_UP || keyEvent->event.key_up.string[0] != '\r')
-        return;
-
-    if (inputMethodContext->autoCapitalType() == ECORE_IMF_AUTOCAPITAL_TYPE_NONE)
-        inputMethodContext->hideIMFContext();
-}
-#endif
-
-#if ENABLE(TIZEN_SUPPORT_BEFORE_UNLOAD_CONFIRM_PANEL)
-bool PageUIClientEfl::runBeforeUnloadConfirmPanel(WKPageRef, WKStringRef message, WKFrameRef, const void* clientInfo)
-{
-    return ewk_view_run_before_unload_confirm_panel(toPageUIClientEfl(clientInfo)->m_viewImpl->view(), message);
-}
-#endif
-
-bool PageUIClientEfl::runOpenPanel(WKPageRef, WKFrameRef, WKOpenPanelParametersRef parameters, WKOpenPanelResultListenerRef listener, const void* clientInfo)
-{
-    return ewkViewRunOpenPanel(toPageUIClientEfl(clientInfo)->m_viewImpl->view(), parameters, listener);
-}
-
-void PageUIClientEfl::decidePolicyForGeolocationPermissionRequest(WKPageRef, WKFrameRef, WKSecurityOriginRef origin, WKGeolocationPermissionRequestRef permissionRequest, const void* clientInfo)
-{
-#if ENABLE(TIZEN_GEOLOCATION)
-    Evas_Object* ewkView = toPageUIClientEfl(clientInfo)->m_viewImpl->view();
-    Ewk_Geolocation_Permission_Request* geolocationPermissionRequest = ewkGeolocationCreatePermissionRequest(ewkView, permissionRequest, origin);
-    ewkViewRequestGeolocationPermission(ewkView, geolocationPermissionRequest);
-
-    if(!ewkGeolocationIsPermissionRequestSuspended(geolocationPermissionRequest))
-        if(!ewkGeolocationIsPermissionRequestDecided(geolocationPermissionRequest))
-            WKGeolocationPermissionRequestDeny(permissionRequest);
-#endif
-}
-
-#if ENABLE(TIZEN_NOTIFICATIONS)
-void PageUIClientEfl::decidePolicyForNotificationPermissionRequest(WKPageRef, WKSecurityOriginRef origin, WKNotificationPermissionRequestRef permissionRequest, const void* clientInfo)
-{
-    Evas_Object* ewkView = toPageUIClientEfl(clientInfo)->m_viewImpl->view();
-    Ewk_Notification_Permission_Request* ewkNotificationPermissionRequest = ewkNotificationCreatePermissionRequest(ewkView, permissionRequest, origin);
-    ewkViewRequestNotificationPermission(ewkView, ewkNotificationPermissionRequest);
-
-    if(!ewkNotificationIsPermissionRequestSuspended(ewkNotificationPermissionRequest))
-        if(!ewkNotificationIsPermissionRequestDecided(ewkNotificationPermissionRequest))
-            WKNotificationPermissionRequestDeny(ewkNotificationGetWKNotificationPermissionRequest(ewkNotificationPermissionRequest));
-}
-#endif
-#endif // #if OS(TIZEN)
-
-PageUIClientEfl::PageUIClientEfl(EwkViewImpl* viewImpl)
-    : m_viewImpl(viewImpl)
-{
-    WKPageRef pageRef = m_viewImpl->wkPage();
-    ASSERT(pageRef);
-
-    WKPageUIClient uiClient;
-    memset(&uiClient, 0, sizeof(WKPageUIClient));
-    uiClient.version = kWKPageUIClientCurrentVersion;
-    uiClient.clientInfo = this;
-    uiClient.close = closePage;
-    uiClient.createNewPage = createNewPage;
-    uiClient.runJavaScriptAlert = runJavaScriptAlert;
-    uiClient.runJavaScriptConfirm = runJavaScriptConfirm;
-    uiClient.runJavaScriptPrompt = runJavaScriptPrompt;
-    uiClient.takeFocus = takeFocus;
-    uiClient.focus = focus;
-    uiClient.unfocus = unfocus;
-    uiClient.getWindowFrame = getWindowFrame;
-    uiClient.setWindowFrame = setWindowFrame;
-#if ENABLE(SQL_DATABASE)
-    uiClient.exceededDatabaseQuota = exceededDatabaseQuota;
-#endif
-
-#if ENABLE(INPUT_TYPE_COLOR)
-    uiClient.showColorPicker = showColorPicker;
-    uiClient.hideColorPicker = hideColorPicker;
-#endif
-
-#if OS(TIZEN)
-#if ENABLE(TIZEN_ISF_PORT)
-    uiClient.didNotHandleKeyEvent = didNotHandleKeyEvent;
-#endif
-#if ENABLE(TIZEN_SUPPORT_BEFORE_UNLOAD_CONFIRM_PANEL)
-    uiClient.runBeforeUnloadConfirmPanel = runBeforeUnloadConfirmPanel;
-#endif
-    uiClient.runOpenPanel = runOpenPanel;
-    uiClient.decidePolicyForGeolocationPermissionRequest = decidePolicyForGeolocationPermissionRequest;
-#if ENABLE(TIZEN_NOTIFICATIONS)
-    uiClient.decidePolicyForNotificationPermissionRequest = decidePolicyForNotificationPermissionRequest;
-#endif
-#endif
-
-    WKPageSetPageUIClient(pageRef, &uiClient);
-}
-
-} // namespace WebKit
diff --git a/Source/WebKit2/UIProcess/efl/PageUIClientEfl.h b/Source/WebKit2/UIProcess/efl/PageUIClientEfl.h
deleted file mode 100755 (executable)
index 87bbadf..0000000
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * Copyright (C) 2012 Samsung Electronics. All rights reserved.
- * Copyright (C) 2012 Intel Corporation. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef PageUIClientEfl_h
-#define PageUIClientEfl_h
-
-#include "WKPage.h"
-#include <WebKit2/WKBase.h>
-#include <wtf/PassOwnPtr.h>
-
-class EwkViewImpl;
-
-namespace WebKit {
-
-class PageUIClientEfl {
-public:
-    static PassOwnPtr<PageUIClientEfl> create(EwkViewImpl* viewImpl)
-    {
-        return adoptPtr(new PageUIClientEfl(viewImpl));
-    }
-
-private:
-    explicit PageUIClientEfl(EwkViewImpl*);
-
-    static void closePage(WKPageRef, const void*);
-    static WKPageRef createNewPage(WKPageRef, WKURLRequestRef, WKDictionaryRef, WKEventModifiers, WKEventMouseButton, const void*);
-#if OS(TIZEN)
-    static bool runJavaScriptAlert(WKPageRef, WKStringRef, WKFrameRef, const void*);
-    static bool runJavaScriptConfirm(WKPageRef, WKStringRef, WKFrameRef, const void*);
-    static bool runJavaScriptPrompt(WKPageRef, WKStringRef, WKStringRef, WKFrameRef, const void*);
-#else
-    static void runJavaScriptAlert(WKPageRef, WKStringRef, WKFrameRef, const void*);
-    static bool runJavaScriptConfirm(WKPageRef, WKStringRef, WKFrameRef, const void*);
-    static WKStringRef runJavaScriptPrompt(WKPageRef, WKStringRef, WKStringRef, WKFrameRef, const void*);
-#endif
-#if ENABLE(INPUT_TYPE_COLOR)
-    static void showColorPicker(WKPageRef, WKStringRef initialColor, WKColorPickerResultListenerRef, const void*);
-    static void hideColorPicker(WKPageRef, const void*);
-#endif
-#if ENABLE(SQL_DATABASE)
-    static unsigned long long exceededDatabaseQuota(WKPageRef, WKFrameRef, WKSecurityOriginRef, WKStringRef, WKStringRef, unsigned long long currentQuota, unsigned long long, unsigned long long, unsigned long long, const void*);
-#endif
-    static void focus(WKPageRef, const void*);
-    static void unfocus(WKPageRef, const void*);
-    static void takeFocus(WKPageRef, WKFocusDirection, const void*);
-    static WKRect getWindowFrame(WKPageRef, const void*);
-    static void setWindowFrame(WKPageRef, WKRect, const void*);
-
-#if OS(TIZEN)
-#if ENABLE(TIZEN_ISF_PORT)
-    static void didNotHandleKeyEvent(WKPageRef, WKNativeEventPtr, const void*);
-#endif
-#if ENABLE(TIZEN_SUPPORT_BEFORE_UNLOAD_CONFIRM_PANEL)
-    static bool runBeforeUnloadConfirmPanel(WKPageRef, WKStringRef, WKFrameRef, const void*);
-#endif
-    static bool runOpenPanel(WKPageRef, WKFrameRef, WKOpenPanelParametersRef, WKOpenPanelResultListenerRef, const void*);
-    static void decidePolicyForGeolocationPermissionRequest(WKPageRef, WKFrameRef, WKSecurityOriginRef, WKGeolocationPermissionRequestRef, const void*);
-#if ENABLE(TIZEN_NOTIFICATIONS)
-    static void decidePolicyForNotificationPermissionRequest(WKPageRef, WKSecurityOriginRef, WKNotificationPermissionRequestRef, const void*);
-#endif
-#endif
-
-    EwkViewImpl* m_viewImpl;
-};
-
-} // namespace WebKit
-
-#endif // PageUIClientEfl_h
diff --git a/Source/WebKit2/UIProcess/efl/RequestManagerClientEfl.cpp b/Source/WebKit2/UIProcess/efl/RequestManagerClientEfl.cpp
deleted file mode 100755 (executable)
index 1faf8b9..0000000
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * Copyright (C) 2012 Intel Corporation. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "RequestManagerClientEfl.h"
-
-#include "WKContextSoup.h"
-#include "WKSoupRequestManager.h"
-#include "WebSoupRequestManagerProxy.h"
-#include "ewk_context_private.h"
-#include "ewk_url_scheme_request_private.h"
-
-namespace WebKit {
-
-struct Ewk_Url_Scheme_Handler {
-    Ewk_Url_Scheme_Request_Cb callback;
-    void* userData;
-
-    Ewk_Url_Scheme_Handler()
-        : callback(0)
-        , userData(0)
-    { }
-
-    Ewk_Url_Scheme_Handler(Ewk_Url_Scheme_Request_Cb callback, void* userData)
-        : callback(callback)
-        , userData(userData)
-    { }
-};
-
-static inline RequestManagerClientEfl* toRequestManagerClientEfl(const void* clientInfo)
-{
-    return static_cast<RequestManagerClientEfl*>(const_cast<void*>(clientInfo));
-}
-
-void RequestManagerClientEfl::didReceiveURIRequest(WKSoupRequestManagerRef soupRequestManagerRef, WKURLRef urlRef, WKPageRef, uint64_t requestID, const void* clientInfo)
-{
-    RequestManagerClientEfl* requestManager = toRequestManagerClientEfl(clientInfo);
-
-    RefPtr<Ewk_Url_Scheme_Request> schemeRequest = Ewk_Url_Scheme_Request::create(soupRequestManagerRef, urlRef, requestID);
-    Ewk_Url_Scheme_Handler handler = requestManager->m_urlSchemeHandlers.get(schemeRequest->scheme());
-    if (!handler.callback)
-        return;
-
-    handler.callback(schemeRequest.get(), handler.userData);
-}
-
-RequestManagerClientEfl::RequestManagerClientEfl(Ewk_Context* context)
-    : m_soupRequestManager(WKContextGetSoupRequestManager(context->wkContext()))
-{
-    ASSERT(context);
-
-    WKSoupRequestManagerClient wkRequestManagerClient;
-    memset(&wkRequestManagerClient, 0, sizeof(WKSoupRequestManagerClient));
-
-    wkRequestManagerClient.version = kWKSoupRequestManagerClientCurrentVersion;
-    wkRequestManagerClient.clientInfo = this;
-    wkRequestManagerClient.didReceiveURIRequest = didReceiveURIRequest;
-
-    WKSoupRequestManagerSetClient(m_soupRequestManager.get(), &wkRequestManagerClient);
-}
-
-RequestManagerClientEfl::~RequestManagerClientEfl()
-{
-}
-
-void RequestManagerClientEfl::registerURLSchemeHandler(const String& scheme, Ewk_Url_Scheme_Request_Cb callback, void* userData)
-{
-    ASSERT(callback);
-
-    m_urlSchemeHandlers.set(scheme, Ewk_Url_Scheme_Handler(callback, userData));
-    toImpl(m_soupRequestManager.get())->registerURIScheme(scheme);
-}
-
-} // namespace WebKit
diff --git a/Source/WebKit2/UIProcess/efl/RequestManagerClientEfl.h b/Source/WebKit2/UIProcess/efl/RequestManagerClientEfl.h
deleted file mode 100644 (file)
index a84c9c5..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (C) 2012 Intel Corporation. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef RequestManagerClientEfl_h
-#define RequestManagerClientEfl_h
-
-#include "WKRetainPtr.h"
-#include "ewk_context.h"
-#include <WebKit2/WKBase.h>
-#include <wtf/HashMap.h>
-#include <wtf/PassOwnPtr.h>
-#include <wtf/text/WTFString.h>
-
-namespace WebKit {
-
-class RequestManagerClientEfl {
-public:
-    ~RequestManagerClientEfl();
-    static PassOwnPtr<RequestManagerClientEfl> create(Ewk_Context* context)
-    {
-        return adoptPtr(new RequestManagerClientEfl(context));
-    }
-
-    void registerURLSchemeHandler(const String& scheme, Ewk_Url_Scheme_Request_Cb callback, void* userData);
-
-private:
-    explicit RequestManagerClientEfl(Ewk_Context*);
-
-    static void didReceiveURIRequest(WKSoupRequestManagerRef, WKURLRef, WKPageRef, uint64_t requestID, const void* clientInfo);
-
-    WKRetainPtr<WKSoupRequestManagerRef> m_soupRequestManager;
-    HashMap<String, class Ewk_Url_Scheme_Handler> m_urlSchemeHandlers;
-};
-
-} // namespace WebKit
-
-#endif // RequestManagerClientEfl_h
diff --git a/Source/WebKit2/UIProcess/efl/ResourceLoadClientEfl.cpp b/Source/WebKit2/UIProcess/efl/ResourceLoadClientEfl.cpp
deleted file mode 100755 (executable)
index 67606b6..0000000
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
- * Copyright (C) 2012 Intel Corporation. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "ResourceLoadClientEfl.h"
-
-#include "EwkViewImpl.h"
-#include "WKAPICast.h"
-#include "WKFrame.h"
-#include "WKPage.h"
-#include "WKRetainPtr.h"
-#include "ewk_error_private.h"
-#include "ewk_url_request_private.h"
-#include "ewk_url_response_private.h"
-
-using namespace WebCore;
-
-namespace WebKit {
-
-static inline ResourceLoadClientEfl* toResourceLoadClientEfl(const void* clientInfo)
-{
-    return static_cast<ResourceLoadClientEfl*>(const_cast<void*>(clientInfo));
-}
-
-void ResourceLoadClientEfl::didInitiateLoadForResource(WKPageRef, WKFrameRef wkFrame, uint64_t resourceIdentifier, WKURLRequestRef wkRequest, bool pageIsProvisionallyLoading, const void* clientInfo)
-{
-    ResourceLoadClientEfl* resourceLoadClient = toResourceLoadClientEfl(clientInfo);
-    bool isMainResource = (WKFrameIsMainFrame(wkFrame) && pageIsProvisionallyLoading);
-    WKRetainPtr<WKURLRef> wkUrl(AdoptWK, WKURLRequestCopyURL(wkRequest));
-
-#if ENABLE(TIZEN_ON_REDIRECTION_REQUESTED)
-    if (!wkUrl.get())
-        return;
-#endif
-
-    RefPtr<Ewk_Resource> resource = Ewk_Resource::create(wkUrl.get(), isMainResource);
-
-    // Keep the resource internally to reuse it later.
-    resourceLoadClient->m_loadingResourcesMap.add(resourceIdentifier, resource);
-
-    RefPtr<Ewk_Url_Request> request = Ewk_Url_Request::create(wkRequest);
-    resourceLoadClient->m_viewImpl->informResourceLoadStarted(resource.get(), request.get());
-}
-
-void ResourceLoadClientEfl::didSendRequestForResource(WKPageRef, WKFrameRef, uint64_t resourceIdentifier, WKURLRequestRef wkRequest, WKURLResponseRef wkRedirectResponse, const void* clientInfo)
-{
-    ResourceLoadClientEfl* resourceLoadClient = toResourceLoadClientEfl(clientInfo);
-
-    RefPtr<Ewk_Resource> resource = resourceLoadClient->m_loadingResourcesMap.get(resourceIdentifier);
-    // Only process if we know about this resource.
-    if (!resource)
-        return;
-
-    RefPtr<Ewk_Url_Request> request = Ewk_Url_Request::create(wkRequest);
-    RefPtr<Ewk_Url_Response> redirectResponse = Ewk_Url_Response::create(wkRedirectResponse);
-    resourceLoadClient->m_viewImpl->informResourceRequestSent(resource.get(), request.get(), redirectResponse.get());
-}
-
-void ResourceLoadClientEfl::didReceiveResponseForResource(WKPageRef, WKFrameRef, uint64_t resourceIdentifier, WKURLResponseRef wkResponse, const void* clientInfo)
-{
-    ResourceLoadClientEfl* resourceLoadClient = toResourceLoadClientEfl(clientInfo);
-
-    RefPtr<Ewk_Resource> resource = resourceLoadClient->m_loadingResourcesMap.get(resourceIdentifier);
-    // Only process if we know about this resource.
-    if (!resource)
-        return;
-
-    RefPtr<Ewk_Url_Response> response = Ewk_Url_Response::create(wkResponse);
-    resourceLoadClient->m_viewImpl->informResourceLoadResponse(resource.get(), response.get());
-}
-
-void ResourceLoadClientEfl::didFinishLoadForResource(WKPageRef, WKFrameRef, uint64_t resourceIdentifier, const void* clientInfo)
-{
-    ResourceLoadClientEfl* resourceLoadClient = toResourceLoadClientEfl(clientInfo);
-
-    RefPtr<Ewk_Resource> resource = resourceLoadClient->m_loadingResourcesMap.get(resourceIdentifier);
-    // Only process if we know about this resource.
-    if (!resource)
-        return;
-
-    resourceLoadClient->m_viewImpl->informResourceLoadFinished(resource.get());
-}
-
-void ResourceLoadClientEfl::didFailLoadForResource(WKPageRef, WKFrameRef, uint64_t resourceIdentifier, WKErrorRef wkError, const void* clientInfo)
-{
-    ResourceLoadClientEfl* resourceLoadClient = toResourceLoadClientEfl(clientInfo);
-
-    RefPtr<Ewk_Resource> resource = resourceLoadClient->m_loadingResourcesMap.take(resourceIdentifier);
-    // Only process if we know about this resource.
-    if (!resource)
-        return;
-
-    OwnPtr<Ewk_Error> ewkError = Ewk_Error::create(wkError);
-    resourceLoadClient->m_viewImpl->informResourceLoadFailed(resource.get(), ewkError.get());
-    resourceLoadClient->m_viewImpl->informResourceLoadFinished(resource.get());
-}
-
-void ResourceLoadClientEfl::onViewProvisionalLoadStarted(void* userData, Evas_Object*, void*)
-{
-    ResourceLoadClientEfl* resourceLoadClient = toResourceLoadClientEfl(userData);
-
-    // The view started a new load, clear internal resource map.
-    resourceLoadClient->m_loadingResourcesMap.clear();
-}
-
-ResourceLoadClientEfl::ResourceLoadClientEfl(EwkViewImpl* viewImpl)
-    : m_viewImpl(viewImpl)
-{
-    // Listen for "load,provisional,started" on the view to clear internal resources map.
-    evas_object_smart_callback_add(m_viewImpl->view(), "load,provisional,started", onViewProvisionalLoadStarted, this);
-
-    WKPageRef pageRef = m_viewImpl->wkPage();
-    ASSERT(pageRef);
-
-    WKPageResourceLoadClient wkResourceLoadClient;
-    memset(&wkResourceLoadClient, 0, sizeof(WKPageResourceLoadClient));
-    wkResourceLoadClient.version = kWKPageResourceLoadClientCurrentVersion;
-    wkResourceLoadClient.clientInfo = this;
-    wkResourceLoadClient.didInitiateLoadForResource = didInitiateLoadForResource;
-    wkResourceLoadClient.didSendRequestForResource = didSendRequestForResource;
-    wkResourceLoadClient.didReceiveResponseForResource = didReceiveResponseForResource;
-    wkResourceLoadClient.didFinishLoadForResource = didFinishLoadForResource;
-    wkResourceLoadClient.didFailLoadForResource = didFailLoadForResource;
-
-    WKPageSetPageResourceLoadClient(pageRef, &wkResourceLoadClient);
-}
-
-ResourceLoadClientEfl::~ResourceLoadClientEfl()
-{
-    evas_object_smart_callback_del(m_viewImpl->view(), "load,provisional,started", onViewProvisionalLoadStarted);
-}
-
-} // namespace WebKit
diff --git a/Source/WebKit2/UIProcess/efl/ResourceLoadClientEfl.h b/Source/WebKit2/UIProcess/efl/ResourceLoadClientEfl.h
deleted file mode 100644 (file)
index 7a5525b..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright (C) 2012 Intel Corporation. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef ResourceLoadClientEfl_h
-#define ResourceLoadClientEfl_h
-
-#include "ewk_resource_private.h"
-#include <wtf/HashMap.h>
-#include <wtf/PassOwnPtr.h>
-
-class EwkViewImpl;
-
-namespace WebKit {
-
-class ResourceLoadClientEfl {
-public:
-    ~ResourceLoadClientEfl();
-
-    static PassOwnPtr<ResourceLoadClientEfl> create(EwkViewImpl* viewImpl)
-    {
-        return adoptPtr(new ResourceLoadClientEfl(viewImpl));
-    }
-
-private:
-    explicit ResourceLoadClientEfl(EwkViewImpl*);
-
-    static void didInitiateLoadForResource(WKPageRef, WKFrameRef, uint64_t resourceIdentifier, WKURLRequestRef, bool pageIsProvisionallyLoading, const void* clientInfo);
-    static void didSendRequestForResource(WKPageRef, WKFrameRef, uint64_t resourceIdentifier, WKURLRequestRef, WKURLResponseRef, const void* clientInfo);
-    static void didReceiveResponseForResource(WKPageRef, WKFrameRef, uint64_t resourceIdentifier, WKURLResponseRef, const void* clientInfo);
-    static void didFinishLoadForResource(WKPageRef, WKFrameRef, uint64_t resourceIdentifier, const void* clientInfo);
-    static void didFailLoadForResource(WKPageRef, WKFrameRef, uint64_t resourceIdentifier, WKErrorRef, const void* clientInfo);
-
-    static void onViewProvisionalLoadStarted(void* userData, Evas_Object* view, void* clientInfo);
-
-    EwkViewImpl* m_viewImpl;
-    HashMap< uint64_t, RefPtr<Ewk_Resource> > m_loadingResourcesMap;
-};
-
-} // namespace WebKit
-
-#endif // ResourceLoadClientEfl_h
index 8877abe..7cb6791 100755 (executable)
@@ -93,9 +93,10 @@ String WebContext::platformDefaultIconDatabasePath() const
 {
 #if ENABLE(TIZEN_ICON_DATABASE)
     return WebCore::pathByAppendingComponent(WebCore::homeDirectoryPath(), ".webkit/iconDatabase/WebpageIcons.db");
-#else
-    return String::fromUTF8(efreet_data_home_get()) + "/WebKitEfl/IconDatabase";
 #endif
+
+    notImplemented();
+    return "";
 }
 
 #if ENABLE(TIZEN_FILE_SYSTEM)
index e744331..71ade43 100755 (executable)
@@ -31,8 +31,7 @@
 #include "WebFullScreenManagerMessages.h"
 #include "WebFullScreenManagerProxyMessages.h"
 #include "WebProcess.h"
-
-#include "EwkViewImpl.h"
+#include "ewk_view_private.h"
 #include <WebCore/NotImplemented.h>
 
 
@@ -57,11 +56,8 @@ bool WebFullScreenManagerProxy::isFullScreen()
 
 void WebFullScreenManagerProxy::enterFullScreen()
 {
-    if (!m_webView)
-        return;
-
     willEnterFullScreen();
-    EwkViewImpl::fromEvasObject(m_webView)->enterFullScreen();
+    ewk_view_fullscreen_enter(m_webView);
     didEnterFullScreen();
 
     m_isFullScreen = true;
@@ -69,12 +65,8 @@ void WebFullScreenManagerProxy::enterFullScreen()
 
 void WebFullScreenManagerProxy::exitFullScreen()
 {
-    if (!m_webView)
-        return;
-
-
     willExitFullScreen();
-    EwkViewImpl::fromEvasObject(m_webView)->exitFullScreen();
+    ewk_view_fullscreen_exit(m_webView);
     didExitFullScreen();
 
     m_isFullScreen = false;
old mode 100755 (executable)
new mode 100644 (file)
index a635946..ece882a
@@ -28,7 +28,6 @@
 
 #if ENABLE(INSPECTOR)
 
-#include "EwkViewImpl.h"
 #include "WebProcessProxy.h"
 #include "ewk_view_private.h"
 #include <WebCore/NotImplemented.h>
@@ -47,15 +46,7 @@ WebPageProxy* WebInspectorProxy::platformCreateInspectorPage()
         return 0;
 
     m_inspectorView = ewk_view_base_add(ecore_evas_get(m_inspectorWindow), toAPI(page()->process()->context()), toAPI(inspectorPageGroup()));
-    EwkViewImpl* inspectorViewImpl = EwkViewImpl::fromEvasObject(m_inspectorView);
-    inspectorViewImpl->setThemePath(TEST_THEME_DIR "/default.edj");
-
-#if ENABLE(WAIT_UPVERSION)
-    Ewk_Settings* settings = inspectorViewImpl->settings();
-    ewk_settings_file_access_from_file_urls_allowed_set(settings, true);
-#endif
-
-    return inspectorViewImpl->page();
+    return ewk_view_page_get(m_inspectorView);
 }
 
 void WebInspectorProxy::platformOpen()
index e5afa6f..33abec6 100755 (executable)
@@ -26,8 +26,6 @@
 #include "config.h"
 #include "WebPageProxy.h"
 
-#include "EwkViewImpl.h"
-#include "NativeWebKeyboardEvent.h"
 #include "NotImplemented.h"
 #include "PageClientImpl.h"
 #include "WebPageMessages.h"
@@ -73,7 +71,7 @@ namespace WebKit {
 
 Evas_Object* WebPageProxy::viewWidget()
 {
-    return static_cast<PageClientImpl*>(m_pageClient)->viewImpl()->view();
+    return static_cast<PageClientImpl*>(m_pageClient)->viewWidget();
 }
 
 String WebPageProxy::standardUserAgent(const String& applicationNameForUserAgent)
@@ -292,9 +290,7 @@ void WebPageProxy::updateCursorOffset(int offset)
 void WebPageProxy::didCancelComposition()
 {
     m_didCancelCompositionFromWebProcess = true;
-    InputMethodContextEfl* inputMethodContext = static_cast<PageClientImpl*>(m_pageClient)->viewImpl()->inputMethodContext();
-    if (inputMethodContext)
-        inputMethodContext->resetIMFContext();
+    ewk_view_imf_context_reset(viewWidget());
     m_didCancelCompositionFromWebProcess = false;
 }
 #endif
@@ -320,6 +316,31 @@ void WebPageProxy::updateFormNavigation(int length, int offset)
     static_cast<PageClientImpl*>(m_pageClient)->updateFormNavigation(length, offset);
 }
 
+void WebPageProxy::handleInputMethodKeydown(bool& handled)
+{
+#if ENABLE(TIZEN_ISF_PORT)
+#if ENABLE(TIZEN_WEBKIT2_ROTATION_WHILE_JAVASCRIPT_POPUP)
+    NativeWebKeyboardEvent event = m_keyEventQueue.first().forwardedEvent;
+#else
+    NativeWebKeyboardEvent event = m_keyEventQueue.first();
+#endif
+    handled = event.isFiltered();
+#endif
+}
+
+void WebPageProxy::confirmComposition(const String& compositionString)
+{
+    if (!isValid())
+        return;
+
+#if ENABLE(TIZEN_ISF_PORT)
+    if (m_didCancelCompositionFromWebProcess)
+        return;
+#endif
+
+    process()->send(Messages::WebPage::ConfirmComposition(compositionString), m_pageID);
+}
+
 #if ENABLE(TIZEN_REDUCE_KEY_LAGGING)
 Eina_Bool WebPageProxy::pageContentResumeTimerFired(void* data)
 {
@@ -329,6 +350,20 @@ Eina_Bool WebPageProxy::pageContentResumeTimerFired(void* data)
 }
 #endif
 
+void WebPageProxy::setComposition(const String& compositionString, Vector<CompositionUnderline>& underlines, int cursorPosition)
+{
+    if (!isValid())
+        return;
+
+#if ENABLE(TIZEN_REDUCE_KEY_LAGGING)
+    // Suspend layout&paint at the key input, and resume layout&paint after 150 ms.
+    suspendActiveDOMObjectsAndAnimations();
+    if (m_pageContentResumeTimer)
+        ecore_timer_del(m_pageContentResumeTimer);
+    m_pageContentResumeTimer = ecore_timer_add(150.0/1000.0, pageContentResumeTimerFired, this);
+#endif
+    process()->send(Messages::WebPage::SetComposition(compositionString, underlines, cursorPosition), m_pageID);
+}
 #if ENABLE(TIZEN_TEXT_CARET_HANDLING_WK2)
 void WebPageProxy::setCaretPosition(const WebCore::IntPoint& pos)
 {
@@ -355,10 +390,16 @@ void WebPageProxy::processPluginCustomRequest(const String& request, const Strin
         if (String("show") == msg)
             active = true;
 #if ENABLE(TIZEN_ISF_PORT)
-        setInputMethodState(active, "plugin", String());
+        setInputMethodState(active, String(), String());
 #else
         setInputMethodState(active);
 #endif
+#if ENABLE(TIZEN_ISF_PORT)
+        // plugin does not use preedit.
+        Ecore_IMF_Context* imfContext = ewk_view_imf_context_get(viewWidget());
+        if (active && imfContext)
+            ecore_imf_context_prediction_allow_set(imfContext, false);
+#endif
     }
 #if ENABLE(TIZEN_JSBRIDGE_PLUGIN)
     else if (String("requestToNative,json") == request)
@@ -935,7 +976,7 @@ void WebPageProxy::getLinkMagnifierRect(const WebCore::IntPoint& position, const
 void WebPageProxy::didGetLinkMagnifierRect(const IntPoint& position, const IntRect& rect)
 {
     if (!rect.isEmpty())
-        LinkMagnifierProxy::linkMagnifier().show(EwkViewImpl::fromEvasObject(viewWidget()), position, rect);
+        LinkMagnifierProxy::linkMagnifier().show(static_cast<PageClientImpl*>(m_pageClient), position, rect);
     else
         openLink(position);
 }
@@ -1017,50 +1058,4 @@ void WebPageProxy::setContentSecurityPolicy(const String& policy, WebCore::Conte
 
 #endif // #if OS(TIZEN)
 
-void WebPageProxy::handleInputMethodKeydown(bool& handled)
-{
-#if ENABLE(TIZEN_WEBKIT2_ROTATION_WHILE_JAVASCRIPT_POPUP)
-    handled = m_keyEventQueue.first().forwardedEvent.isFiltered();
-#else
-    handled = m_keyEventQueue.first().isFiltered();
-#endif
-}
-
-void WebPageProxy::confirmComposition(const String& compositionString)
-{
-    if (!isValid())
-        return;
-
-#if ENABLE(TIZEN_ISF_PORT)
-    if (m_didCancelCompositionFromWebProcess)
-        return;
-#endif
-
-    process()->send(Messages::WebPage::ConfirmComposition(compositionString), m_pageID, 0);
-}
-
-void WebPageProxy::setComposition(const String& compositionString, Vector<WebCore::CompositionUnderline>& underlines, int cursorPosition)
-{
-    if (!isValid())
-        return;
-
-#if ENABLE(TIZEN_REDUCE_KEY_LAGGING)
-    // Suspend layout&paint at the key input, and resume layout&paint after 150 ms.
-    suspendActiveDOMObjectsAndAnimations();
-    if (m_pageContentResumeTimer)
-        ecore_timer_del(m_pageContentResumeTimer);
-    m_pageContentResumeTimer = ecore_timer_add(150.0/1000.0, pageContentResumeTimerFired, this);
-#endif
-
-    process()->send(Messages::WebPage::SetComposition(compositionString, underlines, cursorPosition), m_pageID, 0);
-}
-
-void WebPageProxy::cancelComposition()
-{
-    if (!isValid())
-        return;
-
-    process()->send(Messages::WebPage::CancelComposition(), m_pageID, 0);
-}
-
 } // namespace WebKit
old mode 100755 (executable)
new mode 100644 (file)
index 1ab6885..2a8b448
 #include "config.h"
 #include "WebPopupMenuProxyEfl.h"
 
-#include "EwkViewImpl.h"
 #include "NativeWebMouseEvent.h"
 #include "WebPopupItem.h"
-#include "ewk_view.h"
+#include "ewk_view_private.h"
 #include <wtf/text/CString.h>
 
 using namespace WebCore;
 
 namespace WebKit {
 
-WebPopupMenuProxyEfl::WebPopupMenuProxyEfl(EwkViewImpl* viewImpl, WebPopupMenuProxy::Client* client)
+WebPopupMenuProxyEfl::WebPopupMenuProxyEfl(Evas_Object* webView, WebPopupMenuProxy::Client* client)
     : WebPopupMenuProxy(client)
-    , m_viewImpl(viewImpl)
+    , m_webView(webView)
 {
 }
 
 #if ENABLE(TIZEN_MULTIPLE_SELECT)
 void WebPopupMenuProxyEfl::showPopupMenu(const IntRect& rect, TextDirection textDirection, double pageScaleFactor, const Vector<WebPopupItem>& items, const PlatformPopupMenuData& data, int32_t selectedIndex)
 {
-    m_viewImpl->requestPopupMenu(this, rect, textDirection, pageScaleFactor, items, selectedIndex, data.multipleSelections);
+    ewk_view_popup_menu_request(m_webView, this, rect, textDirection, pageScaleFactor, items, selectedIndex, data.multipleSelections);
 }
 #else
 void WebPopupMenuProxyEfl::showPopupMenu(const IntRect& rect, TextDirection textDirection, double pageScaleFactor, const Vector<WebPopupItem>& items, const PlatformPopupMenuData&, int32_t selectedIndex)
 {
-    m_viewImpl->requestPopupMenu(this, rect, textDirection, pageScaleFactor, items, selectedIndex);
+    ewk_view_popup_menu_request(m_webView, this, rect, textDirection, pageScaleFactor, items, selectedIndex);
 }
 #endif
 
 void WebPopupMenuProxyEfl::hidePopupMenu()
 {
-    ewk_view_popup_menu_close(m_viewImpl->view());
-}
-
-void WebPopupMenuProxyEfl::valueChanged(int newSelectedIndex)
-{
-    m_client->valueChangedForPopupMenu(this, newSelectedIndex);
+    ewk_view_popup_menu_close(m_webView);
 }
 
 #if ENABLE(TIZEN_WEBKIT2_POPUP_INTERNAL)
 void WebPopupMenuProxyEfl::updatePopupMenu(TextDirection textDirection, const Vector<WebPopupItem>& items, int32_t selectedIndex)
 {
-    ewk_view_popup_menu_update(m_viewImpl->view(), textDirection, items, selectedIndex);
+    ewk_view_popup_menu_update(m_webView, textDirection, items, selectedIndex);
 }
 #endif
 
+void WebPopupMenuProxyEfl::valueChanged(int newSelectedIndex)
+{
+    m_client->valueChangedForPopupMenu(this, newSelectedIndex);
+}
+
 #if ENABLE(TIZEN_MULTIPLE_SELECT)
 void WebPopupMenuProxyEfl::multipleValueChanged(Vector<int>& newSelectedIndex)
 {
old mode 100755 (executable)
new mode 100644 (file)
index 4590f21..a4513b0
@@ -34,36 +34,32 @@ namespace WebCore {
 class IntRect;
 }
 
-class EwkViewImpl;
-
 namespace WebKit {
 
 class WebPageProxy;
 
 class WebPopupMenuProxyEfl : public WebPopupMenuProxy {
 public:
-    static PassRefPtr<WebPopupMenuProxyEfl> create(EwkViewImpl* viewImpl, WebPopupMenuProxy::Client* client)
+    static PassRefPtr<WebPopupMenuProxyEfl> create(Evas_Object* webView, WebPopupMenuProxy::Client* client)
     {
-        return adoptRef(new WebPopupMenuProxyEfl(viewImpl, client));
+        return adoptRef(new WebPopupMenuProxyEfl(webView, client));
     }
 
-    void showPopupMenu(const WebCore::IntRect&, WebCore::TextDirection, double pageScaleFactor, const Vector<WebPopupItem>&, const PlatformPopupMenuData&, int32_t selectedIndex);
-    void hidePopupMenu();
-
-    void valueChanged(int newSelectedIndex);
-
+    virtual void showPopupMenu(const WebCore::IntRect&, WebCore::TextDirection, double pageScaleFactor, const Vector<WebPopupItem>&, const PlatformPopupMenuData&, int32_t selectedIndex);
+    virtual void hidePopupMenu();
 #if ENABLE(TIZEN_WEBKIT2_POPUP_INTERNAL)
     virtual void updatePopupMenu(WebCore::TextDirection, const Vector<WebPopupItem>&, int32_t selectedIndex);
 #endif
 
+    void valueChanged(int newSelectedIndex);
 #if ENABLE(TIZEN_MULTIPLE_SELECT)
     void multipleValueChanged(Vector<int>& newSelectedIndex);
 #endif
 
 private:
-    WebPopupMenuProxyEfl(EwkViewImpl*, WebPopupMenuProxy::Client*);
+    WebPopupMenuProxyEfl(Evas_Object*, WebPopupMenuProxy::Client*);
 
-    EwkViewImpl* m_viewImpl;
+    Evas_Object* m_webView;
 };
 
 } // namespace WebKit
index d35aeff..71c7bbe 100644 (file)
@@ -53,8 +53,8 @@ String WebContext::platformDefaultDatabaseDirectory() const
 
 String WebContext::platformDefaultIconDatabasePath() const
 {
-    GOwnPtr<gchar> databaseDirectory(g_build_filename(g_get_user_data_dir(), "webkitgtk", "icondatabase", NULL));
-    return WebCore::filenameToString(databaseDirectory.get());
+    // FIXME: Implement.
+    return WTF::String();
 }
 
 String WebContext::platformDefaultLocalStorageDirectory() const
index c5d7e3b..be2c6cc 100644 (file)
 
 namespace WebKit {
 
-bool WebSoupRequestManagerClient::didReceiveURIRequest(WebSoupRequestManagerProxy* soupRequestManager, WebURL* url, WebPageProxy* initiaingPage, uint64_t requestID)
+bool WebSoupRequestManagerClient::didReceiveURIRequest(WebSoupRequestManagerProxy* soupRequestManager, WebURL* url, uint64_t requestID)
 {
     if (!m_client.didReceiveURIRequest)
         return false;
 
-    m_client.didReceiveURIRequest(toAPI(soupRequestManager), toAPI(url), toAPI(initiaingPage), requestID, m_client.clientInfo);
+    m_client.didReceiveURIRequest(toAPI(soupRequestManager), toAPI(url), requestID, m_client.clientInfo);
     return true;
 }
 
index e247fec..dc1755e 100644 (file)
@@ -30,7 +30,7 @@ class WebURL;
 
 class WebSoupRequestManagerClient : public APIClient<WKSoupRequestManagerClient, kWKSoupRequestManagerClientCurrentVersion> {
 public:
-    bool didReceiveURIRequest(WebSoupRequestManagerProxy*, WebURL*, WebPageProxy*, uint64_t requestID);
+    bool didReceiveURIRequest(WebSoupRequestManagerProxy*, WebURL*, uint64_t requestID);
     void didFailToLoadURIRequest(WebSoupRequestManagerProxy*, uint64_t requestID);
 };
 
index 19e7ee6..c766b0a 100644 (file)
@@ -76,9 +76,9 @@ void WebSoupRequestManagerProxy::didReceiveURIRequestData(const WebData* request
     m_webContext->sendToAllProcesses(Messages::WebSoupRequestManager::DidReceiveURIRequestData(requestData->dataReference(), requestID));
 }
 
-void WebSoupRequestManagerProxy::didReceiveURIRequest(const String& uriString, WebPageProxy* initiaingPage, uint64_t requestID)
+void WebSoupRequestManagerProxy::didReceiveURIRequest(const String& uriString, uint64_t requestID)
 {
-    if (!m_client.didReceiveURIRequest(this, WebURL::create(uriString).get(), initiaingPage, requestID))
+    if (!m_client.didReceiveURIRequest(this, WebURL::create(uriString).get(), requestID))
         didHandleURIRequest(WebData::create(0, 0).get(), 0, String(), requestID);
 }
 
index dab8bf4..92bd63e 100644 (file)
@@ -54,7 +54,6 @@ public:
     void didReceiveURIRequestData(const WebData*, uint64_t requestID);
     void didFailToLoadURIRequest(uint64_t requestID);
 
-    void didReceiveURIRequest(const String& uriString, WebPageProxy*, uint64_t requestID);
     void didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*);
 
 private:
@@ -62,6 +61,8 @@ private:
 
     virtual Type type() const { return APIType; }
 
+    void didReceiveURIRequest(const String& uriString, uint64_t requestID);
+
     void didReceiveWebSoupRequestManagerProxyMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*);
 
     WebContext* m_webContext;
index 18058f5..81591a4 100644 (file)
@@ -21,5 +21,6 @@
 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 messages -> WebSoupRequestManagerProxy {
+    DidReceiveURIRequest(WTF::String uriString, uint64_t requestID);
     DidFailToLoadURIRequest(uint64_t requestID);
 }
old mode 100755 (executable)
new mode 100644 (file)
index 6e66b2b..8807227
@@ -197,7 +197,7 @@ void WebContextMenuProxyTizen::showContextMenu(const WebCore::IntPoint& position
         m_pageClientImpl->setIsContextMenuVisible(true);
 #if ENABLE(TOUCH_EVENTS) && ENABLE(TIZEN_GESTURE)
         // Cancel touch event when ContextMenu is shown.
-        EwkViewImpl::fromEvasObject(m_webView)->feedCancelTouchEvents();
+        ewkViewHandleTouchEvent(m_webView, EWK_TOUCH_CANCEL);
 #endif
     }
 #else
index 133b682..1d10dfb 100755 (executable)
@@ -47,7 +47,6 @@
 #include "WebFrame.h"
 #include "WebFrameNetworkingContext.h"
 #include "WebFullScreenManager.h"
-#include "WebIconDatabaseMessages.h"
 #include "WebNavigationDataStore.h"
 #include "WebPage.h"
 #include "WebPageProxyMessages.h"
@@ -417,8 +416,7 @@ void WebFrameLoaderClient::dispatchDidReceiveIcon()
     webPage->send(Messages::WebPageProxy::DidReceiveIcon());
     return;
 #endif
-
-    WebProcess::shared().connection()->send(Messages::WebIconDatabase::DidReceiveIconForPageURL(m_frame->url()), 0);
+    notImplemented();
 }
 
 void WebFrameLoaderClient::dispatchDidStartProvisionalLoad()
index 9132021..d999480 100755 (executable)
 #include "WebEditorClient.h"
 
 #include "Frame.h"
-#include "NativeWebKeyboardEvent.h"
 #include "PlatformKeyboardEvent.h"
 #include "WebPage.h"
 #include "WebPageProxyMessages.h"
 #include "WebProcess.h"
 #if ENABLE(TIZEN_ISF_PORT)
 #include "WindowsKeyboardCodes.h"
+#include "NativeWebKeyboardEvent.h"
 #endif
 #include <WebCore/FocusController.h>
 #include <WebCore/KeyboardEvent.h>
@@ -72,21 +72,19 @@ void WebEditorClient::handleKeyboardEvent(KeyboardEvent* event)
 void WebEditorClient::handleInputMethodKeydown(KeyboardEvent* event)
 {
     Frame* frame = m_page->corePage()->focusController()->focusedOrMainFrame();
+
     if (!frame || !frame->editor()->canEdit())
         return;
 
-    // FIXME: sending sync message might make input lagging.
-    bool handled = false;
 #if ENABLE(TIZEN_ISF_PORT)
     const NativeWebKeyboardEvent* currentEvent = static_cast<const NativeWebKeyboardEvent*>(WebPage::currentEvent());
     ASSERT(currentEvent);
-    handled = currentEvent->isFiltered();
-#else
-    m_page->sendSync(Messages::WebPageProxy::HandleInputMethodKeydown(), Messages::WebPageProxy::HandleInputMethodKeydown::Reply(handled));
-#endif
 
-    if (handled)
+    if (currentEvent->isFiltered())
         event->setDefaultHandled();
+#else
+    m_page->send(Messages::WebPageProxy::HandleInputMethodKeydown());
+#endif
 }
 
 #if ENABLE(TIZEN_CLIPBOARD) || ENABLE(TIZEN_PASTEBOARD)
index 6e7b593..876de80 100644 (file)
 #include "config.h"
 #include "WebFrameNetworkingContext.h"
 
-#include "WebFrame.h"
-#include "WebPage.h"
 #include <WebCore/ResourceHandle.h>
 
 using namespace WebCore;
 
 namespace WebKit {
 
-WebFrameNetworkingContext::WebFrameNetworkingContext(WebFrame* frame)
-    : FrameNetworkingContext(frame->coreFrame())
-    , m_initiatingPageID(0)
-{
-    if (WebPage* page = frame->page())
-        m_initiatingPageID = page->pageID();
-}
-
 SoupSession* WebFrameNetworkingContext::soupSession() const
 {
     return ResourceHandle::defaultSession();
 }
 
-uint64_t WebFrameNetworkingContext::initiatingPageID() const
-{
-    return m_initiatingPageID;
-}
-
 }
 
index a06a692..2a42d38 100644 (file)
 #ifndef WebFrameNetworkingContext_h
 #define WebFrameNetworkingContext_h
 
+#include "WebFrame.h"
+
 #include <WebCore/FrameNetworkingContext.h>
 
 namespace WebKit {
 
-class WebFrame;
-
 class WebFrameNetworkingContext : public WebCore::FrameNetworkingContext {
 public:
     static PassRefPtr<WebFrameNetworkingContext> create(WebFrame* frame)
@@ -42,12 +42,12 @@ public:
     }
 
 private:
-    WebFrameNetworkingContext(WebFrame*);
+    WebFrameNetworkingContext(WebFrame* frame)
+        : WebCore::FrameNetworkingContext(frame->coreFrame())
+    {
+    }
 
     virtual SoupSession* soupSession() const;
-    virtual uint64_t initiatingPageID() const;
-
-    uint64_t m_initiatingPageID;
 };
 
 }
index 1798843..7329927 100755 (executable)
@@ -229,6 +229,8 @@ public:
     void centerSelectionInVisibleArea();
 
 #if PLATFORM(EFL)
+    void confirmComposition(const String& compositionString);
+    void setComposition(const WTF::String& compositionString, const WTF::Vector<WebCore::CompositionUnderline>& underlines, uint64_t cursorPosition);
 #if ENABLE(TIZEN_TEXT_CARET_HANDLING_WK2)
     bool setCaretPosition(const WebCore::IntPoint&);
     void getCaretPosition(WebCore::IntRect&);
@@ -590,10 +592,7 @@ public:
     void gestureWillBegin(const WebCore::IntPoint&, bool& canBeginPanning);
     void gestureDidScroll(const WebCore::IntSize&);
     void gestureDidEnd();
-#elif PLATFORM(EFL)
-    void confirmComposition(const String& compositionString);
-    void setComposition(const WTF::String& compositionString, const WTF::Vector<WebCore::CompositionUnderline>& underlines, uint64_t cursorPosition);
-    void cancelComposition();
+
 #elif PLATFORM(GTK)
     void updateAccessibilityTree();
     bool handleMousePressedEvent(const WebCore::PlatformMouseEvent&);
index 5d778ea..a684281 100755 (executable)
@@ -336,6 +336,8 @@ messages -> WebPage {
     GestureDidEnd()
 #endif
 #if PLATFORM(EFL) && OS(TIZEN)
+    ConfirmComposition(WTF::String compositionString)
+    SetComposition(WTF::String compositionString, WTF::Vector<WebCore::CompositionUnderline> underlines, uint64_t cursorPosition)
 #if ENABLE(TIZEN_TEXT_CARET_HANDLING_WK2)
     SetCaretPosition(WebCore::IntPoint pos)
     GetCaretPosition() -> (WebCore::IntRect rect)
@@ -347,11 +349,6 @@ messages -> WebPage {
     DeleteSurroundingText(int offset, int count)
 #endif
 #endif
-#if PLATFORM(EFL)
-    ConfirmComposition(WTF::String compositionString)
-    SetComposition(WTF::String compositionString, WTF::Vector<WebCore::CompositionUnderline> underlines, uint64_t cursorPosition)
-    CancelComposition()
-#endif
 #if PLATFORM(QT) || OS(TIZEN)
     FindZoomableAreaForPoint(WebCore::IntPoint point, WebCore::IntSize area)
 #endif
index 21e01cf..e6afc26 100755 (executable)
@@ -28,7 +28,6 @@
 #include "config.h"
 #include "WebPage.h"
 
-#include "EditorState.h"
 #include "NamedNodeMap.h"
 #include "NotImplemented.h"
 #include "WebEvent.h"
@@ -246,96 +245,6 @@ void WebPage::setThemePath(const String& themePath)
     theme->setThemePath(themePath);
 }
 
-static Frame* targetFrameForEditing(WebPage* page)
-{
-    Frame* frame = page->corePage()->focusController()->focusedOrMainFrame();
-    if (!frame)
-        return 0;
-
-    Editor* editor = frame->editor();
-    if (!editor->canEdit())
-        return 0;
-
-    if (editor->hasComposition()) {
-        // We should verify the parent node of this IME composition node are
-        // editable because JavaScript may delete a parent node of the composition
-        // node. In this case, WebKit crashes while deleting texts from the parent
-        // node, which doesn't exist any longer.
-        if (PassRefPtr<Range> range = editor->compositionRange()) {
-            Node* node = range->startContainer();
-            if (!node || !node->isContentEditable())
-                return 0;
-        }
-    }
-
-    return frame;
-}
-
-void WebPage::confirmComposition(const String& compositionString)
-{
-    Frame* targetFrame = targetFrameForEditing(this);
-    if (!targetFrame)
-        return;
-
-    targetFrame->editor()->confirmComposition(compositionString);
-
-#if ENABLE(TIZEN_ISF_PORT)
-    updateCursorOffset();
-#endif
-}
-
-void WebPage::setComposition(const String& compositionString, const Vector<WebCore::CompositionUnderline>& underlines, uint64_t cursorPosition)
-{
-    Frame* targetFrame = targetFrameForEditing(this);
-    if (!targetFrame)
-        return;
-
-#if ENABLE(TIZEN_ISF_PORT)
-    if (targetFrame->selection()->rootEditableElement()) {
-        HTMLTextFormControlElement* textFormControl = toTextFormControl(targetFrame->selection()->rootEditableElement()->shadowAncestorNode());
-        if (textFormControl && textFormControl->maxLength() >= 0) {
-            unsigned availableLength = textFormControl->maxLength() - textFormControl->value().length();
-            if (targetFrame->editor()->hasComposition())
-                availableLength += (targetFrame->editor()->compositionEnd() - targetFrame->editor()->compositionStart());
-            if (!availableLength)
-                return;
-
-            if (availableLength < compositionString.length()) {
-                String newCompositionString = compositionString.substring(0, availableLength);
-                Vector<CompositionUnderline> newUnderlines;
-                size_t numUnderlines = underlines.size();
-                for (size_t index = 0; index < numUnderlines; ++index) {
-                    if (underlines[index].startOffset < availableLength) {
-                        newUnderlines.append(underlines[index]);
-                        if (newUnderlines.last().endOffset > availableLength)
-                            newUnderlines.last().endOffset = availableLength;
-                    }
-                }
-                targetFrame->editor()->setComposition(newCompositionString, newUnderlines, cursorPosition, 0);
-                return;
-            }
-        }
-    }
-    m_isSettingComposition = true;
-#endif
-
-    targetFrame->editor()->setComposition(compositionString, underlines, cursorPosition, 0);
-
-#if ENABLE(TIZEN_ISF_PORT)
-    m_isSettingComposition = false;
-    updateCursorOffset();
-#endif
-}
-
-void WebPage::cancelComposition()
-{
-    Frame* frame = m_page->focusController()->focusedOrMainFrame();
-    if (!frame)
-        return;
-
-    frame->editor()->cancelComposition();
-}
-
 #if OS(TIZEN)
 
 #if ENABLE(TIZEN_WEBKIT2_TILED_BACKING_STORE)
@@ -493,6 +402,57 @@ void WebPage::createPagesToPDF(const IntSize& surfaceSize, const IntSize& conten
 }
 #endif
 
+void WebPage::confirmComposition(const String& compositionString)
+{
+    Frame* frame = m_page->focusController()->focusedOrMainFrame();
+    if (!frame || !frame->editor()->canEdit())
+        return;
+    frame->editor()->confirmComposition(compositionString);
+#if ENABLE(TIZEN_ISF_PORT)
+    updateCursorOffset();
+#endif
+}
+
+void WebPage::setComposition(const String& compositionString, const Vector<WebCore::CompositionUnderline>& underlines, uint64_t cursorPosition)
+{
+    Frame* frame = m_page->focusController()->focusedOrMainFrame();
+    if (!frame || !frame->editor()->canEdit())
+        return;
+#if ENABLE(TIZEN_ISF_PORT)
+    if (frame->selection()->rootEditableElement()) {
+        HTMLTextFormControlElement* textFormControl = toTextFormControl(frame->selection()->rootEditableElement()->shadowAncestorNode());
+        if (textFormControl && textFormControl->maxLength() >= 0) {
+            unsigned availableLength = textFormControl->maxLength() - textFormControl->value().length();
+            if (frame->editor()->hasComposition())
+                availableLength += (frame->editor()->compositionEnd() - frame->editor()->compositionStart());
+            if (!availableLength)
+                return;
+
+            if (availableLength < compositionString.length()) {
+                String newCompositionString = compositionString.substring(0, availableLength);
+                Vector<CompositionUnderline> newUnderlines;
+                size_t numUnderlines = underlines.size();
+                for (size_t index = 0; index < numUnderlines; ++index) {
+                    if (underlines[index].startOffset < availableLength) {
+                        newUnderlines.append(underlines[index]);
+                        if (newUnderlines.last().endOffset > availableLength)
+                            newUnderlines.last().endOffset = availableLength;
+                    }
+                }
+                frame->editor()->setComposition(newCompositionString, newUnderlines, cursorPosition, 0);
+                return;
+            }
+        }
+    }
+    m_isSettingComposition = true;
+#endif
+    frame->editor()->setComposition(compositionString, underlines, cursorPosition, 0);
+#if ENABLE(TIZEN_ISF_PORT)
+    m_isSettingComposition = false;
+    updateCursorOffset();
+#endif
+}
+
 #if ENABLE(TIZEN_TEXT_CARET_HANDLING_WK2)
 bool WebPage::setCaretPosition(const WebCore::IntPoint& pos)
 {
index 7406d68..6c5cad1 100644 (file)
@@ -25,7 +25,6 @@
 #include "WebErrors.h"
 #include "WebKitSoupRequestGeneric.h"
 #include "WebKitSoupRequestInputStream.h"
-#include "WebPageProxyMessages.h"
 #include "WebProcess.h"
 #include "WebSoupRequestManagerProxyMessages.h"
 #include <WebCore/ResourceHandle.h>
@@ -170,14 +169,12 @@ void WebSoupRequestManager::didReceiveURIRequestData(const CoreIPC::DataReferenc
 void WebSoupRequestManager::send(GSimpleAsyncResult* result, GCancellable* cancellable)
 {
     GRefPtr<WebKitSoupRequestGeneric> request = adoptGRef(WEBKIT_SOUP_REQUEST_GENERIC(g_async_result_get_source_object(G_ASYNC_RESULT(result))));
-    SoupRequest* soupRequest = SOUP_REQUEST(request.get());
-    GOwnPtr<char> uriString(soup_uri_to_string(soup_request_get_uri(soupRequest), FALSE));
+    SoupURI* uri = soup_request_get_uri(SOUP_REQUEST(request.get()));
+    GOwnPtr<char> uriString(soup_uri_to_string(uri, FALSE));
 
     uint64_t requestID = generateSoupRequestID();
     m_requestMap.set(requestID, adoptPtr(new WebSoupRequestAsyncData(result, request.get(), cancellable)));
-
-    uint64_t initiaingPageID = WebCore::ResourceHandle::getSoupRequestInitiaingPageID(soupRequest);
-    m_process->connection()->send(Messages::WebPageProxy::DidReceiveURIRequest(String::fromUTF8(uriString.get()), requestID), initiaingPageID);
+    m_process->connection()->send(Messages::WebSoupRequestManagerProxy::DidReceiveURIRequest(String::fromUTF8(uriString.get()), requestID), 0);
 }
 
 GInputStream* WebSoupRequestManager::finish(GSimpleAsyncResult* result)
diff --git a/Source/cmake/EFLHelpers.cmake b/Source/cmake/EFLHelpers.cmake
deleted file mode 100644 (file)
index bf8fbf4..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-# - Set of macros and functions that are useful for building the EFL port.
-#
-# The following functions are currently defined:
-# FIND_EFL_LIBRARY(<name> HEADERS <header1> ... HEADER_PREFIXES <prefix1> ... LIBRARY <libname>)
-#     Looks for the header files inside the given prefix directories, and for the library
-#     passed to the LIBRARY parameter.
-#     Two #defines in the form <UPPERCASED_NAME>_VERSION_MAJOR and <UPPERCASED_NAME>_VERSION_MINOR
-#     are looked for in all the given headers, and the first occurrence is used to build the library's
-#     version number.
-#     This function defines the following variables:
-#     - <UPPERCASED_NAME>_INCLUDE_DIRS: All the directories required by this library's headers.
-#     - <UPPERCASED_NAME>_LIBRARIES:    All the libraries required to link against this library.
-#     - <UPPERCASED_NAME>_VERSION:      The library's version in the format "major.minor".
-#
-# Copyright (C) 2012 Intel Corporation. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1.  Redistributions of source code must retain the above copyright
-#     notice, this list of conditions and the following disclaimer.
-# 2.  Redistributions in binary form must reproduce the above copyright
-#     notice, this list of conditions and the following disclaimer in the
-#     documentation and/or other materials provided with the distribution.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND ITS CONTRIBUTORS ``AS
-# IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR ITS
-# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
-# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
-# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-INCLUDE(CMakeParseArguments)
-
-FUNCTION(FIND_EFL_LIBRARY _name)
-    CMAKE_PARSE_ARGUMENTS(PARAM "" "LIBRARY" "HEADERS;HEADER_PREFIXES" ${ARGN})
-
-    STRING(TOUPPER ${_name} _name_upper)
-    SET(_version_found FALSE)
-
-    FOREACH (_current_header ${PARAM_HEADERS})
-        FIND_PATH(${_current_header}_INCLUDE_DIR NAMES ${_current_header} PATH_SUFFIXES ${PARAM_HEADER_PREFIXES})
-        LIST(APPEND ${_name}_INCLUDE_DIRS "${${_current_header}_INCLUDE_DIR}")
-
-        IF (NOT _version_found)
-            SET (_header_path "${${_current_header}_INCLUDE_DIR}/${_current_header}")
-            IF (EXISTS ${_header_path})
-                FILE(READ "${_header_path}" _header_contents)
-
-                STRING(REGEX MATCH "#define +${_name_upper}_VERSION_MAJOR +([0-9]+)" _dummy "${_header_contents}")
-                SET(_version_major "${CMAKE_MATCH_1}")
-                STRING(REGEX MATCH "#define +${_name_upper}_VERSION_MINOR +([0-9]+)" _dummy "${_header_contents}")
-                SET(_version_minor "${CMAKE_MATCH_1}")
-
-                IF (_version_major AND _version_minor)
-                    SET(_version_found TRUE)
-                ENDIF ()
-            ENDIF ()
-        ENDIF ()
-    ENDFOREACH ()
-
-    FIND_LIBRARY(${_name}_LIBRARIES NAMES ${PARAM_LIBRARY})
-
-    SET(${_name}_INCLUDE_DIRS ${${_name}_INCLUDE_DIRS} PARENT_SCOPE)
-    SET(${_name}_LIBRARIES ${${_name}_LIBRARIES} PARENT_SCOPE)
-    SET(${_name}_VERSION "${_version_major}.${_version_minor}" PARENT_SCOPE)
-ENDFUNCTION()
diff --git a/Source/cmake/FindEFL.cmake b/Source/cmake/FindEFL.cmake
new file mode 100755 (executable)
index 0000000..ad13761
--- /dev/null
@@ -0,0 +1,29 @@
+INCLUDE(FindPkgConfig)
+
+PKG_CHECK_MODULES (EDJE REQUIRED edje>=1.0.0)
+PKG_CHECK_MODULES (ECORE REQUIRED ecore>=1.2.0)
+PKG_CHECK_MODULES (ECORE_EVAS REQUIRED ecore-evas>=1.0.0)
+# for WEBKIT_UPVERSION, "eina>=1.0.999.63568" ===> "eina>=1.0.999"
+PKG_CHECK_MODULES (EFLDEPS REQUIRED
+  eina>=1.2.0
+  evas>=1.0.0
+  ecore>=1.2.0
+  ecore-file>=1.0.0
+  ecore-imf>=1.0.0
+  ecore-evas>=1.0.999.59763
+  edje>=1.0.0
+  eukit>=1.1.0
+  edbus>=1.1.0
+  ecore-input>=1.0.0
+  eeze>=1.2.0
+  )
+PKG_CHECK_MODULES (EINA REQUIRED eina>=1.2.0)
+PKG_CHECK_MODULES (ECORE_X ecore-x>=1.0.0)
+PKG_CHECK_MODULES (EVAS REQUIRED evas>=1.0.0)
+PKG_CHECK_MODULES (EUKIT REQUIRED eukit>=1.1.0)
+PKG_CHECK_MODULES (EDBUS REQUIRED edbus>=1.1.0)
+
+FIND_PROGRAM (EDJE_CC_EXECUTABLE edje_cc)
+IF (NOT EDJE_CC_EXECUTABLE)
+    MESSAGE (FATAL_ERROR "edje_cc could not be found")
+ENDIF ()
diff --git a/Source/cmake/FindE_DBus.cmake b/Source/cmake/FindE_DBus.cmake
deleted file mode 100644 (file)
index 5a81998..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-# - Try to find E_DBus
-# Once done, this will define
-#
-#  E_DBUS_FOUND - system has E_DBus installed.
-#  E_DBUS_INCLUDE_DIRS - directories which contain the E_DBus headers.
-#  E_DBUS_LIBRARIES - libraries required to link against E_DBus.
-#
-# Optionally, the COMPONENTS keyword can be passed to FIND_PACKAGE()
-# and additional E_DBus libraries can be looked for. Currently, the
-# following libraries can be searched, and they define the following
-# variables if found:
-#
-#  EUKIT - E_DBUS_EUKIT_INCLUDE_DIRS and E_DBUS_EUKIT_LIBRARIES
-#
-# Copyright (C) 2012 Intel Corporation. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1.  Redistributions of source code must retain the above copyright
-#     notice, this list of conditions and the following disclaimer.
-# 2.  Redistributions in binary form must reproduce the above copyright
-#     notice, this list of conditions and the following disclaimer in the
-#     documentation and/or other materials provided with the distribution.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND ITS CONTRIBUTORS ``AS
-# IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR ITS
-# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
-# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
-# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-INCLUDE(EFLHelpers)
-
-FIND_EFL_LIBRARY(E_DBUS
-    HEADERS E_DBus.h
-    HEADER_PREFIXES e_dbus-1
-    LIBRARY edbus
-)
-
-# Components.
-FIND_EFL_LIBRARY(E_DBUS_EUKIT
-    HEADERS E_Ukit.h
-    HEADER_PREFIXES e_dbus-1
-    LIBRARY eukit
-)
-
-FOREACH(_component ${E_DBus_FIND_COMPONENTS})
-    SET(_e_dbus_component "E_DBUS_${_component}")
-    STRING(TOUPPER ${_e_dbus_component} _UPPER_NAME)
-
-    LIST(APPEND _E_DBUS_REQUIRED_COMPONENT_VARS ${_UPPER_NAME}_INCLUDE_DIRS ${_UPPER_NAME}_LIBRARIES)
-ENDFOREACH()
-
-INCLUDE(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(E_DBus REQUIRED_VARS E_DBUS_INCLUDE_DIRS E_DBUS_LIBRARIES ${_E_DBUS_REQUIRED_COMPONENT_VARS}
-                                         VERSION_VAR   E_DBUS_VERSION)
diff --git a/Source/cmake/FindEcore.cmake b/Source/cmake/FindEcore.cmake
deleted file mode 100644 (file)
index 38bbf0f..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-# - Try to find Ecore
-# Once done, this will define
-#
-#  ECORE_FOUND - system has Ecore installed.
-#  ECORE_INCLUDE_DIRS - directories which contain the Ecore headers.
-#  ECORE_LIBRARIES - libraries required to link against Ecore.
-#
-# Optionally, the COMPONENTS keyword can be passed to FIND_PACKAGE()
-# and additional Ecore libraries can be looked for. Currently, the
-# following libraries can be searched, and they define the following
-# variables if found:
-#
-#  EVAS  - ECORE_EVAS_INCLUDE_DIRS and ECORE_EVAS_LIBRARIES
-#  FILE  - ECORE_FILE_INCLUDE_DIRS and ECORE_FILE_LIBRARIES
-#  INPUT - ECORE_INPUT_INCLUDE_DIRS and ECORE_INPUT_LIBRARIES
-#  X     - ECORE_X_INCLUDE_DIRS and ECORE_X_LIBRARIES
-#
-# Copyright (C) 2012 Intel Corporation. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1.  Redistributions of source code must retain the above copyright
-#     notice, this list of conditions and the following disclaimer.
-# 2.  Redistributions in binary form must reproduce the above copyright
-#     notice, this list of conditions and the following disclaimer in the
-#     documentation and/or other materials provided with the distribution.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND ITS CONTRIBUTORS ``AS
-# IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR ITS
-# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
-# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
-# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-INCLUDE(EFLHelpers)
-
-FIND_EFL_LIBRARY(ECORE
-    HEADERS Ecore.h
-    HEADER_PREFIXES ecore-1
-    LIBRARY ecore
-)
-
-# Components.
-FIND_EFL_LIBRARY(ECORE_EVAS
-    HEADERS Ecore_Evas.h
-    HEADER_PREFIXES ecore-1
-    LIBRARY ecore_evas
-)
-FIND_EFL_LIBRARY(ECORE_FILE
-    HEADERS Ecore_File.h
-    HEADER_PREFIXES ecore-1
-    LIBRARY ecore_file
-)
-FIND_EFL_LIBRARY(ECORE_INPUT
-    HEADERS Ecore_Input.h
-    HEADER_PREFIXES ecore-1
-    LIBRARY ecore_input
-)
-FIND_EFL_LIBRARY(ECORE_X
-    HEADERS Ecore_X.h
-    HEADER_PREFIXES ecore-1
-    LIBRARY ecore_x
-)
-FIND_EFL_LIBRARY(ECORE_IMF
-    HEADERS Ecore_IMF.h Ecore_IMF_Evas.h
-    HEADER_PREFIXES ecore-1
-    LIBRARY ecore_imf
-)
-
-FOREACH(_component ${Ecore_FIND_COMPONENTS})
-    SET(_ecore_component "ECORE_${_component}")
-    STRING(TOUPPER ${_ecore_component} _UPPER_NAME)
-
-    LIST(APPEND _ECORE_REQUIRED_COMPONENT_VARS ${_UPPER_NAME}_INCLUDE_DIRS ${_UPPER_NAME}_LIBRARIES)
-ENDFOREACH()
-
-INCLUDE(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(Ecore REQUIRED_VARS ECORE_INCLUDE_DIRS ECORE_LIBRARIES ${_ECORE_REQUIRED_COMPONENT_VARS}
-                                        VERSION_VAR   ECORE_VERSION)
diff --git a/Source/cmake/FindEdje.cmake b/Source/cmake/FindEdje.cmake
deleted file mode 100644 (file)
index 01ff8d8..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-# - Try to find Edje
-# Once done, this will define
-#
-#  EDJE_FOUND - system has Edje installed.
-#  EDJE_INCLUDE_DIRS - directories which contain the Edje headers.
-#  EDJE_LIBRARIES - libraries required to link against Edje.
-#  EDJE_CC_EXECUTABLE - full path to the `edje_cc' program.
-#
-# Copyright (C) 2012 Intel Corporation. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1.  Redistributions of source code must retain the above copyright
-#     notice, this list of conditions and the following disclaimer.
-# 2.  Redistributions in binary form must reproduce the above copyright
-#     notice, this list of conditions and the following disclaimer in the
-#     documentation and/or other materials provided with the distribution.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND ITS CONTRIBUTORS ``AS
-# IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR ITS
-# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
-# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
-# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-INCLUDE(EFLHelpers)
-
-FIND_EFL_LIBRARY(EDJE
-    HEADERS Edje.h
-    HEADER_PREFIXES edje-1
-    LIBRARY edje
-)
-
-FIND_PROGRAM(EDJE_CC_EXECUTABLE
-    NAMES edje_cc
-)
-
-INCLUDE(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(Edje REQUIRED_VARS EDJE_INCLUDE_DIRS EDJE_LIBRARIES EDJE_CC_EXECUTABLE
-                                       VERSION_VAR   EDJE_VERSION)
diff --git a/Source/cmake/FindEeze.cmake b/Source/cmake/FindEeze.cmake
deleted file mode 100644 (file)
index 93edc48..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-# - Try to find Eeze
-# Once done, this will define
-#
-#  EEZE_FOUND - system has Eeze installed.
-#  EEZE_INCLUDE_DIRS - directories which contain the Eeze headers.
-#  EEZE_LIBRARIES - libraries required to link against Eeze.
-#
-# Copyright (C) 2012 Intel Corporation. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1.  Redistributions of source code must retain the above copyright
-#     notice, this list of conditions and the following disclaimer.
-# 2.  Redistributions in binary form must reproduce the above copyright
-#     notice, this list of conditions and the following disclaimer in the
-#     documentation and/or other materials provided with the distribution.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND ITS CONTRIBUTORS ``AS
-# IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR ITS
-# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
-# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
-# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-INCLUDE(EFLHelpers)
-
-FIND_EFL_LIBRARY(EEZE
-    HEADERS Eeze.h
-    HEADER_PREFIXES eeze-1
-    LIBRARY eeze
-)
-
-INCLUDE(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(Eeze REQUIRED_VARS EEZE_INCLUDE_DIRS EEZE_LIBRARIES
-                                       VERSION_VAR   EEZE_VERSION)
diff --git a/Source/cmake/FindEfreet.cmake b/Source/cmake/FindEfreet.cmake
deleted file mode 100644 (file)
index 22d704b..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-# - Try to find Efreet
-# Once done, this will define
-#
-#  EFREET_FOUND - system has Efreet installed.
-#  EFREET_INCLUDE_DIRS - directories which contain the Efreet headers.
-#  EFREET_LIBRARIES - libraries required to link against Efreet.
-#
-# Copyright (C) 2012 Intel Corporation. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1.  Redistributions of source code must retain the above copyright
-#     notice, this list of conditions and the following disclaimer.
-# 2.  Redistributions in binary form must reproduce the above copyright
-#     notice, this list of conditions and the following disclaimer in the
-#     documentation and/or other materials provided with the distribution.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND ITS CONTRIBUTORS ``AS
-# IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR ITS
-# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
-# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
-# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-INCLUDE(EFLHelpers)
-
-FIND_EFL_LIBRARY(EFREET
-    HEADERS Efreet.h
-    HEADER_PREFIXES efreet-1
-    LIBRARY efreet
-)
-
-INCLUDE(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(Efreet REQUIRED_VARS EFREET_INCLUDE_DIRS EFREET_LIBRARIES
-                                         VERSION_VAR   EFREET_VERSION)
diff --git a/Source/cmake/FindEina.cmake b/Source/cmake/FindEina.cmake
deleted file mode 100644 (file)
index 5ac9480..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-# - Try to find Eina
-# Once done, this will define
-#
-#  EINA_FOUND - system has Eina installed.
-#  EINA_INCLUDE_DIRS - directories which contain the Eina headers.
-#  EINA_LIBRARIES - libraries required to link against Eina.
-#
-# Copyright (C) 2012 Intel Corporation. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1.  Redistributions of source code must retain the above copyright
-#     notice, this list of conditions and the following disclaimer.
-# 2.  Redistributions in binary form must reproduce the above copyright
-#     notice, this list of conditions and the following disclaimer in the
-#     documentation and/or other materials provided with the distribution.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND ITS CONTRIBUTORS ``AS
-# IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR ITS
-# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
-# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
-# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-INCLUDE(EFLHelpers)
-
-FIND_EFL_LIBRARY(EINA
-    HEADERS Eina.h eina_main.h
-    HEADER_PREFIXES eina-1 eina-1/eina
-    LIBRARY eina
-)
-
-INCLUDE(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(Eina REQUIRED_VARS EINA_INCLUDE_DIRS EINA_LIBRARIES
-                                       VERSION_VAR   EINA_VERSION)
diff --git a/Source/cmake/FindEvas.cmake b/Source/cmake/FindEvas.cmake
deleted file mode 100644 (file)
index ce75eae..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-# - Try to find Evas
-# Once done, this will define
-#
-#  EVAS_FOUND - system has Evas installed.
-#  EVAS_INCLUDE_DIRS - directories which contain the Evas headers.
-#  EVAS_LIBRARIES - libraries required to link against Evas.
-#
-# Copyright (C) 2012 Intel Corporation. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1.  Redistributions of source code must retain the above copyright
-#     notice, this list of conditions and the following disclaimer.
-# 2.  Redistributions in binary form must reproduce the above copyright
-#     notice, this list of conditions and the following disclaimer in the
-#     documentation and/or other materials provided with the distribution.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND ITS CONTRIBUTORS ``AS
-# IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR ITS
-# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
-# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
-# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-INCLUDE(EFLHelpers)
-
-FIND_EFL_LIBRARY(EVAS
-    HEADERS Evas.h
-    HEADER_PREFIXES evas-1
-    LIBRARY evas
-)
-
-INCLUDE(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(Evas REQUIRED_VARS EVAS_INCLUDE_DIRS EVAS_LIBRARIES
-                                       VERSION_VAR   EVAS_VERSION)
diff --git a/Source/cmake/FindGIO.cmake b/Source/cmake/FindGIO.cmake
new file mode 100644 (file)
index 0000000..c32a3bf
--- /dev/null
@@ -0,0 +1,27 @@
+# - Try to find GIO 2.0
+# Once done, this will define
+#
+#  GIO_FOUND - system has GIO
+#  GIO_INCLUDE_DIRS - the GIO include directories
+#  GIO_LIBRARIES - link these to use GIO
+
+include(LibFindMacros)
+
+# Dependencies
+libfind_package(GIO Glib)
+
+# Use pkg-config to get hints about paths
+libfind_pkg_check_modules(GIO_PKGCONF gio-2.0)
+
+# Find the library
+find_library(GIO_LIBRARY
+  NAMES gio-2.0
+  PATHS ${GIO_PKGCONF_LIBRARY_DIRS}
+)
+
+# Set the include dir variables and the libraries and let libfind_process do the rest.
+# NOTE: Singular variables for this library, plural for libraries this this lib depends on.
+set(GIO_PROCESS_INCLUDES Glib_INCLUDE_DIRS)
+set(GIO_PROCESS_LIBS GIO_LIBRARY Glib_LIBRARIES)
+libfind_process(GIO)
+
diff --git a/Source/cmake/FindGLIB.cmake b/Source/cmake/FindGLIB.cmake
deleted file mode 100644 (file)
index 86bf8c0..0000000
+++ /dev/null
@@ -1,102 +0,0 @@
-# - Try to find Glib and its components (gio, gobject etc)
-# Once done, this will define
-#
-#  GLIB_FOUND - system has Glib
-#  GLIB_INCLUDE_DIRS - the Glib include directories
-#  GLIB_LIBRARIES - link these to use Glib
-#
-# Optionally, the COMPONENTS keyword can be passed to FIND_PACKAGE()
-# and Glib components can be looked for.  Currently, the following
-# components can be used, and they define the following variables if
-# found:
-#
-#  gio:             GLIB_GIO_LIBRARIES
-#  gobject:         GLIB_GOBJECT_LIBRARIES
-#  gmodule:         GLIB_GMODULE_LIBRARIES
-#  gthread:         GLIB_GTHREAD_LIBRARIES
-#
-# Note that the respective _INCLUDE_DIR variables are not set, since
-# all headers are in the same directory as GLIB_INCLUDE_DIRS.
-#
-# Copyright (C) 2012 Raphael Kubo da Costa <rakuco@webkit.org>
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1.  Redistributions of source code must retain the above copyright
-#     notice, this list of conditions and the following disclaimer.
-# 2.  Redistributions in binary form must reproduce the above copyright
-#     notice, this list of conditions and the following disclaimer in the
-#     documentation and/or other materials provided with the distribution.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND ITS CONTRIBUTORS ``AS
-# IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR ITS
-# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
-# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
-# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-FIND_PACKAGE(PkgConfig)
-PKG_CHECK_MODULES(PC_GLIB QUIET glib-2.0)
-
-FIND_LIBRARY(GLIB_LIBRARIES
-    NAMES glib-2.0
-    HINTS ${PC_GLIB_LIBDIR}
-          ${PC_GLIB_LIBRARY_DIRS}
-)
-
-# Files in glib's main include path may include glibconfig.h, which,
-# for some odd reason, is normally in $LIBDIR/glib-2.0/include.
-GET_FILENAME_COMPONENT(_GLIB_LIBRARY_DIR ${GLIB_LIBRARIES} PATH)
-FIND_PATH(GLIBCONFIG_INCLUDE_DIR
-    NAMES glibconfig.h
-    HINTS ${PC_LIBDIR} ${PC_LIBRARY_DIRS} ${_GLIB_LIBRARY_DIR}
-    PATH_SUFFIXES glib-2.0/include
-)
-
-FIND_PATH(GLIB_INCLUDE_DIR
-    NAMES glib.h
-    HINTS ${PC_GLIB_INCLUDEDIR}
-          ${PC_GLIB_INCLUDE_DIRS}
-    PATH_SUFFIXES glib-2.0
-)
-
-SET(GLIB_INCLUDE_DIRS ${GLIB_INCLUDE_DIR} ${GLIBCONFIG_INCLUDE_DIR})
-
-# Version detection
-FILE(READ "${GLIBCONFIG_INCLUDE_DIR}/glibconfig.h" GLIBCONFIG_H_CONTENTS)
-STRING(REGEX MATCH "#define GLIB_MAJOR_VERSION ([0-9]+)" _dummy "${GLIBCONFIG_H_CONTENTS}")
-SET(GLIB_VERSION_MAJOR "${CMAKE_MATCH_1}")
-STRING(REGEX MATCH "#define GLIB_MINOR_VERSION ([0-9]+)" _dummy "${GLIBCONFIG_H_CONTENTS}")
-SET(GLIB_VERSION_MINOR "${CMAKE_MATCH_1}")
-STRING(REGEX MATCH "#define GLIB_MICRO_VERSION ([0-9]+)" _dummy "${GLIBCONFIG_H_CONTENTS}")
-SET(GLIB_VERSION_MICRO "${CMAKE_MATCH_1}")
-SET(GLIB_VERSION "${GLIB_VERSION_MAJOR}.${GLIB_VERSION_MINOR}.${GLIB_VERSION_MICRO}")
-
-# Additional Glib components.  We only look for libraries, as not all of them
-# have corresponding headers and all headers are installed alongside the main
-# glib ones.
-FOREACH (_component ${GLIB_FIND_COMPONENTS})
-    IF (${_component} STREQUAL "gio")
-        FIND_LIBRARY(GLIB_GIO_LIBRARIES NAMES gio-2.0 HINTS ${_GLIB_LIBRARY_DIR})
-        SET(ADDITIONAL_REQUIRED_VARS ${ADDITIONAL_REQUIRED_VARS} GLIB_GIO_LIBRARIES)
-    ELSEIF (${_component} STREQUAL "gobject")
-        FIND_LIBRARY(GLIB_GOBJECT_LIBRARIES NAMES gobject-2.0 HINTS ${_GLIB_LIBRARY_DIR})
-        SET(ADDITIONAL_REQUIRED_VARS ${ADDITIONAL_REQUIRED_VARS} GLIB_GOBJECT_LIBRARIES)
-    ELSEIF (${_component} STREQUAL "gmodule")
-        FIND_LIBRARY(GLIB_GMODULE_LIBRARIES NAMES gmodule-2.0 HINTS ${_GLIB_LIBRARY_DIR})
-        SET(ADDITIONAL_REQUIRED_VARS "${ADDITIONAL_REQUIRED_VARS} GLIB_GMODULE_LIBRARIES")
-    ELSEIF (${_component} STREQUAL "gthread")
-        FIND_LIBRARY(GLIB_GTHREAD_LIBRARIES NAMES gthread-2.0 HINTS ${_GLIB_LIBRARY_DIR})
-        SET(ADDITIONAL_REQUIRED_VARS ${ADDITIONAL_REQUIRED_VARS} GLIB_GTHREAD_LIBRARIES)
-    ENDIF ()
-ENDFOREACH ()
-
-INCLUDE(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(GLIB REQUIRED_VARS GLIB_INCLUDE_DIRS GLIB_LIBRARIES ${ADDITIONAL_REQUIRED_VARS}
-                                       VERSION_VAR   GLIB_VERSION)
diff --git a/Source/cmake/FindGlib.cmake b/Source/cmake/FindGlib.cmake
new file mode 100644 (file)
index 0000000..d4b73af
--- /dev/null
@@ -0,0 +1,43 @@
+# - Try to find Glib-2.0 (with gobject)
+# Once done, this will define
+#
+#  Glib_FOUND - system has Glib
+#  Glib_INCLUDE_DIRS - the Glib include directories
+#  Glib_LIBRARIES - link these to use Glib
+
+include(LibFindMacros)
+
+# Use pkg-config to get hints about paths
+libfind_pkg_check_modules(Glib_PKGCONF glib-2.0)
+
+# Main include dir
+find_path(Glib_INCLUDE_DIR
+  NAMES glib.h
+  PATHS ${Glib_PKGCONF_INCLUDE_DIRS}
+  PATH_SUFFIXES glib-2.0
+)
+
+# Glib-related libraries also use a separate config header, which is in lib dir
+find_path(GlibConfig_INCLUDE_DIR
+  NAMES glibconfig.h
+  PATHS ${Glib_PKGCONF_INCLUDE_DIRS} /usr
+  PATH_SUFFIXES lib/glib-2.0/include
+)
+
+# Finally the library itself
+find_library(Glib_LIBRARY
+  NAMES glib-2.0
+  PATHS ${Glib_PKGCONF_LIBRARY_DIRS}
+)
+find_library(Gobject_LIBRARY
+  NAMES gobject-2.0
+  PATHS ${Glib_PKGCONF_LIBRARY_DIRS}
+)
+
+# Set the include dir variables and the libraries and let libfind_process do the rest.
+# NOTE: Singular variables for this library, plural for libraries this this lib depends on.
+set(Glib_PROCESS_INCLUDES Glib_INCLUDE_DIR GlibConfig_INCLUDE_DIR)
+set(Glib_PROCESS_LIBS Glib_LIBRARY Gobject_LIBRARY)
+libfind_process(Glib)
+
+
diff --git a/Source/cmake/FindGthread.cmake b/Source/cmake/FindGthread.cmake
new file mode 100644 (file)
index 0000000..281e657
--- /dev/null
@@ -0,0 +1,4 @@
+# Find include and libraries for Gthread library
+
+INCLUDE(FindPkgConfig)
+PKG_CHECK_MODULES (Gthread REQUIRED gthread-2.0>=2.20.0)
diff --git a/Source/cmake/FindLibSoup.cmake b/Source/cmake/FindLibSoup.cmake
deleted file mode 100644 (file)
index cb8e4e2..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-# - Try to find LibSoup 2.4
-# This module defines the following variables:
-#
-#  LIBSOUP_FOUND - LibSoup 2.4 was found
-#  LIBSOUP_INCLUDE_DIRS - the LibSoup 2.4 include directories
-#  LIBSOUP_LIBRARIES - link these to use LibSoup 2.4
-#
-# Copyright (C) 2012 Raphael Kubo da Costa <rakuco@webkit.org>
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1.  Redistributions of source code must retain the above copyright
-#     notice, this list of conditions and the following disclaimer.
-# 2.  Redistributions in binary form must reproduce the above copyright
-#     notice, this list of conditions and the following disclaimer in the
-#     documentation and/or other materials provided with the distribution.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND ITS CONTRIBUTORS ``AS
-# IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR ITS
-# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
-# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
-# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-# LibSoup does not provide an easy way to retrieve its version other than its
-# .pc file, so we need to rely on PC_LIBSOUP_VERSION and REQUIRE the .pc file
-# to be found.
-FIND_PACKAGE(PkgConfig)
-PKG_CHECK_MODULES(PC_LIBSOUP REQUIRED QUIET libsoup-2.4)
-
-FIND_PATH(LIBSOUP_INCLUDE_DIRS
-    NAMES libsoup/soup.h
-    HINTS ${PC_LIBSOUP_INCLUDEDIR}
-          ${PC_LIBSOUP_INCLUDE_DIRS}
-    PATH_SUFFIXES libsoup-2.4
-)
-
-FIND_LIBRARY(LIBSOUP_LIBRARIES
-    NAMES soup-2.4
-    HINTS ${PC_LIBSOUP_LIBDIR}
-          ${PC_LIBSOUP_LIBRARY_DIRS}
-)
-
-INCLUDE(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibSoup REQUIRED_VARS LIBSOUP_INCLUDE_DIRS LIBSOUP_LIBRARIES
-                                          VERSION_VAR   PC_LIBSOUP_VERSION)
diff --git a/Source/cmake/FindLibSoup2.cmake b/Source/cmake/FindLibSoup2.cmake
new file mode 100644 (file)
index 0000000..e023a63
--- /dev/null
@@ -0,0 +1,191 @@
+# - Try to find libsoup
+# Find libsoup headers, libraries and the answer to all questions.
+#
+#  LIBSOUP2_FOUND                True if libsoup2 got found
+#  LIBSOUP2_INCLUDE_DIRS         Location of libsoup2 headers 
+#  LIBSOUP2_LIBRARIES            List of libaries to use libsoup2
+#  LIBSOUP2_LIBRARY_DIRS         Location of libsoup2 library
+#
+#  LIBSOUP22_FOUND               True if libsoup2.2 got found
+#  LIBSOUP22_INCLUDE_DIRS        Location of libsoup2.2 headers 
+#  LIBSOUP22_LIBRARIES           List of libaries to use libsoup2.2
+#  LIBSOUP22_LIBRARY_DIRS        Location of libsoup2.2 library
+#
+#  LIBSOUP24_FOUND               True if libsoup2.4 got found
+#  LIBSOUP24_INCLUDE_DIRS        Location of libsoup2.4 headers 
+#  LIBSOUP24_LIBRARIES           List of libaries to use libsoup2.4
+#  LIBSOUP24_LIBRARY_DIRS        Location of libsoup2.4 library
+#
+#  Set LIBSOUP2_MIN_VERSION to find libsoup2.2 or libsoup2.4 if only 
+#  one of both libraries is supported
+#
+#  Don't use LIBSOUP2_MIN_VERSION if you want to support 
+#  libsoup2.2 and libsoup2.4. 
+#  Instead use LIBSPOUP22_MIN_VERSION and LIBSPOUP24_MIN_VERSION.
+#
+#  Set LIBSPOUP22_MIN_VERSION to find libsoup2.2 which version is
+#  greater than LIBSPOUP22_MIN_VERSION
+#
+#  Set LIBSPOUP24_MIN_VERSION to find libsoup2.4 which version is
+#  greater than LIBSPOUP24_MIN_VERSION
+#
+#  WARNING: It is not possible to set LIBSPOUP22_MIN_VERSION 
+#  and support any version of libsoup2.4 at the same time.
+#  In this situation you have to set LIBSPOUP24_MIN_VERSION also.
+#  The same applies to LIBSPOUP24_MIN_VERSION and libsoup2.2.
+#
+#  Copyright (c) 2007 Daniel Gollub <gollub@b1-systems.de>
+#  Copyright (c) 2008 Bjoern Ricks  <bjoern.ricks@gmail.com>
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 
+# 1. Redistributions of source code must retain the copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+# 3. The name of the author may not be used to endorse or promote products
+#    derived from this software without specific prior written permission.
+# 
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+
+INCLUDE( FindPkgConfig )
+
+IF ( LibSoup2_FIND_VERSION AND NOT LIBSOUP2_MIN_VERSION AND NOT LIBSOUP24_MIN_VERSION )
+       SET( LIBSOUP2_MIN_VERSION "${LibSoup2_FIND_VERSION}" )
+       SET( LIBSOUP24_MIN_VERSION "${LibSoup2_FIND_VERSION}" )
+ENDIF ( LibSoup2_FIND_VERSION AND NOT LIBSOUP2_MIN_VERSION AND NOT LIBSOUP24_MIN_VERSION )
+
+IF ( LibSoup2_FIND_REQUIRED )
+       SET( _pkgconfig_REQUIRED "REQUIRED" )
+ELSE( LibSoup2_FIND_REQUIRED )
+       SET( _pkgconfig_REQUIRED "" )
+ENDIF ( LibSoup2_FIND_REQUIRED )
+
+IF ( LIBSOUP2_MIN_VERSION )
+       STRING(REGEX REPLACE "^(2)(\\.)([0-9]*)(\\.?)(.*)" "\\3" LIBSOUP2_VERSION_MINOR "${LIBSOUP2_MIN_VERSION}")
+       IF ( LIBSOUP2_VERSION_MINOR EQUAL "2" )
+               SET( LIBSOUP22_MIN_VERSION "${LIBSOUP2_MIN_VERSION}" )
+       ELSE ( LIBSOUP2_VERSION_MINOR EQUAL "2" )
+               SET( LIBSOUP24_MIN_VERSION "${LIBSOUP2_MIN_VERSION}" )
+       ENDIF ( LIBSOUP2_VERSION_MINOR EQUAL "2" )
+ENDIF ( LIBSOUP2_MIN_VERSION )
+
+# try to find libsoup2.2>=LIBSOUP22_MIN_VERSION
+IF ( LIBSOUP22_MIN_VERSION )
+       PKG_SEARCH_MODULE( LIBSOUP22 libsoup-2.2>=${LIBSOUP22_MIN_VERSION} libsoup2>=${LIBSOUP22_MIN_VERSION} )
+ENDIF ( LIBSOUP22_MIN_VERSION )
+
+# try to find libsoup2.4>=LIBSOUP24_MIN_VERSION
+IF ( LIBSOUP24_MIN_VERSION )
+       PKG_SEARCH_MODULE( LIBSOUP24 libsoup-2.4>=${LIBSOUP24_MIN_VERSION} libsoup2>=${LIBSOUP24_MIN_VERSION} )
+ENDIF ( LIBSOUP24_MIN_VERSION )        
+
+# try to find any version of libsoup2.4 if LIBSOUP22_MIN_VERSION is not set
+IF ( NOT LIBSOUP24_FOUND AND NOT LIBSOUP22_MIN_VERSION AND NOT LIBSOUP24_MIN_VERSION )
+       PKG_SEARCH_MODULE( LIBSOUP24 libsoup-2.4 libsoup2 )
+ENDIF ( NOT LIBSOUP24_FOUND AND NOT LIBSOUP22_MIN_VERSION AND NOT LIBSOUP24_MIN_VERSION )
+
+# try to find any version of libsoup2.2 if LIBSOUP24_MIN_VERSION is not set
+IF ( NOT LIBSOUP22_FOUND AND NOT LIBSOUP24_MIN_VERSION AND NOT LIBSOUP24_MIN_VERSION )
+       PKG_SEARCH_MODULE( LIBSOUP22 libsoup-2.2 libsoup2 )
+ENDIF ( NOT LIBSOUP22_FOUND AND NOT LIBSOUP24_MIN_VERSION AND NOT LIBSOUP24_MIN_VERSION )
+
+# set LIBSOUP2_ variables
+IF ( LIBSOUP24_FOUND )
+       # prefer libsoup2.4 to libsoup2.2 if both are found
+       SET( LIBSOUP2_FOUND ${LIBSOUP24_FOUND} CACHE INTERNAL "" )
+       SET( LIBSOUP2_INCLUDE_DIRS ${LIBSOUP24_INCLUDE_DIRS} CACHE INTERNAL "" )
+       SET( LIBSOUP2_LIBRARIES ${LIBSOUP24_LIBRARIES} CACHE INTERNAL "" )
+       SET( LIBSOUP2_LIBRARY_DIRS ${LIBSOUP24_LIBRARY_DIRS} CACHE INTERNAL "" )
+       SET( LIBSOUP2_VERSION ${LIBSOUP24_VERSION} CACHE INTERNAL "" )
+ELSEIF ( LIBSOUP22_FOUND )
+       SET( LIBSOUP2_FOUND ${LIBSOUP22_FOUND} CACHE INTERNAL "" )
+       SET( LIBSOUP2_INCLUDE_DIRS ${LIBSOUP22_INCLUDE_DIRS} CACHE INTERNAL "" )
+       SET( LIBSOUP2_LIBRARIES ${LIBSOUP22_LIBRARIES} CACHE INTERNAL "" )
+       SET( LIBSOUP2_LIBRARY_DIRS ${LIBSOUP22_LIBRARY_DIRS} CACHE INTERNAL "" )
+       SET( LIBSOUP2_VERSION ${LIBSOUP22_VERSION} CACHE INTERNAL "" )
+ELSEIF( PKG_CONFIG_FOUND AND LibSoup2_FIND_REQUIRED )
+       # raise an error if both libs are not found 
+       # and FIND_PACKAGE( LibSoup2 REQUIRED ) was called
+       MESSAGE( FATAL_ERROR "package libsoup2 not found" )
+ENDIF ( LIBSOUP24_FOUND )
+
+IF( NOT LIBSOUP2_FOUND AND NOT PKG_CONFIG_FOUND )
+       # WARNING:
+       # This case is executed if pkg-config isn't installed.
+       # Currently in this case it is only checked if libsoup2.2 is available.
+       # Therefore please don't use this cmake module without pkg-config!
+       FIND_PATH( _libsoup2_include_DIR libsoup/soup.h PATH_SUFFIXES libsoup libsoup-2.2 )
+       FIND_LIBRARY( _libsoup2_LIBRARY soup-2.2)
+
+       IF ( _libsoup2_include_DIR AND _libsoup2_LIBRARY )
+               SET ( _libsoup2_FOUND TRUE )
+       ENDIF ( _libsoup2_include_DIR AND _libsoup2_LIBRARY )
+
+       IF ( _libsoup2_FOUND )
+               SET ( LIBSOUP2_INCLUDE_DIRS ${_libsoup2_include_DIR} )
+               SET ( LIBSOUP2_LIBRARIES ${_libsoup2_LIBRARY} )
+       
+               # find requited glib2
+               IF( NOT GLIB2_FOUND )
+                       FIND_PACKAGE( GLIB2 REQUIRED )
+                       IF ( GLIB2_FOUND )
+                               SET ( LIBSOUP2_INCLUDE_DIRS ${LIBSOUP2_INCLUDE_DIRS} ${GLIB2_INCLUDE_DIRS} )
+                               SET ( LIBSOUP2_LIBRARIES ${LIBSOUP2_LIBRARIES} ${GLIB2_LIBRARIES} )
+                       ENDIF ( GLIB2_FOUND )
+               ENDIF( NOT GLIB2_FOUND )
+               
+               # find required libxml2
+               IF( NOT LIBXML2_FOUND )
+                       FIND_PACKAGE( LibXml2 REQUIRED )
+                       IF ( LIBXML2_FOUND )
+                               SET ( LIBSOUP2_INCLUDE_DIRS ${LIBSOUP2_INCLUDE_DIRS} ${LIBXML2_INCLUDE_DIRS} )
+                               SET ( LIBSOUP2_LIBRARIES ${LIBSOUP2_LIBRARIES} ${LIBXML2_LIBRARIES} )
+                       ENDIF( LIBXML2_FOUND )
+               ENDIF( NOT LIBXML2_FOUND )
+               
+               # find required gnutls
+               IF( NOT GNUTLS_FOUND )
+                       FIND_PACKAGE( GNUTLS REQUIRED )
+                       IF ( GNUTLS_FOUND )
+                               SET ( LIBSOUP2_INCLUDE_DIRS ${LIBSOUP2_INCLUDE_DIRS} ${GNUTLS_INCLUDE_DIRS} )
+                               SET ( LIBSOUP2_LIBRARIES ${LIBSOUP2_LIBRARIES} ${GNUTLS_LIBRARIES} )
+                       ENDIF( GNUTLS_FOUND )
+               ENDIF( NOT GNUTLS_FOUND )
+       ENDIF ( _libsoup2_FOUND )
+
+       MARK_AS_ADVANCED( _libsoup2_include_DIR  _libsoup2_LIBRARY )
+
+       # Report results
+       IF ( LIBSOUP2_LIBRARIES AND LIBSOUP2_INCLUDE_DIRS AND _libsoup2_FOUND ) 
+               SET( LIBSOUP2_FOUND 1 )
+               IF ( NOT LibSoup2_FIND_QUIETLY )
+                       MESSAGE( STATUS "Found libsoup2: ${_libsoup2_LIBRARY}" )
+               ENDIF ( NOT LibSoup2_FIND_QUIETLY )
+       ELSE ( LIBSOUP2_LIBRARIES AND LIBSOUP_INCLUDE_DIRS AND _libsoup2_FOUND )        
+               IF ( LibSoup2_FIND_REQUIRED )
+                       MESSAGE( SEND_ERROR "Could NOT find libsoup2" )
+               ELSE ( LibSoup2_FIND_REQUIRED )
+                       IF ( NOT LibSoup2_FIND_QUIETLY )
+                               MESSAGE( STATUS "Could NOT find libsoup2" )     
+                       ENDIF ( NOT LibSoup2_FIND_QUIETLY )
+               ENDIF ( LibSoup2_FIND_REQUIRED )
+       ENDIF ( LIBSOUP2_LIBRARIES AND LIBSOUP2_INCLUDE_DIRS AND _libsoup2_FOUND )
+ENDIF( NOT LIBSOUP2_FOUND AND NOT PKG_CONFIG_FOUND )
+
+# Hide advanced variables from CMake GUIs
+MARK_AS_ADVANCED( LIBSOUP2_LIBRARIES LIBSOUP2_INCLUDE_DIRS )
+
old mode 100755 (executable)
new mode 100644 (file)
index bdfee30..246ecab
@@ -22,6 +22,7 @@ SET(ALL_FONT_BACKENDS freetype pango)
 SET(FONT_BACKEND "freetype" CACHE STRING "choose which network backend to use (one of ${ALL_FONT_BACKENDS})")
 
 FIND_PACKAGE(Cairo 1.10 REQUIRED)
+FIND_PACKAGE(EFL REQUIRED)
 FIND_PACKAGE(Fontconfig 2.8.0 REQUIRED)
 FIND_PACKAGE(Sqlite REQUIRED)
 FIND_PACKAGE(LibXml2 2.6 REQUIRED)
@@ -32,8 +33,9 @@ FIND_PACKAGE(JPEG REQUIRED)
 FIND_PACKAGE(PNG REQUIRED)
 FIND_PACKAGE(ZLIB REQUIRED)
 
-FIND_PACKAGE(GLIB 2.31.8 REQUIRED COMPONENTS gio gobject gthread)
-FIND_PACKAGE(LibSoup 2.39.4.1 REQUIRED)
+FIND_PACKAGE(Glib 2.31.8 REQUIRED)
+FIND_PACKAGE(Gthread REQUIRED)
+FIND_PACKAGE(LibSoup2 2.39.4.1 REQUIRED)
 SET(ENABLE_GLIB_SUPPORT ON)
 
 SET(WTF_USE_SOUP 1)
@@ -113,18 +115,14 @@ WEBKIT_OPTION_END()
 
 OPTION(ENABLE_ECORE_X "Enable Ecore_X specific usage (cursor, bell)" ON)
 IF (ENABLE_ECORE_X)
-    LIST(APPEND ECORE_ADDITIONAL_COMPONENTS X)
-    ADD_DEFINITIONS(-DHAVE_ECORE_X)
+    IF (ECORE_X_FOUND)
+        MESSAGE(STATUS "Using Ecore-X to provide extended support.")
+        ADD_DEFINITIONS(-DHAVE_ECORE_X)
+    ELSE ()
+        MESSAGE(ERROR "Requested Ecore-X but it was not found!")
+    ENDIF ()
 ENDIF ()
 
-FIND_PACKAGE(Eina 1.2 REQUIRED)
-FIND_PACKAGE(Evas 1.0 REQUIRED)
-FIND_PACKAGE(Ecore 1.2 COMPONENTS Evas File Input ${ECORE_ADDITIONAL_COMPONENTS})
-FIND_PACKAGE(Edje 1.0 REQUIRED)
-FIND_PACKAGE(Eeze 1.2 REQUIRED)
-FIND_PACKAGE(Efreet 1.0 REQUIRED)
-FIND_PACKAGE(E_DBus 1.1 COMPONENTS EUKit)
-
 IF (FONT_BACKEND STREQUAL "freetype")
   FIND_PACKAGE(Freetype REQUIRED)
   FIND_PACKAGE(HarfBuzz REQUIRED)
index fae9f7d..febd281 100644 (file)
@@ -29,6 +29,7 @@ SET(ALL_FONT_BACKENDS freetype pango)
 SET(FONT_BACKEND "freetype" CACHE STRING "choose which font backend to use (one of ${ALL_FONT_BACKENDS})")
 
 FIND_PACKAGE(Cairo 1.10 REQUIRED)
+FIND_PACKAGE(EFL REQUIRED)
 FIND_PACKAGE(Fontconfig 2.8.0 REQUIRED)
 FIND_PACKAGE(Sqlite REQUIRED)
 FIND_PACKAGE(LibXml2 2.6 REQUIRED)
@@ -39,8 +40,9 @@ FIND_PACKAGE(JPEG REQUIRED)
 FIND_PACKAGE(PNG REQUIRED)
 FIND_PACKAGE(ZLIB REQUIRED)
 
-FIND_PACKAGE(GLIB 2.31.8 REQUIRED COMPONENTS gio gobject gthread)
-FIND_PACKAGE(LibSoup 2.37.92 REQUIRED)
+FIND_PACKAGE(Glib 2.31.8 REQUIRED)
+FIND_PACKAGE(Gthread REQUIRED)
+FIND_PACKAGE(LibSoup2 2.37.92 REQUIRED)
 SET(ENABLE_GLIB_SUPPORT ON)
 
 SET(WTF_USE_SOUP 1)
@@ -363,18 +365,14 @@ ENDIF()
 
 OPTION(ENABLE_ECORE_X "Enable Ecore_X specific usage (cursor, bell)" ON)
 IF (ENABLE_ECORE_X)
-    LIST(APPEND ECORE_ADDITIONAL_COMPONENTS X)
-    ADD_DEFINITIONS(-DHAVE_ECORE_X)
+    IF (ECORE_X_FOUND)
+        MESSAGE(STATUS "Using Ecore-X to provide extended support.")
+        ADD_DEFINITIONS(-DHAVE_ECORE_X)
+    ELSE ()
+        MESSAGE(ERROR "Requested Ecore-X but it was not found!")
+    ENDIF ()
 ENDIF ()
 
-FIND_PACKAGE(Eina 1.2 REQUIRED)
-FIND_PACKAGE(Evas 1.0 REQUIRED)
-FIND_PACKAGE(Ecore 1.2 COMPONENTS Evas File Input ${ECORE_ADDITIONAL_COMPONENTS})
-FIND_PACKAGE(Edje 1.0 REQUIRED)
-FIND_PACKAGE(Eeze 1.2 REQUIRED)
-#FIND_PACKAGE(Efreet 1.0 REQUIRED)
-FIND_PACKAGE(E_DBus 1.1 COMPONENTS EUKit)
-
 IF (ENABLE_TIZEN_SCREEN_READER)
     FIND_PACKAGE(TTS REQUIRED)
     ADD_DEFINITIONS(-DENABLE_TIZEN_SCREEN_READER=1)
index 548924b..4395c93 100644 (file)
@@ -3,8 +3,6 @@ IF (ENABLE_WEBKIT2 AND ENABLE_TIZEN_WEBKIT2_EFL_WTR)
 ENDIF ()
 
 IF ("${PORT}" STREQUAL "Efl")
-    ADD_SUBDIRECTORY(EWebLauncher/ControlTheme)
-
     IF (ENABLE_WEBKIT)
         ADD_SUBDIRECTORY(DumpRenderTree/efl)
         ADD_SUBDIRECTORY(EWebLauncher)
old mode 100755 (executable)
new mode 100644 (file)
index 7e07e59..4bd7226
@@ -40,19 +40,16 @@ SET(DumpRenderTree_LIBRARIES
     ${WebKit_LIBRARY_NAME}
     ${WTF_LIBRARY_NAME}
     ${CAIRO_LIBRARIES}
-    ${ECORE_LIBRARIES}
-    ${ECORE_EVAS_LIBRARIES}
-    ${ECORE_FILE_LIBRARIES}
-    ${ECORE_INPUT_LIBRARIES}
+    ${ECORE_X_LIBRARIES}
     ${EDJE_LIBRARIES}
-    ${EINA_LIBRARIES}
+    ${EFLDEPS_LIBRARIES}
     ${EVAS_LIBRARIES}
     ${FONTCONFIG_LIBRARIES}
     ${LIBXML2_LIBRARIES}
     ${LIBXSLT_LIBRARIES}
     ${SQLITE_LIBRARIES}
-    ${GLIB_LIBRARIES}
-    ${LIBSOUP_LIBRARIES}
+    ${Glib_LIBRARIES}
+    ${LIBSOUP24_LIBRARIES}
 #if ENABLE(TIZEN_WEBKIT_EFL_DRT)
     ${X11_LIBRARIES}
     ${PANGO_LIBRARIES}
@@ -131,17 +128,20 @@ SET(DumpRenderTree_INCLUDE_DIRECTORIES
     ${WEBCORE_DIR}/bindings/js
     ${WEBCORE_DIR}/testing/js
     ${CAIRO_INCLUDE_DIRS}
-    ${ECORE_INCLUDE_DIRS}
-    ${ECORE_INCLUDE_DIRS}
-    ${ECORE_EVAS_INCLUDE_DIRS}
-    ${ECORE_FILE_INCLUDE_DIRS}
-    ${ECORE_INPUT_INCLUDE_DIRS}
     ${EDJE_INCLUDE_DIRS}
-    ${EINA_INCLUDE_DIRS}
+    ${EFLDEPS_INCLUDE_DIRS}
     ${EVAS_INCLUDE_DIRS}
     ${FONTCONFIG_INCLUDE_DIR}
-    ${GLIB_INCLUDE_DIRS}
-    ${LIBSOUP_INCLUDE_DIRS}
+    ${Glib_INCLUDE_DIRS}
+    ${LIBSOUP24_INCLUDE_DIRS}
+)
+
+SET(DumpRenderTree_LINK_FLAGS
+    ${ECORE_X_LDFLAGS}
+    ${EDJE_LDFLAGS}
+    ${EFLDEPS_LDFLAGS}
+    ${EVAS_LDFLAGS}
+    ${LIBSOUP24_LDFLAGS}
 )
 
 # FIXME: DOWNLOADED_FONTS_DIR should not hardcode the directory
@@ -168,8 +168,10 @@ INCLUDE_DIRECTORIES(${DumpRenderTree_INCLUDE_DIRECTORIES})
 
 ADD_EXECUTABLE(DumpRenderTree ${DumpRenderTree_SOURCES})
 TARGET_LINK_LIBRARIES(DumpRenderTree ${DumpRenderTree_LIBRARIES})
+ADD_TARGET_PROPERTIES(DumpRenderTree LINK_FLAGS "${DumpRenderTree_LINK_FLAGS}")
 SET_TARGET_PROPERTIES(DumpRenderTree PROPERTIES FOLDER "Tools")
 
 ADD_EXECUTABLE(ImageDiff ${ImageDiff_SOURCES})
 TARGET_LINK_LIBRARIES(ImageDiff ${DumpRenderTree_LIBRARIES})
+ADD_TARGET_PROPERTIES(ImageDiff LINK_FLAGS "${DumpRenderTree_LINK_FLAGS}")
 SET_TARGET_PROPERTIES(ImageDiff PROPERTIES FOLDER "Tools")
index 0ddee28..c2c9d71 100755 (executable)
@@ -67,6 +67,7 @@ volatile bool done = false;
 static int dumpPixels = false;
 static int dumpTree = true;
 static int printSeparators = true;
+static int useX11Window = false;
 
 static String dumpFramesAsText(Evas_Object* frame)
 {
@@ -193,6 +194,7 @@ static bool parseCommandLineOptions(int argc, char** argv)
         {"notree", no_argument, &dumpTree, false},
         {"pixel-tests", no_argument, &dumpPixels, true},
         {"tree", no_argument, &dumpTree, true},
+        {"gui", no_argument, &useX11Window, true},
         {0, 0, 0, 0}
     };
 
@@ -426,7 +428,7 @@ void dump()
 
 static Ecore_Evas* initEcoreEvas()
 {
-    Ecore_Evas* ecoreEvas = ecore_evas_new(0, 0, 0, 800, 600, 0);
+    Ecore_Evas* ecoreEvas = useX11Window ? ecore_evas_new(0, 0, 0, 800, 600, 0) : ecore_evas_buffer_new(800, 600);
     if (!ecoreEvas) {
         shutdownEfl();
         exit(EXIT_FAILURE);
old mode 100755 (executable)
new mode 100644 (file)
index 817231d..f2c263f
@@ -1,6 +1,4 @@
 SET(EWebLauncher_SOURCES
-    ${TOOLS_DIR}/EWebLauncher/url_bar.c
-    ${TOOLS_DIR}/EWebLauncher/url_utils.c
     ${TOOLS_DIR}/EWebLauncher/main.c
 )
 
@@ -9,39 +7,39 @@ SET(EWebLauncher_LIBRARIES
     ${WebCore_LIBRARY_NAME}
     ${WebKit_LIBRARY_NAME}
     ${CAIRO_LIBRARIES}
-    ${ECORE_LIBRARIES}
-    ${ECORE_EVAS_LIBRARIES}
-    ${ECORE_FILE_LIBRARIES}
     ${ECORE_X_LIBRARIES}
     ${EDJE_LIBRARIES}
-    ${EINA_LIBRARIES}
+    ${EFLDEPS_LIBRARIES}
     ${EVAS_LIBRARIES}
     ${LIBXML2_LIBRARIES}
     ${LIBXSLT_LIBRARIES}
     ${SQLITE_LIBRARIES}
-    ${GLIB_LIBRARIES}
-    ${LIBSOUP_LIBRARIES}
+    ${Glib_LIBRARIES}
+    ${LIBSOUP24_LIBRARIES}
 )
 
 SET(EWebLauncher_INCLUDE_DIRECTORIES
     "${WEBKIT_DIR}/efl/ewk"
     ${CAIRO_INCLUDE_DIRS}
-    ${ECORE_INCLUDE_DIRS}
-    ${ECORE_EVAS_INCLUDE_DIRS}
-    ${ECORE_FILE_INCLUDE_DIRS}
-    ${ECORE_X_INCLUDE_DIRS}
     ${EDJE_INCLUDE_DIRS}
-    ${EINA_INCLUDE_DIRS}
+    ${EFLDEPS_INCLUDE_DIRS}
     ${EVAS_INCLUDE_DIRS}
-    ${GLIB_INCLUDE_DIRS}
-    ${LIBSOUP_INCLUDE_DIRS}
+    ${Glib_INCLUDE_DIRS}
+    ${LIBSOUP24_INCLUDE_DIRS}
 )
 
-ADD_DEFINITIONS(-DTHEME_DIR=\"${THEME_BINARY_DIR}\")
+SET(EWebLauncher_LINK_FLAGS
+    ${ECORE_X_LDFLAGS}
+    ${EDJE_LDFLAGS}
+    ${EFLDEPS_LDFLAGS}
+    ${EVAS_LDFLAGS}
+    ${LIBSOUP24_LDFLAGS}
+)
+
+ADD_DEFINITIONS(-DDATA_DIR=\"${THEME_BINARY_DIR}\")
 
 INCLUDE_DIRECTORIES(${EWebLauncher_INCLUDE_DIRECTORIES})
 ADD_EXECUTABLE(EWebLauncher ${EWebLauncher_SOURCES})
 TARGET_LINK_LIBRARIES(EWebLauncher ${EWebLauncher_LIBRARIES})
+ADD_TARGET_PROPERTIES(EWebLauncher LINK_FLAGS "${EWebLauncher_LINK_FLAGS}")
 SET_TARGET_PROPERTIES(EWebLauncher PROPERTIES FOLDER "Tools")
-
-ADD_DEPENDENCIES(EWebLauncher ControlTheme)
diff --git a/Tools/EWebLauncher/ControlTheme/CMakeLists.txt b/Tools/EWebLauncher/ControlTheme/CMakeLists.txt
deleted file mode 100644 (file)
index 68aa8cf..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-SET(ControlTheme_DIR "${TOOLS_DIR}/EWebLauncher/ControlTheme")
-
-ADD_CUSTOM_TARGET(ControlTheme ALL
-    COMMAND ${EDJE_CC_EXECUTABLE} -v ${ControlTheme_DIR}/entry.edc ${THEME_BINARY_DIR}/entry.edj
-    DEPENDS
-        ${ControlTheme_DIR}/entry.edc
-    VERBATIM
-)
diff --git a/Tools/EWebLauncher/ControlTheme/entry.edc b/Tools/EWebLauncher/ControlTheme/entry.edc
deleted file mode 100644 (file)
index 7a1a5f7..0000000
+++ /dev/null
@@ -1,143 +0,0 @@
-/*
- * Copyright (C) 2012 Samsung Electronics
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *  * Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *  * Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-collections {
-   group {
-      name: "control/entry/base/default";
-      styles {
-         style {
-            name: "entry_textblock_style";
-            base: "font=Roman font_size=14 color=#000000 wrap=mixed";
-         }
-      }
-      parts {
-         part {
-            name: "url.text";
-            type: TEXTBLOCK;
-            mouse_events: 1;
-            scale: 1;
-            entry_mode: EDITABLE;
-            multiline: 0;
-            source: "control/entry/selection/default"; // selection under
-            source4: "control/entry/cursor/default"; // cursor over
-            description {
-               state: "default" 0.0;
-               fixed: 1 0;
-               text {
-                  style: "entry_textblock_style";
-                  min: 0 1;
-               }
-            }
-         }
-      }
-      programs {
-         program {
-            name: "focus";
-            signal: "load";
-            source: "";
-            action: FOCUS_SET;
-            target: "url.text";
-         }
-      }
-   }
-
-   group {
-      name: "control/entry/cursor/default";
-      parts {
-         part {
-            name: "clip";
-            type: RECT;
-            mouse_events: 0;
-            scale: 1;
-            description {
-               state: "default" 0.0;
-               rel1.offset: -10 0;
-               rel2.offset: 9 9;
-               visible: 0;
-            }
-            description {
-               state: "focused" 0.0;
-               inherit: "default" 0.0;
-               visible: 1;
-            }
-         }
-         part {
-            name: "cursor";
-            type: RECT;
-            mouse_events: 0;
-            scale: 1;
-            clip_to: "clip";
-            description {
-               state: "default" 0.0;
-               min: 1 0;
-               fixed: 1 0;
-               align: 0.5 0.5;
-               visible: 1;
-               rel1 {
-                  relative: 0.0  0.0;
-                  offset: 0 2;
-               }
-               rel2 {
-                  relative: 0.0  1.0;
-                  offset: 0 -2;
-               }
-               color: 0 0 0 255; // cursor color
-            }
-         }
-      }
-      programs {
-         program {
-            name: "focused";
-            signal: "entry,action,focus";
-            source: "entry";
-            action: STATE_SET "focused" 0.0;
-            target: "clip";
-         }
-         program {
-            name: "unfocused";
-            signal: "entry,action,unfocus";
-            source: "entry";
-            action: STATE_SET "default" 0.0;
-            target: "clip";
-         }
-      }
-   }
-
-   group {
-      name: "control/entry/selection/default";
-      parts {
-         part {
-            name: "bg";
-            type: RECT;
-            scale: 1;
-            mouse_events: 0;
-            description {
-               state: "default" 0.0;
-               color: 138 183 223 128;
-            }
-         }
-      }
-   }
-}
index ff06372..4089d6e 100644 (file)
@@ -30,8 +30,7 @@
 
 #include "EWebKit.h"
 
-#include "url_bar.h"
-#include "url_utils.h"
+#include <ctype.h>
 #include <Ecore.h>
 #include <Ecore_Evas.h>
 #include <Ecore_File.h>
@@ -39,7 +38,6 @@
 #include <Ecore_X.h>
 #include <Edje.h>
 #include <Evas.h>
-#include <ctype.h>
 #include <inttypes.h>
 #include <limits.h>
 #include <stdio.h>
@@ -145,7 +143,6 @@ typedef struct _ELauncher {
     Evas *evas;
     Evas_Object *bg;
     Evas_Object *browser;
-    Url_Bar *url_bar;
     const char *theme;
     const char *userAgent;
     const char *backingStore;
@@ -156,21 +153,6 @@ static void browserDestroy(Ecore_Evas *ee);
 static void closeWindow(Ecore_Evas *ee);
 static int browserCreate(const char *url, const char *theme, const char *userAgent, Eina_Rectangle geometry, const char *engine, const char *backingStore, unsigned char isFlattening, unsigned char isFullscreen, const char *databasePath);
 
-static ELauncher *
-find_app_from_ee(Ecore_Evas *ee)
-{
-    Eina_List *l;
-    void *data;
-
-    EINA_LIST_FOREACH(windows, l, data)
-    {
-        ELauncher *app = (ELauncher *) data;
-        if (app->ee == ee)
-            return app;
-    }
-    return NULL;
-}
-
 static void
 print_history(Eina_List *list)
 {
@@ -231,24 +213,19 @@ zoom_level_set(Evas_Object *webview, int level)
 static void
 on_ecore_evas_resize(Ecore_Evas *ee)
 {
-    ELauncher *app;
     Evas_Object *webview;
     Evas_Object *bg;
     int w, h;
 
     ecore_evas_geometry_get(ee, NULL, NULL, &w, &h);
 
-    /* Resize URL bar */
-    app = find_app_from_ee(ee);
-    url_bar_width_set(app->url_bar, w);
-
     bg = evas_object_name_find(ecore_evas_get(ee), "bg");
     evas_object_move(bg, 0, 0);
     evas_object_resize(bg, w, h);
 
     webview = evas_object_name_find(ecore_evas_get(ee), "browser");
-    evas_object_move(webview, 0, URL_BAR_HEIGHT);
-    evas_object_resize(webview, w, h - URL_BAR_HEIGHT);
+    evas_object_move(webview, 10, 10);
+    evas_object_resize(webview, w - 20, h - 20);
 }
 
 static void
@@ -425,13 +402,6 @@ on_inputmethod_changed(void* user_data, Evas_Object* webview, void* event_info)
 }
 
 static void
-on_url_changed(void* user_data, Evas_Object* webview, void* event_info)
-{
-    ELauncher *app = (ELauncher *)user_data;
-    url_bar_url_set(app->url_bar, ewk_view_uri_get(app->browser));
-}
-
-static void
 on_mouse_down(void* data, Evas* e, Evas_Object* webview, void* event_info)
 {
     Evas_Event_Mouse_Down *ev = (Evas_Event_Mouse_Down*) event_info;
@@ -725,7 +695,6 @@ browserCreate(const char *url, const char *theme, const char *userAgent, Eina_Re
     evas_object_smart_callback_add(app->browser, "menubar,visible,get", on_menubar_visible_get, app);
     evas_object_smart_callback_add(app->browser, "tooltip,text,set", on_tooltip_text_set, app);
     evas_object_smart_callback_add(app->browser, "inputmethod,changed", on_inputmethod_changed, app);
-    evas_object_smart_callback_add(app->browser, "uri,changed", on_url_changed, app);
 
 /*     ewk_callback_resize_requested_add(app->browser, on_resize_requested, app->ee); */
 
@@ -735,10 +704,8 @@ browserCreate(const char *url, const char *theme, const char *userAgent, Eina_Re
     evas_object_event_callback_add(app->browser, EVAS_CALLBACK_FOCUS_OUT, on_focus_out, app);
     evas_object_event_callback_add(app->browser, EVAS_CALLBACK_DEL, on_browser_del, app);
 
-    app->url_bar = url_bar_add(app->browser, DEFAULT_WIDTH);
-
-    evas_object_move(app->browser, 0, URL_BAR_HEIGHT);
-    evas_object_resize(app->browser, geometry.w, geometry.h - URL_BAR_HEIGHT);
+    evas_object_move(app->browser, 10, 10);
+    evas_object_resize(app->browser, geometry.w - 20, geometry.h - 20);
 
     if (url && (url[0] != '\0'))
         ewk_view_uri_set(app->browser, url);
@@ -764,11 +731,14 @@ browserDestroy(Ecore_Evas *ee)
 static void
 closeWindow(Ecore_Evas *ee)
 {
-    ELauncher *app;
-
-    app = find_app_from_ee(ee);
+    Eina_List *l;
+    void *app;
+    EINA_LIST_FOREACH(windows, l, app)
+    {
+        if (((ELauncher*) app)->ee == ee)
+            break;
+    }
     windows = eina_list_remove(windows, app);
-    url_bar_del(app->url_bar);
     browserDestroy(ee);
     free(app);
 }
@@ -790,12 +760,12 @@ main_signal_exit(void *data, int ev_type, void *ev)
 static char *
 findThemePath(const char *theme)
 {
-    const char *default_theme = THEME_DIR"/default.edj";
+    const char *defaultTheme = DATA_DIR"/default.edj";
     char *rpath;
     struct stat st;
 
     if (!theme)
-        theme = default_theme;
+        theme = defaultTheme;
 
     rpath = ecore_file_realpath(theme);
     if (!strlen(rpath) || stat(rpath, &st)) {
@@ -812,6 +782,7 @@ main(int argc, char *argv[])
     const char *default_url = "http://www.google.com/";
 
     Eina_Rectangle geometry = {0, 0, 0, 0};
+    char *url = NULL;
     char *userAgent = NULL;
     const char *tmp;
     const char *proxyUri;
@@ -866,6 +837,11 @@ main(int argc, char *argv[])
     if (quitOption)
         return quit(EINA_TRUE, NULL);
 
+    if (args < argc)
+        url = argv[args];
+    else
+        url = (char*) default_url;
+
     themePath = findThemePath(theme);
     if (!themePath)
         return quit(EINA_FALSE, "ERROR: could not find theme.\n");
@@ -885,13 +861,7 @@ main(int argc, char *argv[])
     if (proxyUri)
         ewk_network_proxy_uri_set(proxyUri);
 
-    if (args < argc) {
-        char *url = url_from_user_input(argv[args]);
-        browserCreate(url, themePath, userAgent, geometry, engine, backingStore, isFlattening, isFullscreen, path);
-        free(url);
-    } else
-        browserCreate(default_url, themePath, userAgent, geometry, engine, backingStore, isFlattening, isFullscreen, path);
-
+    browserCreate(url, themePath, userAgent, geometry, engine, backingStore, isFlattening, isFullscreen, path);
     ecore_event_handler_add(ECORE_EVENT_SIGNAL_EXIT, main_signal_exit, &windows);
 
     ecore_main_loop_begin();
diff --git a/Tools/EWebLauncher/url_bar.c b/Tools/EWebLauncher/url_bar.c
deleted file mode 100755 (executable)
index f567588..0000000
+++ /dev/null
@@ -1,154 +0,0 @@
-/*
- * Copyright (C) 2012 Samsung Electronics
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *  * Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *  * Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "url_bar.h"
-#include "url_utils.h"
-
-#include <Edje.h>
-#include <Ecore_Evas.h>
-
-#define PADDING_SIZE 5
-
-static char *
-_url_bar_url_get_with_protocol(Url_Bar *urlBar)
-{
-    const char *url = edje_object_part_text_get(urlBar->entry, "url.text");
-
-    return url_from_user_input(url);
-}
-
-static void
-on_urlbar_key_down(void *data, Evas *e, Evas_Object *obj, void *event_info)
-{
-    Evas_Event_Key_Down *ev = event_info;
-    Url_Bar *urlBar = (Url_Bar *)data;
-
-    if (!ev->key || strcmp(ev->key, "Return"))
-        return;
-
-    char *url = _url_bar_url_get_with_protocol(urlBar);
-    if (url) {
-#ifdef EFL_WK2
-        ewk_view_url_set(urlBar->webView, url);
-#else
-        ewk_view_uri_set(urlBar->webView, url);
-#endif
-        free(url);
-    }
-    evas_object_focus_set(urlBar->webView, EINA_TRUE);
-}
-
-static void
-on_urlbar_mouse_down(void *data, Evas *e, Evas_Object *obj, void *event_info)
-{
-    Evas_Event_Mouse_Down *ev = event_info;
-    Url_Bar *urlBar = (Url_Bar *)data;
-
-    if (ev->button == 1) {
-        evas_object_focus_set(urlBar->entry, EINA_TRUE);
-        edje_object_signal_emit(urlBar->entry, "entry,action,focus", "entry");
-    }
-}
-
-static void
-on_urlbar_focus_out(void *data, Evas *e, Evas_Object *obj, void *event_info)
-{
-    Url_Bar *urlBar = (Url_Bar *)data;
-
-    edje_object_signal_emit(urlBar->entry, "entry,action,unfocus", "entry");
-}
-
-void
-url_bar_width_set(Url_Bar *urlBar, int width)
-{
-    evas_object_move(urlBar->area, 0, 0);
-    evas_object_resize(urlBar->area, width, URL_BAR_HEIGHT);
-
-    evas_object_move(urlBar->entry, PADDING_SIZE, PADDING_SIZE);
-    evas_object_resize(urlBar->entry, width - PADDING_SIZE * 2, URL_BAR_HEIGHT - PADDING_SIZE * 2);
-}
-
-Url_Bar *
-url_bar_add(Evas_Object *webView, int width)
-{
-    Evas *evas;
-    Url_Bar *url_bar;
-    if (!webView)
-        return NULL;
-    evas = evas_object_evas_get(webView);
-
-    url_bar = (Url_Bar *)malloc(sizeof(Url_Bar));
-    url_bar->webView = webView;
-
-    url_bar->area = evas_object_rectangle_add(evas);
-    evas_object_name_set(url_bar->area, "url_barArea");
-    evas_object_color_set(url_bar->area, 255, 255, 255, 255);
-
-    url_bar->entry = edje_object_add(evas);
-    Eina_Bool ret = edje_object_file_set(url_bar->entry, THEME_DIR"/entry.edj", "control/entry/base/default");
-    if (!ret) {
-        evas_object_del(url_bar->area);
-
-        free(url_bar);
-        return NULL;
-    }
-
-    edje_object_part_text_set(url_bar->entry, "url.text", "");
-
-    /* Set URL bar dimensions and show it */
-    url_bar_width_set(url_bar, width);
-    evas_object_show(url_bar->area);
-    evas_object_show(url_bar->entry);
-
-    evas_object_event_callback_add(url_bar->entry, EVAS_CALLBACK_MOUSE_DOWN, on_urlbar_mouse_down, url_bar);
-    evas_object_event_callback_add(url_bar->entry, EVAS_CALLBACK_KEY_DOWN, on_urlbar_key_down, url_bar);
-    evas_object_event_callback_add(url_bar->entry, EVAS_CALLBACK_FOCUS_OUT, on_urlbar_focus_out, url_bar);
-
-    return url_bar;
-}
-
-void
-url_bar_del(Url_Bar *urlBar)
-{
-    if (!urlBar)
-        return;
-
-    evas_object_event_callback_del(urlBar->entry, EVAS_CALLBACK_KEY_DOWN, on_urlbar_key_down);
-    evas_object_event_callback_del(urlBar->entry, EVAS_CALLBACK_MOUSE_DOWN, on_urlbar_mouse_down);
-    evas_object_event_callback_del(urlBar->entry, EVAS_CALLBACK_FOCUS_OUT, on_urlbar_focus_out);
-
-    evas_object_del(urlBar->area);
-    evas_object_del(urlBar->entry);
-    free(urlBar);
-}
-
-void
-url_bar_url_set(Url_Bar *urlBar, const char *url)
-{
-    if (!urlBar || !url)
-        return;
-
-    edje_object_part_text_set(urlBar->entry, "url.text", url);
-}
diff --git a/Tools/EWebLauncher/url_bar.h b/Tools/EWebLauncher/url_bar.h
deleted file mode 100644 (file)
index 32d7793..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (C) 2012 Samsung Electronics
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *  * Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *  * Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef url_bar_h
-#define url_bar_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <Evas.h>
-
-#define URL_BAR_HEIGHT 30
-
-typedef struct _Url_Bar {
-    Evas_Object *webView;
-    Evas_Object *area;
-    Evas_Object *entry;
-} Url_Bar;
-
-Url_Bar *url_bar_add(Evas_Object* webview, int width);
-void url_bar_del(Url_Bar *urlBar);
-void url_bar_url_set(Url_Bar *urlBar, const char *url);
-void url_bar_width_set(Url_Bar *urlBar, int width);
-
-#ifdef __cplusplus
-}
-#endif
-#endif // url_bar_h
diff --git a/Tools/EWebLauncher/url_utils.c b/Tools/EWebLauncher/url_utils.c
deleted file mode 100644 (file)
index fd92f14..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright (C) 2012 Intel Corporation. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "url_utils.h"
-
-#include <Ecore_File.h>
-#include <string.h>
-#include <sys/statvfs.h>
-
-Eina_Bool
-has_scheme(const char *url)
-{
-    return !!strstr(url, "://");
-}
-
-char *
-url_from_user_input(const char *arg)
-{
-    /* If it is already a URL, return the argument as is. */
-    if (has_scheme(arg))
-        return strdup(arg);
-
-    Eina_Strbuf *buf = eina_strbuf_manage_new(eina_file_path_sanitize(arg));
-
-    /* Check if the path exists. */
-    if (ecore_file_exists(eina_strbuf_string_get(buf))) {
-        /* File exists, convert local path to a URL. */
-        eina_strbuf_prepend(buf, "file://");
-    } else {
-        /* The path does not exist, convert it to a URL by
-           prepending http:// scheme:
-           www.google.com -> http://www.google.com */
-         eina_strbuf_string_free(buf);
-         eina_strbuf_append_printf(buf, "http://%s", arg);
-    }
-    char *url = eina_strbuf_string_steal(buf);
-    eina_strbuf_free(buf);
-
-    return url;
-}
index e39d911..fc4fcf3 100755 (executable)
@@ -1,24 +1,15 @@
 SET(MiniBrowser_DIR "${TOOLS_DIR}/MiniBrowser/efl")
 
 SET(MiniBrowser_SOURCES
-    ${TOOLS_DIR}/EWebLauncher/url_utils.c
     ${MiniBrowser_DIR}/main.c
 )
 
 SET(MiniBrowser_INCLUDE_DIRECTORIES
     ${CAIRO_INCLUDE_DIRS}
-    ${ECORE_INCLUDE_DIRS}
-    ${ECORE_EVAS_INCLUDE_DIRS}
-    ${ECORE_FILE_INCLUDE_DIRS}
+    ${ECORE_X_INCLUDE_DIRS}
     ${EDJE_INCLUDE_DIRS}
-    ${EET_INCLUDE_DIRS}
-    ${DBUS_INCLUDE_DIRS}
-    ${E_DBUS_INCLUDE_DIRS}
-    ${EFREET_INCLUDE_DIRS}
-    ${EINA_INCLUDE_DIRS}
-    ${ELEMENTARY_INCLUDE_DIRS}
+    ${EFLDEPS_INCLUDE_DIRS}
     ${EVAS_INCLUDE_DIRS}
-    ${TOOLS_DIR}/EWebLauncher
     ${WEBKIT2_DIR}/UIProcess/API/efl
     ${WEBKIT2_DIR}
     ${CMAKE_SOURCE_DIR}/Source
@@ -29,25 +20,29 @@ SET(MiniBrowser_LIBRARIES
     ${WebCore_LIBRARY_NAME}
     ${WebKit2_LIBRARY_NAME}
     ${CAIRO_LIBRARIES}
-    ${ECORE_LIBRARIES}
-    ${ECORE_EVAS_LIBRARIES}
-    ${ECORE_FILE_LIBRARIES}
+    ${ECORE_X_LIBRARIES}
     ${EDJE_LIBRARIES}
-    ${EINA_LIBRARIES}
-    ${ELEMENTARY_LIBRARIES}
+    ${EFLDEPS_LIBRARIES}
     ${EVAS_LIBRARIES}
     ${FONTCONFIG_LIBRARIES}
-    ${LIBSOUP_LIBRARIES}
+    ${LIBSOUP24_LIBRARIES}
     ${LIBXML2_LIBRARIES}
     ${LIBXSLT_LIBRARIES}
-    ${OPENGL_LIBRARIES}
     ${SQLITE_LIBRARIES}
 )
 
+SET(MiniBrowser_LINK_FLAGS
+    ${ECORE_X_LDFLAGS}
+    ${EDJE_LDFLAGS}
+    ${EFLDEPS_LDFLAGS}
+    ${EVAS_LDFLAGS}
+    ${LIBSOUP24_LDFLAGS}
+)
+
 IF (ENABLE_GLIB_SUPPORT)
     LIST(APPEND MiniBrowser_LIBRARIES
-        ${GLIB_LIBRARIES}
-        ${GLIB_GTHREAD_LIBRARIES}
+        ${Glib_LIBRARIES}
+        ${Gthread_LIBRARIES}
     )
 ENDIF ()
 
@@ -57,4 +52,5 @@ INCLUDE_DIRECTORIES(${MiniBrowser_INCLUDE_DIRECTORIES})
 
 ADD_EXECUTABLE(MiniBrowser ${MiniBrowser_SOURCES})
 TARGET_LINK_LIBRARIES(MiniBrowser ${MiniBrowser_LIBRARIES})
+ADD_TARGET_PROPERTIES(MiniBrowser LINK_FLAGS "${MiniBrowser_LINK_FLAGS}")
 SET_TARGET_PROPERTIES(MiniBrowser PROPERTIES FOLDER "Tools")
old mode 100755 (executable)
new mode 100644 (file)
index 783045e..f611eaa
  */
 
 #include "EWebKit2.h"
-#include "url_utils.h"
 #include <Ecore.h>
 #include <Ecore_Evas.h>
 #include <Eina.h>
-#include <Elementary.h>
 #include <Evas.h>
 
 static const int DEFAULT_WIDTH = 800;
 static const int DEFAULT_HEIGHT = 600;
 static const char DEFAULT_URL[] = "http://www.google.com/";
 static const char APP_NAME[] = "EFL MiniBrowser";
-static const int TOOL_BAR_ICON_SIZE = 24;
-static const int TOOL_BAR_BUTTON_SIZE = 32;
 
 #define info(format, args...)       \
     do {                            \
@@ -38,77 +34,41 @@ static const int TOOL_BAR_BUTTON_SIZE = 32;
             printf(format, ##args); \
     } while (0)
 
-static int verbose = 1;
-static Eina_List *windows = NULL;
-static char *evas_engine_name = NULL;
-static Eina_Bool frame_flattening_enabled = EINA_FALSE;
+static int verbose = 0;
 
-typedef struct _Browser_Window {
-    Evas_Object *window;
-    Evas_Object *webview;
-    Evas_Object *url_bar;
-    Evas_Object *back_button;
-    Evas_Object *forward_button;
-} Browser_Window;
-
-static const Ecore_Getopt options = {
-    "MiniBrowser",
-    "%prog [options] [url]",
-    "0.0.1",
-    "(C)2012 Samsung Electronics\n",
-    "",
-    "Test Web Browser using the Enlightenment Foundation Libraries of WebKit2",
-    EINA_TRUE, {
-        ECORE_GETOPT_STORE_STR
-            ('e', "engine", "ecore-evas engine to use."),
-        ECORE_GETOPT_CALLBACK_NOARGS
-            ('E', "list-engines", "list ecore-evas engines.",
-             ecore_getopt_callback_ecore_evas_list_engines, NULL),
-        ECORE_GETOPT_STORE_DEF_BOOL
-            ('f', "flattening", "frame flattening.", EINA_FALSE),
-        ECORE_GETOPT_VERSION
-            ('V', "version"),
-        ECORE_GETOPT_COPYRIGHT
-            ('R', "copyright"),
-        ECORE_GETOPT_HELP
-            ('h', "help"),
-        ECORE_GETOPT_SENTINEL
-    }
-};
+typedef struct _MiniBrowser {
+    Ecore_Evas *ee;
+    Evas *evas;
+    Evas_Object *bg;
+    Evas_Object *browser;
+} MiniBrowser;
 
-static Browser_Window *window_create(const char *url);
-
-static Browser_Window *browser_window_find(Evas_Object *window)
+static Eina_Bool main_signal_exit(void *data, int ev_type, void *ev)
 {
-    Eina_List *l;
-    void *data;
-
-    if (!window)
-        return NULL;
-
-    EINA_LIST_FOREACH(windows, l, data) {
-        Browser_Window *browser_window = (Browser_Window *)data;
-        if (browser_window->window == window)
-            return browser_window;
-    }
-    return NULL;
+    ecore_main_loop_quit();
+    return EINA_TRUE;
 }
 
-static void window_free(Browser_Window *window)
+static void closeWindow(Ecore_Evas *ee)
 {
-    evas_object_del(window->webview);
-    /* The elm_win will take care of freeing its children */
-    evas_object_del(window->window);
-    free(window);
+    ecore_main_loop_quit();
 }
 
-static void window_close(Browser_Window *window)
+static void on_ecore_evas_resize(Ecore_Evas *ee)
 {
-    windows = eina_list_remove(windows, window);
-    window_free(window);
+    Evas_Object *webview;
+    Evas_Object *bg;
+    int w, h;
 
-    if (!windows)
-        elm_exit();
+    ecore_evas_geometry_get(ee, NULL, NULL, &w, &h);
+
+    bg = evas_object_name_find(ecore_evas_get(ee), "bg");
+    evas_object_move(bg, 0, 0);
+    evas_object_resize(bg, w, h);
+
+    webview = evas_object_name_find(ecore_evas_get(ee), "browser");
+    evas_object_move(webview, 0, 0);
+    evas_object_resize(webview, w, h);
 }
 
 static void
@@ -121,8 +81,6 @@ on_key_down(void *data, Evas *e, Evas_Object *obj, void *event_info)
         NULL
     };
     static int currentEncoding = -1;
-    Eina_Bool ctrlPressed = evas_key_modifier_is_set(evas_key_modifier_get(e), "Control");
-
     if (!strcmp(ev->key, "F1")) {
         info("Back (F1) was pressed\n");
         if (!ewk_view_back(obj))
@@ -136,50 +94,21 @@ on_key_down(void *data, Evas *e, Evas_Object *obj, void *event_info)
         info("Set encoding (F3) pressed. New encoding to %s", encodings[currentEncoding]);
         ewk_view_custom_encoding_set(obj, encodings[currentEncoding]);
     } else if (!strcmp(ev->key, "F5")) {
-        info("Reload (F5) was pressed, reloading.\n");
-        ewk_view_reload(obj);
+            info("Reload (F5) was pressed, reloading.\n");
+            ewk_view_reload(obj);
     } else if (!strcmp(ev->key, "F6")) {
-        info("Stop (F6) was pressed, stop loading.\n");
-        ewk_view_stop(obj);
-    } else if (!strcmp(ev->key, "n") && ctrlPressed) {
-        info("Create new window (Ctrl+n) was pressed.\n");
-        Browser_Window *window = window_create(DEFAULT_URL);
-        windows = eina_list_append(windows, window);
+            info("Stop (F6) was pressed, stop loading.\n");
+            ewk_view_stop(obj);
     }
 }
 
 static void
-view_focus_set(Browser_Window *window, Eina_Bool focus)
+title_set(Ecore_Evas *ee, const char *title, int progress)
 {
-    /* We steal focus away from elm's focus model and start to do things
-     * manually here, so elm now has no clue what's up. Tell elm that its
-     * toplevel widget is to be unfocused so elm gives up the focus */
-    elm_object_focus_set(elm_object_top_widget_get(window->window), EINA_FALSE);
-    evas_object_focus_set(window->webview, focus);
-}
-
-static void
-on_mouse_down(void *user_data, Evas *e, Evas_Object *webview, void *event_info)
-{
-    Browser_Window *window = (Browser_Window *)user_data;
-    Evas_Event_Mouse_Down *ev = (Evas_Event_Mouse_Down *)event_info;
-
-    /* Clear selection from the URL bar */
-    elm_entry_select_none(window->url_bar);
-
-    if (ev->button == 1)
-        view_focus_set(window, EINA_TRUE);
-    else if (ev->button == 2)
-        view_focus_set(window, !evas_object_focus_get(webview));
-}
-
-static void
-title_set(Evas_Object *window, const char *title, int progress)
-{
-    Eina_Strbuf *buffer;
+    Eina_Strbuf* buffer;
 
     if (!title || !*title) {
-        elm_win_title_set(window, APP_NAME);
+        ecore_evas_title_set(ee, APP_NAME);
         return;
     }
 
@@ -189,384 +118,110 @@ title_set(Evas_Object *window, const char *title, int progress)
     else
         eina_strbuf_append_printf(buffer, "%s - %s", title, APP_NAME);
 
-    elm_win_title_set(window, eina_strbuf_string_get(buffer));
+    ecore_evas_title_set(ee, eina_strbuf_string_get(buffer));
     eina_strbuf_free(buffer);
 }
 
 static void
 on_title_changed(void *user_data, Evas_Object *webview, void *event_info)
 {
-    Browser_Window *window = (Browser_Window *)user_data;
+    MiniBrowser *app = (MiniBrowser *)user_data;
     const char *title = (const char *)event_info;
 
-    title_set(window->window, title, 100);
-}
-
-static void
-on_url_changed(void *user_data, Evas_Object *webview, void *event_info)
-{
-    Browser_Window *window = (Browser_Window *)user_data;
-    elm_entry_entry_set(window->url_bar, ewk_view_url_get(window->webview));
-}
-
-static void
-on_back_forward_list_changed(void *user_data, Evas_Object *webview, void *event_info)
-{
-    Browser_Window *window = (Browser_Window *)user_data;
-
-    /* Update navigation buttons state */
-    elm_object_disabled_set(window->back_button, !ewk_view_back_possible(webview));
-    elm_object_disabled_set(window->forward_button, !ewk_view_forward_possible(webview));
-}
-
-static void
-on_new_window(void *user_data, Evas_Object *webview, void *event_info)
-{
-    Evas_Object **new_view = (Evas_Object **)event_info;
-    Browser_Window *window = window_create(NULL);
-    *new_view = window->webview;
-    windows = eina_list_append(windows, window);
-}
-
-static void
-on_close_window(void *user_data, Evas_Object *webview, void *event_info)
-{
-    window_close((Browser_Window *)user_data);
+    title_set(app->ee, title, 100);
 }
 
 static void
 on_progress(void *user_data, Evas_Object *webview, void *event_info)
 {
-    Browser_Window *window = (Browser_Window *)user_data;
+    MiniBrowser *app = (MiniBrowser *)user_data;
     double progress = *(double *)event_info;
 
-    title_set(window->window, ewk_view_title_get(window->webview), progress * 100);
+    title_set(app->ee, ewk_view_title_get(app->browser), progress * 100);
 }
 
 static void
 on_error(void *user_data, Evas_Object *webview, void *event_info)
 {
     Eina_Strbuf* buffer;
-    const Ewk_Error *error = (const Ewk_Error *)event_info;
-
-    /* This is a cancellation, do not display the error page */
-    if (ewk_error_cancellation_get(error))
-        return;
+    const Ewk_Web_Error *error = (const Ewk_Web_Error *)event_info;
 
     buffer = eina_strbuf_new();
     eina_strbuf_append_printf(buffer, "<html><body><div style=\"color:#ff0000\">ERROR!</div><br><div>Code: %d<br>Description: %s<br>URL: %s</div></body</html>",
-        ewk_error_code_get(error), ewk_error_description_get(error), ewk_error_url_get(error));
+                              ewk_web_error_code_get(error), ewk_web_error_description_get(error), ewk_web_error_url_get(error));
 
-    ewk_view_html_string_load(webview, eina_strbuf_string_get(buffer), 0, ewk_error_url_get(error));
+    ewk_view_html_string_load(webview, eina_strbuf_string_get(buffer), 0, ewk_web_error_url_get(error));
     eina_strbuf_free(buffer);
 }
 
-static void
-on_download_request(void *user_data, Evas_Object *webview, void *event_info)
-{
-    Ewk_Download_Job *download = (Ewk_Download_Job *)event_info;
-
-    // FIXME: The destination folder should be selected by the user but we set it to '/tmp' for now.
-    Eina_Strbuf *destination_path = eina_strbuf_new();
-
-    const char *suggested_name = ewk_download_job_suggested_filename_get(download);
-    if (suggested_name && *suggested_name)
-        eina_strbuf_append_printf(destination_path, "/tmp/%s", suggested_name);
-    else {
-        // Generate a unique file name since no name was suggested.
-        char unique_path[] = "/tmp/downloaded-file.XXXXXX";
-        mktemp(unique_path);
-        eina_strbuf_append(destination_path, unique_path);
-    }
-
-    ewk_download_job_destination_set(download, eina_strbuf_string_get(destination_path));
-    info("Downloading: %s\n", eina_strbuf_string_get(destination_path));
-    eina_strbuf_free(destination_path);
-}
-
-static void
-on_download_finished(void *user_data, Evas_Object *webview, void *event_info)
-{
-    Ewk_Download_Job *download = (Ewk_Download_Job *)event_info;
-    info("Download finished: %s\n",  ewk_download_job_destination_get(download));
-}
-
-static void
-on_download_failed(void *user_data, Evas_Object *webview, void *event_info)
-{
-    info("Download failed!\n");
-}
-
-static int
-quit(Eina_Bool success, const char *msg)
-{
-    ewk_shutdown();
-    elm_shutdown();
-
-    if (msg)
-        fputs(msg, (success) ? stdout : stderr);
-
-    if (!success)
-        return EXIT_FAILURE;
-
-    return EXIT_SUCCESS;
-}
-
-static void
-on_url_bar_activated(void *user_data, Evas_Object *url_bar, void *event_info)
-{
-    Browser_Window *app_data = (Browser_Window *)user_data;
-
-    const char *user_url = elm_entry_entry_get(url_bar);
-    char *url = url_from_user_input(user_url);
-    ewk_view_url_set(app_data->webview, url);
-    free(url);
-
-    /* Give focus back to the view */
-    view_focus_set(app_data, EINA_TRUE);
-}
-
-static void
-on_url_bar_clicked(void *user_data, Evas_Object *url_bar, void *event_info)
-{
-    Browser_Window *app_data = (Browser_Window *)user_data;
-
-    /* Grab focus from the view */
-    evas_object_focus_set(app_data->webview, EINA_FALSE);
-    elm_object_focus_set(url_bar, EINA_TRUE);
-}
-
-static void
-on_back_button_clicked(void *user_data, Evas_Object *back_button, void *event_info)
-{
-    Browser_Window *app_data = (Browser_Window *)user_data;
-
-    ewk_view_back(app_data->webview);
-    /* Update back button state */
-    elm_object_disabled_set(back_button, !ewk_view_back_possible(app_data->webview));
-}
-
-static void
-on_forward_button_clicked(void *user_data, Evas_Object *forward_button, void *event_info)
+static MiniBrowser *browserCreate(const char *url)
 {
-    Browser_Window *app_data = (Browser_Window *)user_data;
+    MiniBrowser *app = malloc(sizeof(MiniBrowser));
 
-    ewk_view_forward(app_data->webview);
-    /* Update forward button state */
-    elm_object_disabled_set(forward_button, !ewk_view_forward_possible(app_data->webview));
-}
+    app->ee = ecore_evas_new(0, 0, 0, DEFAULT_WIDTH, DEFAULT_HEIGHT, 0);
 
-static void
-on_refresh_button_clicked(void *user_data, Evas_Object *refresh_button, void *event_info)
-{
-    Browser_Window *app_data = (Browser_Window *)user_data;
-
-    Evas *evas = evas_object_evas_get(refresh_button);
-    Eina_Bool ctrlPressed = evas_key_modifier_is_set(evas_key_modifier_get(evas), "Control");
-    if (ctrlPressed) {
-        info("Reloading and bypassing cache...\n");
-        ewk_view_reload_bypass_cache(app_data->webview);
-    } else {
-        info("Reloading...\n");
-        ewk_view_reload(app_data->webview);
-    }
-}
+    ecore_evas_title_set(app->ee, APP_NAME);
+    ecore_evas_callback_resize_set(app->ee, on_ecore_evas_resize);
+    ecore_evas_borderless_set(app->ee, 0);
+    ecore_evas_show(app->ee);
+    ecore_evas_callback_delete_request_set(app->ee, closeWindow);
 
-static void
-on_home_button_clicked(void *user_data, Evas_Object *home_button, void *event_info)
-{
-    Browser_Window *app_data = (Browser_Window *)user_data;
+    app->evas = ecore_evas_get(app->ee);
 
-    ewk_view_url_set(app_data->webview, DEFAULT_URL);
-}
+    app->bg = evas_object_rectangle_add(app->evas);
+    evas_object_name_set(app->bg, "bg");
+    evas_object_size_hint_weight_set(app->bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
 
-static void
-on_window_deletion(void *user_data, Evas_Object *window, void *event_info)
-{
-    window_close(browser_window_find(window));
-}
+    evas_object_move(app->bg, 0, 0);
+    evas_object_resize(app->bg, DEFAULT_WIDTH, DEFAULT_HEIGHT);
+    evas_object_color_set(app->bg, 255, 150, 150, 255);
+    evas_object_show(app->bg);
 
-static Evas_Object *
-create_toolbar_button(Evas_Object *window, const char *icon_name)
-{
-    Evas_Object *button = elm_button_add(window);
+    /* Create webview */
+    app->browser = ewk_view_add(app->evas);
+    ewk_view_theme_set(app->browser, THEME_DIR"/default.edj");
+    evas_object_name_set(app->browser, "browser");
 
-    Evas_Object *icon = elm_icon_add(window);
-    elm_icon_standard_set(icon, icon_name);
-    evas_object_size_hint_max_set(icon, TOOL_BAR_ICON_SIZE, TOOL_BAR_ICON_SIZE);
-    evas_object_color_set(icon, 44, 44, 102, 128);
-    evas_object_show(icon);
-    elm_object_part_content_set(button, "icon", icon);
-    evas_object_size_hint_min_set(button, TOOL_BAR_BUTTON_SIZE, TOOL_BAR_BUTTON_SIZE);
+    evas_object_smart_callback_add(app->browser, "load,error", on_error, app);
+    evas_object_smart_callback_add(app->browser, "load,progress", on_progress, app);
+    evas_object_smart_callback_add(app->browser, "title,changed", on_title_changed, app);
 
-    return button;
-}
+    evas_object_event_callback_add(app->browser, EVAS_CALLBACK_KEY_DOWN, on_key_down, app);
 
-static Browser_Window *window_create(const char *url)
-{
-    Browser_Window *app_data = malloc(sizeof(Browser_Window));
-    if (!app_data) {
-        info("ERROR: could not create browser window.\n");
-        return NULL;
-    }
+    evas_object_size_hint_weight_set(app->browser, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+    evas_object_resize(app->browser, DEFAULT_WIDTH, DEFAULT_HEIGHT);
+    evas_object_show(app->browser);
+    evas_object_focus_set(app->browser, EINA_TRUE);
 
-    /* Create window */
-    app_data->window = elm_win_add(NULL, "minibrowser-window", ELM_WIN_BASIC);
-    elm_win_title_set(app_data->window, APP_NAME);
-    evas_object_smart_callback_add(app_data->window, "delete,request", on_window_deletion, &app_data);
-
-    /* Create window background */
-    Evas_Object *bg = elm_bg_add(app_data->window);
-    elm_bg_color_set(bg, 193, 192, 191);
-    evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-    elm_win_resize_object_add(app_data->window, bg);
-    evas_object_show(bg);
-
-    /* Create vertical layout */
-    Evas_Object *vertical_layout = elm_box_add(app_data->window);
-    elm_box_padding_set(vertical_layout, 0, 2);
-    evas_object_size_hint_weight_set(vertical_layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-    elm_win_resize_object_add(app_data->window, vertical_layout);
-    evas_object_show(vertical_layout);
-
-    /* Create horizontal layout for top bar */
-    Evas_Object *horizontal_layout = elm_box_add(app_data->window);
-    elm_box_horizontal_set(horizontal_layout, EINA_TRUE);
-    evas_object_size_hint_weight_set(horizontal_layout, EVAS_HINT_EXPAND, 0.0);
-    evas_object_size_hint_align_set(horizontal_layout, EVAS_HINT_FILL, 0.0);
-    elm_box_pack_end(vertical_layout, horizontal_layout);
-    evas_object_show(horizontal_layout);
-
-    /* Create Back button */
-    app_data->back_button = create_toolbar_button(app_data->window, "arrow_left");
-    evas_object_smart_callback_add(app_data->back_button, "clicked", on_back_button_clicked, app_data);
-    elm_object_disabled_set(app_data->back_button, EINA_TRUE);
-    evas_object_size_hint_weight_set(app_data->back_button, 0.0, EVAS_HINT_EXPAND);
-    evas_object_size_hint_align_set(app_data->back_button, 0.0, 0.5);
-    elm_box_pack_end(horizontal_layout, app_data->back_button);
-    evas_object_show(app_data->back_button);
-
-    /* Create Forward button */
-    app_data->forward_button = create_toolbar_button(app_data->window, "arrow_right");
-    evas_object_smart_callback_add(app_data->forward_button, "clicked", on_forward_button_clicked, app_data);
-    elm_object_disabled_set(app_data->forward_button, EINA_TRUE);
-    evas_object_size_hint_weight_set(app_data->forward_button, 0.0, EVAS_HINT_EXPAND);
-    evas_object_size_hint_align_set(app_data->forward_button, 0.0, 0.5);
-    elm_box_pack_end(horizontal_layout, app_data->forward_button);
-    evas_object_show(app_data->forward_button);
-
-    /* Create URL bar */
-    app_data->url_bar = elm_entry_add(app_data->window);
-    elm_entry_scrollable_set(app_data->url_bar, EINA_TRUE);
-    elm_entry_single_line_set(app_data->url_bar, EINA_TRUE);
-    elm_entry_cnp_mode_set(app_data->url_bar, ELM_CNP_MODE_PLAINTEXT);
-    elm_entry_text_style_user_push(app_data->url_bar, "DEFAULT='font_size=18'");
-    evas_object_smart_callback_add(app_data->url_bar, "activated", on_url_bar_activated, app_data);
-    evas_object_smart_callback_add(app_data->url_bar, "clicked", on_url_bar_clicked, app_data);
-    evas_object_size_hint_weight_set(app_data->url_bar, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-    evas_object_size_hint_align_set(app_data->url_bar, EVAS_HINT_FILL, EVAS_HINT_FILL);
-    elm_box_pack_end(horizontal_layout, app_data->url_bar);
-    evas_object_show(app_data->url_bar);
-
-    /* Create Refresh button */
-    Evas_Object *refresh_button = create_toolbar_button(app_data->window, "refresh");
-    evas_object_smart_callback_add(refresh_button, "clicked", on_refresh_button_clicked, app_data);
-    evas_object_size_hint_weight_set(refresh_button, 0.0, EVAS_HINT_EXPAND);
-    evas_object_size_hint_align_set(refresh_button, 1.0, 0.5);
-    elm_box_pack_end(horizontal_layout, refresh_button);
-    evas_object_show(refresh_button);
-
-    /* Create Home button */
-    Evas_Object *home_button = create_toolbar_button(app_data->window, "home");
-    evas_object_smart_callback_add(home_button, "clicked", on_home_button_clicked, app_data);
-    evas_object_size_hint_weight_set(home_button, 0.0, EVAS_HINT_EXPAND);
-    evas_object_size_hint_align_set(home_button, 1.0, 0.5);
-    elm_box_pack_end(horizontal_layout, home_button);
-    evas_object_show(home_button);
+    ewk_view_url_set(app->browser, url);
 
-    /* Create webview */
-    Evas *evas = evas_object_evas_get(app_data->window);
-    app_data->webview = ewk_view_add(evas);
-    ewk_view_theme_set(app_data->webview, THEME_DIR "/default.edj");
-
-//    Ewk_Settings *settings = ewk_view_settings_get(app_data->webview);
-//    ewk_settings_file_access_from_file_urls_allowed_set(settings, EINA_TRUE);
-//    ewk_settings_enable_frame_flattening_set(settings, frame_flattening_enabled);
-
-    evas_object_smart_callback_add(app_data->webview, "close,window", on_close_window, app_data);
-    evas_object_smart_callback_add(app_data->webview, "create,window", on_new_window, app_data);
-    evas_object_smart_callback_add(app_data->webview, "download,failed", on_download_failed, app_data);
-    evas_object_smart_callback_add(app_data->webview, "download,finished", on_download_finished, app_data);
-    evas_object_smart_callback_add(app_data->webview, "download,request", on_download_request, app_data);
-    evas_object_smart_callback_add(app_data->webview, "load,error", on_error, app_data);
-    evas_object_smart_callback_add(app_data->webview, "load,progress", on_progress, app_data);
-    evas_object_smart_callback_add(app_data->webview, "title,changed", on_title_changed, app_data);
-    evas_object_smart_callback_add(app_data->webview, "url,changed", on_url_changed, app_data);
-    evas_object_smart_callback_add(app_data->webview, "back,forward,list,changed", on_back_forward_list_changed, app_data);
-
-    evas_object_event_callback_add(app_data->webview, EVAS_CALLBACK_KEY_DOWN, on_key_down, app_data);
-    evas_object_event_callback_add(app_data->webview, EVAS_CALLBACK_MOUSE_DOWN, on_mouse_down, app_data);
-
-    evas_object_size_hint_weight_set(app_data->webview, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-    evas_object_size_hint_align_set(app_data->webview, EVAS_HINT_FILL, EVAS_HINT_FILL);
-    elm_box_pack_end(vertical_layout, app_data->webview);
-    evas_object_show(app_data->webview);
-
-    if (url)
-        ewk_view_url_set(app_data->webview, url);
-
-    evas_object_resize(app_data->window, DEFAULT_WIDTH, DEFAULT_HEIGHT);
-    elm_win_center(app_data->window, EINA_TRUE, EINA_TRUE);
-    evas_object_show(app_data->window);
-
-    view_focus_set(app_data, EINA_TRUE);
-
-    return app_data;
+    return app;
 }
 
-EAPI_MAIN int
-elm_main(int argc, char *argv[])
+int main(int argc, char *argv[])
 {
+    const char *url;
     int args = 1;
-    unsigned char quitOption = 0;
-    Browser_Window *window;
-
-    Ecore_Getopt_Value values[] = {
-        ECORE_GETOPT_VALUE_STR(evas_engine_name),
-        ECORE_GETOPT_VALUE_BOOL(quitOption),
-        ECORE_GETOPT_VALUE_BOOL(frame_flattening_enabled),
-        ECORE_GETOPT_VALUE_BOOL(quitOption),
-        ECORE_GETOPT_VALUE_BOOL(quitOption),
-        ECORE_GETOPT_VALUE_BOOL(quitOption),
-        ECORE_GETOPT_VALUE_NONE
-    };
 
     if (!ewk_init())
         return EXIT_FAILURE;
 
-    ecore_app_args_set(argc, (const char **) argv);
-    args = ecore_getopt_parse(&options, values, argc, argv);
-
-    if (args < 0)
-        return quit(EINA_FALSE, "ERROR: could not parse options.\n");
+    if (args < argc)
+        url = argv[args];
+    else
+        url = DEFAULT_URL;
 
-    if (quitOption)
-        return quit(EINA_TRUE, NULL);
+    MiniBrowser *browser = browserCreate(url);
 
-    if (args < argc) {
-        char *url = url_from_user_input(argv[args]);
-        window = window_create(url);
-        free(url);
-    } else
-        window = window_create(DEFAULT_URL);
+    Ecore_Event_Handler *handle = ecore_event_handler_add(ECORE_EVENT_SIGNAL_EXIT, main_signal_exit, 0);
 
-    if (!window)
-        return quit(EINA_FALSE, "ERROR: could not create browser window.\n");
+    ecore_main_loop_begin();
 
-    windows = eina_list_append(windows, window);
+    ecore_event_handler_del(handle);
+    ecore_evas_free(browser->ee);
+    free(browser);
 
-    elm_run();
+    ewk_shutdown();
 
-    return quit(EINA_TRUE, NULL);
+    return 0;
 }
-ELM_MAIN()
old mode 100755 (executable)
new mode 100644 (file)
index 263aab3..0a1cdf9
@@ -76,10 +76,6 @@ class EflPort(WebKitPort, PulseAudioSanitizer):
 
     def setup_environ_for_server(self, server_name=None):
         env = super(EflPort, self).setup_environ_for_server(server_name)
-        # If DISPLAY environment variable is unset in the system
-        # e.g. on build bot, remove DISPLAY variable from the dictionary
-        if not 'DISPLAY' in os.environ:
-            del env['DISPLAY']
         env['TEST_RUNNER_INJECTED_BUNDLE_FILENAME'] = self._build_path('lib', 'libTestRunnerInjectedBundle.so')
         env['TEST_RUNNER_PLUGIN_PATH'] = self._build_path('lib')
         if self.webprocess_cmd_prefix:
old mode 100755 (executable)
new mode 100644 (file)
index d0f8bf2..4c4c902
@@ -8,14 +8,12 @@ ADD_CUSTOM_TARGET(forwarding-headersSoupForTestWebKitAPI
 )
 SET(ForwardingNetworkHeadersForTestWebKitAPI_NAME forwarding-headersSoupForTestWebKitAPI)
 
-INCLUDE_DIRECTORIES(
+INCLUDE_DIRECTORIES(${LIBSOUP24_INCLUDE_DIRS}
     ${WEBKIT2_DIR}/UIProcess/API/C/soup
     ${WEBKIT2_DIR}/UIProcess/API/C/efl
     ${ECORE_INCLUDE_DIRS}
     ${EINA_INCLUDE_DIRS}
     ${EVAS_INCLUDE_DIRS}
-    ${GLIB_INCLUDE_DIRS}
-    ${LIBSOUP_INCLUDE_DIRS}
 )
 
 SET(test_main_SOURCES
index f83adf5..6cee6d0 100644 (file)
@@ -49,7 +49,7 @@ SET(WebKitTestRunner_INCLUDE_DIRECTORIES
     ${DERIVED_SOURCES_DIR}/InjectedBundle
     ${CMAKE_BINARY_DIR}
     ${CMAKE_SOURCE_DIR}/Source
-    ${LIBSOUP_INCLUDE_DIRS}
+    ${LIBSOUP24_INCLUDE_DIRS}
 )
 
 IF (ENABLE_TIZEN_SUPPORT)
@@ -115,5 +115,9 @@ TARGET_LINK_LIBRARIES(TestRunnerInjectedBundle ${WebKitTestRunner_LIBRARIES})
 ADD_EXECUTABLE(WebKitTestRunner ${WebKitTestRunner_SOURCES})
 TARGET_LINK_LIBRARIES(WebKitTestRunner ${WebKitTestRunner_LIBRARIES})
 
+IF (WebKitTestRunner_LINK_FLAGS)
+    ADD_TARGET_PROPERTIES(WebKitTestRunner LINK_FLAGS ${WebKitTestRunner_LINK_FLAGS})
+ENDIF ()
+
 ADD_DEPENDENCIES(${WebKit2_LIBRARY_NAME} ${ForwardingHeadersForWebKitTestRunner_NAME})
 ADD_DEPENDENCIES(${WebKit2_LIBRARY_NAME} ${ForwardingNetworkHeadersForWebKitTestRunner_NAME})
index 921d3c4..c910437 100644 (file)
@@ -44,8 +44,6 @@ module WTR {
         void dumpFullScreenCallbacks();
         void dumpFrameLoadCallbacks();
         void dumpProgressFinishedCallback();
-        void dumpResourceLoadCallbacks();
-        void dumpResourceResponseMIMETypes();
 
         // Special options.
         void keepWebHistory();
old mode 100755 (executable)
new mode 100644 (file)
index de31516..16371d1
@@ -42,7 +42,6 @@
 #include <WebKit2/WKBundleNodeHandlePrivate.h>
 #include <WebKit2/WKBundlePagePrivate.h>
 #include <WebKit2/WKURLRequest.h>
-#include <wtf/HashMap.h>
 #include <wtf/text/CString.h>
 #include <wtf/text/StringBuilder.h>
 
@@ -216,58 +215,6 @@ static WTF::String frameToStr(WKBundleFrameRef frame)
     return stringBuilder.toString();
 }
 
-static inline bool isLocalFileScheme(WKStringRef scheme)
-{
-    return WKStringIsEqualToUTF8CStringIgnoringCase(scheme, "file");
-}
-
-static const char divider = '/';
-
-static inline WTF::String pathSuitableForTestResult(WKURLRef fileUrl)
-{
-    if (!fileUrl)
-        return String();
-
-    WKRetainPtr<WKStringRef> schemeString = adoptWK(WKURLCopyScheme(fileUrl));
-    if (!isLocalFileScheme(schemeString.get()))
-        return toWTFString(adoptWK(WKURLCopyString(fileUrl)));
-
-    String pathString = toWTFString(adoptWK(WKURLCopyPath(fileUrl)));
-    WTF::StringBuilder stringBuilder;
-
-    // Remove the leading path from file urls.
-    const size_t indexBaseName = pathString.reverseFind(divider);
-    if (indexBaseName != notFound) {
-        const size_t indexDirName = pathString.reverseFind(divider, indexBaseName - 1);
-        if (indexDirName != notFound)
-            stringBuilder.append(pathString.substring(indexDirName + 1, indexBaseName - indexDirName - 1));
-        stringBuilder.append(divider);
-        stringBuilder.append(pathString.substring(indexBaseName + 1)); // Filename.
-    } else {
-        stringBuilder.append(divider);
-        stringBuilder.append(pathString); // Return "/pathString".
-    }
-
-    return stringBuilder.toString();
-}
-
-static inline WTF::String urlSuitableForTestResult(WKURLRef fileUrl)
-{
-    if (!fileUrl)
-        return String();
-
-    WKRetainPtr<WKStringRef> schemeString = adoptWK(WKURLCopyScheme(fileUrl));
-    if (!isLocalFileScheme(schemeString.get()))
-        return toWTFString(adoptWK(WKURLCopyString(fileUrl)));
-
-    WTF::String urlString = toWTFString(adoptWK(WKURLCopyString(fileUrl)));
-    const size_t indexBaseName = urlString.reverseFind(divider);
-
-    return (indexBaseName == notFound) ? urlString : urlString.substring(indexBaseName + 1);
-}
-
-static HashMap<uint64_t, String> assignedUrlsCache;
-
 InjectedBundlePage::InjectedBundlePage(WKBundlePageRef page)
     : m_page(page)
     , m_world(AdoptWK, WKBundleScriptWorldCreateWorld())
@@ -419,7 +366,6 @@ void InjectedBundlePage::resetAfterTest()
 #else
     WebCoreTestSupport::resetInternalsObject(context);
 #endif
-    assignedUrlsCache.clear();
 }
 
 // Loader Client Callbacks
@@ -450,70 +396,6 @@ static void dumpFrameDescriptionSuitableForTestResult(WKBundleFrameRef frame)
     InjectedBundle::shared().stringBuilder()->append("\"");
 }
 
-static inline void dumpRequestDescriptionSuitableForTestResult(WKURLRequestRef request)
-{
-    WKRetainPtr<WKURLRef> url = adoptWK(WKURLRequestCopyURL(request));
-    WKRetainPtr<WKURLRef> firstParty = adoptWK(WKURLRequestCopyFirstPartyForCookies(request));
-    WKRetainPtr<WKStringRef> httpMethod = adoptWK(WKURLRequestCopyHTTPMethod(request));
-
-    InjectedBundle::shared().stringBuilder()->append("<NSURLRequest URL ");
-    InjectedBundle::shared().stringBuilder()->append(pathSuitableForTestResult(url.get()));
-    InjectedBundle::shared().stringBuilder()->append(", main document URL ");
-    InjectedBundle::shared().stringBuilder()->append(urlSuitableForTestResult(firstParty.get()));
-    InjectedBundle::shared().stringBuilder()->append(", http method ");
-
-    if (WKStringIsEmpty(httpMethod.get()))
-        InjectedBundle::shared().stringBuilder()->append("(none)");
-    else
-        InjectedBundle::shared().stringBuilder()->append(toWTFString(httpMethod));
-
-    InjectedBundle::shared().stringBuilder()->append(">");
-}
-
-static inline void dumpResponseDescriptionSuitableForTestResult(WKURLResponseRef response)
-{
-    WKRetainPtr<WKURLRef> url = adoptWK(WKURLResponseCopyURL(response));
-    if (!url) {
-        InjectedBundle::shared().stringBuilder()->append("(null)");
-        return;
-    }
-    InjectedBundle::shared().stringBuilder()->append("<NSURLResponse ");
-    InjectedBundle::shared().stringBuilder()->append(pathSuitableForTestResult(url.get()));
-    InjectedBundle::shared().stringBuilder()->append(", http status code ");
-    InjectedBundle::shared().stringBuilder()->append(WTF::String::number(WKURLResponseHTTPStatusCode(response)));
-    InjectedBundle::shared().stringBuilder()->append(">");
-}
-
-static inline void dumpErrorDescriptionSuitableForTestResult(WKErrorRef error)
-{
-    WKRetainPtr<WKStringRef> errorDomain = adoptWK(WKErrorCopyDomain(error));
-    int errorCode = WKErrorGetErrorCode(error);
-
-    // We need to do some error mapping here to match the test expectations (Mac error names are expected).
-    if (WKStringIsEqualToUTF8CString(errorDomain.get(), "WebKitNetworkError")) {
-        errorDomain = adoptWK(WKStringCreateWithUTF8CString("NSURLErrorDomain"));
-        errorCode = -999;
-    }
-
-    if (WKStringIsEqualToUTF8CString(errorDomain.get(), "WebKitPolicyError"))
-        errorDomain = adoptWK(WKStringCreateWithUTF8CString("WebKitErrorDomain"));
-
-    InjectedBundle::shared().stringBuilder()->append("<NSError domain ");
-    InjectedBundle::shared().stringBuilder()->append(toWTFString(errorDomain));
-    InjectedBundle::shared().stringBuilder()->append(", code ");
-    InjectedBundle::shared().stringBuilder()->append(String::number(errorCode));
-
-    WKRetainPtr<WKURLRef> url = adoptWK(WKErrorCopyFailingURL(error));
-    if (url.get()) {
-        WKRetainPtr<WKStringRef> urlString = adoptWK(WKURLCopyString(url.get()));
-        InjectedBundle::shared().stringBuilder()->append(", failing URL \"");
-        InjectedBundle::shared().stringBuilder()->append(toWTFString(urlString));
-        InjectedBundle::shared().stringBuilder()->append("\"");
-    }
-
-    InjectedBundle::shared().stringBuilder()->append(">");
-}
-
 void InjectedBundlePage::didStartProvisionalLoadForFrame(WKBundlePageRef page, WKBundleFrameRef frame, WKTypeRef*, const void *clientInfo)
 {
     static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->didStartProvisionalLoadForFrame(frame);
@@ -1056,37 +938,17 @@ void InjectedBundlePage::didDetectXSSForFrame(WKBundleFrameRef frame)
 {
 }
 
-void InjectedBundlePage::didInitiateLoadForResource(WKBundlePageRef, WKBundleFrameRef, uint64_t identifier, WKURLRequestRef request, bool)
+void InjectedBundlePage::didInitiateLoadForResource(WKBundlePageRef, WKBundleFrameRef, uint64_t identifier, WKURLRequestRef, bool)
 {
-    if (!InjectedBundle::shared().isTestRunning())
-        return;
-
-    if (!InjectedBundle::shared().layoutTestController()->shouldDumpResourceLoadCallbacks())
-        return;
-
-    WKRetainPtr<WKURLRef> url = adoptWK(WKURLRequestCopyURL(request));
-    assignedUrlsCache.add(identifier, pathSuitableForTestResult(url.get()));
 }
 
 // Resource Load Client Callbacks
 
-WKURLRequestRef InjectedBundlePage::willSendRequestForFrame(WKBundlePageRef, WKBundleFrameRef, uint64_t identifier, WKURLRequestRef request, WKURLResponseRef response)
+WKURLRequestRef InjectedBundlePage::willSendRequestForFrame(WKBundlePageRef, WKBundleFrameRef, uint64_t, WKURLRequestRef request, WKURLResponseRef)
 {
     if (InjectedBundle::shared().isTestRunning() && InjectedBundle::shared().layoutTestController()->willSendRequestReturnsNull())
         return 0;
 
-    if (InjectedBundle::shared().isTestRunning()
-        && InjectedBundle::shared().layoutTestController()->shouldDumpResourceLoadCallbacks()) {
-        InjectedBundle::shared().stringBuilder()->append(assignedUrlsCache.contains(identifier)
-                                                         ? assignedUrlsCache.get(identifier)
-                                                         : "<unknown>");
-        InjectedBundle::shared().stringBuilder()->append(" - willSendRequest ");
-        dumpRequestDescriptionSuitableForTestResult(request);
-        InjectedBundle::shared().stringBuilder()->append(" redirectResponse ");
-        dumpResponseDescriptionSuitableForTestResult(response);
-        InjectedBundle::shared().stringBuilder()->append("\n");
-    }
-
     WKRetainPtr<WKURLRef> url = adoptWK(WKURLRequestCopyURL(request));
     WKRetainPtr<WKStringRef> host = adoptWK(WKURLCopyHostName(url.get()));
     WKRetainPtr<WKStringRef> scheme = adoptWK(WKURLCopyScheme(url.get()));
@@ -1106,67 +968,20 @@ WKURLRequestRef InjectedBundlePage::willSendRequestForFrame(WKBundlePageRef, WKB
     return request;
 }
 
-void InjectedBundlePage::didReceiveResponseForResource(WKBundlePageRef, WKBundleFrameRef, uint64_t identifier, WKURLResponseRef response)
+void InjectedBundlePage::didReceiveResponseForResource(WKBundlePageRef, WKBundleFrameRef, uint64_t, WKURLResponseRef)
 {
-    if (!InjectedBundle::shared().isTestRunning())
-        return;
-
-    if (InjectedBundle::shared().layoutTestController()->shouldDumpResourceLoadCallbacks()) {
-        InjectedBundle::shared().stringBuilder()->append(assignedUrlsCache.contains(identifier)
-                                                         ? assignedUrlsCache.get(identifier)
-                                                         : "<unknown>");
-        InjectedBundle::shared().stringBuilder()->append(" - didReceiveResponse ");
-        dumpResponseDescriptionSuitableForTestResult(response);
-        InjectedBundle::shared().stringBuilder()->append("\n");
-    }
-
-
-    if (!InjectedBundle::shared().layoutTestController()->shouldDumpResourceResponseMIMETypes())
-        return;
-
-    WKRetainPtr<WKURLRef> url = adoptWK(WKURLResponseCopyURL(response));
-    WKRetainPtr<WKStringRef> urlString = adoptWK(WKURLCopyLastPathComponent(url.get()));
-    WKRetainPtr<WKStringRef> mimeTypeString = adoptWK(WKURLResponseCopyMIMEType(response));
-
-    InjectedBundle::shared().stringBuilder()->append(toWTFString(urlString));
-    InjectedBundle::shared().stringBuilder()->append(" has MIME type ");
-    InjectedBundle::shared().stringBuilder()->append(toWTFString(mimeTypeString));
-    InjectedBundle::shared().stringBuilder()->append("\n");
 }
 
 void InjectedBundlePage::didReceiveContentLengthForResource(WKBundlePageRef, WKBundleFrameRef, uint64_t, uint64_t)
 {
 }
 
-void InjectedBundlePage::didFinishLoadForResource(WKBundlePageRef, WKBundleFrameRef, uint64_t identifier)
+void InjectedBundlePage::didFinishLoadForResource(WKBundlePageRef, WKBundleFrameRef, uint64_t)
 {
-    if (!InjectedBundle::shared().isTestRunning())
-        return;
-
-    if (!InjectedBundle::shared().layoutTestController()->shouldDumpResourceLoadCallbacks())
-        return;
-
-    InjectedBundle::shared().stringBuilder()->append(assignedUrlsCache.contains(identifier)
-                                                     ? assignedUrlsCache.get(identifier)
-                                                     : "<unknown>");
-    InjectedBundle::shared().stringBuilder()->append(" - didFinishLoading\n");
 }
 
-void InjectedBundlePage::didFailLoadForResource(WKBundlePageRef, WKBundleFrameRef, uint64_t identifier, WKErrorRef error)
+void InjectedBundlePage::didFailLoadForResource(WKBundlePageRef, WKBundleFrameRef, uint64_t, WKErrorRef)
 {
-    if (!InjectedBundle::shared().isTestRunning())
-        return;
-
-    if (!InjectedBundle::shared().layoutTestController()->shouldDumpResourceLoadCallbacks())
-        return;
-
-    InjectedBundle::shared().stringBuilder()->append(assignedUrlsCache.contains(identifier)
-                                                     ? assignedUrlsCache.get(identifier)
-                                                     : "<unknown>");
-    InjectedBundle::shared().stringBuilder()->append(" - didFailLoadingWithError: ");
-
-    dumpErrorDescriptionSuitableForTestResult(error);
-    InjectedBundle::shared().stringBuilder()->append("\n");
 }
 
 
index b0b3e09..dc26fb3 100644 (file)
@@ -76,8 +76,6 @@ LayoutTestController::LayoutTestController()
     , m_dumpFullScreenCallbacks(false)
     , m_dumpFrameLoadCallbacks(false)
     , m_dumpProgressFinishedCallback(false)
-    , m_dumpResourceLoadCallbacks(false)
-    , m_dumpResourceResponseMIMETypes(false)
     , m_waitToDump(false)
     , m_testRepaint(false)
     , m_testRepaintSweepHorizontally(false)
old mode 100755 (executable)
new mode 100644 (file)
index fe0c69b..aa65294
@@ -78,8 +78,6 @@ public:
     void dumpFullScreenCallbacks() { m_dumpFullScreenCallbacks = true; }
     void dumpFrameLoadCallbacks() { setShouldDumpFrameLoadCallbacks(true); }
     void dumpProgressFinishedCallback() { setShouldDumpProgressFinishedCallback(true); }
-    void dumpResourceLoadCallbacks() { m_dumpResourceLoadCallbacks = true; }
-    void dumpResourceResponseMIMETypes() { m_dumpResourceResponseMIMETypes = true; }
 
     void setShouldDumpFrameLoadCallbacks(bool value) { m_dumpFrameLoadCallbacks = value; }
     void setShouldDumpProgressFinishedCallback(bool value) { m_dumpProgressFinishedCallback = value; }
@@ -172,9 +170,6 @@ public:
     bool shouldDumpFullScreenCallbacks() const { return m_dumpFullScreenCallbacks; }
     bool shouldDumpFrameLoadCallbacks() const { return m_dumpFrameLoadCallbacks; }
     bool shouldDumpProgressFinishedCallback() { return m_dumpProgressFinishedCallback; }
-    bool shouldDumpResourceLoadCallbacks() const { return m_dumpResourceLoadCallbacks; }
-    bool shouldDumpResourceResponseMIMETypes() const { return m_dumpResourceResponseMIMETypes; }
-
     bool isPolicyDelegateEnabled() const { return m_policyDelegateEnabled; }
     bool isPolicyDelegatePermissive() const { return m_policyDelegatePermissive; }
 
@@ -260,8 +255,6 @@ private:
     bool m_dumpFullScreenCallbacks;
     bool m_dumpFrameLoadCallbacks;
     bool m_dumpProgressFinishedCallback;
-    bool m_dumpResourceLoadCallbacks;
-    bool m_dumpResourceResponseMIMETypes;
     bool m_waitToDump; // True if waitUntilDone() has been called, but notifyDone() has not yet been called.
     bool m_testRepaint;
     bool m_testRepaintSweepHorizontally;
old mode 100755 (executable)
new mode 100644 (file)
index 4bfa64a..6c93091
@@ -1,3 +1,11 @@
+LIST(APPEND WebKitTestRunner_LINK_FLAGS
+    ${ECORE_X_LDFLAGS}
+    ${EDJE_LDFLAGS}
+    ${EFLDEPS_LDFLAGS}
+    ${EVAS_LDFLAGS}
+    ${LIBSOUP24_LDFLAGS}
+)
+
 ADD_CUSTOM_TARGET(forwarding-headersEflForWebKitTestRunner
     COMMAND ${PERL_EXECUTABLE} ${WEBKIT2_DIR}/Scripts/generate-forwarding-headers.pl ${WEBKIT_TESTRUNNER_DIR} ${DERIVED_SOURCES_WEBKIT2_DIR}/include efl
 )
@@ -23,22 +31,18 @@ LIST(APPEND WebKitTestRunner_INCLUDE_DIRECTORIES
     "${WTF_DIR}/wtf/gobject"
 
     ${CAIRO_INCLUDE_DIRS}
-    ${ECORE_INCLUDE_DIRS}
-    ${ECORE_EVAS_INCLUDE_DIRS}
     ${ECORE_X_INCLUDE_DIRS}
-    ${EINA_INCLUDE_DIRS}
+    ${EFLDEPS_INCLUDE_DIRS}
     ${EVAS_INCLUDE_DIRS}
-    ${GLIB_INCLUDE_DIRS}
+    ${Glib_INCLUDE_DIRS}
 )
 
 LIST(APPEND WebKitTestRunner_LIBRARIES
     ${CAIRO_LIBRARIES}
-    ${ECORE_LIBRARIES}
-    ${ECORE_EVAS_LIBRARIES}
     ${ECORE_X_LIBRARIES}
-    ${EINA_LIBRARIES}
-    ${EVAS_LIBRARIES}
-    ${GLIB_LIBRARIES}
+    ${EDJE_LIBRARIES}
+    ${EFLDEPS_LIBRARIES}
+    ${Glib_LIBRARIES}
     ${WTF_LIBRARY_NAME}
 )
 
index 65bb48b..da1975e 100755 (executable)
@@ -28,9 +28,11 @@ using namespace WebKit;
 
 namespace WTR {
 
+static bool useX11Window = false;
+
 static Ecore_Evas* initEcoreEvas()
 {
-    Ecore_Evas* ecoreEvas = ecore_evas_new(0, 0, 0, 800, 600, 0);
+    Ecore_Evas* ecoreEvas = useX11Window ? ecore_evas_new(0, 0, 0, 800, 600, 0) : ecore_evas_buffer_new(800, 600);
     if (!ecoreEvas)
         return 0;
 
old mode 100755 (executable)
new mode 100644 (file)
index cc47a4b..c12f1b5
 
 #include "EWebKit2.h"
 #include "TestController.h"
-#include <stdlib.h>
 
 #if OS(TIZEN)
 #include <Elementary.h>
 #endif
 
+#ifdef HAVE_ECORE_X
+#include <Ecore_X.h>
+#endif
+
 int main(int argc, char** argv)
 {
     if (!ewk_init())
@@ -37,9 +40,18 @@ int main(int argc, char** argv)
         return 1;
 #endif
 
+#ifdef HAVE_ECORE_X
+    if (!ecore_x_init(0)) {
+        ewk_shutdown();
+        return 1;
+    }
+#endif
+
     // Prefer the not installed web and plugin processes.
     WTR::TestController controller(argc, const_cast<const char**>(argv));
 
+    ecore_x_shutdown();
+
 #if OS(TIZEN)
     elm_shutdown();
 #else
@@ -47,6 +59,10 @@ int main(int argc, char** argv)
     ecore_evas_shutdown();
 #endif
 
+#ifdef HAVE_ECORE_X
+    ecore_x_shutdown();
+#endif
+
     ewk_shutdown();
 
     return 0;