Title: [87072] trunk
Revision
87072
Author
[email protected]
Date
2011-05-23 07:20:30 -0700 (Mon, 23 May 2011)

Log Message

2011-05-23  Qi Zhang  <[email protected]>

        Reviewed by Darin Adler.

        WebKitTestRunner needs layoutTestController.setJavaScriptCanAccessClipboard
        https://bugs.webkit.org/show_bug.cgi?id=42669

        Unskip test case due to the implementation setJavaScriptCanAccessClipboard in WebKitTestRunner.

        * platform/mac-wk2/Skipped:
        * platform/qt-wk2/Skipped:
2011-05-23  Qi Zhang  <[email protected]>

        Reviewed by Darin Adler.

        WebKitTestRunner needs layoutTestController.setJavaScriptCanAccessClipboard
        https://bugs.webkit.org/show_bug.cgi?id=42669

        Implement setJavaScriptCanAccessClipboard in WebKitTestRunner.

        * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
        (WKBundleSetJavaScriptCanAccessClipboard):
        * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
        * WebProcess/InjectedBundle/InjectedBundle.cpp:
        (WebKit::InjectedBundle::setJavaScriptCanAccessClipboard):
        * WebProcess/InjectedBundle/InjectedBundle.h:
2011-05-23  Qi Zhang  <[email protected]>

        Reviewed by Darin Adler.

        WebKitTestRunner needs layoutTestController.setJavaScriptCanAccessClipboard
        https://bugs.webkit.org/show_bug.cgi?id=42669

        Implement setJavaScriptCanAccessClipboard in WebKitTestRunner.

        * WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl:
        * WebKitTestRunner/InjectedBundle/LayoutTestController.cpp:
        (WTR::LayoutTestController::setJavaScriptCanAccessClipboard):
        * WebKitTestRunner/InjectedBundle/LayoutTestController.h:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (87071 => 87072)


--- trunk/LayoutTests/ChangeLog	2011-05-23 13:41:24 UTC (rev 87071)
+++ trunk/LayoutTests/ChangeLog	2011-05-23 14:20:30 UTC (rev 87072)
@@ -1,3 +1,15 @@
+2011-05-23  Qi Zhang  <[email protected]>
+
+        Reviewed by Darin Adler.
+
+        WebKitTestRunner needs layoutTestController.setJavaScriptCanAccessClipboard
+        https://bugs.webkit.org/show_bug.cgi?id=42669
+
+        Unskip test case due to the implementation setJavaScriptCanAccessClipboard in WebKitTestRunner.
+
+        * platform/mac-wk2/Skipped:
+        * platform/qt-wk2/Skipped:
+
 2011-05-18  Pavel Podivilov  <[email protected]>
 
         Reviewed by Yury Semikhatsky.

Modified: trunk/LayoutTests/platform/mac-wk2/Skipped (87071 => 87072)


--- trunk/LayoutTests/platform/mac-wk2/Skipped	2011-05-23 13:41:24 UTC (rev 87071)
+++ trunk/LayoutTests/platform/mac-wk2/Skipped	2011-05-23 14:20:30 UTC (rev 87072)
@@ -1243,10 +1243,6 @@
 svg/custom/manually-parsed-svg-disallowed-in-dashboard.html
 svg/custom/svg-disallowed-in-dashboard-object.html
 
-# WebKitTestRunner needs layoutTestController.setJavaScriptCanAccessClipboard
-# <https://bugs.webkit.org/show_bug.cgi?id=42669>
-editing/execCommand/clipboard-access.html
-
 # WebKitTestRunner needs layoutTestController.queueReload
 # <https://bugs.webkit.org/show_bug.cgi?id=42672>
 fast/css/compare-content-style.html

Modified: trunk/LayoutTests/platform/qt-wk2/Skipped (87071 => 87072)


--- trunk/LayoutTests/platform/qt-wk2/Skipped	2011-05-23 13:41:24 UTC (rev 87071)
+++ trunk/LayoutTests/platform/qt-wk2/Skipped	2011-05-23 14:20:30 UTC (rev 87072)
@@ -1685,10 +1685,6 @@
 transitions/transition-shorthand-delay.html
 transitions/negative-delay.html
 
-# WebKitTestRunner needs layoutTestController.setJavaScriptCanAccessClipboard
-# <https://bugs.webkit.org/show_bug.cgi?id=42669>
-editing/execCommand/clipboard-access.html
-
 # WebKitTestRunner needs layoutTestController.queueReload
 # <https://bugs.webkit.org/show_bug.cgi?id=42672>
 fast/css/compare-content-style.html

Modified: trunk/Source/WebKit2/ChangeLog (87071 => 87072)


