Changeset 135752 in webkit
- Timestamp:
- Nov 26, 2012, 12:17:36 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r135748 r135752 1 2012-11-26 Christophe Dumez <christophe.dumez@intel.com> 2 3 [EFL][WK2] Add setting to enable / disable HTML5 local storage functionality 4 https://bugs.webkit.org/show_bug.cgi?id=103224 5 6 Reviewed by Laszlo Gombos. 7 8 Add API to ewk_settings to enable / disable the HTML5 9 local storage functionality. The functionality is 10 enabled by default. 11 12 * UIProcess/API/efl/ewk_settings.cpp: 13 (ewk_settings_local_storage_enabled_set): 14 (ewk_settings_local_storage_enabled_get): 15 * UIProcess/API/efl/ewk_settings.h: 16 * UIProcess/API/efl/tests/test_ewk2_settings.cpp: 17 (TEST_F): Add API test for ewk_settings_local_storage_enabled_get / set. 18 1 19 2012-11-26 Rafael Brandao <rafael.lobo@openbossa.org> 2 20 -
trunk/Source/WebKit2/UIProcess/API/efl/ewk_settings.cpp
r135117 r135752 333 333 return settings->preferences()->javaScriptCanOpenWindowsAutomatically(); 334 334 } 335 336 Eina_Bool ewk_settings_local_storage_enabled_set(Ewk_Settings* settings, Eina_Bool enable) 337 { 338 EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false); 339 340 settings->preferences()->setLocalStorageEnabled(enable); 341 342 return true; 343 } 344 345 Eina_Bool ewk_settings_local_storage_enabled_get(const Ewk_Settings* settings) 346 { 347 EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false); 348 349 return settings->preferences()->localStorageEnabled(); 350 } -
trunk/Source/WebKit2/UIProcess/API/efl/ewk_settings.h
r135117 r135752 392 392 EAPI Eina_Bool ewk_settings_scripts_can_open_windows_get(const Ewk_Settings *settings); 393 393 394 /** 395 * Enables/disables the HTML5 local storage functionality. 396 * 397 * Local storage provides simple synchronous storage access. 398 * HTML5 local storage specification is available at 399 * http://dev.w3.org/html5/webstorage/. 400 * 401 * By default, the HTML5 local storage is enabled. 402 * 403 * @param settings settings object to set the HTML5 local storage state 404 * @param enable @c EINA_TRUE to enable HTML5 local storage, 405 * @c EINA_FALSE to disable 406 * 407 * @return @c EINA_TRUE on success or @c EINA_FALSE on failure 408 */ 409 EAPI Eina_Bool ewk_settings_local_storage_enabled_set(Ewk_Settings *settings, Eina_Bool enable); 410 411 /** 412 * Returns whether the HTML5 local storage functionality is enabled or not. 413 * 414 * Local storage provides simple synchronous storage access. 415 * HTML5 local storage specification is available at 416 * http://dev.w3.org/html5/webstorage/. 417 * 418 * By default, the HTML5 local storage is enabled. 419 * 420 * @param settings settings object to query whether HTML5 local storage is enabled 421 * 422 * @return @c EINA_TRUE if the HTML5 local storage is enabled 423 * @c EINA_FALSE if disabled or on failure 424 */ 425 EAPI Eina_Bool ewk_settings_local_storage_enabled_get(const Ewk_Settings *settings); 426 394 427 #ifdef __cplusplus 395 428 } -
trunk/Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_settings.cpp
r135349 r135752 208 208 ASSERT_FALSE(ewk_settings_scripts_can_open_windows_get(settings)); 209 209 } 210 211 TEST_F(EWK2UnitTestBase, ewk_settings_local_storage_enabled) 212 { 213 Ewk_Settings* settings = ewk_view_settings_get(webView()); 214 215 // HTML5 local storage should be enabled by default. 216 ASSERT_TRUE(ewk_settings_local_storage_enabled_get(settings)); 217 218 ASSERT_TRUE(ewk_settings_local_storage_enabled_set(settings, false)); 219 ASSERT_FALSE(ewk_settings_local_storage_enabled_get(settings)); 220 221 ASSERT_TRUE(ewk_settings_local_storage_enabled_set(settings, true)); 222 ASSERT_TRUE(ewk_settings_local_storage_enabled_get(settings)); 223 } -
trunk/Tools/ChangeLog
r135744 r135752 1 2012-11-26 Christophe Dumez <christophe.dumez@intel.com> 2 3 [EFL][WK2] Add setting to enable / disable HTML5 local storage functionality 4 https://bugs.webkit.org/show_bug.cgi?id=103224 5 6 Reviewed by Laszlo Gombos. 7 8 Add --local-storage command line argument to MiniBrowser to 9 explicitely disable HTML5 local storage functionality. This 10 is useful for testing purposes. 11 12 * MiniBrowser/efl/main.c: 13 (window_create): 14 (elm_main): 15 1 16 2012-11-26 Zan Dobersek <zandobersek@gmail.com> 2 17 -
trunk/Tools/MiniBrowser/efl/main.c
r135372 r135752 42 42 static Eina_Bool encoding_detector_enabled = EINA_FALSE; 43 43 static Eina_Bool frame_flattening_enabled = EINA_FALSE; 44 static Eina_Bool local_storage_enabled = EINA_TRUE; 44 45 static int window_width = 800; 45 46 static int window_height = 600; … … 79 80 "%prog [options] [url]", 80 81 "0.0.1", 81 "(C)2012 Samsung Electronics\n ",82 "(C)2012 Samsung Electronics\n (C)2012 Intel Corporation\n", 82 83 "", 83 "Test Web Browser using the Enlightenment Foundation Libraries of WebKit2",84 "Test Web Browser using the Enlightenment Foundation Libraries (EFL) port of WebKit2", 84 85 EINA_TRUE, { 85 86 ECORE_GETOPT_STORE_STR … … 96 97 ECORE_GETOPT_STORE_DEF_BOOL 97 98 ('f', "flattening", "frame flattening.", EINA_FALSE), 99 ECORE_GETOPT_STORE_DEF_BOOL 100 ('l', "local-storage", "HTML5 local storage support (enabled by default).", EINA_TRUE), 98 101 ECORE_GETOPT_VERSION 99 102 ('V', "version"), … … 1064 1067 ewk_settings_encoding_detector_enabled_set(settings, encoding_detector_enabled); 1065 1068 ewk_settings_frame_flattening_enabled_set(settings, frame_flattening_enabled); 1069 ewk_settings_local_storage_enabled_set(settings, local_storage_enabled); 1070 info("HTML5 local storage is %s for this view.\n", local_storage_enabled ? "enabled" : "disabled"); 1066 1071 ewk_settings_developer_extras_enabled_set(settings, EINA_TRUE); 1067 1072 ewk_settings_preferred_minimum_contents_width_set(settings, 0); … … 1140 1145 ECORE_GETOPT_VALUE_BOOL(encoding_detector_enabled), 1141 1146 ECORE_GETOPT_VALUE_BOOL(frame_flattening_enabled), 1147 ECORE_GETOPT_VALUE_BOOL(local_storage_enabled), 1142 1148 ECORE_GETOPT_VALUE_BOOL(quitOption), 1143 1149 ECORE_GETOPT_VALUE_BOOL(quitOption),
Note:
See TracChangeset
for help on using the changeset viewer.