WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Rebased patch for landing
42679_08021100AM.patch (text/plain), 10.99 KB, created by
Dinu Jacob
on 2012-08-02 08:28:06 PDT
(
hide
)
Description:
Rebased patch for landing
Filename:
MIME Type:
Creator:
Dinu Jacob
Created:
2012-08-02 08:28:06 PDT
Size:
10.99 KB
patch
obsolete
>diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 6a15acf..a5b2b39 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,14 @@ >+2012-08-02 Dinu Jacob <dinu.jacob@nokia.com> >+ >+ WebKitTestRunner needs layoutTestController.setUserStyleSheetEnabled >+ https://bugs.webkit.org/show_bug.cgi?id=42679 >+ >+ Reviewed by Eric Seidel. >+ >+ Removed tests that are now passing. >+ >+ * platform/wk2/Skipped: >+ > 2012-08-02 Dominik Röttsches <dominik.rottsches@intel.com> > > [Cairo] Add complex font drawing using HarfbuzzNG >diff --git a/LayoutTests/platform/wk2/Skipped b/LayoutTests/platform/wk2/Skipped >index e1f381f..4bb7314 100644 >--- a/LayoutTests/platform/wk2/Skipped >+++ b/LayoutTests/platform/wk2/Skipped >@@ -611,14 +611,6 @@ http/tests/navigation/timerredirect-subframeload.html > # <https://bugs.webkit.org/show_bug.cgi?id=42675> > http/tests/cache/subresource-failover-to-network.html > >-# WebKitTestRunner needs layoutTestController.setUserStyleSheetLocation >-# <https://bugs.webkit.org/show_bug.cgi?id=42678> >-http/tests/security/local-user-CSS-from-remote.html >- >-# WebKitTestRunner needs layoutTestController.setUserStyleSheetEnabled >-# <https://bugs.webkit.org/show_bug.cgi?id=42679> >-fast/loader/user-stylesheet-fast-path.html >- > # WebKitTestRunner needs layoutTestController.setCacheModel > # <https://bugs.webkit.org/show_bug.cgi?id=42684> > fast/dom/HTMLScriptElement/nested-execution.html >diff --git a/Source/WebKit2/ChangeLog b/Source/WebKit2/ChangeLog >index dbf67f7..d267187 100644 >--- a/Source/WebKit2/ChangeLog >+++ b/Source/WebKit2/ChangeLog >@@ -1,3 +1,22 @@ >+2012-08-02 Dinu Jacob <dinu.jacob@nokia.com> >+ >+ WebKitTestRunner needs layoutTestController.setUserStyleSheetEnabled >+ https://bugs.webkit.org/show_bug.cgi?id=42679 >+ >+ Reviewed by Eric Seidel. >+ >+ Added WKBundleSetUserStyleSheetLocation API. >+ >+ * WebProcess/InjectedBundle/API/c/WKBundle.cpp: >+ (WKBundleSetUserStyleSheetLocation): Added. >+ * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h: Added WKBundleSetUserStyleSheetLocation. >+ * WebProcess/InjectedBundle/InjectedBundle.cpp: >+ (WebKit::InjectedBundle::setUserStyleSheetLocation): Added. Sets the user style sheet location >+ for all pages in the page group. >+ (WebKit): >+ * WebProcess/InjectedBundle/InjectedBundle.h: >+ (InjectedBundle): >+ > 2012-08-01 Brady Eidson <beidson@apple.com> > > Small part of "Out-of-process plug-ins should support asynchronous initialization." >diff --git a/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundle.cpp b/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundle.cpp >index 55d083b..ee10e96 100644 >--- a/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundle.cpp >+++ b/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundle.cpp >@@ -255,3 +255,8 @@ void WKBundleSetPageVisibilityState(WKBundleRef bundleRef, WKBundlePageRef pageR > { > toImpl(bundleRef)->setPageVisibilityState(toImpl(pageRef), state, isInitialState); > } >+ >+void WKBundleSetUserStyleSheetLocation(WKBundleRef bundleRef, WKBundlePageGroupRef pageGroupRef, WKStringRef location) >+{ >+ toImpl(bundleRef)->setUserStyleSheetLocation(toImpl(pageGroupRef), toImpl(location)->string()); >+} >diff --git a/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePrivate.h b/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePrivate.h >index 12e933e..b5e10e5 100644 >--- a/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePrivate.h >+++ b/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePrivate.h >@@ -74,6 +74,7 @@ WK_EXPORT void WKBundleSetGeolocationPermission(WKBundleRef bundle, WKBundlePage > WK_EXPORT void WKBundleSetJavaScriptCanAccessClipboard(WKBundleRef bundle, WKBundlePageGroupRef pageGroup, bool enabled); > WK_EXPORT void WKBundleSetPrivateBrowsingEnabled(WKBundleRef bundle, WKBundlePageGroupRef pageGroup, bool enabled); > WK_EXPORT void WKBundleSetPopupBlockingEnabled(WKBundleRef bundle, WKBundlePageGroupRef pageGroup, bool enabled); >+WK_EXPORT void WKBundleSetUserStyleSheetLocation(WKBundleRef bundle, WKBundlePageGroupRef pageGroup, WKStringRef location); > WK_EXPORT void WKBundleSetAuthorAndUserStylesEnabled(WKBundleRef bundle, WKBundlePageGroupRef pageGroup, bool enabled); > WK_EXPORT void WKBundleClearAllDatabases(WKBundleRef bundle); > WK_EXPORT void WKBundleSetDatabaseQuota(WKBundleRef bundle, uint64_t); >diff --git a/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp b/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp >index d809d61..5450e3d 100644 >--- a/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp >+++ b/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp >@@ -479,4 +479,11 @@ void InjectedBundle::setPageVisibilityState(WebPage* page, int state, bool isIni > #endif > } > >+void InjectedBundle::setUserStyleSheetLocation(WebPageGroupProxy* pageGroup, const String& location) >+{ >+ const HashSet<Page*>& pages = PageGroup::pageGroup(pageGroup->identifier())->pages(); >+ for (HashSet<Page*>::iterator iter = pages.begin(); iter != pages.end(); ++iter) >+ (*iter)->settings()->setUserStyleSheetLocation(KURL(KURL(), location)); >+} >+ > } // namespace WebKit >diff --git a/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.h b/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.h >index f3e36a8..1e24050 100644 >--- a/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.h >+++ b/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.h >@@ -123,6 +123,7 @@ public: > int pageNumberForElementById(WebFrame*, const String&, double, double); > String pageSizeAndMarginsInPixels(WebFrame*, int, int, int, int, int, int, int); > bool isPageBoxVisible(WebFrame*, int); >+ void setUserStyleSheetLocation(WebPageGroupProxy*, const String&); > > // UserContent API > void addUserScript(WebPageGroupProxy*, InjectedBundleScriptWorld*, const String& source, const String& url, ImmutableArray* whitelist, ImmutableArray* blacklist, WebCore::UserScriptInjectionTime, WebCore::UserContentInjectedFrames); >diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index 5eb73a1..abc0d77 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -1,3 +1,20 @@ >+2012-08-02 Dinu Jacob <dinu.jacob@nokia.com> >+ >+ WebKitTestRunner needs layoutTestController.setUserStyleSheetEnabled >+ https://bugs.webkit.org/show_bug.cgi?id=42679 >+ >+ Reviewed by Eric Seidel. >+ >+ * WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl: Added >+ setUserStyleSheetEnabled and setUserStyleSheetLocation. >+ * WebKitTestRunner/InjectedBundle/LayoutTestController.cpp: >+ (WTR::LayoutTestController::LayoutTestController): Initialize new members added. >+ (WTR::LayoutTestController::setUserStyleSheetEnabled): Added. >+ (WTR::LayoutTestController::setUserStyleSheetLocation): Added. >+ * WebKitTestRunner/InjectedBundle/LayoutTestController.h: Added members >+ userStyleSheetEnabled, and m_userStyleSheetLocation and methods >+ setUserStyleSheetEnabled, and setUserStyleSheetLocation. >+ > 2012-08-02 Zoltan Arvai <zarvai@inf.u-szeged.hu> > > [Qt] MSVC specific buildfix for DRT. >diff --git a/Tools/WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl b/Tools/WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl >index 768e89f..95fd735 100644 >--- a/Tools/WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl >+++ b/Tools/WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl >@@ -62,6 +62,8 @@ module WTR { > 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); >+ void setUserStyleSheetEnabled(in boolean value); >+ void setUserStyleSheetLocation(in DOMString location); > > // Special DOM functions. > void clearBackForwardList(); >diff --git a/Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp b/Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp >index 3376ed0..0f8569f 100644 >--- a/Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp >+++ b/Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp >@@ -85,6 +85,8 @@ LayoutTestController::LayoutTestController() > , m_policyDelegatePermissive(false) > , m_globalFlag(false) > , m_customFullScreenBehavior(false) >+ , m_userStyleSheetEnabled(false) >+ , m_userStyleSheetLocation(adoptWK(WKStringCreateWithUTF8CString(""))) > { > platformInitialize(); > } >@@ -664,4 +666,28 @@ double LayoutTestController::preciseTime() > return currentTime(); > } > >+void LayoutTestController::setUserStyleSheetEnabled(bool enabled) >+{ >+ m_userStyleSheetEnabled = enabled; >+ >+ WKRetainPtr<WKStringRef> emptyUrl = adoptWK(WKStringCreateWithUTF8CString("")); >+ WKStringRef location = enabled ? m_userStyleSheetLocation.get() : emptyUrl.get(); >+ WKBundleSetUserStyleSheetLocation(InjectedBundle::shared().bundle(), InjectedBundle::shared().pageGroup(), location); >+} >+ >+void LayoutTestController::setUserStyleSheetLocation(JSStringRef location) >+{ >+ m_userStyleSheetLocation = adoptWK(WKStringCreateWithJSString(location)); >+ >+ if (m_userStyleSheetEnabled) >+ setUserStyleSheetEnabled(true); >+} >+ >+void LayoutTestController::setUserStyleSheetLocation(JSStringRef location) >+{ >+ m_userStyleSheetLocation = adoptWK(WKStringCreateWithJSString(location)); >+ >+ if (m_userStyleSheetEnabled) >+ setUserStyleSheetEnabled(true); >+} > } // namespace WTR >diff --git a/Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.h b/Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.h >index 3043963..06ea672 100644 >--- a/Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.h >+++ b/Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.h >@@ -29,6 +29,7 @@ > #include "JSWrappable.h" > #include <JavaScriptCore/JSRetainPtr.h> > #include <WebKit2/WKBundleScriptWorld.h> >+#include <WebKit2/WKRetainPtr.h> > #include <string> > #include <wtf/PassRefPtr.h> > >@@ -100,6 +101,8 @@ public: > void setCustomPolicyDelegate(bool enabled, bool permissive = false); > void addOriginAccessWhitelistEntry(JSStringRef sourceOrigin, JSStringRef destinationProtocol, JSStringRef destinationHost, bool allowDestinationSubdomains); > void removeOriginAccessWhitelistEntry(JSStringRef sourceOrigin, JSStringRef destinationProtocol, JSStringRef destinationHost, bool allowDestinationSubdomains); >+ void setUserStyleSheetEnabled(bool); >+ void setUserStyleSheetLocation(JSStringRef); > > // Special DOM functions. > JSValueRef computedStyleIncludingVisitedInfo(JSValueRef element); >@@ -255,6 +258,9 @@ private: > bool m_globalFlag; > bool m_customFullScreenBehavior; > >+ bool m_userStyleSheetEnabled; >+ WKRetainPtr<WKStringRef> m_userStyleSheetLocation; >+ > PlatformTimerRef m_waitToDumpWatchdogTimer; > }; >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
buildbot
:
commit-queue-
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 42679
:
142830
|
142832
|
143690
|
143691
|
143703
|
143884
|
143949
|
156093
|
156103