--- trunk/Source/WebKit2/ChangeLog	2011-05-23 13:41:24 UTC (rev 87071)
+++ trunk/Source/WebKit2/ChangeLog	2011-05-23 14:20:30 UTC (rev 87072)
@@ -1,3 +1,19 @@
+2011-05-23  Qi Zhang  <[email protected]>
+
+        Reviewed by Darin Adler.
+
+        WebKitTestRunner needs layoutTestController.setJavaScriptCanAccessClipboard
+        https://bugs.webkit.org/show_bug.cgi?id=42669
+
+        Implement setJavaScriptCanAccessClipboard in WebKitTestRunner.
+
+        * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
+        (WKBundleSetJavaScriptCanAccessClipboard):
+        * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
+        * WebProcess/InjectedBundle/InjectedBundle.cpp:
+        (WebKit::InjectedBundle::setJavaScriptCanAccessClipboard):
+        * WebProcess/InjectedBundle/InjectedBundle.h:
+
 2011-05-23  Csaba Osztrogonác  <[email protected]>
 
         [Qt][WK2] Unreviewed trivial fix after r86990.

Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundle.cpp (87071 => 87072)


--- trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundle.cpp	2011-05-23 13:41:24 UTC (rev 87071)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundle.cpp	2011-05-23 14:20:30 UTC (rev 87072)
@@ -143,6 +143,11 @@
     toImpl(bundleRef)->setFrameFlatteningEnabled(toImpl(pageGroupRef), enabled);
 }
 
+WK_EXPORT void WKBundleSetJavaScriptCanAccessClipboard(WKBundleRef bundleRef, WKBundlePageGroupRef pageGroupRef, bool enabled)
+{
+    toImpl(bundleRef)->setJavaScriptCanAccessClipboard(toImpl(pageGroupRef), enabled);
+}
+
 void WKBundleAddOriginAccessWhitelistEntry(WKBundleRef bundleRef, WKStringRef sourceOrigin, WKStringRef destinationProtocol, WKStringRef destinationHost, bool allowDestinationSubdomains)
 {
     toImpl(bundleRef)->addOriginAccessWhitelistEntry(toImpl(sourceOrigin)->string(), toImpl(destinationProtocol)->string(), toImpl(destinationHost)->string(), allowDestinationSubdomains);

Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePrivate.h (87071 => 87072)


--- trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePrivate.h	2011-05-23 13:41:24 UTC (rev 87071)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePrivate.h	2011-05-23 14:20:30 UTC (rev 87072)
@@ -68,6 +68,7 @@
 WK_EXPORT void WKBundleSetAllowUniversalAccessFromFileURLs(WKBundleRef bundle, WKBundlePageGroupRef pageGroup, bool enabled);
 WK_EXPORT void WKBundleSetAllowFileAccessFromFileURLs(WKBundleRef bundle, WKBundlePageGroupRef pageGroup, bool enabled);
 WK_EXPORT void WKBundleSetFrameFlatteningEnabled(WKBundleRef bundle, WKBundlePageGroupRef pageGroup, bool enabled);
+WK_EXPORT void WKBundleSetJavaScriptCanAccessClipboard(WKBundleRef bundle, WKBundlePageGroupRef pageGroup, bool enabled);
 WK_EXPORT void WKBundleClearAllDatabases(WKBundleRef bundle);
 WK_EXPORT void WKBundleSetDatabaseQuota(WKBundleRef bundle, uint64_t);
 WK_EXPORT int WKBundleNumberOfPages(WKBundleRef bundle, WKBundleFrameRef frameRef, double pageWidthInPixels, double pageHeightInPixels);

Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp (87071 => 87072)


--- trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp	2011-05-23 13:41:24 UTC (rev 87071)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp	2011-05-23 14:20:30 UTC (rev 87072)
@@ -135,6 +135,13 @@
         (*iter)->settings()->setFrameFlatteningEnabled(enabled);
 }
 
