Title: [87452] trunk
Revision
87452
Author
[email protected]
Date
2011-05-26 17:00:42 -0700 (Thu, 26 May 2011)

Log Message

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

        Reviewed by Andreas Kling.

        WebKitTestRunner needs layoutTestController.setAuthorAndUserStylesEnabled
        https://bugs.webkit.org/show_bug.cgi?id=42676

        Implemented layoutTestController.setAuthorAndUserStylesEnabled for WebKitTestRunner.

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

        Reviewed by Andreas Kling.

        WebKitTestRunner needs layoutTestController.setAuthorAndUserStylesEnabled
        https://bugs.webkit.org/show_bug.cgi?id=42676

        Implemented layoutTestController.setAuthorAndUserStylesEnabled for WebKitTestRunner.

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

        Reviewed by Andreas Kling.

        WebKitTestRunner needs layoutTestController.setAuthorAndUserStylesEnabled
        https://bugs.webkit.org/show_bug.cgi?id=42676

        Implemented layoutTestController.setAuthorAndUserStylesEnabled for WebKitTestRunner.

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

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (87451 => 87452)


--- trunk/LayoutTests/ChangeLog	2011-05-26 23:58:38 UTC (rev 87451)
+++ trunk/LayoutTests/ChangeLog	2011-05-27 00:00:42 UTC (rev 87452)
@@ -1,3 +1,15 @@
+2011-05-26  Qi Zhang  <[email protected]>
+
+        Reviewed by Andreas Kling.
+
+        WebKitTestRunner needs layoutTestController.setAuthorAndUserStylesEnabled
+        https://bugs.webkit.org/show_bug.cgi?id=42676
+
+        Implemented layoutTestController.setAuthorAndUserStylesEnabled for WebKitTestRunner.
+
+        * platform/mac-wk2/Skipped:
+        * platform/qt-wk2/Skipped:
+
 2011-05-26  Adam Klein  <[email protected]>
 
         Unreviewed.  Add Leopard rebaseline.

Modified: trunk/LayoutTests/platform/mac-wk2/Skipped (87451 => 87452)


--- trunk/LayoutTests/platform/mac-wk2/Skipped	2011-05-26 23:58:38 UTC (rev 87451)
+++ trunk/LayoutTests/platform/mac-wk2/Skipped	2011-05-27 00:00:42 UTC (rev 87452)
@@ -1314,10 +1314,6 @@
 # <https://bugs.webkit.org/show_bug.cgi?id=42675>
 http/tests/cache/subresource-failover-to-network.html
 
-# WebKitTestRunner needs layoutTestController.setAuthorAndUserStylesEnabled
-# <https://bugs.webkit.org/show_bug.cgi?id=42676>
-fast/css/disabled-author-styles.html
-
 # WebKitTestRunner needs layoutTestController.setUserStyleSheetLocation
 # <https://bugs.webkit.org/show_bug.cgi?id=42678>
 http/tests/security/local-user-CSS-from-remote.html

Modified: trunk/LayoutTests/platform/qt-wk2/Skipped (87451 => 87452)


--- trunk/LayoutTests/platform/qt-wk2/Skipped	2011-05-26 23:58:38 UTC (rev 87451)
+++ trunk/LayoutTests/platform/qt-wk2/Skipped	2011-05-27 00:00:42 UTC (rev 87452)
@@ -1607,10 +1607,6 @@
 # <https://bugs.webkit.org/show_bug.cgi?id=42675>
 http/tests/cache/subresource-failover-to-network.html
 
-# WebKitTestRunner needs layoutTestController.setAuthorAndUserStylesEnabled
-# <https://bugs.webkit.org/show_bug.cgi?id=42676>
-fast/css/disabled-author-styles.html
-
 # WebKitTestRunner needs layoutTestController.setUserStyleSheetLocation
 # <https://bugs.webkit.org/show_bug.cgi?id=42678>
 http/tests/security/local-user-CSS-from-remote.html

Modified: trunk/Source/WebKit2/ChangeLog (87451 => 87452)


--- trunk/Source/WebKit2/ChangeLog	2011-05-26 23:58:38 UTC (rev 87451)
+++ trunk/Source/WebKit2/ChangeLog	2011-05-27 00:00:42 UTC (rev 87452)
@@ -1,3 +1,19 @@
+2011-05-26  Qi Zhang  <[email protected]>
+
+        Reviewed by Andreas Kling.
+
+        WebKitTestRunner needs layoutTestController.setAuthorAndUserStylesEnabled
+        https://bugs.webkit.org/show_bug.cgi?id=42676
+
+        Implemented layoutTestController.setAuthorAndUserStylesEnabled for WebKitTestRunner.
+
+        * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
+        (WKBundleSetAuthorAndUserStylesEnabled):
+        * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
+        * WebProcess/InjectedBundle/InjectedBundle.cpp:
+        (WebKit::InjectedBundle::setAuthorAndUserStylesEnabled):
+        * WebProcess/InjectedBundle/InjectedBundle.h:
+
 2011-05-25  Brian Weinstein  <[email protected]>
 
         Reviewed by Adam Roben.

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


--- trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundle.cpp	2011-05-26 23:58:38 UTC (rev 87451)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundle.cpp	2011-05-27 00:00:42 UTC (rev 87452)
@@ -153,6 +153,11 @@
     toImpl(bundleRef)->setPrivateBrowsingEnabled(toImpl(pageGroupRef), enabled);
 }
 
