Make the setting of letting Javascript access the clipboard configurable through...
[WebKit-https.git] / WebKit / qt / Api / qwebsettings.cpp
index ddb4b25c11560fac76e121c40ceca4c6ddd60c18..8c249ce7c1b4b7e19aafa2babd6b1ce8fd06bccc 100644 (file)
@@ -125,6 +125,10 @@ void QWebSettingsPrivate::apply()
                                       global->attributes.value(QWebSettings::PrivateBrowsingEnabled));
         settings->setPrivateBrowsingEnabled(value);
 
+        value = attributes.value(QWebSettings::JavascriptCanAccessClipboard,
+                                      global->attributes.value(QWebSettings::JavascriptCanAccessClipboard));
+        settings->setDOMPasteAllowed(value);
+
         QString location = (!userStyleSheetLocation.isEmpty()) ? userStyleSheetLocation : global->userStyleSheetLocation;
         settings->setUserStyleSheetLocation(WebCore::KURL(location));
     } else {