[WK2][WKTR] Enable Shadow DOM at runtime if compiled with SHADOW_DOM support
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 29 Oct 2012 14:52:18 +0000 (14:52 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 29 Oct 2012 14:52:18 +0000 (14:52 +0000)
https://bugs.webkit.org/show_bug.cgi?id=100668

Patch by Christophe Dumez <christophe.dumez@intel.com> on 2012-10-29
Reviewed by Kenneth Rohde Christiansen.

Source/WebKit2:

Add Bundle API to enable Shadow DOM functionality. This is
now needed by WebKitTestRunner.

* WebProcess/InjectedBundle/API/c/WKBundle.cpp:
(WKBundleSetShadowDOMEnabled):
* WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::setShadowDOMEnabled):
(WebKit):
* WebProcess/InjectedBundle/InjectedBundle.h:
(InjectedBundle):

Tools:

Enable Shadow DOM functionality at run time in WebKitTestRunner
if compiled with SHADOW_DOM flag set. This is needed to run
the Shadow DOM layout tests.

* WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::beginTesting):

LayoutTests:

Remove Shadow DOM layout tests from the global wk2 TestExpectations
and add it to the mac-wk2 one. EFL and GTK ports have Shadow DOM
enabled so they don't need to be skipped for those ports. The Qt port
is already skipping those tests in its global TestExpectations file.

* platform/efl-wk2/TestExpectations:
* platform/mac-wk2/TestExpectations:
* platform/wk2/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@132804 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/platform/efl-wk2/TestExpectations
LayoutTests/platform/mac-wk2/TestExpectations
LayoutTests/platform/wk2/TestExpectations
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundle.cpp
Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePrivate.h
Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp
Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.h
Tools/ChangeLog
Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp

index 1f7b261..29c6d95 100644 (file)
@@ -1,3 +1,19 @@
+2012-10-29  Christophe Dumez  <christophe.dumez@intel.com>
+
+        [WK2][WKTR] Enable Shadow DOM at runtime if compiled with SHADOW_DOM support
+        https://bugs.webkit.org/show_bug.cgi?id=100668
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        Remove Shadow DOM layout tests from the global wk2 TestExpectations
+        and add it to the mac-wk2 one. EFL and GTK ports have Shadow DOM
+        enabled so they don't need to be skipped for those ports. The Qt port
+        is already skipping those tests in its global TestExpectations file.
+
+        * platform/efl-wk2/TestExpectations:
+        * platform/mac-wk2/TestExpectations:
+        * platform/wk2/TestExpectations:
+
 2012-10-29  Csaba Osztrogon√°c  <ossy@webkit.org>
 
         [Qt] Text with zero font size renders as X px sometimes, causing fast/text/zero-font-size-2.html to fail
index a4fd125..a03deed 100644 (file)
@@ -256,6 +256,9 @@ webkit.org/b/98741 plugins/refcount-leaks.html [ Failure ]
 # NPP_SetWindow is not called during plugin destruction on X11.
 webkit.org/b/63261 plugins/npp-set-window-called-during-destruction.html [ Failure ]
 
+# Focus navigation behaves differently than in DRT
+webkit.org/b/100669 fast/dom/shadow/focus-navigation.html [ Failure ]
+
 # Delete plugin failures.
 webkit.org/b/98740 plugins/npruntime/delete-plugin-within-hasProperty-return-false.html [ Failure ]
 webkit.org/b/98740 plugins/npruntime/delete-plugin-within-hasProperty-return-true.html [ Failure ]
index 6dfa0db..c35db55 100644 (file)
@@ -268,6 +268,10 @@ webkit.org/b/98527 http/tests/loading/text-content-type-with-binary-extension.ht
 # Causes next test to crash
 webkit.org/b/98960 fast/parser/document-open-in-unload.html [ Skip ]
 
+# ENABLE(SHADOW_DOM) is disabled.
+webkit.org/b/76359 editing/shadow [ Skip ]
+webkit.org/b/76359 fast/dom/shadow [ Skip ]
+
 ### END OF (1) Classified failures with bug reports
 ########################################
 
index 4e4b6b2..217da29 100644 (file)
@@ -632,10 +632,6 @@ fast/events/moving-text-should-fire-drop-and-dragend-events.html
 fast/events/moving-text-should-fire-drop-and-dragend-events-2.html
 editing/pasteboard/drag-drop-url-with-style.html
 
-# ENABLE(SHADOW_DOM) is disabled.
-editing/shadow
-fast/dom/shadow
-
 # ENABLE(LINK_PRERENDER) is disabled.
 fast/dom/HTMLLinkElement/prerender-insert-after-stop.html
 fast/dom/HTMLLinkElement/prerender-remove-after-stop.html
index a66122b..e09904d 100644 (file)
@@ -1,5 +1,24 @@
 2012-10-29  Christophe Dumez  <christophe.dumez@intel.com>
 