+void InjectedBundle::setJavaScriptCanAccessClipboard(WebPageGroupProxy* pageGroup, bool enabled)
+{
+    const HashSet<Page*>& pages = PageGroup::pageGroup(pageGroup->identifier())->pages();
+    for (HashSet<Page*>::iterator iter = pages.begin(); iter != pages.end(); ++iter)
+        (*iter)->settings()->setJavaScriptCanAccessClipboard(enabled);
+}
+
 void InjectedBundle::addOriginAccessWhitelistEntry(const String& sourceOrigin, const String& destinationProtocol, const String& destinationHost, bool allowDestinationSubdomains)
 {
     SecurityOrigin::addOriginAccessWhitelistEntry(*SecurityOrigin::createFromString(sourceOrigin), destinationProtocol, destinationHost, allowDestinationSubdomains);

Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.h (87071 => 87072)


--- trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.h	2011-05-23 13:41:24 UTC (rev 87071)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.h	2011-05-23 14:20:30 UTC (rev 87072)
@@ -94,6 +94,7 @@
     void setAllowUniversalAccessFromFileURLs(WebPageGroupProxy*, bool);
     void setAllowFileAccessFromFileURLs(WebPageGroupProxy*, bool);
     void setFrameFlatteningEnabled(WebPageGroupProxy*, bool);
+    void setJavaScriptCanAccessClipboard(WebPageGroupProxy*, bool);
     void addOriginAccessWhitelistEntry(const String&, const String&, const String&, bool);
     void removeOriginAccessWhitelistEntry(const String&, const String&, const String&, bool);
     void resetOriginAccessWhitelists();

Modified: trunk/Tools/ChangeLog (87071 => 87072)


--- trunk/Tools/ChangeLog	2011-05-23 13:41:24 UTC (rev 87071)
+++ trunk/Tools/ChangeLog	2011-05-23 14:20:30 UTC (rev 87072)
@@ -1,3 +1,17 @@
+2011-05-23  Qi Zhang  <[email protected]>
+
+        Reviewed by Darin Adler.
+
+        WebKitTestRunner needs layoutTestController.setJavaScriptCanAccessClipboard
+        https://bugs.webkit.org/show_bug.cgi?id=42669
+
+        Implement setJavaScriptCanAccessClipboard in WebKitTestRunner.
+
+        * WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl:
+        * WebKitTestRunner/InjectedBundle/LayoutTestController.cpp:
+        (WTR::LayoutTestController::setJavaScriptCanAccessClipboard):
+        * WebKitTestRunner/InjectedBundle/LayoutTestController.h:
+
 2011-05-22  Robert Hogan  <[email protected]>
 
         Reviewed by Kenneth Rohde Christiansen.

Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl (87071 => 87072)


--- trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl	2011-05-23 13:41:24 UTC (rev 87071)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl	2011-05-23 14:20:30 UTC (rev 87072)
@@ -50,6 +50,7 @@
         void setAllowUniversalAccessFromFileURLs(in boolean value);
         void setAllowFileAccessFromFileURLs(in boolean value);
         void setFrameFlatteningEnabled(in boolean value);
+        void setJavaScriptCanAccessClipboard(in boolean value);
         void addOriginAccessWhitelistEntry(in DOMString sourceOrigin, in DOMString destinationProtocol, in DOMString destinationHost, in boolean allowDestinationSubdomains);
         void removeOriginAccessWhitelistEntry(in DOMString sourceOrigin, in DOMString destinationProtocol, in DOMString destinationHost, in boolean allowDestinationSubdomains);
 

Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp (87071 => 87072)


--- trunk/Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp	2011-05-23 13:41:24 UTC (rev 87071)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp	2011-05-23 14:20:30 UTC (rev 87072)
@@ -339,6 +339,11 @@
     WKBundleSetFrameFlatteningEnabled(InjectedBundle::shared().bundle(), InjectedBundle::shared().pageGroup(), enabled);
 }
 
+void LayoutTestController::setJavaScriptCanAccessClipboard(bool enabled)
+{
+     WKBundleSetJavaScriptCanAccessClipboard(InjectedBundle::shared().bundle(), InjectedBundle::shared().pageGroup(), enabled);
+}
+
 void LayoutTestController::addOriginAccessWhitelistEntry(JSStringRef sourceOrigin, JSStringRef destinationProtocol, JSStringRef destinationHost, bool allowDestinationSubdomains)
 {
     WKBundleAddOriginAccessWhitelistEntry(InjectedBundle::shared().bundle(), toWK(sourceOrigin).get(), toWK(destinationProtocol).get(), toWK(destinationHost).get(), allowDestinationSubdomains);

Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.h (87071 => 87072)


--- trunk/Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.h	2011-05-23 13:41:24 UTC (rev 87071)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.h	2011-05-23 14:20:30 UTC (rev 87072)
@@ -79,6 +79,7 @@
     void setAllowUniversalAccessFromFileURLs(bool);
     void setAllowFileAccessFromFileURLs(bool);
     void setFrameFlatteningEnabled(bool);
+    void setJavaScriptCanAccessClipboard(bool);
     void addOriginAccessWhitelistEntry(JSStringRef sourceOrigin, JSStringRef destinationProtocol, JSStringRef destinationHost, bool allowDestinationSubdomains);
     void removeOriginAccessWhitelistEntry(JSStringRef sourceOrigin, JSStringRef destinationProtocol, JSStringRef destinationHost, bool allowDestinationSubdomains);
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to