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:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@87452
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+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 Adam Klein <adamk@chromium.org>
Unreviewed. Add Leopard rebaseline.
# <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
# <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
+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-25 Brian Weinstein <bweinstein@apple.com>
Reviewed by Adam Roben.
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);
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);
(*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);
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();
+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:
+
2011-05-26 Ademar de Souza Reis Jr. <ademar.reis@openbossa.org>
Reviewed by Andreas Kling.
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);
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);
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);
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);