+        [WK2][WKTR] Enable Shadow DOM at runtime if compiled with SHADOW_DOM support
+        https://bugs.webkit.org/show_bug.cgi?id=100668
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        Add Bundle API to enable Shadow DOM functionality. This is
+        now needed by WebKitTestRunner.
+
+        * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
+        (WKBundleSetShadowDOMEnabled):
+        * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
+        * WebProcess/InjectedBundle/InjectedBundle.cpp:
+        (WebKit::InjectedBundle::setShadowDOMEnabled):
+        (WebKit):
+        * WebProcess/InjectedBundle/InjectedBundle.h:
+        (InjectedBundle):
+
+2012-10-29  Christophe Dumez  <christophe.dumez@intel.com>
+
         [EFL][WK2] Fix cursor change detection in EwkViewImpl::setCursor()
         https://bugs.webkit.org/show_bug.cgi?id=100662
 
index 7210a9d..95273a7 100644 (file)
@@ -329,6 +329,11 @@ void WKBundleSetSerialLoadingEnabled(WKBundleRef bundleRef, bool enabled)
     toImpl(bundleRef)->setSerialLoadingEnabled(enabled);
 }
 
+void WKBundleSetShadowDOMEnabled(WKBundleRef bundleRef, bool enabled)
+{
+    toImpl(bundleRef)->setShadowDOMEnabled(enabled);
+}
+
 void WKBundleDispatchPendingLoadRequests(WKBundleRef bundleRef)
 {
     toImpl(bundleRef)->dispatchPendingLoadRequests();
index 369c430..15b2e7c 100644 (file)
@@ -102,6 +102,7 @@ WK_EXPORT size_t WKBundleGetWorkerThreadCount(WKBundleRef bundle);
 
 WK_EXPORT void WKBundleSetTabKeyCyclesThroughElements(WKBundleRef bundle, WKBundlePageRef page, bool enabled);
 WK_EXPORT void WKBundleSetSerialLoadingEnabled(WKBundleRef bundle, bool enabled);
+WK_EXPORT void WKBundleSetShadowDOMEnabled(WKBundleRef bundle, bool enabled);
 WK_EXPORT void WKBundleDispatchPendingLoadRequests(WKBundleRef bundle);
 
 #ifdef __cplusplus
index 4d0aa56..5af0e00 100644 (file)
 #include <wtf/OwnArrayPtr.h>
 #include <wtf/PassOwnArrayPtr.h>
 
+#if ENABLE(SHADOW_DOM)
+#include <WebCore/RuntimeEnabledFeatures.h>
+#endif
+
 using namespace WebCore;
 using namespace JSC;
 
@@ -622,6 +626,15 @@ void InjectedBundle::setSerialLoadingEnabled(bool enabled)
     resourceLoadScheduler()->setSerialLoadingEnabled(enabled);
 }
 
+void InjectedBundle::setShadowDOMEnabled(bool enabled)
+{
+#if ENABLE(SHADOW_DOM)
+    RuntimeEnabledFeatures::setShadowDOMEnabled(enabled);
+#else
+    UNUSED_PARAM(enabled);
+#endif
+}
+
 void InjectedBundle::dispatchPendingLoadRequests()
 {
     resourceLoadScheduler()->servePendingRequests();
index 754b133..c621f24 100644 (file)
@@ -178,6 +178,7 @@ public:
 
     void setTabKeyCyclesThroughElements(WebPage*, bool enabled);
     void setSerialLoadingEnabled(bool);
+    void setShadowDOMEnabled(bool);
     void dispatchPendingLoadRequests();
 
 private:
index 62f7b06..fecce04 100644 (file)
@@ -1,3 +1,17 @@
+2012-10-29  Christophe Dumez  <christophe.dumez@intel.com>
+
+        [WK2][WKTR] Enable Shadow DOM at runtime if compiled with SHADOW_DOM support
+        https://bugs.webkit.org/show_bug.cgi?id=100668
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        Enable Shadow DOM functionality at run time in WebKitTestRunner
+        if compiled with SHADOW_DOM flag set. This is needed to run
+        the Shadow DOM layout tests.
+
+        * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
+        (WTR::InjectedBundle::beginTesting):
+
 2012-10-29  Yael Aharon  <yael.aharon@intel.com>
 
         [EFL][AC] Fix bugs preventing us from running layout tests with AC turned on
index 790b857..d80570b 100644 (file)
@@ -253,6 +253,7 @@ void InjectedBundle::beginTesting(WKDictionaryRef settings)
     WKBundleSetPopupBlockingEnabled(m_bundle, m_pageGroup, false);
     WKBundleSetAlwaysAcceptCookies(m_bundle, false);
     WKBundleSetSerialLoadingEnabled(m_bundle, false);
+    WKBundleSetShadowDOMEnabled(m_bundle, true);
 
     WKBundleRemoveAllUserContent(m_bundle, m_pageGroup);