+void WKBundleSetAuthorAndUserStylesEnabled(WKBundleRef bundleRef, WKBundlePageGroupRef pageGroupRef, bool enabled)
+{
+    toImpl(bundleRef)->setAuthorAndUserStylesEnabled(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 (87451 => 87452)


--- trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePrivate.h	2011-05-26 23:58:38 UTC (rev 87451)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePrivate.h	2011-05-27 00:00:42 UTC (rev 87452)
@@ -70,6 +70,7 @@
 WK_EXPORT void WKBundleSetFrameFlatteningEnabled(WKBundleRef bundle, WKBundlePageGroupRef pageGroup, bool enabled);
 WK_EXPORT void WKBundleSetJavaScriptCanAccessClipboard(WKBundleRef bundle, WKBundlePageGroupRef pageGroup, bool enabled);
 WK_EXPORT void WKBundleSetPrivateBrowsingEnabled(WKBundleRef bundle, WKBundlePageGroupRef pageGroup, bool enabled);
+WK_EXPORT void WKBundleSetAuthorAndUserStylesEnabled(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 (87451 => 87452)


--- trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp	2011-05-26 23:58:38 UTC (rev 87451)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp	2011-05-27 00:00:42 UTC (rev 87452)
@@ -150,6 +150,13 @@
         (*iter)->settings()->setPrivateBrowsingEnabled(enabled);
 }
 
+void InjectedBundle::setAuthorAndUserStylesEnabled(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()->setAuthorAndUserStylesEnabled(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 (87451 => 87452)


--- trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.h	2011-05-26 23:58:38 UTC (rev 87451)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.h	2011-05-27 00:00:42 UTC (rev 87452)
@@ -96,6 +96,7 @@
     void setFrameFlatteningEnabled(WebPageGroupProxy*, bool);
     void setJavaScriptCanAccessClipboard(WebPageGroupProxy*, bool);
     void setPrivateBrowsingEnabled(WebPageGroupProxy*, bool);
+    void setAuthorAndUserStylesEnabled(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 (87451 => 87452)


--- trunk/Tools/ChangeLog	2011-05-26 23:58:38 UTC (rev 87451)
+++ trunk/Tools/ChangeLog	2011-05-27 00:00:42 UTC (rev 87452)
@@ -1,3 +1,19 @@
+2011-05-26  Qi Zhang  <[email protected]>
+
+        Reviewed by Andreas Kling.
+
+        WebKitTestRunner needs layoutTestController.setAuthorAndUserStylesEnabled
+        https://bugs.webkit.org/show_bug.cgi?id=42676
+
+        Implemented layoutTestController.setAuthorAndUserStylesEnabled for WebKitTestRunner.
+
+        * WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl:
+        * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
+        (WTR::InjectedBundle::beginTesting):
+        * WebKitTestRunner/InjectedBundle/LayoutTestController.cpp:
+        (WTR::LayoutTestController::setAuthorAndUserStylesEnabled):
+        * WebKitTestRunner/InjectedBundle/LayoutTestController.h:
+
 2011-05-26  Ademar de Souza Reis Jr.  <[email protected]>
 
         Reviewed by Andreas Kling.

Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl (87451 => 87452)


--- trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl	2011-05-26 23:58:38 UTC (rev 87451)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl	2011-05-27 00:00:42 UTC (rev 87452)
@@ -52,6 +52,7 @@
         void setFrameFlatteningEnabled(in boolean value);
         void setJavaScriptCanAccessClipboard(in boolean value);
         void setPrivateBrowsingEnabled(in boolean value);
+        void setAuthorAndUserStylesEnabled(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/InjectedBundle.cpp (87451 => 87452)


--- trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp	2011-05-26 23:58:38 UTC (rev 87451)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp	2011-05-27 00:00:42 UTC (rev 87452)
@@ -180,6 +180,7 @@
     WKBundleSetAllowUniversalAccessFromFileURLs(m_bundle, m_pageGroup, true);
     WKBundleSetJavaScriptCanAccessClipboard(m_bundle, m_pageGroup, true);
     WKBundleSetPrivateBrowsingEnabled(m_bundle, m_pageGroup, false);
+    WKBundleSetAuthorAndUserStylesEnabled(m_bundle, m_pageGroup, true);
 
     WKBundleRemoveAllUserContent(m_bundle, m_pageGroup);
 

Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp (87451 => 87452)


--- trunk/Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp	2011-05-26 23:58:38 UTC (rev 87451)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp	2011-05-27 00:00:42 UTC (rev 87452)
@@ -349,6 +349,11 @@
      WKBundleSetPrivateBrowsingEnabled(InjectedBundle::shared().bundle(), InjectedBundle::shared().pageGroup(), enabled);
 }
 
+void LayoutTestController::setAuthorAndUserStylesEnabled(bool enabled)
+{
+     WKBundleSetAuthorAndUserStylesEnabled(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 (87451 => 87452)


--- trunk/Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.h	2011-05-26 23:58:38 UTC (rev 87451)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.h	2011-05-27 00:00:42 UTC (rev 87452)
@@ -81,6 +81,7 @@
     void setFrameFlatteningEnabled(bool);
     void setJavaScriptCanAccessClipboard(bool);
     void setPrivateBrowsingEnabled(bool);
+    void setAuthorAndUserStylesEnabled(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