Changeset 87452 in webkit


Ignore:
Timestamp:
May 26, 2011 5:00:42 PM (13 years ago)
Author:
qi.2.zhang@nokia.com
Message:

2011-05-26 Qi Zhang <qi.2.zhang@nokia.com>

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 <qi.2.zhang@nokia.com>

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 <qi.2.zhang@nokia.com>

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:
Location:
trunk
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r87435 r87452  
     12011-05-26  Qi Zhang  <qi.2.zhang@nokia.com>
     2
     3        Reviewed by Andreas Kling.
     4
     5        WebKitTestRunner needs layoutTestController.setAuthorAndUserStylesEnabled
     6        https://bugs.webkit.org/show_bug.cgi?id=42676
     7
     8        Implemented layoutTestController.setAuthorAndUserStylesEnabled for WebKitTestRunner.
     9
     10        * platform/mac-wk2/Skipped:
     11        * platform/qt-wk2/Skipped:
     12
    1132011-05-26  Adam Klein  <adamk@chromium.org>
    214
  • trunk/LayoutTests/platform/mac-wk2/Skipped

    r87402 r87452  
    13151315http/tests/cache/subresource-failover-to-network.html
    13161316
    1317 # WebKitTestRunner needs layoutTestController.setAuthorAndUserStylesEnabled
    1318 # <https://bugs.webkit.org/show_bug.cgi?id=42676>
    1319 fast/css/disabled-author-styles.html
    1320 
    13211317# WebKitTestRunner needs layoutTestController.setUserStyleSheetLocation
    13221318# <https://bugs.webkit.org/show_bug.cgi?id=42678>
  • trunk/LayoutTests/platform/qt-wk2/Skipped

    r87385 r87452  
    16071607# <https://bugs.webkit.org/show_bug.cgi?id=42675>
    16081608http/tests/cache/subresource-failover-to-network.html
    1609 
    1610 # WebKitTestRunner needs layoutTestController.setAuthorAndUserStylesEnabled
    1611 # <https://bugs.webkit.org/show_bug.cgi?id=42676>
    1612 fast/css/disabled-author-styles.html
    16131609
    16141610# WebKitTestRunner needs layoutTestController.setUserStyleSheetLocation
  • trunk/Source/WebKit2/ChangeLog

    r87421 r87452  
     12011-05-26  Qi Zhang  <qi.2.zhang@nokia.com>
     2
     3        Reviewed by Andreas Kling.
     4
     5        WebKitTestRunner needs layoutTestController.setAuthorAndUserStylesEnabled
     6        https://bugs.webkit.org/show_bug.cgi?id=42676
     7
     8        Implemented layoutTestController.setAuthorAndUserStylesEnabled for WebKitTestRunner.
     9
     10        * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
     11        (WKBundleSetAuthorAndUserStylesEnabled):
     12        * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
     13        * WebProcess/InjectedBundle/InjectedBundle.cpp:
     14        (WebKit::InjectedBundle::setAuthorAndUserStylesEnabled):
     15        * WebProcess/InjectedBundle/InjectedBundle.h:
     16
    1172011-05-25  Brian Weinstein  <bweinstein@apple.com>
    218
  • trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundle.cpp

    r87348 r87452  
    154154}
    155155
     156void WKBundleSetAuthorAndUserStylesEnabled(WKBundleRef bundleRef, WKBundlePageGroupRef pageGroupRef, bool enabled)
     157{
     158    toImpl(bundleRef)->setAuthorAndUserStylesEnabled(toImpl(pageGroupRef), enabled);
     159}
     160
    156161void WKBundleAddOriginAccessWhitelistEntry(WKBundleRef bundleRef, WKStringRef sourceOrigin, WKStringRef destinationProtocol, WKStringRef destinationHost, bool allowDestinationSubdomains)
    157162{
  • trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePrivate.h

    r87348 r87452  
    7171WK_EXPORT void WKBundleSetJavaScriptCanAccessClipboard(WKBundleRef bundle, WKBundlePageGroupRef pageGroup, bool enabled);
    7272WK_EXPORT void WKBundleSetPrivateBrowsingEnabled(WKBundleRef bundle, WKBundlePageGroupRef pageGroup, bool enabled);
     73WK_EXPORT void WKBundleSetAuthorAndUserStylesEnabled(WKBundleRef bundle, WKBundlePageGroupRef pageGroup, bool enabled);
    7374WK_EXPORT void WKBundleClearAllDatabases(WKBundleRef bundle);
    7475WK_EXPORT void WKBundleSetDatabaseQuota(WKBundleRef bundle, uint64_t);
  • trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp

    r87348 r87452  
    151151}
    152152
     153void InjectedBundle::setAuthorAndUserStylesEnabled(WebPageGroupProxy* pageGroup, bool enabled)
     154{
     155    const HashSet<Page*>& pages = PageGroup::pageGroup(pageGroup->identifier())->pages();
     156    for (HashSet<Page*>::iterator iter = pages.begin(); iter != pages.end(); ++iter)
     157        (*iter)->settings()->setAuthorAndUserStylesEnabled(enabled);
     158}
     159
    153160void InjectedBundle::addOriginAccessWhitelistEntry(const String& sourceOrigin, const String& destinationProtocol, const String& destinationHost, bool allowDestinationSubdomains)
    154161{
  • trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.h

    r87348 r87452  
    9797    void setJavaScriptCanAccessClipboard(WebPageGroupProxy*, bool);
    9898    void setPrivateBrowsingEnabled(WebPageGroupProxy*, bool);
     99    void setAuthorAndUserStylesEnabled(WebPageGroupProxy*, bool);
    99100    void addOriginAccessWhitelistEntry(const String&, const String&, const String&, bool);
    100101    void removeOriginAccessWhitelistEntry(const String&, const String&, const String&, bool);
  • trunk/Tools/ChangeLog

    r87436 r87452  
     12011-05-26  Qi Zhang  <qi.2.zhang@nokia.com>
     2
     3        Reviewed by Andreas Kling.
     4
     5        WebKitTestRunner needs layoutTestController.setAuthorAndUserStylesEnabled
     6        https://bugs.webkit.org/show_bug.cgi?id=42676
     7
     8        Implemented layoutTestController.setAuthorAndUserStylesEnabled for WebKitTestRunner.
     9
     10        * WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl:
     11        * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
     12        (WTR::InjectedBundle::beginTesting):
     13        * WebKitTestRunner/InjectedBundle/LayoutTestController.cpp:
     14        (WTR::LayoutTestController::setAuthorAndUserStylesEnabled):
     15        * WebKitTestRunner/InjectedBundle/LayoutTestController.h:
     16
    1172011-05-26  Ademar de Souza Reis Jr.  <ademar.reis@openbossa.org>
    218
  • trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl

    r87348 r87452  
    5353        void setJavaScriptCanAccessClipboard(in boolean value);
    5454        void setPrivateBrowsingEnabled(in boolean value);
     55        void setAuthorAndUserStylesEnabled(in boolean value);
    5556        void addOriginAccessWhitelistEntry(in DOMString sourceOrigin, in DOMString destinationProtocol, in DOMString destinationHost, in boolean allowDestinationSubdomains);
    5657        void removeOriginAccessWhitelistEntry(in DOMString sourceOrigin, in DOMString destinationProtocol, in DOMString destinationHost, in boolean allowDestinationSubdomains);
  • trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp

    r87348 r87452  
    181181    WKBundleSetJavaScriptCanAccessClipboard(m_bundle, m_pageGroup, true);
    182182    WKBundleSetPrivateBrowsingEnabled(m_bundle, m_pageGroup, false);
     183    WKBundleSetAuthorAndUserStylesEnabled(m_bundle, m_pageGroup, true);
    183184
    184185    WKBundleRemoveAllUserContent(m_bundle, m_pageGroup);
  • trunk/Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp

    r87348 r87452  
    350350}
    351351
     352void LayoutTestController::setAuthorAndUserStylesEnabled(bool enabled)
     353{
     354     WKBundleSetAuthorAndUserStylesEnabled(InjectedBundle::shared().bundle(), InjectedBundle::shared().pageGroup(), enabled);
     355}
     356
    352357void LayoutTestController::addOriginAccessWhitelistEntry(JSStringRef sourceOrigin, JSStringRef destinationProtocol, JSStringRef destinationHost, bool allowDestinationSubdomains)
    353358{
  • trunk/Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.h

    r87348 r87452  
    8282    void setJavaScriptCanAccessClipboard(bool);
    8383    void setPrivateBrowsingEnabled(bool);
     84    void setAuthorAndUserStylesEnabled(bool);
    8485    void addOriginAccessWhitelistEntry(JSStringRef sourceOrigin, JSStringRef destinationProtocol, JSStringRef destinationHost, bool allowDestinationSubdomains);
    8586    void removeOriginAccessWhitelistEntry(JSStringRef sourceOrigin, JSStringRef destinationProtocol, JSStringRef destinationHost, bool allowDestinationSubdomains);
Note: See TracChangeset for help on using the changeset viewer.