2009-03-03 Adam Barth <abarth@webkit.org>
authorabarth@webkit.org <abarth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 4 Mar 2009 17:39:14 +0000 (17:39 +0000)
committerabarth@webkit.org <abarth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 4 Mar 2009 17:39:14 +0000 (17:39 +0000)
        Reviewed by Alexey Proskuryakov.

        https://bugs.webkit.org/show_bug.cgi?id=24340

        Expose AllowUniversalAccessFromFileUrls to Qt clients.

        * Api/qwebsettings.cpp:
        (QWebSettingsPrivate::apply):
        (QWebSettings::QWebSettings):
        * Api/qwebsettings.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@41421 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebKit/qt/Api/qwebsettings.cpp
WebKit/qt/Api/qwebsettings.h
WebKit/qt/ChangeLog

index 51235a8085fdf663bfa3fe42043bacb331e8f4ee..9ae3d36f75b8337b784f7be798f3697ad258b36e 100644 (file)
@@ -183,6 +183,10 @@ void QWebSettingsPrivate::apply()
         value = attributes.value(QWebSettings::LocalStorageDatabaseEnabled,
                                       global->attributes.value(QWebSettings::LocalStorageDatabaseEnabled));
         settings->setLocalStorageEnabled(value);
+
+        value = attributes.value(QWebSettings::AllowUniversalAccessFromFileUrls,
+                                      global->attributes.value(QWebSettings::AllowUniversalAccessFromFileUrls));
+        settings->setAllowUniversalAccessFromFileUrls(value);
     } else {
         QList<QWebSettingsPrivate *> settings = *::allSettings();
         for (int i = 0; i < settings.count(); ++i)
@@ -311,6 +315,8 @@ QWebSettings *QWebSettings::globalSettings()
         web application cache feature is enabled or not.
     \value LocalStorageDatabaseEnabled Specifies whether support for the HTML 5
         local storage feature is enabled or not.
+    \value AllowUniversalAccessFromFileUrls Specifies whether documents from file
+        URLs should be granted universal access (e.g., to HTTP and HTTPS documents).
 */
 
 /*!
@@ -339,6 +345,7 @@ QWebSettings::QWebSettings()
     d->attributes.insert(QWebSettings::OfflineStorageDatabaseEnabled, true);
     d->attributes.insert(QWebSettings::OfflineWebApplicationCacheEnabled, true);
     d->attributes.insert(QWebSettings::LocalStorageDatabaseEnabled, true);
+    d->attributes.insert(QWebSettings::AllowUniversalAccessFromFileUrls, true);
     d->offlineStorageDefaultQuota = 5 * 1024 * 1024;
 
 }
index 3d0660b9aa5e5136caa06792fadb2e88744432c5..561079766caa301d6760dbc90ca0267baa2771e9 100644 (file)
@@ -63,7 +63,8 @@ public:
         PrintElementBackgrounds,
         OfflineStorageDatabaseEnabled,
         OfflineWebApplicationCacheEnabled,
-        LocalStorageDatabaseEnabled
+        LocalStorageDatabaseEnabled,
+        AllowUniversalAccessFromFileUrls
     };
     enum WebGraphic {
         MissingImageGraphic,
index d07703b3c322ba1f983d736a8c964f7e9df05e86..ba363d216ccfdb1734e269a1396475497715aa5c 100644 (file)
@@ -1,3 +1,16 @@
+2009-03-03  Adam Barth  <abarth@webkit.org>
+
+        Reviewed by Alexey Proskuryakov.
+
+        https://bugs.webkit.org/show_bug.cgi?id=24340
+
+        Expose AllowUniversalAccessFromFileUrls to Qt clients.
+
+        * Api/qwebsettings.cpp:
+        (QWebSettingsPrivate::apply):
+        (QWebSettings::QWebSettings):
+        * Api/qwebsettings.h:
+
 2009-03-03  Ariya Hidayat  <ariya.hidayat@trolltech.com>
 
         Rubber-stamped by Simon Hausmann.