Diff
Modified: trunk/LayoutTests/ChangeLog (127023 => 127024)
--- trunk/LayoutTests/ChangeLog 2012-08-29 18:14:01 UTC (rev 127023)
+++ trunk/LayoutTests/ChangeLog 2012-08-29 18:16:15 UTC (rev 127024)
@@ -1,3 +1,14 @@
+2012-08-29 Kamil Blank <[email protected]>
+
+ [EFL] Add setting API for allow universal/file access from file URLs.
+ https://bugs.webkit.org/show_bug.cgi?id=83121
+
+ Reviewed by Eric Seidel.
+
+ Enable test connected with setAllowUniversalAccessFromFileURLs and setAllowFileAccessFromFileURLs.
+
+ * platform/efl/Skipped:
+
2012-08-29 W. James MacLean <[email protected]>
[chromium] Link highlight should clear on page navigation.
Modified: trunk/LayoutTests/platform/efl/Skipped (127023 => 127024)
--- trunk/LayoutTests/platform/efl/Skipped 2012-08-29 18:14:01 UTC (rev 127023)
+++ trunk/LayoutTests/platform/efl/Skipped 2012-08-29 18:16:15 UTC (rev 127024)
@@ -127,15 +127,6 @@
fast/events/blur-focus-window-should-blur-focus-element.html
plugins/netscape-plugin-setwindow-size-2.html
-# EFL's LayoutTestController does not implement setAllowUniversalAccessFromFileURLs
-# EFL's LayoutTestController does not implement setAllowAccessFromFileURLs
-fast/files/workers/inline-worker-via-blob-url.html
-fast/forms/formtarget-attribute-button-html.html
-fast/forms/formtarget-attribute-input-html.html
-fast/frames/location-change-no-file-access.html
-fast/xmlhttprequest/xmlhttprequest-no-file-access.html
-fast/xmlhttprequest/xmlhttprequest-nonexistent-file.html
-
# BUG84835: Tests failing because of missing editing delegate callbacks.
editing/deleting
editing/inserting
Modified: trunk/Source/WebKit/efl/ChangeLog (127023 => 127024)
--- trunk/Source/WebKit/efl/ChangeLog 2012-08-29 18:14:01 UTC (rev 127023)
+++ trunk/Source/WebKit/efl/ChangeLog 2012-08-29 18:16:15 UTC (rev 127024)
@@ -1,3 +1,24 @@
+2012-08-29 Kamil Blank <[email protected]>
+
+ [EFL] Add setting API for allow universal/file access from file URLs.
+ https://bugs.webkit.org/show_bug.cgi?id=83121
+
+ Reviewed by Eric Seidel.
+
+ Make it possible to enable allow universal/file access from file URLs.
+ Default value for both settings is true.
+
+ * ewk/ewk_view.cpp:
+ (_Ewk_View_Private_Data):
+ (_ewk_view_priv_new):
+ (ewk_view_setting_allow_universal_access_from_file_urls_set): Function sets if locally loaded documents
+ are allowed to access remote urls.
+ (ewk_view_setting_allow_universal_access_from_file_urls_get):
+ (ewk_view_setting_allow_file_access_from_file_urls_set): Function sets if locally loaded documents
+ are allowed to access other local urls.
+ (ewk_view_setting_allow_file_access_from_file_urls_get):
+ * ewk/ewk_view.h:
+
2012-08-29 Ryuan Choi <[email protected]>
[EFL] Add *explicit* keyword to constructors in WebCoreSupport
Modified: trunk/Source/WebKit/efl/ewk/ewk_view.cpp (127023 => 127024)
--- trunk/Source/WebKit/efl/ewk/ewk_view.cpp 2012-08-29 18:14:01 UTC (rev 127023)
+++ trunk/Source/WebKit/efl/ewk/ewk_view.cpp 2012-08-29 18:16:15 UTC (rev 127024)
@@ -332,6 +332,8 @@
} zoomRange;
float devicePixelRatio;
double domTimerInterval;
+ bool allowUniversalAccessFromFileURLs : 1;
+ bool allowFileAccessFromFileURLs : 1;
} settings;
struct {
struct {
@@ -874,6 +876,9 @@
priv->settings.domTimerInterval = priv->pageSettings->defaultMinDOMTimerInterval();
+ priv->settings.allowUniversalAccessFromFileURLs = priv->pageSettings->allowUniversalAccessFromFileURLs();
+ priv->settings.allowFileAccessFromFileURLs = priv->pageSettings->allowFileAccessFromFileURLs();
+
priv->mainFrame = _ewk_view_core_frame_new(smartData, priv, 0).get();
priv->history = ewk_history_new(static_cast<WebCore::BackForwardListImpl*>(priv->page->backForwardList()));
@@ -2677,6 +2682,44 @@
return true;
}
+Eina_Bool ewk_view_setting_allow_universal_access_from_file_urls_set(Evas_Object* ewkView, Eina_Bool enable)
+{
+ EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
+ EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
+ enable = !!enable;
+ if (priv->settings.allowUniversalAccessFromFileURLs != enable) {
+ priv->pageSettings->setAllowUniversalAccessFromFileURLs(enable);
+ priv->settings.allowUniversalAccessFromFileURLs = enable;
+ }
+ return true;
+}
+
+Eina_Bool ewk_view_setting_allow_universal_access_from_file_urls_get(const Evas_Object* ewkView)
+{
+ EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
+ EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
+ return priv->settings.allowUniversalAccessFromFileURLs;
+}
+
+Eina_Bool ewk_view_setting_allow_file_access_from_file_urls_set(Evas_Object* ewkView, Eina_Bool enable)
+{
+ EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
+ EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
+ enable = !!enable;
+ if (priv->settings.allowFileAccessFromFileURLs != enable) {
+ priv->pageSettings->setAllowFileAccessFromFileURLs(enable);
+ priv->settings.allowFileAccessFromFileURLs = enable;
+ }
+ return true;
+}
+
+Eina_Bool ewk_view_setting_allow_file_access_from_file_urls_get(const Evas_Object* ewkView)
+{
+ EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
+ EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
+ return priv->settings.allowFileAccessFromFileURLs;
+}
+
Ewk_View_Smart_Data* ewk_view_smart_data_get(const Evas_Object* ewkView)
{
EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, 0);
Modified: trunk/Source/WebKit/efl/ewk/ewk_view.h (127023 => 127024)
--- trunk/Source/WebKit/efl/ewk/ewk_view.h 2012-08-29 18:14:01 UTC (rev 127023)
+++ trunk/Source/WebKit/efl/ewk/ewk_view.h 2012-08-29 18:16:15 UTC (rev 127024)
@@ -2227,6 +2227,58 @@
EAPI Eina_Bool ewk_view_setting_enable_hyperlink_auditing_set(Evas_Object *o, Eina_Bool enable);
/**
+ * Enables/disables allowing universal access from file URLs.
+ *
+ * This setting specifies whether locally loaded documents are allowed to access remote urls.
+ * By default this setting is enabled.
+ *
+ * @param o view object to set allowing universal access from file URLs
+ * @param enable @c EINA_TRUE to enable universal access from file URLs,
+ * @c EINA_FALSE to disable
+ *
+ * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
+ */
+EAPI Eina_Bool ewk_view_setting_allow_universal_access_from_file_urls_set(Evas_Object *o, Eina_Bool flag);
+
+/**
+ * Gets if allowing universal access from file URLs is enabled.
+ *
+ * @param o view object to query if allowing universal access from file URLs is enabled.
+ *
+ * @return @c EINA_TRUE if allowing universal access from file URLs is enabled, @c EINA_FALSE
+ * otherwise
+ *
+ * @see ewk_view_setting_allow_universal_access_from_file_urls_set()
+ */
+EAPI Eina_Bool ewk_view_setting_allow_universal_access_from_file_urls_get(const Evas_Object *o);
+
+/**
+ * Enables/disables allowing file access from file URLs.
+ *
+ * This setting specifies whether locally loaded documents are allowed to access other local urls.
+ * By default this setting is enabled.
+ *
+ * @param o view object to set allowing file access from file URLs
+ * @param enable @c EINA_TRUE to enable file access from file URLs,
+ * @c EINA_FALSE to disable
+ *
+ * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
+ */
+EAPI Eina_Bool ewk_view_setting_allow_file_access_from_file_urls_set(Evas_Object *o, Eina_Bool flag);
+
+/**
+ * Gets if allowing file access from file URLs is enabled.
+ *
+ * @param o view object to query if allowing file access from file URLs is enabled.
+ *
+ * @return @c EINA_TRUE if allowing file access from file URLs is enabled, @c EINA_FALSE
+ * otherwise
+ *
+ * @see ewk_view_setting_allow_file_access_from_file_urls_set()
+ */
+EAPI Eina_Bool ewk_view_setting_allow_file_access_from_file_urls_get(const Evas_Object *o);
+
+/**
* Gets the internal data of @a o.
*
* This is similar to evas_object_smart_data_get(), but additionally does type checking.
Modified: trunk/Tools/ChangeLog (127023 => 127024)
--- trunk/Tools/ChangeLog 2012-08-29 18:14:01 UTC (rev 127023)
+++ trunk/Tools/ChangeLog 2012-08-29 18:16:15 UTC (rev 127024)
@@ -1,3 +1,18 @@
+2012-08-29 Kamil Blank <[email protected]>
+
+ [EFL] Add setting API for allow universal/file access from file URLs.
+ https://bugs.webkit.org/show_bug.cgi?id=83121
+
+ Reviewed by Eric Seidel.
+
+ Implementation of setAllowUniversalAccessFromFileURLs and setAllowFileAccessFromFileURLs.
+
+ * DumpRenderTree/efl/DumpRenderTreeChrome.cpp:
+ (DumpRenderTreeChrome::resetDefaultsToConsistentValues):
+ * DumpRenderTree/efl/TestRunnerEfl.cpp:
+ (TestRunner::setAllowUniversalAccessFromFileURLs):
+ (TestRunner::setAllowFileAccessFromFileURLs):
+
2012-08-29 Jon Lee <[email protected]>
Update TestRunner API for web notifications
Modified: trunk/Tools/DumpRenderTree/efl/DumpRenderTreeChrome.cpp (127023 => 127024)
--- trunk/Tools/DumpRenderTree/efl/DumpRenderTreeChrome.cpp 2012-08-29 18:14:01 UTC (rev 127023)
+++ trunk/Tools/DumpRenderTree/efl/DumpRenderTreeChrome.cpp 2012-08-29 18:16:15 UTC (rev 127024)
@@ -279,6 +279,8 @@
ewk_view_setting_include_links_in_focus_chain_set(mainView(), EINA_FALSE);
ewk_view_setting_scripts_can_access_clipboard_set(mainView(), EINA_TRUE);
ewk_view_setting_web_audio_set(mainView(), EINA_FALSE);
+ ewk_view_setting_allow_universal_access_from_file_urls_set(mainView(), EINA_TRUE);
+ ewk_view_setting_allow_file_access_from_file_urls_set(mainView(), EINA_TRUE);
ewk_view_zoom_set(mainView(), 1.0, 0, 0);
ewk_view_scale_set(mainView(), 1.0, 0, 0);
Modified: trunk/Tools/DumpRenderTree/efl/TestRunnerEfl.cpp (127023 => 127024)
--- trunk/Tools/DumpRenderTree/efl/TestRunnerEfl.cpp 2012-08-29 18:14:01 UTC (rev 127023)
+++ trunk/Tools/DumpRenderTree/efl/TestRunnerEfl.cpp 2012-08-29 18:16:15 UTC (rev 127024)
@@ -365,16 +365,16 @@
ewk_view_setting_spatial_navigation_set(browser->mainView(), flag);
}
-void TestRunner::setAllowUniversalAccessFromFileURLs(bool)
+void TestRunner::setAllowUniversalAccessFromFileURLs(bool flag)
{
- notImplemented();
+ ewk_view_setting_allow_universal_access_from_file_urls_set(browser->mainView(), flag);
}
-
-void TestRunner::setAllowFileAccessFromFileURLs(bool)
+
+void TestRunner::setAllowFileAccessFromFileURLs(bool flag)
{
- notImplemented();
+ ewk_view_setting_allow_file_access_from_file_urls_set(browser->mainView(), flag);
}
-
+
void TestRunner::setAuthorAndUserStylesEnabled(bool flag)
{
DumpRenderTreeSupportEfl::setAuthorAndUserStylesEnabled(browser->mainView(), flag);