Make the setting of letting Javascript access the clipboard configurable through...
authorhausmann <hausmann@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 7 Nov 2007 14:32:23 +0000 (14:32 +0000)
committerhausmann <hausmann@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 7 Nov 2007 14:32:23 +0000 (14:32 +0000)
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@27565 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebKit/qt/Api/qwebpage.cpp
WebKit/qt/Api/qwebsettings.cpp
WebKit/qt/Api/qwebsettings.h
WebKit/qt/ChangeLog
WebKitTools/ChangeLog
WebKitTools/DumpRenderTree/qt/DumpRenderTree.cpp

index 35b3ef7459891c21bf4497a580ab0f6aedc556fd..4656772565cc8f455d948983a777f11c13923d37 100644 (file)
@@ -4,8 +4,6 @@
 
         Made the QWebSettings::webGraphic functions static. The implementation was using QWebSettings::global() anyway.
 
-        WARNING: NO TEST CASES ADDED OR CHANGED
-
         * platform/graphics/qt/ImageQt.cpp:
         (loadResourcePixmap):
 
@@ -15,8 +13,6 @@
 
         Moved the WebCore::Image specific function loadResourcePixmap from qwebsettings.cpp to ImageQt.cpp and made it static.
 
-        WARNING: NO TEST CASES ADDED OR CHANGED
-
         * platform/graphics/qt/ImageQt.cpp:
         (loadResourcePixmap):
 
@@ -30,8 +26,6 @@
         For the actual Qt context menu we traverse this structure after sendContextMenuEvent and create a QMenu
         out of it. That menu is currently not functional anymore though.
 
-        WARNING: NO TEST CASES ADDED OR CHANGED
-
         * platform/ContextMenu.h:
         * platform/ContextMenuItem.h:
         (WebCore::PlatformMenuItemDescription::PlatformMenuItemDescription):
@@ -66,8 +60,6 @@
         Instead now QWebPage::contextMenuEvent() retrieves the QMenu after calling sendContextMenuEvent and calls exec()
         on it.
 
-        WARNING: NO TEST CASES ADDED OR CHANGED
-
         * platform/qt/ContextMenuQt.cpp:
 
 2007-11-07  Simon Hausmann  <hausmann@kde.org>
@@ -77,8 +69,6 @@
         Changed to PlatformMouseEvent constructor to allow construction from a QContextMenuEvent.
         Call sendContextMenuEvent on the event handler from a QWidget::contextMenuEvent re-implementation instead of in mousePressEvent.
 
-        WARNING: NO TEST CASES ADDED OR CHANGED
-
         * platform/PlatformMouseEvent.h:
         * platform/qt/PlatformMouseEventQt.cpp:
         (WebCore::PlatformMouseEvent::PlatformMouseEvent):
index c39b0e576f0f2757566d3df774f011ea489784e9..0b2354ca7d0e928428fc5c11f0886c5a549a123c 100644 (file)
@@ -88,7 +88,6 @@ QWebPagePrivate::QWebPagePrivate(QWebPage *qq)
 
     // ### should be configurable
     page->settings()->setDefaultTextEncodingName("iso-8859-1");
-    page->settings()->setDOMPasteAllowed(true);
 
     settings = new QWebSettings(page->settings());
 
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 {
index 2f9dae8b405d6c60cd5b44eadddd93bc59d146ef..50449a14570f2fcfc4ac0f28fc91df574f0f2276 100644 (file)
@@ -54,7 +54,8 @@ public:
         JavaEnabled,
         PluginsEnabled,
         PrivateBrowsingEnabled,
-        JavascriptCanOpenWindows
+        JavascriptCanOpenWindows,
+        JavascriptCanAccessClipboard
     };
     enum WebGraphic {
         MissingImageGraphic,
index c30fc92ddf9941942c82ebf58e19c96dc999a887..88310f74bd22e5c0a246ac01fb5891589b5b5d6b 100644 (file)
@@ -1,3 +1,15 @@
+2007-11-07  Simon Hausmann  <hausmann@kde.org>
+
+        Reviewed by Lars.
+
+        Make the setting of letting Javascript access the clipboard configurable through QWebSettings, turn it off by default and turn it on in DumpRenderTree.
+
+        * Api/qwebpage.cpp:
+        (QWebPagePrivate::QWebPagePrivate):
+        * Api/qwebsettings.cpp:
+        (QWebSettingsPrivate::apply):
+        * Api/qwebsettings.h:
+
 2007-11-07  Simon Hausmann  <hausmann@kde.org>
 
         Reviewed by Lars.
index 5c24a0912be96b7305414429d582e7799af3b409..dd2ba1dfeea70ce6e09e07b2bea5cf227d1d5bc1 100644 (file)
@@ -1,3 +1,11 @@
+2007-11-07  Simon Hausmann  <hausmann@kde.org>
+
+        Reviewed by Lars.
+
+        Make the setting of letting Javascript access the clipboard configurable through QWebSettings, turn it off by default and turn it on in DumpRenderTree.
+
+        * DumpRenderTree/qt/DumpRenderTree.cpp:
+
 2007-11-07  Simon Hausmann  <hausmann@kde.org>
 
         Reviewed by Lars.
index d6047591808836dee14245dc5299ef9bd852cc8d..37722f267697f9dfca028e7560b61a8046a91c52 100644 (file)
@@ -74,6 +74,7 @@ WebPage::WebPage(QWidget *parent, DumpRenderTree *drt)
     : QWebPage(parent), m_drt(drt)
 {
     settings()->setAttribute(QWebSettings::JavascriptCanOpenWindows, true);
+    settings()->setAttribute(QWebSettings::JavascriptCanAccessClipboard, true);
 }
 
 QWebPage *WebPage::createWindow()