Changeset 127422 in webkit
- Timestamp:
- Sep 3, 2012 7:48:45 AM (12 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 4 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r127420 r127422 1 2012-09-03 Eunmi Lee <eunmi15.lee@samsung.com> 2 3 [EFL][WK2] Add ewk_settings. 4 https://bugs.webkit.org/show_bug.cgi?id=91206 5 6 Reviewed by Gyuyoung Kim. 7 8 Add the ewk_settings which wraps the WKPreferencesRef. 9 The ewk_settings will be created by the ewk_view and it will be 10 destroyed when the ewk_view is destroyed. I make each view to have 11 its own group to make one ewk_settings sets preferences only for 12 one ewk_view. 13 The application can get the ewk_settings from ewk_view using 14 ewk_view_settings_get() API. 15 16 * UIProcess/API/efl/EWebKit2.h: 17 * UIProcess/API/efl/ewk_settings.cpp: Added. 18 (ewk_settings_enable_scripts_set): 19 (ewk_settings_enable_scripts_get): 20 (ewk_settings_auto_load_images_set): 21 (ewk_settings_auto_load_images_get): 22 * UIProcess/API/efl/ewk_settings.h: Added. 23 * UIProcess/API/efl/ewk_settings_private.h: Added. 24 (_Ewk_Settings): 25 (_Ewk_Settings::_Ewk_Settings): 26 * UIProcess/API/efl/ewk_view.cpp: 27 (_Ewk_View_Private_Data): 28 (_ewk_view_initialize): 29 (ewk_view_settings_get): 30 * UIProcess/API/efl/ewk_view.h: 31 * UIProcess/API/efl/tests/test_ewk2_settings.cpp: Added. 32 (TEST_F): 33 * UIProcess/API/efl/tests/test_ewk2_view.cpp: 34 (TEST_F): 35 1 36 2012-09-03 Allan Sandfeld Jensen <allan.jensen@nokia.com> 2 37 -
trunk/Source/WebKit2/PlatformEfl.cmake
r127195 r127422 61 61 UIProcess/API/efl/ewk_navigation_policy_decision.cpp 62 62 UIProcess/API/efl/ewk_popup_menu_item.cpp 63 UIProcess/API/efl/ewk_settings.cpp 63 64 UIProcess/API/efl/ewk_url_request.cpp 64 65 UIProcess/API/efl/ewk_url_response.cpp … … 215 216 "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_navigation_policy_decision.h" 216 217 "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_popup_menu_item.h" 218 "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_settings.h" 217 219 "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_url_request.h" 218 220 "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_url_response.h" … … 280 282 test_ewk2_eina_shared_string 281 283 test_ewk2_intents 284 test_ewk2_settings 282 285 test_ewk2_view 283 286 ) -
trunk/Source/WebKit2/UIProcess/API/efl/EWebKit2.h
r126866 r127422 40 40 #include "ewk_navigation_policy_decision.h" 41 41 #include "ewk_popup_menu_item.h" 42 #include "ewk_settings.h" 42 43 #include "ewk_url_request.h" 43 44 #include "ewk_url_response.h" -
trunk/Source/WebKit2/UIProcess/API/efl/ewk_view.cpp
r127390 r127422 33 33 #include "WKURL.h" 34 34 #include "WebContext.h" 35 #include "WebPageGroup.h" 35 36 #include "WebPopupItem.h" 36 37 #include "WebPopupMenuProxyEfl.h" … … 42 43 #include "ewk_popup_menu_item_private.h" 43 44 #include "ewk_private.h" 45 #include "ewk_settings_private.h" 44 46 #include "ewk_view_find_client_private.h" 45 47 #include "ewk_view_form_client_private.h" … … 54 56 #include <WebCore/Cursor.h> 55 57 #include <WebCore/EflScreenUtilities.h> 58 #include <WebKit2/WKPageGroup.h> 56 59 #include <wtf/text/CString.h> 57 60 … … 89 92 LoadingResourcesMap loadingResourcesMap; 90 93 Ewk_Back_Forward_List* backForwardList; 94 OwnPtr<Ewk_Settings> settings; 91 95 92 96 WebPopupMenuProxyEfl* popupMenuProxy; … … 686 690 priv->pageClient = PageClientImpl::create(ewkView); 687 691 688 priv->pageProxy = toImpl(ewk_context_WKContext_get(context))->createWebPage(priv->pageClient.get(), toImpl(pageGroupRef)); 692 if (pageGroupRef) 693 priv->pageProxy = toImpl(ewk_context_WKContext_get(context))->createWebPage(priv->pageClient.get(), toImpl(pageGroupRef)); 694 else 695 priv->pageProxy = toImpl(ewk_context_WKContext_get(context))->createWebPage(priv->pageClient.get(), WebPageGroup::create().get()); 689 696 #if USE(COORDINATED_GRAPHICS) 690 697 priv->pageProxy->pageGroup()->preferences()->setAcceleratedCompositingEnabled(true); … … 695 702 696 703 priv->backForwardList = ewk_back_forward_list_new(toAPI(priv->pageProxy->backForwardList())); 704 priv->settings = adoptPtr(new Ewk_Settings(WKPageGroupGetPreferences(WKPageGetPageGroup(toAPI(priv->pageProxy.get()))))); 697 705 698 706 #if USE(COORDINATED_GRAPHICS) … … 850 858 851 859 return true; 860 } 861 862 Ewk_Settings* ewk_view_settings_get(const Evas_Object* ewkView) 863 { 864 EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, 0); 865 EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, 0); 866 867 return priv->settings.get(); 852 868 } 853 869 -
trunk/Source/WebKit2/UIProcess/API/efl/ewk_view.h
r126866 r127422 74 74 #include "ewk_download_job.h" 75 75 #include "ewk_intent.h" 76 #include "ewk_settings.h" 76 77 #include "ewk_url_request.h" 77 78 #include "ewk_url_response.h" … … 357 358 358 359 /** 360 * Gets the Ewk_Settings of this view. 361 * 362 * @param o view object to get Ewk_Settings 363 * 364 * @return the Ewk_Settings of this view or @c NULL on failure 365 */ 366 EAPI Ewk_Settings *ewk_view_settings_get(const Evas_Object *o); 367 368 /** 359 369 * Delivers a Web intent to the view's main frame. 360 370 * -
trunk/Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_view.cpp
r127397 r127422 237 237 EXPECT_FALSE(ewk_view_popup_menu_select(webView(), 0)); 238 238 } 239 240 TEST_F(EWK2UnitTestBase, ewk_view_settings_get) 241 { 242 Ewk_Settings* settings = ewk_view_settings_get(webView()); 243 ASSERT_TRUE(settings); 244 ASSERT_EQ(settings, ewk_view_settings_get(webView())); 245 }
Note: See TracChangeset
for help on using the changeset viewer.