[GTK] Expose allowFileAccessFromFileURLs setting to WebKit2 GTK+ API
authorcarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 May 2015 11:53:56 +0000 (11:53 +0000)
committercarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 May 2015 11:53:56 +0000 (11:53 +0000)
commitfe8c86a05d69bde09d56b22076f7bdfacc5004a1
tree467699449db4c8f8d9e998170c3514fdb2c4f006
parentc4eba441476c9a2c498dba1cd94fd41b61e6490d
[GTK] Expose allowFileAccessFromFileURLs setting to WebKit2 GTK+ API
https://bugs.webkit.org/show_bug.cgi?id=144748

Reviewed by Sergio Villar Senin.

Source/WebKit2:

This is needed by local applications loaded as a file URI that do XMLHttpRequests.

* UIProcess/API/gtk/WebKitSettings.cpp:
(webKitSettingsSetProperty):
(webKitSettingsGetProperty):
(webkit_settings_class_init):
(webkit_settings_get_allow_file_access_from_file_urls):
(webkit_settings_set_allow_file_access_from_file_urls):
* UIProcess/API/gtk/WebKitSettings.h:
* UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt:
* UIProcess/API/gtk/docs/webkit2gtk-docs.sgml:

Tools:

* TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitSettings.cpp:
(testWebKitSettings): Check the new setting is correctly
initialized and updated.
* TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitWebContext.cpp:
(testWebContextSecurityFileXHR): Check XHR to local files is
allowed from file URLs after changing the setting.
(beforeAll): Add new test.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183992 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/gtk/WebKitSettings.cpp
Source/WebKit2/UIProcess/API/gtk/WebKitSettings.h
Source/WebKit2/UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt
Source/WebKit2/UIProcess/API/gtk/docs/webkit2gtk-docs.sgml
Tools/ChangeLog
Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitSettings.cpp
Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitWebContext.cpp