2011-06-24 Dominic Cooney <dominicc@chromium.org>
authordominicc@chromium.org <dominicc@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 24 Jun 2011 17:37:51 +0000 (17:37 +0000)
committerdominicc@chromium.org <dominicc@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 24 Jun 2011 17:37:51 +0000 (17:37 +0000)
        Reviewed by Dimitri Glazkov.

        Convert shadow DOM-related tests to use window.internals
        https://bugs.webkit.org/show_bug.cgi?id=61671

        * Source/autotools/symbols.filter: Export symbols for GTK.
2011-06-24  Dominic Cooney  <dominicc@chromium.org>

        Reviewed by Dimitri Glazkov.

        Convert shadow DOM-related tests to use window.internals
        https://bugs.webkit.org/show_bug.cgi?id=61671

        Update tests to use internals.{ensureShadowRoot, shadowRoot,
        shadowPseudoId, removeShadowRoot} instead of layoutTestController.

        * fast/dom/HTMLKeygenElement/keygen-expected.txt:
        * fast/dom/HTMLKeygenElement/keygen.html:
        * fast/dom/HTMLMeterElement/meter-clone-expected.txt:
        * fast/dom/HTMLMeterElement/meter-clone.html:
        * fast/dom/HTMLProgressElement/progress-clone-expected.txt:
        * fast/dom/HTMLProgressElement/progress-clone.html:
        * fast/dom/shadow/activeelement-should-be-shadowhost.html:
        * fast/dom/shadow/create-content-element.html:
        * fast/dom/shadow/gc-shadow-expected.txt:
        * fast/dom/shadow/gc-shadow.html:
        * fast/dom/shadow/layout-tests-can-access-shadow-expected.txt: shadowRoot of non-element throws now, so verify new behavior.
        * fast/dom/shadow/layout-tests-can-access-shadow.html:
        * fast/dom/shadow/nodetype.html:
        * fast/dom/shadow/tab-order-iframe-and-shadow.html:
        * fast/events/shadow-boundary-crossing.html:
        * fast/forms/resources/common.js:
        (getValidationMessageBubbleNode):
        * fast/html/clone-keygen-expected.txt:
        * fast/html/clone-keygen.html:
        * fast/html/clone-range-expected.txt:
        * fast/html/clone-range.html:
        * fast/html/details-clone.html:
        * fullscreen/video-controls-override-expected.txt:
        * fullscreen/video-controls-override.html:
        * media/audio-controls-do-not-fade-out.html:
        * media/media-controls.js:
        (mediaControlsButtonCoordinates):
        * media/video-controls-in-media-document.html:
        * platform/win/Skipped: shadowRoot and friends now available on win.
2011-06-24  Dominic Cooney  <dominicc@chromium.org>

        Reviewed by Dimitri Glazkov.

        Convert shadow DOM-related tests to use window.internals
        https://bugs.webkit.org/show_bug.cgi?id=61671

        * WebCore.exp.in: Exports for symbols used by WebCoreTestSupport.
        * testing/Internals.cpp: The new home of shadowRoot and friends.
        (WebCore::Internals::ensureShadowRoot):
        (WebCore::Internals::shadowRoot):
        (WebCore::Internals::removeShadowRoot):
        (WebCore::Internals::shadowPseudoId):
        * testing/Internals.h:
        * testing/Internals.idl:
2011-06-24  Dominic Cooney  <dominicc@chromium.org>

        Reviewed by Dimitri Glazkov.

        Convert shadow DOM-related tests to use window.internals
        https://bugs.webkit.org/show_bug.cgi?id=61671

        Remove shadow DOM-related methods from Chromium API. These are not
        required any more.

        * public/WebElement.h:
        * src/WebElement.cpp:
2011-06-24  Dominic Cooney  <dominicc@chromium.org>

        Reviewed by Dimitri Glazkov.

        Convert shadow DOM-related tests to use window.internals
        https://bugs.webkit.org/show_bug.cgi?id=61671

        Remove shadow-DOM related methods from GTK DRT API. These are not
        required any more.

        * WebCoreSupport/DumpRenderTreeSupportGtk.cpp:
        * WebCoreSupport/DumpRenderTreeSupportGtk.h:
2011-06-24  Dominic Cooney  <dominicc@chromium.org>

        Reviewed by Dimitri Glazkov.

        Convert shadow DOM-related tests to use window.internals
        https://bugs.webkit.org/show_bug.cgi?id=61671

        Remove shadow DOM-related methods from Mac API. These are not
        required any more.

        * DOM/WebDOMOperations.mm:
        * DOM/WebDOMOperationsPrivate.h:
2011-06-24  Dominic Cooney  <dominicc@chromium.org>

        Reviewed by Dimitri Glazkov.

        Convert shadow-DOM related tests to use window.internals
        https://bugs.webkit.org/show_bug.cgi?id=61671

        Remove shadow-DOM related methods from Qt DRT API. These are not
        required any more.

        * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
        * WebCoreSupport/DumpRenderTreeSupportQt.h:
2011-06-24  Dominic Cooney  <dominicc@chromium.org>

        Reviewed by Dimitri Glazkov.

        Convert shadow DOM-related tests to use window.internals
        https://bugs.webkit.org/show_bug.cgi?id=61671

        Remove shadow DOM-related methods from WebKit2 API. These are not
        required any more.

        * WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp:
        * WebProcess/InjectedBundle/API/c/WKBundleNodeHandlePrivate.h:
        * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
        * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h:
        * win/WebKit2.def: Re-exports for symbols used by WebCoreTestSupport.
        * win/WebKit2CFLite.def: Same for Cairo.
2011-06-24  Dominic Cooney   <dominicc@chromium.org>

        Reviewed by Dimitri Glazkov.

        Convert shadow DOM-related tests to use window.internals
        https://bugs.webkit.org/show_bug.cgi?id=61671

        Remove ensureShadowRoot, shadowRoot, shadowPseudoId and
        removeShadowRoot from layoutTestController; these have been
        replaced by equivalents in window.internals instead.

        * DumpRenderTree/LayoutTestController.cpp:
        (LayoutTestController::staticFunctions):
        * DumpRenderTree/LayoutTestController.h:
        * DumpRenderTree/chromium/LayoutTestController.cpp:
        (LayoutTestController::LayoutTestController):
        * DumpRenderTree/chromium/LayoutTestController.h:
        * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:
        * DumpRenderTree/mac/LayoutTestControllerMac.mm:
        * DumpRenderTree/qt/LayoutTestControllerQt.cpp:
        * DumpRenderTree/qt/LayoutTestControllerQt.h:
        * DumpRenderTree/win/LayoutTestControllerWin.cpp:
        * DumpRenderTree/wx/LayoutTestControllerWx.cpp:
        * WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl:
        * WebKitTestRunner/InjectedBundle/LayoutTestController.cpp:
        * WebKitTestRunner/InjectedBundle/LayoutTestController.h:

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

68 files changed:
ChangeLog
LayoutTests/ChangeLog
LayoutTests/fast/dom/HTMLKeygenElement/keygen-expected.txt
LayoutTests/fast/dom/HTMLKeygenElement/keygen.html
LayoutTests/fast/dom/HTMLMeterElement/meter-clone-expected.txt
LayoutTests/fast/dom/HTMLMeterElement/meter-clone.html
LayoutTests/fast/dom/HTMLProgressElement/progress-clone-expected.txt
LayoutTests/fast/dom/HTMLProgressElement/progress-clone.html
LayoutTests/fast/dom/shadow/activeelement-should-be-shadowhost.html
LayoutTests/fast/dom/shadow/create-content-element.html
LayoutTests/fast/dom/shadow/gc-shadow-expected.txt
LayoutTests/fast/dom/shadow/gc-shadow.html
LayoutTests/fast/dom/shadow/layout-tests-can-access-shadow-expected.txt
LayoutTests/fast/dom/shadow/layout-tests-can-access-shadow.html
LayoutTests/fast/dom/shadow/nodetype.html
LayoutTests/fast/dom/shadow/tab-order-iframe-and-shadow.html
LayoutTests/fast/events/shadow-boundary-crossing.html
LayoutTests/fast/forms/resources/common.js
LayoutTests/fast/html/clone-keygen-expected.txt
LayoutTests/fast/html/clone-keygen.html
LayoutTests/fast/html/clone-range-expected.txt
LayoutTests/fast/html/clone-range.html
LayoutTests/fast/html/details-clone.html
LayoutTests/fullscreen/video-controls-override-expected.txt
LayoutTests/fullscreen/video-controls-override.html
LayoutTests/media/audio-controls-do-not-fade-out.html
LayoutTests/media/media-controls.js
LayoutTests/media/video-controls-in-media-document.html
LayoutTests/platform/win/Skipped
Source/WebCore/ChangeLog
Source/WebCore/WebCore.exp.in
Source/WebCore/testing/Internals.cpp
Source/WebCore/testing/Internals.h
Source/WebCore/testing/Internals.idl
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/public/WebElement.h
Source/WebKit/chromium/src/WebElement.cpp
Source/WebKit/gtk/ChangeLog
Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp
Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.h
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/DOM/WebDOMOperations.mm
Source/WebKit/mac/DOM/WebDOMOperationsPrivate.h
Source/WebKit/qt/ChangeLog
Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp
Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp
Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleNodeHandlePrivate.h
Source/WebKit2/WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp
Source/WebKit2/WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h
Source/WebKit2/win/WebKit2.def
Source/WebKit2/win/WebKit2CFLite.def
Source/autotools/symbols.filter
Tools/ChangeLog
Tools/DumpRenderTree/LayoutTestController.cpp
Tools/DumpRenderTree/LayoutTestController.h
Tools/DumpRenderTree/chromium/LayoutTestController.cpp
Tools/DumpRenderTree/chromium/LayoutTestController.h
Tools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp
Tools/DumpRenderTree/mac/LayoutTestControllerMac.mm
Tools/DumpRenderTree/qt/LayoutTestControllerQt.cpp
Tools/DumpRenderTree/qt/LayoutTestControllerQt.h
Tools/DumpRenderTree/win/LayoutTestControllerWin.cpp
Tools/DumpRenderTree/wx/LayoutTestControllerWx.cpp
Tools/WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl
Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp
Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.h

index 24b159d8ece263efae5abbb66b1037800b9edeea..e957d9aa02ccd443a4d946cd808bdefae7b93e05 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2011-06-24  Dominic Cooney  <dominicc@chromium.org>
+
+        Reviewed by Dimitri Glazkov.
+
+        Convert shadow DOM-related tests to use window.internals
+        https://bugs.webkit.org/show_bug.cgi?id=61671
+
+        * Source/autotools/symbols.filter: Export symbols for GTK.
+
 2011-06-24  Carlos Garcia Campos  <cgarcia@igalia.com>
 
         Reviewed by Martin Robinson.
index 607de907cab5129029d5650e4860b0b4f4b265a8..7b565ecf1c2afeb2b36bef70a38656ba96114877 100644 (file)
@@ -1,3 +1,43 @@
+2011-06-24  Dominic Cooney  <dominicc@chromium.org>
+
+        Reviewed by Dimitri Glazkov.
+
+        Convert shadow DOM-related tests to use window.internals
+        https://bugs.webkit.org/show_bug.cgi?id=61671
+
+        Update tests to use internals.{ensureShadowRoot, shadowRoot,
+        shadowPseudoId, removeShadowRoot} instead of layoutTestController.
+
+        * fast/dom/HTMLKeygenElement/keygen-expected.txt:
+        * fast/dom/HTMLKeygenElement/keygen.html:
+        * fast/dom/HTMLMeterElement/meter-clone-expected.txt:
+        * fast/dom/HTMLMeterElement/meter-clone.html:
+        * fast/dom/HTMLProgressElement/progress-clone-expected.txt:
+        * fast/dom/HTMLProgressElement/progress-clone.html:
+        * fast/dom/shadow/activeelement-should-be-shadowhost.html:
+        * fast/dom/shadow/create-content-element.html:
+        * fast/dom/shadow/gc-shadow-expected.txt:
+        * fast/dom/shadow/gc-shadow.html:
+        * fast/dom/shadow/layout-tests-can-access-shadow-expected.txt: shadowRoot of non-element throws now, so verify new behavior.
+        * fast/dom/shadow/layout-tests-can-access-shadow.html:
+        * fast/dom/shadow/nodetype.html:
+        * fast/dom/shadow/tab-order-iframe-and-shadow.html:
+        * fast/events/shadow-boundary-crossing.html:
+        * fast/forms/resources/common.js:
+        (getValidationMessageBubbleNode):
+        * fast/html/clone-keygen-expected.txt:
+        * fast/html/clone-keygen.html:
+        * fast/html/clone-range-expected.txt:
+        * fast/html/clone-range.html:
+        * fast/html/details-clone.html:
+        * fullscreen/video-controls-override-expected.txt:
+        * fullscreen/video-controls-override.html:
+        * media/audio-controls-do-not-fade-out.html:
+        * media/media-controls.js:
+        (mediaControlsButtonCoordinates):
+        * media/video-controls-in-media-document.html:
+        * platform/win/Skipped: shadowRoot and friends now available on win.
+
 2011-06-24  Matthew Delaney  <mdelaney@apple.com>
 
         Reviewed by Simon Fraser.
index 017eeacf3c38bf30ec81ae1a0fd525897bba1c79..d798687d53243ea0e1f8443133f2e090ec1ac71b 100644 (file)
@@ -3,8 +3,7 @@ This tests the keygen element.
 
 PASS keygen.options is undefined
 PASS shadow.firstChild.tagName is "SELECT"
-PASS layoutTestController.shadowRoot(shadow) is null
-PASS layoutTestController.shadowRoot(shadow.firstChild) is null
+PASS internals.shadowRoot(shadow.firstChild) is null
 PASS successfullyParsed is true
 
 TEST COMPLETE
index a9c5c74a941c82474cddb810ed07fb6a14af7c67..4908f96b80f2def607154fce79195e6780196ba7 100644 (file)
@@ -13,11 +13,10 @@ This tests the keygen element.
 var keygen = document.getElementById('keys');
 shouldBe('keygen.options', 'undefined');  // keygen is not a select
 
-if (window.layoutTestController) {
-  var shadow = layoutTestController.shadowRoot(keygen);
+if (window.internals) {
+  var shadow = internals.shadowRoot(keygen);
   shouldBe('shadow.firstChild.tagName', '"SELECT"');
-  shouldBe('layoutTestController.shadowRoot(shadow)', 'null');
-  shouldBe('layoutTestController.shadowRoot(shadow.firstChild)', 'null');
+  shouldBe('internals.shadowRoot(shadow.firstChild)', 'null');
 }
 
 var successfullyParsed = true;
index 5981024cf73af78eb2fd1c98009eb8689c1c7742..f6676f71632c04e4e97b3a53eca73a837ae4c2c4 100644 (file)
@@ -1,6 +1,6 @@
 PASS cloned.value is target.value
-PASS layoutTestController.shadowPseudoId(clonedShadowRoot.firstChild) is layoutTestController.shadowPseudoId(targetShadowRoot.firstChild)
-PASS layoutTestController.shadowPseudoId(clonedShadowRoot.firstChild.firstChild) is layoutTestController.shadowPseudoId(targetShadowRoot.firstChild.firstChild)
+PASS internals.shadowPseudoId(clonedShadowRoot.firstChild) is internals.shadowPseudoId(targetShadowRoot.firstChild)
+PASS internals.shadowPseudoId(clonedShadowRoot.firstChild.firstChild) is internals.shadowPseudoId(targetShadowRoot.firstChild.firstChild)
 PASS clonedShadowRoot.firstChild.firstChild.style.width is "70%"
 PASS targetShadowRoot.firstChild.firstChild.style.width is "50%"
 PASS successfullyParsed is true
index a3360957d4c7120c973bc95b2b90dcd56e2abcf9..89553d457c06e9474416fe6a3b222887bd409b5b 100644 (file)
     cloned = target.cloneNode();
     document.body.insertBefore(cloned, target.nextSibling);
     
-    if (!window.layoutTestController) {
-        debug("You need layoutTestController to run this test.");
+    if (!window.internals) {
+        debug("You need internals to run this test.");
         return;
     }
     
-    targetShadowRoot = layoutTestController.shadowRoot(target);
-    clonedShadowRoot = layoutTestController.shadowRoot(cloned);
+    targetShadowRoot = internals.shadowRoot(target);
+    clonedShadowRoot = internals.shadowRoot(cloned);
     
     shouldBe("cloned.value", "target.value");
-    shouldBe("layoutTestController.shadowPseudoId(clonedShadowRoot.firstChild)", "layoutTestController.shadowPseudoId(targetShadowRoot.firstChild)");
-    shouldBe("layoutTestController.shadowPseudoId(clonedShadowRoot.firstChild.firstChild)", "layoutTestController.shadowPseudoId(targetShadowRoot.firstChild.firstChild)");
+    shouldBe("internals.shadowPseudoId(clonedShadowRoot.firstChild)", "internals.shadowPseudoId(targetShadowRoot.firstChild)");
+    shouldBe("internals.shadowPseudoId(clonedShadowRoot.firstChild.firstChild)", "internals.shadowPseudoId(targetShadowRoot.firstChild.firstChild)");
     cloned.value = 70;
     shouldBe("clonedShadowRoot.firstChild.firstChild.style.width", '"70%"');
     shouldBe("targetShadowRoot.firstChild.firstChild.style.width", '"50%"');
index 5981024cf73af78eb2fd1c98009eb8689c1c7742..f6676f71632c04e4e97b3a53eca73a837ae4c2c4 100644 (file)
@@ -1,6 +1,6 @@
 PASS cloned.value is target.value
-PASS layoutTestController.shadowPseudoId(clonedShadowRoot.firstChild) is layoutTestController.shadowPseudoId(targetShadowRoot.firstChild)
-PASS layoutTestController.shadowPseudoId(clonedShadowRoot.firstChild.firstChild) is layoutTestController.shadowPseudoId(targetShadowRoot.firstChild.firstChild)
+PASS internals.shadowPseudoId(clonedShadowRoot.firstChild) is internals.shadowPseudoId(targetShadowRoot.firstChild)
+PASS internals.shadowPseudoId(clonedShadowRoot.firstChild.firstChild) is internals.shadowPseudoId(targetShadowRoot.firstChild.firstChild)
 PASS clonedShadowRoot.firstChild.firstChild.style.width is "70%"
 PASS targetShadowRoot.firstChild.firstChild.style.width is "50%"
 PASS successfullyParsed is true
index 220ad3c6182397644b25f55d3c9015195d14d7f2..373dca4bdd283c2e01a717aa04306495a27163a9 100644 (file)
     cloned = target.cloneNode();
     document.body.insertBefore(cloned, target.nextSibling);
     
-    if (!window.layoutTestController) {
-        debug("You need layoutTestController to run this test.");
+    if (!window.internals) {
+        debug("You need internals to run this test.");
         return;
     }
 
-    targetShadowRoot = layoutTestController.shadowRoot(target);
-    clonedShadowRoot = layoutTestController.shadowRoot(cloned);
-    
+    targetShadowRoot = internals.shadowRoot(target);
+    clonedShadowRoot = internals.shadowRoot(cloned);
+
     shouldBe("cloned.value", "target.value");
-    shouldBe("layoutTestController.shadowPseudoId(clonedShadowRoot.firstChild)", "layoutTestController.shadowPseudoId(targetShadowRoot.firstChild)");
-    shouldBe("layoutTestController.shadowPseudoId(clonedShadowRoot.firstChild.firstChild)", "layoutTestController.shadowPseudoId(targetShadowRoot.firstChild.firstChild)");
+    shouldBe("internals.shadowPseudoId(clonedShadowRoot.firstChild)", "internals.shadowPseudoId(targetShadowRoot.firstChild)");
+    shouldBe("internals.shadowPseudoId(clonedShadowRoot.firstChild.firstChild)", "internals.shadowPseudoId(targetShadowRoot.firstChild.firstChild)");
     
     cloned.value = 70;
     shouldBe("clonedShadowRoot.firstChild.firstChild.style.width", '"70%"');
index 65c585013c19e99266eeb8c72c02fcdbeb8ce370..80db4115ff06f14f5c3973f7a04983c49ad5acb1 100644 (file)
@@ -29,7 +29,7 @@ if (window.layoutTestController) {
     layoutTestController.dumpAsText();
 
   function shadowRoot(shadowHost) {
-    return layoutTestController.ensureShadowRoot(shadowHost);
+    return internals.ensureShadowRoot(shadowHost);
   }
 
   function appendChildToShadow(shadowHost, child) {
index 235de56c8b68749cc9df1f837a96103b6a1bc457..bdb60016f0da2404f5da1c878cf189d8912b78cd 100644 (file)
@@ -24,7 +24,7 @@ function setupTargetTree()
 {
     var target = document.createElement("div");
     target.innerHTML = "<span>content</span>";
-    var root = layoutTestController.ensureShadowRoot(target);
+    var root = internals.ensureShadowRoot(target);
     
     var child0 = document.createElement("span");
     child0.innerHTML = "Hello,";
index cbbed2a9423676935dd77d5efc12ce525d1a9167..15e92512ede4892c3731efba66609deabbff9db2 100644 (file)
@@ -1,16 +1,16 @@
 This tests that the JavaScript wrapper objects of shadow DOM objects
 are not prematurely garbage collected.
 
-PASS layoutTestController.shadowRoot(ps[0]).tattoo is "I <3 WebKit"
-PASS layoutTestController.shadowRoot(ps[1]).tattoo is "I <3 WebKit"
-PASS layoutTestController.shadowRoot(ps[2]).tattoo is "I <3 WebKit"
-PASS layoutTestController.shadowRoot(ps[3]).tattoo is "I <3 WebKit"
-PASS layoutTestController.shadowRoot(ps[4]).tattoo is "I <3 WebKit"
-PASS layoutTestController.shadowRoot(ps[5]).tattoo is "I <3 WebKit"
-PASS layoutTestController.shadowRoot(ps[6]).tattoo is "I <3 WebKit"
-PASS layoutTestController.shadowRoot(ps[7]).tattoo is "I <3 WebKit"
-PASS layoutTestController.shadowRoot(ps[8]).tattoo is "I <3 WebKit"
-PASS layoutTestController.shadowRoot(ps[9]).tattoo is "I <3 WebKit"
+PASS internals.shadowRoot(ps[0]).tattoo is "I <3 WebKit"
+PASS internals.shadowRoot(ps[1]).tattoo is "I <3 WebKit"
+PASS internals.shadowRoot(ps[2]).tattoo is "I <3 WebKit"
+PASS internals.shadowRoot(ps[3]).tattoo is "I <3 WebKit"
+PASS internals.shadowRoot(ps[4]).tattoo is "I <3 WebKit"
+PASS internals.shadowRoot(ps[5]).tattoo is "I <3 WebKit"
+PASS internals.shadowRoot(ps[6]).tattoo is "I <3 WebKit"
+PASS internals.shadowRoot(ps[7]).tattoo is "I <3 WebKit"
+PASS internals.shadowRoot(ps[8]).tattoo is "I <3 WebKit"
+PASS internals.shadowRoot(ps[9]).tattoo is "I <3 WebKit"
 PASS successfullyParsed is true
 
 TEST COMPLETE
index cda67b99489235812d73399a78eda42f91eed7aa..7395b96a26f9feb850935acd57f187d7eb287080 100644 (file)
@@ -20,14 +20,14 @@ function gc() {
         new String(i);
 }
 
-if (window.layoutTestController) {
+if (window.internals) {
     var ps = [];
 
     for (var i = 0; i < 10; i++) {
         var p = document.createElement('p');
         ps.push(p);
 
-        var shadow = layoutTestController.ensureShadowRoot(p);
+        var shadow = internals.ensureShadowRoot(p);
         shadow.tattoo = 'I <3 WebKit';
         shadow = null;
     }
@@ -35,7 +35,7 @@ if (window.layoutTestController) {
     gc();
 
     for (i = 0; i < ps.length; i++) {
-        shouldBe('layoutTestController.shadowRoot(ps[' + i + ']).tattoo', '"I <3 WebKit"');
+        shouldBe('internals.shadowRoot(ps[' + i + ']).tattoo', '"I <3 WebKit"');
     }
 }
 
index 193f43cd3e397f0e95b3765aa8b6604d5d677806..0cece1ea800d49bb7d371b8319d25c6ea16bcb65 100644 (file)
@@ -1,12 +1,12 @@
 
-This tests that LayoutTestController can access shadow DOM.
+This tests that layout tests can access shadow DOM.
 
 PASS shadow.nodeName is "#shadow-root"
-PASS layoutTestController.shadowRoot(shadow) is null
-PASS layoutTestController.shadowRoot(p) is null
+PASS exceptionCode is DOMException.INVALID_ACCESS_ERR
+PASS internals.shadowRoot(p) is null
 PASS shadow.nodeName is "#shadow-root"
-PASS shadow === layoutTestController.shadowRoot(p) is true
-PASS layoutTestController.shadowRoot(keygen) is null
+PASS shadow === internals.shadowRoot(p) is true
+PASS internals.shadowRoot(keygen) is null
 PASS successfullyParsed is true
 
 TEST COMPLETE
index 64c0feb2d521804d742783f4c4ea1d8ce68f7547..041aab797960812d4492c475b0ba948cffe615bb 100644 (file)
@@ -7,31 +7,38 @@
 <keygen id="keys" />
 <p id="peas" />
 <pre id="console">
-This tests that LayoutTestController can access shadow DOM.
+This tests that layout tests can access shadow DOM.
 
 </pre>
 <script>
-if (window.layoutTestController) {
+if (window.internals) {
     // Make assertions about a built-in shadow
     var keygen = document.getElementById('keys');
-    var shadow = layoutTestController.shadowRoot(keygen);
+    var shadow = internals.shadowRoot(keygen);
     shouldBe('shadow.nodeName', '"#shadow-root"');
 
-    // Shadow roots should not have shadows
-    shouldBe('layoutTestController.shadowRoot(shadow)', 'null');
+    // Shadow roots aren't elements, so accessing their shadow should
+    // raise
+    var exceptionCode;
+    try {
+        internals.shadowRoot(shadow);
+    } catch (e) {
+        exceptionCode = e.code;
+    }
+    shouldBe('exceptionCode', 'DOMException.INVALID_ACCESS_ERR');
 
     // Ordinary element should not have shadow
     var p = document.getElementById('peas');
-    shouldBe('layoutTestController.shadowRoot(p)', 'null');
+    shouldBe('internals.shadowRoot(p)', 'null');
 
-    // LayoutTestController can bless ordinary elements with shadows
-    shadow = layoutTestController.ensureShadowRoot(p);
+    // Can bless ordinary elements with shadows
+    shadow = internals.ensureShadowRoot(p);
     shouldBe('shadow.nodeName', '"#shadow-root"');
-    shouldBe('shadow === layoutTestController.shadowRoot(p)', 'true');
+    shouldBe('shadow === internals.shadowRoot(p)', 'true');
 
-    // LayoutTestController can strip elements of shadows
-    layoutTestController.removeShadowRoot(keygen);
-    shouldBe('layoutTestController.shadowRoot(keygen)', 'null');
+    // Can strip elements of shadows
+    internals.removeShadowRoot(keygen);
+    shouldBe('internals.shadowRoot(keygen)', 'null');
 }
 
 var successfullyParsed = true;
index 08213e59e0d16e3d672702602c98acfbe7466829..c75c0439e3e5ad9c789c21607d0433c11ed5bffd 100644 (file)
@@ -13,7 +13,7 @@ This tests the shadow host's and shadow root's nodeType.
         layoutTestController.dumpAsText();
         
         var keygen = document.getElementById('keys');
-        var shadow = layoutTestController.shadowRoot(keygen);
+        var shadow = internals.shadowRoot(keygen);
         var shadowChild = shadow.firstChild;
         shouldBe('keygen.nodeType', 'Node.ELEMENT_NODE');
         shouldBe('shadow.nodeType', '14');
index 3bf5fdab9206edeae2004f198292f356121cb3a2..10e9162e4c48c2908b5575ba90e64fe9201251cd 100644 (file)
@@ -45,7 +45,7 @@ if (window.layoutTestController) {
     function addShadowHost(doc) {
         var shadowHost = doc.createElement('p');
         shadowHost.tabIndex = -1;  // This shadow host (and a shadow tree in that) should be skipped.
-        var shadow = layoutTestController.ensureShadowRoot(shadowHost);
+        var shadow = internals.ensureShadowRoot(shadowHost);
         doc.body.appendChild(shadowHost);
         shadow.appendChild(createTextInputElement(doc, 'shadow-input-03', 0));
     }
@@ -65,7 +65,7 @@ if (window.layoutTestController) {
         function addShadowHost(doc) {
             var shadowHost = doc.createElement('p');
             shadowHost.tabIndex = 1;
-            var shadow = layoutTestController.ensureShadowRoot(shadowHost);
+            var shadow = internals.ensureShadowRoot(shadowHost);
             doc.body.appendChild(shadowHost);
 
             shadow.appendChild(createTextInputElement(doc, 'iframe-shadow-input-08', 0));
index ecdf9c609a0077ae4664226097194c2a3f002e12..69207ac090dff9861490d644e3e138b14690c374 100644 (file)
@@ -122,7 +122,7 @@ var tests = {
         document.body.appendChild(relatedTarget);
         var target = document.createElement('div');
         target.style.cssText = 'width: 50px; height: 50px';
-        layoutTestController.ensureShadowRoot(relatedTarget).appendChild(target);
+        internals.ensureShadowRoot(relatedTarget).appendChild(target);
         moveOverLeftQuarterOf(relatedTarget);
         var countEventDispatch = function()
         {
@@ -144,7 +144,7 @@ var tests = {
         document.body.appendChild(target);
         var relatedTarget = document.createElement('div');
         relatedTarget.style.cssText = 'width: 50px; height: 50px';
-        layoutTestController.ensureShadowRoot(target).appendChild(relatedTarget);
+        internals.ensureShadowRoot(target).appendChild(relatedTarget);
         moveOverRightQuarterOf(target);
         var countEventDispatch = function(evt)
         {
index 5d655e4ad321fb0c7ab010db9292b3d3373c8927..e505abf7366e55bcf13991654c9ee0eedef681d6 100644 (file)
@@ -4,7 +4,7 @@ function $(id) {
 
 function getValidationMessageBubbleNode(host) {
     // FIXME: We should search for a pseudo ID.
-    return layoutTestController.shadowRoot(host).lastChild;
+    return internals.shadowRoot(host).lastChild;
 }
 
 function getAbsoluteRect(element) {
index 55557c792570d2c1d015bec1b12601e41d4f1659..247e6d970e7ef103b704e5d89d9afaf5c2595652 100644 (file)
@@ -2,7 +2,7 @@ Tests that a cloned keygen has the right shadow pseudo ID. You should see two bi
 
 
 PASS specialK.clientHeight is k.clientHeight
-PASS layoutTestController.shadowPseudoId(cloneShadow.firstChild) is layoutTestController.shadowPseudoId(kShadow.firstChild)
+PASS internals.shadowPseudoId(cloneShadow.firstChild) is internals.shadowPseudoId(kShadow.firstChild)
 PASS successfullyParsed is true
 
 TEST COMPLETE
index a63c6ad9cc9be2f3796a5464c38f6213678b321b..b9bace0d61c42c212f105a6885ae490b5fb9f27c 100644 (file)
@@ -25,11 +25,11 @@ k.insertAdjacentElement('afterEnd', specialK);
 
 shouldBe('specialK.clientHeight', 'k.clientHeight');
 
-if (window.layoutTestController) {
-    var kShadow = layoutTestController.shadowRoot(k);
-    var cloneShadow = layoutTestController.shadowRoot(specialK);
-    shouldBe('layoutTestController.shadowPseudoId(cloneShadow.firstChild)',
-             'layoutTestController.shadowPseudoId(kShadow.firstChild)');
+if (window.internals) {
+    var kShadow = internals.shadowRoot(k);
+    var cloneShadow = internals.shadowRoot(specialK);
+    shouldBe('internals.shadowPseudoId(cloneShadow.firstChild)',
+             'internals.shadowPseudoId(kShadow.firstChild)');
 }
 
 var successfullyParsed = true;
index e2a65de1c9e31e7bc055cdb765f551bd26c2667d..1d23a965ab9b120fea606a501287d7d7512bebdd 100644 (file)
@@ -2,7 +2,7 @@ Tests that a range input's slider is cloned along with its host. There should be
 
 
 PASS dolly.clientHeight is sheep.clientHeight
-PASS layoutTestController.shadowPseudoId(dollyShadow.firstChild) is layoutTestController.shadowPseudoId(sheepShadow.firstChild)
+PASS internals.shadowPseudoId(dollyShadow.firstChild) is internals.shadowPseudoId(sheepShadow.firstChild)
 PASS successfullyParsed is true
 
 TEST COMPLETE
index 2f9787e93ad607bcf29d973d6a9c094894a19da4..b8f4d2a9a80f13cef6510fcd399df61d0226d666 100644 (file)
@@ -22,11 +22,11 @@ sheep.insertAdjacentElement('afterEnd', dolly);
 // symptom of a broken clone.
 shouldBe('dolly.clientHeight', 'sheep.clientHeight');
 
-if (window.layoutTestController) {
-    var sheepShadow = layoutTestController.shadowRoot(sheep);
-    var dollyShadow = layoutTestController.shadowRoot(dolly);
-    shouldBe('layoutTestController.shadowPseudoId(dollyShadow.firstChild)',
-             'layoutTestController.shadowPseudoId(sheepShadow.firstChild)');
+if (window.internals) {
+    var sheepShadow = internals.shadowRoot(sheep);
+    var dollyShadow = internals.shadowRoot(dolly);
+    shouldBe('internals.shadowPseudoId(dollyShadow.firstChild)',
+             'internals.shadowPseudoId(sheepShadow.firstChild)');
 }
 
 dolly.value = 0;
index 6f62b5a2724e21b662d07b805aff9c2a4470436b..577fe909f9b8b6e148b0ed4aa4ca3f082dd3d181 100644 (file)
@@ -12,14 +12,14 @@ function runTest()
     var clonedSummary = targetSummary.cloneNode(true);
     targetDetails.appendChild(clonedSummary);
 
-    if (!window.layoutTestController)
+    if (!window.internals)
         return;
 
     // On cloned <details>, marker shadow element should be created
-    var targetDetailsSummaryShadow = layoutTestController.shadowRoot(targetDetails.querySelector("summary"));
-    targetMarkerPseudoId = layoutTestController.shadowPseudoId(targetDetailsSummaryShadow.firstChild);
-    var clonedDetailsSummaryShadow = layoutTestController.shadowRoot(clonedDetails.querySelector("summary"));
-    clonedMarkerPseudoId = layoutTestController.shadowPseudoId(clonedDetailsSummaryShadow.firstChild);
+    var targetDetailsSummaryShadow = internals.shadowRoot(targetDetails.querySelector("summary"));
+    targetMarkerPseudoId = internals.shadowPseudoId(targetDetailsSummaryShadow.firstChild);
+    var clonedDetailsSummaryShadow = internals.shadowRoot(clonedDetails.querySelector("summary"));
+    clonedMarkerPseudoId = internals.shadowPseudoId(clonedDetailsSummaryShadow.firstChild);
     shouldBe("targetMarkerPseudoId", "clonedMarkerPseudoId");
 }
 </script>
index 93573b1d77fcfe7220b48bdcd307270f017ed8a9..d6c906dc08d539c71d334cd06ba628bd7c64b9fa 100644 (file)
@@ -1,9 +1,9 @@
 This tests that the video element's "controls" attribute is overridden in full screen mode, and that the controls are correctly hidden upon exiting full screen. Press any key to continue.
 
 EVENT(webkitfullscreenchange)
-EXPECTED (shadowRoot = layoutTestController.shadowRoot(video) != 'null') OK
+EXPECTED (shadowRoot = internals.shadowRoot(video) != 'null') OK
 EXPECTED (panel = shadowRoot.firstChild.firstChild != 'null') OK
-EXPECTED (layoutTestController.shadowPseudoId(panel) == '-webkit-media-controls-panel') OK
+EXPECTED (internals.shadowPseudoId(panel) == '-webkit-media-controls-panel') OK
 EXPECTED (document.defaultView.getComputedStyle(panel)['display'] != 'none') OK
 EVENT(webkitfullscreenchange)
 EXPECTED (document.defaultView.getComputedStyle(panel)['display'] == 'none') OK
index 5c5def0a5710512a74b7b314045eb53e1a8229f3..69d50983ad6a1235d3fd861ebcefe93d9ebe54e5 100644 (file)
         var video = document.getElementById('video');
 
         var videoEnteredFullScreen = function() {
-            if (layoutTestController) {
-                testExpected("shadowRoot = layoutTestController.shadowRoot(video)", null, "!=");
+            if (window.internals) {
+                testExpected("shadowRoot = internals.shadowRoot(video)", null, "!=");
                 testExpected("panel = shadowRoot.firstChild.firstChild", null, "!=");
-                testExpected("layoutTestController.shadowPseudoId(panel)", "-webkit-media-controls-panel");
+                testExpected("internals.shadowPseudoId(panel)", "-webkit-media-controls-panel");
                 testExpected("document.defaultView.getComputedStyle(panel)['display']", 'none', "!=");
             }
             callback = cancelledFullScreen;
@@ -28,7 +28,7 @@
         };
 
         var cancelledFullScreen = function() {
-            if (layoutTestController)
+            if (window.layoutTestController)
                 testExpected("document.defaultView.getComputedStyle(panel)['display']", 'none');
             endTest();
         };
@@ -36,4 +36,4 @@
         callback = videoEnteredFullScreen;
         runWithKeyDown(function(){video.webkitRequestFullScreen()});
     </script>
-</body>
\ No newline at end of file
+</body>
index c5a6dafb72c96b75e4a21fc7eaf70e9cacbec7d7..4af951d33e4c543e7989941cf946f7512b11217a 100644 (file)
@@ -14,7 +14,7 @@
 
     function playing() {
         setTimeout(function() {
-            var controls = layoutTestController.shadowRoot(document.getElementById("audio")).firstChild.firstChild;
+            var controls = internals.shadowRoot(document.getElementById("audio")).firstChild.firstChild;
             var opacity = getComputedStyle(controls).opacity;
             document.getElementById("result").innerText = opacity < 1 ? "FAIL" : "PASS";
             layoutTestController.notifyDone();
index c52e391793a79ede70a0477dce181f5bb0387b2a..f34914b4e5c7bfd2e35844b4af387d9b3b0d0dac 100644 (file)
@@ -2,9 +2,9 @@
 function mediaControlsButtonCoordinates(element, id)
 {
     var button;
-    var controlsShadow = layoutTestController.shadowRoot(element).firstChild.firstChild;
+    var controlsShadow = internals.shadowRoot(element).firstChild.firstChild;
     for (child = controlsShadow.firstChild; child; child = child.nextSibling) {
-        if (layoutTestController.shadowPseudoId(child) == "-webkit-media-controls-" + id) {
+        if (internals.shadowPseudoId(child) == "-webkit-media-controls-" + id) {
             button = child;
             break;
         }
index ad488b32534a655cb6df97829ec365e048d59377..705f9e9e6fc197a1b29a95ce6054ba0b4c9b1e54 100644 (file)
@@ -10,7 +10,7 @@ var iframe = document.getElementById("container");
 
 function timeupdate(event) {
     var video = event.target;
-    controls = layoutTestController.shadowRoot(video).firstChild.firstChild;
+    controls = internals.shadowRoot(video).firstChild.firstChild;
     testExpected("controls.offsetTop + controls.offsetHeight", video.offsetHeight, "<=");
     layoutTestController.notifyDone();
 };
index 4fca7ee5716b6a57cfa91183611bfb890cb01314..cfd340f0dda7758594dd8c8970c5e4a76870f899 100644 (file)
@@ -1264,9 +1264,6 @@ editing/pasteboard/smart-paste-004.html
 # https://bugs.webkit.org/show_bug.cgi?id=56496
 fast/js/array-sort-modifying-tostring.html
 
-# https://bugs.webkit.org/show_bug.cgi?id=56573
-fast/dom/HTMLKeygenElement/keygen.html
-
 # https://bugs.webkit.org/show_bug.cgi?id=57693
 plugins/windowless_plugin_paint_test.html
 
@@ -1298,18 +1295,6 @@ plugins/mouse-click-iframe-to-plugin.html
 # https://bugs.webkit.org/show_bug.cgi?id=59062
 fast/images/animated-gif-restored-from-bfcache.html
 
-# Windows DRT needs an implementation of shadowRoot
-# https://bugs.webkit.org/show_bug.cgi?id=59081
-fast/dom/HTMLMeterElement/meter-clone.html
-fast/dom/HTMLProgressElement/progress-clone.html
-fast/dom/shadow
-fast/html/clone-keygen.html
-fast/html/clone-range.html
-fast/html/details-clone.html
-media/audio-controls-do-not-fade-out.html
-media/video-controls-visible-audio-only.html
-fast/events/shadow-boundary-crossing.html
-
 # Causes the next test to fail http://webkit.org/b/59099
 http/tests/security/contentSecurityPolicy/frame-src-blocked.html
 
index a538e811bf9a2c358db72f07082bba4e1ba06c9d..dec8f47a45021d39fea86063863ae84376c36ee4 100644 (file)
@@ -1,3 +1,19 @@
+2011-06-24  Dominic Cooney  <dominicc@chromium.org>
+
+        Reviewed by Dimitri Glazkov.
+
+        Convert shadow DOM-related tests to use window.internals
+        https://bugs.webkit.org/show_bug.cgi?id=61671
+
+        * WebCore.exp.in: Exports for symbols used by WebCoreTestSupport.
+        * testing/Internals.cpp: The new home of shadowRoot and friends.
+        (WebCore::Internals::ensureShadowRoot):
+        (WebCore::Internals::shadowRoot):
+        (WebCore::Internals::removeShadowRoot):
+        (WebCore::Internals::shadowPseudoId):
+        * testing/Internals.h:
+        * testing/Internals.idl:
+
 2011-06-24  Tony Chang  <tony@chromium.org>
 
         Reviewed by Darin Adler.
index 8597ee74674702270952287739494de380337436..f7008eb30c4c13e70fbaf8a0da297276449e0bf1 100644 (file)
@@ -1515,6 +1515,7 @@ __ZN7WebCore15ContextMenuItemC1ENS_19ContextMenuItemTypeENS_17ContextMenuActionE
 __ZN7WebCore15ContextMenuItemC1ENS_19ContextMenuItemTypeENS_17ContextMenuActionERKN3WTF6StringEbb
 __ZN7WebCore15ContextMenuItemC1EP10NSMenuItem
 __ZN7WebCore15ContextMenuItemD1Ev
+__ZN7WebCore15setDOMExceptionEPN3JSC9ExecStateEi
 __ZN7WebCore21ContextMenuController16clearContextMenuEv
 __ZNK7WebCore21ContextMenuController21checkOrEnableIfNeededERNS_15ContextMenuItemE
 __ZN7WebCore21ContextMenuController23contextMenuItemSelectedEPNS_15ContextMenuItemE
index 03bdbeafd9d0e6c4d5c94a4f0f7abf20d7d1746e..86cdcbeb90f0f2c36eb9c4d5edbf4bf32c9c8a1f 100644 (file)
 
 #include "CachedResourceLoader.h"
 #include "Document.h"
+#include "Element.h"
+#include "ExceptionCode.h"
 #include "RenderTreeAsText.h"
 #include "ShadowContentElement.h"
+#include "ShadowRoot.h"
 
 namespace WebCore {
 
@@ -80,4 +83,44 @@ String Internals::elementRenderTreeAsText(Element* element, ExceptionCode& ec)
     return representation;
 }
 
+Node* Internals::ensureShadowRoot(Element* host, ExceptionCode& ec)
+{
+    if (!host) {
+        ec = INVALID_ACCESS_ERR;
+        return 0;
+    }
+
+    return host->ensureShadowRoot();
+}
+
+Node* Internals::shadowRoot(Element* host, ExceptionCode& ec)
+{
+    if (!host) {
+        ec = INVALID_ACCESS_ERR;
+        return 0;
+    }
+
+    return host->shadowRoot();
+}
+
+void Internals::removeShadowRoot(Element* host, ExceptionCode& ec)
+{
+    if (!host) {
+        ec = INVALID_ACCESS_ERR;
+        return;
+    }
+
+    host->removeShadowRoot();
+}
+
+String Internals::shadowPseudoId(Element* element, ExceptionCode& ec)
+{
+    if (!element) {
+        ec = INVALID_ACCESS_ERR;
+        return String();
+    }
+
+    return element->shadowPseudoId().string();
+}
+
 }
index 358b5d57a93acd6e87d0188b62d75d57d6a66463..e677e32f089dcca718b242bab70581d00f566be4 100644 (file)
@@ -36,16 +36,23 @@ namespace WebCore {
 
 class Document;
 class Element;
+class Node;
 
 class Internals : public RefCounted<Internals> {
 public:
     static PassRefPtr<Internals> create();
     virtual ~Internals();
     
+    String elementRenderTreeAsText(Element*, ExceptionCode&);
+
     bool isPreloaded(Document*, const String& url);
 
+    Node* ensureShadowRoot(Element* host, ExceptionCode&);
+    Node* shadowRoot(Element* host, ExceptionCode&);
+    void removeShadowRoot(Element* host, ExceptionCode&);
+    String shadowPseudoId(Element*, ExceptionCode&);
     PassRefPtr<Element> createShadowContentElement(Document*, ExceptionCode&);
-    String elementRenderTreeAsText(Element*, ExceptionCode&);
+
 private:
     Internals();
 };
index 369277e35a72d7cf5d3e46bf03ace997404328a3..b82871e5242f4f4bc9ee7584dd5979d7e0da2346 100644 (file)
@@ -27,9 +27,14 @@ module window {
     interface [
         OmitConstructor
     ] Internals {
-        Element createShadowContentElement(in Document document) raises(DOMException);
         DOMString elementRenderTreeAsText(in Element element) raises(DOMException);
         boolean isPreloaded(in Document document, in DOMString url);
+
+        Node ensureShadowRoot(in Element host) raises (DOMException);
+        Node shadowRoot(in Element host) raises (DOMException);
+        void removeShadowRoot(in Element host) raises (DOMException);
+        DOMString shadowPseudoId(in Element element) raises (DOMException);
+        Element createShadowContentElement(in Document document) raises(DOMException);
     };
 }
 
index 1d758a527e632ca08c6269d5857450968ff0f271..755358a02ae319f045da6b8cae541fa34f836375 100644 (file)
@@ -1,3 +1,16 @@
+2011-06-24  Dominic Cooney  <dominicc@chromium.org>
+
+        Reviewed by Dimitri Glazkov.
+
+        Convert shadow DOM-related tests to use window.internals
+        https://bugs.webkit.org/show_bug.cgi?id=61671
+
+        Remove shadow DOM-related methods from Chromium API. These are not
+        required any more.
+
+        * public/WebElement.h:
+        * src/WebElement.cpp:
+
 2011-06-24  Vsevolod Vlasov  <vsevik@chromium.org>
 
         Reviewed by Darin Fisher.
index 024db6a509b4643cc1b3f77eed18f6fad74c7502..8d51e987e2db6d81f621036b062b9e9d1bce3c77 100644 (file)
@@ -59,11 +59,6 @@ class WebNamedNodeMap;
         WEBKIT_API WebNamedNodeMap attributes() const;
         WEBKIT_API WebString innerText() const;
 
-        WEBKIT_API WebNode shadowRoot();
-        WEBKIT_API WebNode ensureShadowRoot();
-        WEBKIT_API void removeShadowRoot();
-        WEBKIT_API WebString shadowPseudoId() const;
-
         // Returns the language code specified for this element.  This attribute
         // is inherited, so the returned value is drawn from the closest parent
         // element that has the lang attribute set, or from the HTTP
index 7e851b494ac13b65eaef3385034dcd3a63718404..34daa3404f7c08a1b34ff013aad9cf3c8343c874 100644 (file)
@@ -34,7 +34,6 @@
 #include "Element.h"
 #include "RenderBoxModelObject.h"
 #include "RenderObject.h"
-#include "ShadowRoot.h"
 #include <wtf/PassRefPtr.h>
 
 #include "WebNamedNodeMap.h"
@@ -91,26 +90,6 @@ WebString WebElement::innerText() const
     return constUnwrap<Element>()->innerText();
 }
 
-WebNode WebElement::shadowRoot()
-{
-    return PassRefPtr<Node>(static_cast<Node*>(unwrap<Element>()->shadowRoot()));
-}
-
-WebNode WebElement::ensureShadowRoot()
-{
-    return PassRefPtr<Node>(static_cast<Node*>(unwrap<Element>()->ensureShadowRoot()));
-}
-
-void WebElement::removeShadowRoot()
-{
-    unwrap<Element>()->removeShadowRoot();
-}
-
-WebString WebElement::shadowPseudoId() const
-{
-    return WebString(constUnwrap<Element>()->shadowPseudoId().string());
-}
-
 WebString WebElement::computeInheritedLanguage() const
 {
     return WebString(constUnwrap<Element>()->computeInheritedLanguage());
index 07b5a8efbc39dbb8f2eda381a97f8c56aa87b893..3531b45a42efc9db23f7a289ac82ba7565f9379b 100644 (file)
@@ -1,3 +1,16 @@
+2011-06-24  Dominic Cooney  <dominicc@chromium.org>
+
+        Reviewed by Dimitri Glazkov.
+
+        Convert shadow DOM-related tests to use window.internals
+        https://bugs.webkit.org/show_bug.cgi?id=61671
+
+        Remove shadow-DOM related methods from GTK DRT API. These are not
+        required any more.
+
+        * WebCoreSupport/DumpRenderTreeSupportGtk.cpp:
+        * WebCoreSupport/DumpRenderTreeSupportGtk.h:
+
 2011-06-20  Dimitri Glazkov  <dglazkov@chromium.org>
 
         Reviewed by Kent Tamura.
index 1ec03c7cf3de32b5332c2b410b855c825f05227a..5d5a078225eb01be99c7dca9b52d2027ccb2f0f9 100644 (file)
@@ -53,7 +53,6 @@
 #include "RenderView.h"
 #include "SecurityOrigin.h"
 #include "Settings.h"
-#include "ShadowRoot.h"
 #include "TextIterator.h"
 #include "WebKitDOMRangePrivate.h"
 #include "WorkerThread.h"
@@ -416,16 +415,6 @@ CString DumpRenderTreeSupportGtk::markerTextForListItem(WebKitWebFrame* frame, J
     return WebCore::markerTextForListItem(element).utf8();
 }
 
-CString DumpRenderTreeSupportGtk::shadowPseudoId(JSContextRef context, JSValueRef nodeObject)
-{
-    JSC::ExecState* exec = toJS(context);
-    Element* element = toElement(toJS(exec, nodeObject));
-    if (!element)
-        return CString();
-
-    return element->shadowPseudoId().string().utf8();
-}
-
 unsigned int DumpRenderTreeSupportGtk::numberOfActiveAnimations(WebKitWebFrame* frame)
 {
     Frame* coreFrame = core(frame);
@@ -706,39 +695,6 @@ void DumpRenderTreeSupportGtk::clearOpener(WebKitWebFrame* frame)
         coreFrame->loader()->setOpener(0);
 }
 
-JSValueRef DumpRenderTreeSupportGtk::shadowRoot(JSContextRef context, JSValueRef value)
-{
-    JSLock lock(SilenceAssertionsOnly);
-    JSC::ExecState* exec = toJS(context);
-    Element* element = toElement(toJS(exec, value));
-    if (!element)
-        return JSValueMakeNull(context);
-
-    return toRef(exec, toJS(exec, deprecatedGlobalObjectForPrototype(exec), element->shadowRoot()));
-}
-
-JSValueRef DumpRenderTreeSupportGtk::ensureShadowRoot(JSContextRef context, JSValueRef value)
-{
-    JSLock lock(SilenceAssertionsOnly);
-    JSC::ExecState* exec = toJS(context);
-    Element* element = toElement(toJS(exec, value));
-    if (!element)
-        return JSValueMakeNull(context);
-
-    return toRef(exec, toJS(exec, deprecatedGlobalObjectForPrototype(exec), element->ensureShadowRoot()));
-}
-
-void DumpRenderTreeSupportGtk::removeShadowRoot(JSContextRef context, JSValueRef value)
-{
-    JSLock lock(SilenceAssertionsOnly);
-    JSC::ExecState* exec = toJS(context);
-    Element* element = toElement(toJS(exec, value));
-    if (!element)
-        return;
-
-    element->removeShadowRoot();
-}
-
 unsigned int DumpRenderTreeSupportGtk::workerThreadCount()
 {
 #if ENABLE(WORKERS)
index ac1c55dae982567f13c395709072843c83479420..73c445a6cf079a9c7f831fadc6349a3a0bfd5f0b 100644 (file)
@@ -59,10 +59,6 @@ public:
 
     static void clearOpener(WebKitWebFrame*);
 
-    static JSValueRef shadowRoot(JSContextRef, JSValueRef);
-    static JSValueRef ensureShadowRoot(JSContextRef, JSValueRef);
-    static void removeShadowRoot(JSContextRef, JSValueRef);
-
     static WebKitDOMRange* jsValueToDOMRange(JSContextRef, JSValueRef);
 
     // FIXME: Move these to webkitwebframe.h once their API has been discussed.
@@ -81,7 +77,6 @@ public:
     static bool pauseTransition(WebKitWebFrame*, const char* name, double time, const char* element);
     static bool pauseSVGAnimation(WebKitWebFrame*, const char* animationId, double time, const char* elementId);
     static WTF::CString markerTextForListItem(WebKitWebFrame*, JSContextRef, JSValueRef nodeObject);
-    static WTF::CString shadowPseudoId(JSContextRef, JSValueRef nodeObject);
     static unsigned int numberOfActiveAnimations(WebKitWebFrame*);
     static void suspendAnimations(WebKitWebFrame*);
     static void resumeAnimations(WebKitWebFrame*);
index 28b7a404bc46961d15d2c897993b25e6a76eab7a..fd174eac37ef3e84c05c08d6233a36b1905ae70e 100644 (file)
@@ -1,3 +1,16 @@
+2011-06-24  Dominic Cooney  <dominicc@chromium.org>
+
+        Reviewed by Dimitri Glazkov.
+
+        Convert shadow DOM-related tests to use window.internals
+        https://bugs.webkit.org/show_bug.cgi?id=61671
+
+        Remove shadow DOM-related methods from Mac API. These are not
+        required any more.
+
+        * DOM/WebDOMOperations.mm:
+        * DOM/WebDOMOperationsPrivate.h:
+
 2011-06-24  Yuta Kitamura  <yutak@chromium.org>
 
         Reviewed by Adam Barth.
index 2e8ee3b541cf0e5d37580b536a0ff1b922aa0ee4..5ea99461f8070fa780160c1e43cb70d47a57f890 100644 (file)
@@ -39,7 +39,6 @@
 #import "WebKitNSStringExtras.h"
 #import <JavaScriptCore/APICast.h>
 #import <WebCore/Document.h>
-#import <WebCore/Element.h>
 #import <WebCore/HTMLInputElement.h>
 #import <WebCore/HTMLParserIdioms.h>
 #import <WebCore/JSElement.h>
@@ -75,30 +74,6 @@ using namespace JSC;
     return WebCore::markerTextForListItem(core(self));
 }
 
-- (NSString *)_shadowPseudoId
-{
-    return core(self)->shadowPseudoId();
-}
-
-- (JSValueRef)_shadowRoot:(JSContextRef)context
-{
-    JSLock lock(SilenceAssertionsOnly);
-    ExecState* execState = toJS(context);
-    return toRef(execState, toJS(execState, deprecatedGlobalObjectForPrototype(execState), core(self)->shadowRoot()));
-}
-
-- (JSValueRef)_ensureShadowRoot:(JSContextRef)context
-{
-    JSLock lock(SilenceAssertionsOnly);
-    ExecState* execState = toJS(context);
-    return toRef(execState, toJS(execState, deprecatedGlobalObjectForPrototype(execState), core(self)->ensureShadowRoot()));
-}
-
-- (void)_removeShadowRoot
-{
-    core(self)->removeShadowRoot();
-}
-
 @end
 
 @implementation DOMNode (WebDOMNodeOperations)
index f04195172f43d733d53caf8f8bba071f23c2075f..b579a6f87d01f19a3f3f9c089620e6493db252e6 100644 (file)
 @interface DOMElement (WebDOMElementOperationsPrivate)
 + (DOMElement *)_DOMElementFromJSContext:(JSContextRef)context value:(JSValueRef)value;
 - (NSString *)_markerTextForListItem;
-- (JSValueRef)_shadowRoot:(JSContextRef)context;
-- (JSValueRef)_ensureShadowRoot:(JSContextRef)context;
-- (void)_removeShadowRoot;
-- (NSString *)_shadowPseudoId;
 @end
 
 @interface DOMDocument (WebDOMDocumentOperationsPrivate)
index 8244ee7b9765dcc3dba6fbc21493d10d496d1327..5f17bd2e27f167225db9297b134134a745bbc369 100644 (file)
@@ -1,3 +1,16 @@
+2011-06-24  Dominic Cooney  <dominicc@chromium.org>
+
+        Reviewed by Dimitri Glazkov.
+
+        Convert shadow-DOM related tests to use window.internals
+        https://bugs.webkit.org/show_bug.cgi?id=61671
+
+        Remove shadow-DOM related methods from Qt DRT API. These are not
+        required any more.
+
+        * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
+        * WebCoreSupport/DumpRenderTreeSupportQt.h:
+
 2011-06-23  Joe Wild  <joseph.wild@nokia.com>
 
         Reviewed by Laszlo Gombos.
index ea5c0df1c0b2d82fe7c2ab6b4f30b2ffe10b864f..1dcba544f85ca29c881e18cda2c85f6ca0ca3a0a 100644 (file)
@@ -66,7 +66,6 @@
 #include "PrintContext.h"
 #include "RenderListItem.h"
 #include "RenderTreeAsText.h"
-#include "ShadowRoot.h"
 #include "ScriptController.h"
 #include "ScriptSourceCode.h"
 #include "ScriptValue.h"
@@ -1093,45 +1092,6 @@ void DumpRenderTreeSupportQt::setAlternateHtml(QWebFrame* frame, const QString&
     coreFrame->loader()->load(request, substituteData, false);
 }
 
-QVariant DumpRenderTreeSupportQt::shadowRoot(const QWebElement& element)
-{
-    WebCore::Element* webElement = element.m_element;
-    if (!webElement)
-        return QVariant();
-
-    ShadowRoot* webShadowRoot = webElement->shadowRoot();
-    if (!webShadowRoot)
-        return QVariant();
-
-    return QVariant::fromValue(QDRTNode(webShadowRoot));
-}
-
-QVariant DumpRenderTreeSupportQt::ensureShadowRoot(const QWebElement& element)
-{
-    WebCore::Element* webElement = element.m_element;
-    if (!webElement)
-        return QVariant();
-
-    return QVariant::fromValue(QDRTNode(webElement->ensureShadowRoot()));
-}
-
-void DumpRenderTreeSupportQt::removeShadowRoot(const QWebElement& element)
-{
-    WebCore::Element* webElement = element.m_element;
-    if (!webElement)
-        return;
-    webElement->removeShadowRoot();
-}
-
-QString DumpRenderTreeSupportQt::shadowPseudoId(const QWebElement& element)
-{
-    WebCore::Element* webElement = element.m_element;
-    QString pseudoId;
-    if (webElement)
-        pseudoId = webElement->shadowPseudoId().string();
-    return pseudoId;
-}
-
 void DumpRenderTreeSupportQt::confirmComposition(QWebPage* page, const char* text)
 {
     Frame* frame = page->handle()->page->focusController()->focusedOrMainFrame();
index 6e478db4fce10f3091bbe4176726bef418505ba6..894adb0de95fa03413a907e4f288ad15bd8e04a4 100644 (file)
@@ -209,11 +209,6 @@ public:
     static QUrl mediaContentUrlByElementId(QWebFrame*, const QString& elementId);
     static void setAlternateHtml(QWebFrame*, const QString& html, const QUrl& baseUrl, const QUrl& failingUrl);
 
-    static QVariant shadowRoot(const QWebElement&);
-    static QVariant ensureShadowRoot(const QWebElement&);
-    static void removeShadowRoot(const QWebElement&);
-    static QString shadowPseudoId(const QWebElement&);
-
     static QString layerTreeAsText(QWebFrame*);
 
     static void injectInternalsObject(QWebFrame*);
index 1a7b9df8be8c58cbf6f51e619ad8e8d1e83a9e83..72739c2c429e54540bce74ea7e3b5e0aa2120ac4 100644 (file)
@@ -1,3 +1,20 @@
+2011-06-24  Dominic Cooney  <dominicc@chromium.org>
+
+        Reviewed by Dimitri Glazkov.
+
+        Convert shadow DOM-related tests to use window.internals
+        https://bugs.webkit.org/show_bug.cgi?id=61671
+
+        Remove shadow DOM-related methods from WebKit2 API. These are not
+        required any more.
+
+        * WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp:
+        * WebProcess/InjectedBundle/API/c/WKBundleNodeHandlePrivate.h:
+        * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
+        * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h:
+        * win/WebKit2.def: Re-exports for symbols used by WebCoreTestSupport.
+        * win/WebKit2CFLite.def: Same for Cairo.
+
 2011-06-24  Carlos Garcia Campos  <cgarcia@igalia.com>
 
         Reviewed by Martin Robinson.
index d00a9d9b5c6ce49f2eb0c8b924e6303b0b31e82c..b44510cf5d25688c42cd6d1a9e1448d7b49b8049 100644 (file)
@@ -61,28 +61,6 @@ WKRect WKBundleNodeHandleGetElementBounds(WKBundleNodeHandleRef elementHandleRef
     return toAPI(toImpl(elementHandleRef)->elementBounds());
 }
 
-WKBundleNodeHandleRef WKBundleNodeHandleCopyElementShadowRoot(WKBundleNodeHandleRef elementHandleRef)
-{
-    RefPtr<InjectedBundleNodeHandle> nodeHandle = toImpl(elementHandleRef)->elementShadowRoot();
-    return toAPI(nodeHandle.release().releaseRef());
-}
-
-WKBundleNodeHandleRef WKBundleNodeHandleCopyElementEnsureShadowRoot(WKBundleNodeHandleRef elementHandleRef)
-{
-    RefPtr<InjectedBundleNodeHandle> nodeHandle = toImpl(elementHandleRef)->elementEnsureShadowRoot();
-    return toAPI(nodeHandle.release().releaseRef());
-}
-
-void WKBundleNodeHandleRemoveShadowRoot(WKBundleNodeHandleRef elementHandleRef)
-{
-    toImpl(elementHandleRef)->elementRemoveShadowRoot();
-}
-
-WKStringRef WKBundleNodeHandleShadowPseudoId(WKBundleNodeHandleRef elementHandleRef)
-{
-    return toCopiedAPI(toImpl(elementHandleRef)->elementShadowPseudoId());
-}
-
 void WKBundleNodeHandleSetHTMLInputElementValueForUser(WKBundleNodeHandleRef htmlInputElementHandleRef, WKStringRef valueRef)
 {
     toImpl(htmlInputElementHandleRef)->setHTMLInputElementValueForUser(toWTFString(valueRef));
index db6a8be3cda174dbf7a23f6874f7a1a3049a832a..245c5655557240bbad515d60b2fe0d42517b9322 100644 (file)
@@ -46,10 +46,6 @@ WK_EXPORT WKRect WKBundleNodeHandleGetRenderRect(WKBundleNodeHandleRef nodeHandl
 
 /* Element Specific Operations */
 WK_EXPORT WKRect WKBundleNodeHandleGetElementBounds(WKBundleNodeHandleRef elementHandle);
-WK_EXPORT WKBundleNodeHandleRef WKBundleNodeHandleCopyElementShadowRoot(WKBundleNodeHandleRef elementHandle);
-WK_EXPORT WKBundleNodeHandleRef WKBundleNodeHandleCopyElementEnsureShadowRoot(WKBundleNodeHandleRef elementHandle);
-WK_EXPORT void WKBundleNodeHandleRemoveShadowRoot(WKBundleNodeHandleRef elementHandle);
-WK_EXPORT WKStringRef WKBundleNodeHandleShadowPseudoId(WKBundleNodeHandleRef elementHandle);
 
 /* HTMLInputElement Specific Operations */
 WK_EXPORT void WKBundleNodeHandleSetHTMLInputElementValueForUser(WKBundleNodeHandleRef htmlInputElementHandle, WKStringRef value);
index f7e421d40f7fabaa782efcab2a0bb8a19a594851..5e1587202116164b8a3374070fc57080be1e6d5a 100644 (file)
@@ -40,7 +40,6 @@
 #include <WebCore/IntRect.h>
 #include <WebCore/JSNode.h>
 #include <WebCore/Node.h>
-#include <WebCore/ShadowRoot.h>
 #include <wtf/HashMap.h>
 #include <wtf/text/WTFString.h>
 
@@ -166,38 +165,6 @@ PassRefPtr<InjectedBundleNodeHandle> InjectedBundleNodeHandle::htmlTableCellElem
     return getOrCreate(static_cast<HTMLTableCellElement*>(m_node.get())->cellAbove());
 }
 
-PassRefPtr<InjectedBundleNodeHandle> InjectedBundleNodeHandle::elementShadowRoot()
-{
-    if (!m_node->isElementNode())
-        return 0;
-
-    return getOrCreate(static_cast<Element*>(m_node.get())->shadowRoot());
-}
-
-PassRefPtr<InjectedBundleNodeHandle> InjectedBundleNodeHandle::elementEnsureShadowRoot()
-{
-    if (!m_node->isElementNode())
-        return 0;
-
-    return getOrCreate(static_cast<Element*>(m_node.get())->ensureShadowRoot());
-}
-
-void InjectedBundleNodeHandle::elementRemoveShadowRoot()
-{
-    if (!m_node->isElementNode())
-        return;
-
-    static_cast<Element*>(m_node.get())->removeShadowRoot();
-}
-
-String InjectedBundleNodeHandle::elementShadowPseudoId()
-{
-    if (!m_node->isElementNode())
-        return String();
-
-    return static_cast<Element*>(m_node.get())->shadowPseudoId();
-}
-
 PassRefPtr<WebFrame> InjectedBundleNodeHandle::documentFrame()
 {
     if (!m_node->isDocumentNode())
index ae116ac398bb3fad4fbade7310b94b72910e3116..e4a5ab91e8532f626868bdca139c121ce7aad4cd 100644 (file)
@@ -68,11 +68,6 @@ public:
     
     PassRefPtr<InjectedBundleNodeHandle> htmlTableCellElementCellAbove();
 
-    PassRefPtr<InjectedBundleNodeHandle> elementShadowRoot();
-    PassRefPtr<InjectedBundleNodeHandle> elementEnsureShadowRoot();
-    void elementRemoveShadowRoot();
-    String elementShadowPseudoId();
-
     PassRefPtr<WebFrame> documentFrame();
     PassRefPtr<WebFrame> htmlFrameElementContentFrame();
     PassRefPtr<WebFrame> htmlIFrameElementContentFrame();
index 670bf8ee5150d6bd194b6fb51d86ffbc081109e6..668755d13d3fb282d23fc2ca4571fafec71e507f 100644 (file)
@@ -135,14 +135,19 @@ EXPORTS
         ?createThread@WTF@@YAIP6APAXPAX@Z0@Z
 
         ; Re-exports from WebCore for WebCoreTestSupport
-        ?getCachedDOMStructure@WebCore@@YAPAVStructure@JSC@@PAVJSDOMGlobalObject@1@PBUClassInfo@3@@Z
-        ?isPreloaded@CachedResourceLoader@WebCore@@QBE_NABVString@WTF@@@Z
+        ?addSlowCase@AtomicString@WTF@@CA?AV?$PassRefPtr@VStringImpl@WTF@@@2@PAVStringImpl@2@@Z
         ?cacheDOMStructure@WebCore@@YAPAVStructure@JSC@@PAVJSDOMGlobalObject@1@PAV23@PBUClassInfo@3@@Z
-        ?virtualFunctionToPreventWeakVtable@JSDOMWrapper@WebCore@@MAEXXZ
         ?create@ShadowContentElement@WebCore@@SA?AV?$PassRefPtr@VShadowContentElement@WebCore@@@WTF@@PAVDocument@2@@Z
+        ?createWrapper@WebCore@@YA?AVJSValue@JSC@@PAVExecState@3@PAVJSDOMGlobalObject@1@PAVNode@1@@Z
+        ?ensureShadowRoot@Element@WebCore@@QAEPAVShadowRoot@2@XZ
         ?externalRepresentation@WebCore@@YA?AVString@WTF@@PAVElement@1@I@Z
+        ?getCachedDOMStructure@WebCore@@YAPAVStructure@JSC@@PAVJSDOMGlobalObject@1@PBUClassInfo@3@@Z
+        ?isPreloaded@CachedResourceLoader@WebCore@@QBE_NABVString@WTF@@@Z
+        ?jsStringSlowCase@WebCore@@YA?AVJSValue@JSC@@PAVExecState@3@AAV?$HashMap@PAVStringImpl@WTF@@V?$Weak@VJSString@JSC@@@JSC@@UStringHash@2@U?$HashTraits@PAVStringImpl@WTF@@@2@U?$HashTraits@V?$Weak@VJSString@JSC@@@JSC@@@2@@WTF@@PAVStringImpl@6@@Z
+        ?removeShadowRoot@Element@WebCore@@QAEXXZ
         ?setDOMException@WebCore@@YAXPAVExecState@JSC@@H@Z
+        ?shadowRoot@Element@WebCore@@QBEPAVShadowRoot@2@XZ
         ?toDocument@WebCore@@YAPAVDocument@1@VJSValue@JSC@@@Z
-        ?createWrapper@WebCore@@YA?AVJSValue@JSC@@PAVExecState@3@PAVJSDOMGlobalObject@1@PAVNode@1@@Z
         ?toElement@WebCore@@YAPAVElement@1@VJSValue@JSC@@@Z
-        ?jsStringSlowCase@WebCore@@YA?AVJSValue@JSC@@PAVExecState@3@AAV?$HashMap@PAVStringImpl@WTF@@V?$Weak@VJSString@JSC@@@JSC@@UStringHash@2@U?$HashTraits@PAVStringImpl@WTF@@@2@U?$HashTraits@V?$Weak@VJSString@JSC@@@JSC@@@2@@WTF@@PAVStringImpl@6@@Z
\ No newline at end of file
+        ?toJS@WebCore@@YA?AVJSValue@JSC@@PAVExecState@3@PAVJSDOMGlobalObject@1@PAVNode@1@@Z
+        ?virtualFunctionToPreventWeakVtable@JSDOMWrapper@WebCore@@MAEXXZ
index 0e7e58302f4b5784cf9c05f1c88e5df4fc65fe4b..63a9ca16bb47fc19f37c50a08d17cb4c710d9241 100644 (file)
@@ -128,8 +128,17 @@ EXPORTS
         ?createThread@WTF@@YAIP6APAXPAX@Z0@Z
 
         ; Re-exports from WebCore for WebCoreTestSupport
-        ?getCachedDOMStructure@WebCore@@YAPAVStructure@JSC@@PAVJSDOMGlobalObject@1@PBUClassInfo@3@@Z
+        ?addSlowCase@AtomicString@WTF@@CA?AV?$PassRefPtr@VStringImpl@WTF@@@2@PAVStringImpl@2@@Z
         ?cacheDOMStructure@WebCore@@YAPAVStructure@JSC@@PAVJSDOMGlobalObject@1@PAV23@PBUClassInfo@3@@Z
+        ?createWrapper@WebCore@@YA?AVJSValue@JSC@@PAVExecState@3@PAVJSDOMGlobalObject@1@PAVNode@1@@Z
+        ?ensureShadowRoot@Element@WebCore@@QAEPAVShadowRoot@2@XZ
+        ?getCachedDOMStructure@WebCore@@YAPAVStructure@JSC@@PAVJSDOMGlobalObject@1@PBUClassInfo@3@@Z
+        ?jsStringSlowCase@WebCore@@YA?AVJSValue@JSC@@PAVExecState@3@AAV?$HashMap@PAVStringImpl@WTF@@V?$Weak@VJSString@JSC@@@JSC@@UStringHash@2@U?$HashTraits@PAVStringImpl@WTF@@@2@U?$HashTraits@V?$Weak@VJSString@JSC@@@JSC@@@2@@WTF@@PAVStringImpl@6@@Z
+        ?removeShadowRoot@Element@WebCore@@QAEXXZ
+        ?setDOMException@WebCore@@YAXPAVExecState@JSC@@H@Z
+        ?shadowRoot@Element@WebCore@@QBEPAVShadowRoot@2@XZ
+        ?toElement@WebCore@@YAPAVElement@1@VJSValue@JSC@@@Z
+        ?toJS@WebCore@@YA?AVJSValue@JSC@@PAVExecState@3@PAVJSDOMGlobalObject@1@PAVNode@1@@Z
         ?virtualFunctionToPreventWeakVtable@JSDOMWrapper@WebCore@@MAEXXZ
         ?create@ShadowContentElement@WebCore@@SA?AV?$PassRefPtr@VShadowContentElement@WebCore@@@WTF@@PAVDocument@2@@Z
         ?externalRepresentation@WebCore@@YA?AVString@WTF@@PAVElement@1@I@Z
index 9820648f2df500074156ec5aaf5f85cf83d86648..16842deea85bc4f9755e4a1841433147416f0876 100644 (file)
@@ -42,11 +42,14 @@ _ZN7WebCore22externalRepresentationEPNS_7ElementEj;
 _ZN7WebCore6JSNode13visitChildrenERN3JSC11SlotVisitorE;
 _ZN7WebCore6JSNode3putEPN3JSC9ExecStateERKNS1_10IdentifierENS1_7JSValueERNS1_15PutPropertySlotE;
 _ZN7WebCore6JSNode6s_infoE;
+_ZN7WebCore7Element16ensureShadowRootEv;
+_ZN7WebCore7Element16removeShadowRootEv;
 _ZN7WebCore9JSElement3putEPN3JSC9ExecStateERKNS1_10IdentifierENS1_7JSValueERNS1_15PutPropertySlotE;
 _ZN7WebCore9JSElement6s_infoE;
 _ZN7WebCore9toElementEN3JSC7JSValueE;
 _ZNK7WebCore20CachedResourceLoader11isPreloadedERKN3WTF6StringE;
 _ZNK7WebCore6JSNode21pushEventHandlerScopeEPN3JSC9ExecStateEPNS1_14ScopeChainNodeE;
+_ZNK7WebCore7Element10shadowRootEv;
 local:
 _Z*;
 cti*;
index b8e459e0e59c0012f42f9017d1daced73fed44d5..a57cfd70fc21148c3be4e35f8ca60cb34bb47374 100644 (file)
@@ -1,3 +1,30 @@
+2011-06-24  Dominic Cooney   <dominicc@chromium.org>
+
+        Reviewed by Dimitri Glazkov.
+
+        Convert shadow DOM-related tests to use window.internals
+        https://bugs.webkit.org/show_bug.cgi?id=61671
+
+        Remove ensureShadowRoot, shadowRoot, shadowPseudoId and
+        removeShadowRoot from layoutTestController; these have been
+        replaced by equivalents in window.internals instead.
+
+        * DumpRenderTree/LayoutTestController.cpp:
+        (LayoutTestController::staticFunctions):
+        * DumpRenderTree/LayoutTestController.h:
+        * DumpRenderTree/chromium/LayoutTestController.cpp:
+        (LayoutTestController::LayoutTestController):
+        * DumpRenderTree/chromium/LayoutTestController.h:
+        * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:
+        * DumpRenderTree/mac/LayoutTestControllerMac.mm:
+        * DumpRenderTree/qt/LayoutTestControllerQt.cpp:
+        * DumpRenderTree/qt/LayoutTestControllerQt.h:
+        * DumpRenderTree/win/LayoutTestControllerWin.cpp:
+        * DumpRenderTree/wx/LayoutTestControllerWx.cpp:
+        * WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl:
+        * WebKitTestRunner/InjectedBundle/LayoutTestController.cpp:
+        * WebKitTestRunner/InjectedBundle/LayoutTestController.h:
+
 2011-06-24  Csaba Osztrogon√°c  <ossy@webkit.org>
 
         Reviewed by Dirk Schulze.
index 0a6cb8540df1220cc679eaef0c0eccd5eedd8c86..f819c828a0c7a2bea2276d4bfcbdb437bb33431e 100644 (file)
@@ -1773,33 +1773,6 @@ static JSValueRef setAsynchronousSpellCheckingEnabledCallback(JSContextRef conte
     return JSValueMakeUndefined(context);
 }
 
-static JSValueRef shadowRootCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
-{
-    if (argumentCount != 1)
-        return JSValueMakeUndefined(context);
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
-    return controller->shadowRoot(context, arguments[0]);
-}
-
-static JSValueRef ensureShadowRootCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
-{
-    if (argumentCount != 1)
-        return JSValueMakeUndefined(context);
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
-    return controller->ensureShadowRoot(context, arguments[0]);
-}
-
-static JSValueRef removeShadowRootCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
-{
-    if (argumentCount != 1)
-        return JSValueMakeUndefined(context);
-
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
-    controller->removeShadowRoot(context, arguments[0]);
-
-    return JSValueMakeUndefined(context);
-}
-
 static JSValueRef showWebInspectorCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
 {
     LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
@@ -2151,16 +2124,6 @@ static JSValueRef setSerializeHTTPLoadsCallback(JSContextRef context, JSObjectRe
     return JSValueMakeUndefined(context);
 }
 
-static JSValueRef shadowPseudoIdCallback(JSContextRef context, JSObjectRef thisObject, JSObjectRef, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
-{
-    if (argumentCount < 1)
-        return JSValueMakeUndefined(context);
-
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
-
-    return JSValueMakeString(context, controller->shadowPseudoId(context, arguments[0]).get());
-}
-
 // Static Values
 
 static JSValueRef getGlobalFlagCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception)
@@ -2316,7 +2279,6 @@ JSStaticFunction* LayoutTestController::staticFunctions()
         { "dumpWillCacheResponse", dumpWillCacheResponseCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
         { "elementDoesAutoCompleteForElementWithId", elementDoesAutoCompleteForElementWithIdCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
         { "encodeHostName", encodeHostNameCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
-        { "ensureShadowRoot", ensureShadowRootCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
         { "evaluateInWebInspector", evaluateInWebInspectorCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
         { "evaluateScriptInIsolatedWorld", evaluateScriptInIsolatedWorldCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
         { "execCommand", execCommandCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
@@ -2338,7 +2300,6 @@ JSStaticFunction* LayoutTestController::staticFunctions()
         { "numberOfActiveAnimations", numberOfActiveAnimationsCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
         { "suspendAnimations", suspendAnimationsCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
         { "resumeAnimations", resumeAnimationsCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
-        { "removeShadowRoot", removeShadowRootCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
         { "overridePreference", overridePreferenceCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
         { "pageNumberForElementById", pageNumberForElementByIdCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
         { "pageSizeAndMarginsInPixels", pageSizeAndMarginsInPixelsCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
@@ -2418,7 +2379,6 @@ JSStaticFunction* LayoutTestController::staticFunctions()
         { "setJavaScriptCanAccessClipboard", setJavaScriptCanAccessClipboardCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
         { "setXSSAuditorEnabled", setXSSAuditorEnabledCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
         { "setAsynchronousSpellCheckingEnabled", setAsynchronousSpellCheckingEnabledCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
-        { "shadowRoot", shadowRootCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
         { "showWebInspector", showWebInspectorCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
         { "testOnscreen", testOnscreenCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
         { "testRepaint", testRepaintCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
@@ -2436,7 +2396,6 @@ JSStaticFunction* LayoutTestController::staticFunctions()
         { "originsWithLocalStorage", originsWithLocalStorageCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
         { "setShouldPaintBrokenImage", setShouldPaintBrokenImageCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
         { "setTextDirection", setTextDirectionCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
-        { "shadowPseudoId", shadowPseudoIdCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
         { 0, 0, 0 }
     };
 
index d63ecc10cbcd2ed03c21d236e47bd390accc714c..284e72c857ad8637a6b7860257d5c81a02dded37 100644 (file)
@@ -77,7 +77,6 @@ public:
     int pageNumberForElementById(JSStringRef id, float pageWidthInPixels, float pageHeightInPixels);
     JSRetainPtr<JSStringRef> pageProperty(const char* propertyName, int pageNumber) const;
     JSRetainPtr<JSStringRef> pageSizeAndMarginsInPixels(int pageNumber, int width, int height, int marginTop, int marginRight, int marginBottom, int marginLeft) const;
-    JSRetainPtr<JSStringRef> shadowPseudoId(JSContextRef, JSValueRef) const;
     bool isPageBoxVisible(int pageNumber) const;
     JSStringRef pathToLocalResource(JSContextRef, JSStringRef url);
     void queueBackNavigation(int howFarBackward);
@@ -130,10 +129,6 @@ public:
     void setPageVisibility(const char* visibility) { }
     void resetPageVisibility() { }
 
-    JSValueRef shadowRoot(JSContextRef, JSValueRef);
-    JSValueRef ensureShadowRoot(JSContextRef, JSValueRef);
-    void removeShadowRoot(JSContextRef, JSValueRef);
-
     void waitForPolicyDelegate();
     size_t webHistoryItemCount();
     unsigned workerThreadCount() const;
index 70ee7925c1a74f9f06234fd8545afe9ed87b1d85..6957ee0b2fd044127493cb6253c221c15ee8d307 100644 (file)
@@ -108,7 +108,6 @@ LayoutTestController::LayoutTestController(TestShell* shell)
     bindMethod("dumpStatusCallbacks", &LayoutTestController::dumpWindowStatusChanges);
     bindMethod("dumpTitleChanges", &LayoutTestController::dumpTitleChanges);
     bindMethod("elementDoesAutoCompleteForElementWithId", &LayoutTestController::elementDoesAutoCompleteForElementWithId);
-    bindMethod("ensureShadowRoot", &LayoutTestController::ensureShadowRoot);
     bindMethod("evaluateInWebInspector", &LayoutTestController::evaluateInWebInspector);
     bindMethod("evaluateScriptInIsolatedWorld", &LayoutTestController::evaluateScriptInIsolatedWorld);
     bindMethod("setIsolatedWorldSecurityOrigin", &LayoutTestController::setIsolatedWorldSecurityOrigin);
@@ -136,7 +135,6 @@ LayoutTestController::LayoutTestController(TestShell* shell)
     bindMethod("queueNonLoadingScript", &LayoutTestController::queueNonLoadingScript);
     bindMethod("queueReload", &LayoutTestController::queueReload);
     bindMethod("removeOriginAccessWhitelistEntry", &LayoutTestController::removeOriginAccessWhitelistEntry);
-    bindMethod("removeShadowRoot", &LayoutTestController::removeShadowRoot);
     bindMethod("repaintSweepHorizontally", &LayoutTestController::repaintSweepHorizontally);
     bindMethod("resetPageVisibility", &LayoutTestController::resetPageVisibility);
     bindMethod("resumeAnimations", &LayoutTestController::resumeAnimations);
@@ -184,8 +182,6 @@ LayoutTestController::LayoutTestController(TestShell* shell)
     bindMethod("setWindowIsKey", &LayoutTestController::setWindowIsKey);
     bindMethod("setXSSAuditorEnabled", &LayoutTestController::setXSSAuditorEnabled);
     bindMethod("setAsynchronousSpellCheckingEnabled", &LayoutTestController::setAsynchronousSpellCheckingEnabled);
-    bindMethod("shadowRoot", &LayoutTestController::shadowRoot);
-    bindMethod("shadowPseudoId", &LayoutTestController::shadowPseudoId);
     bindMethod("showWebInspector", &LayoutTestController::showWebInspector);
     bindMethod("simulateDesktopNotificationClick", &LayoutTestController::simulateDesktopNotificationClick);
     bindMethod("suspendAnimations", &LayoutTestController::suspendAnimations);
@@ -672,73 +668,6 @@ void LayoutTestController::setAsynchronousSpellCheckingEnabled(const CppArgument
     result->setNull();
 }
 
-void LayoutTestController::shadowRoot(const CppArgumentList& arguments, CppVariant* result)
-{
-    if (arguments.size() != 1 || !arguments[0].isObject()) {
-        result->setNull();
-        return;
-    }
-
-    WebElement element;
-    if (!WebBindings::getElement(arguments[0].value.objectValue, &element)) {
-        result->setNull();
-        return;
-    }
-
-    NPObject* shadowRoot = WebBindings::makeNode(element.shadowRoot());
-    if (!shadowRoot) {
-        result->setNull();
-        return;
-    }
-
-    result->set(shadowRoot);
-    WebBindings::releaseObject(shadowRoot);
-}
-
-void LayoutTestController::ensureShadowRoot(const CppArgumentList& arguments, CppVariant* result)
-{
-    if (arguments.size() != 1 || !arguments[0].isObject()) {
-        result->setNull();
-        return;
-    }
-
-    WebElement element;
-    if (!WebBindings::getElement(arguments[0].value.objectValue, &element)) {
-        result->setNull();
-        return;
-    }
-
-    NPObject* shadowRoot = WebBindings::makeNode(element.ensureShadowRoot());
-    if (!shadowRoot) {
-        result->setNull();
-        return;
-    }
-
-    result->set(shadowRoot);
-    WebBindings::releaseObject(shadowRoot);
-}
-
-void LayoutTestController::removeShadowRoot(const CppArgumentList& arguments, CppVariant* result)
-{
-    if (arguments.size() != 1 || !arguments[0].isObject())
-        return;
-
-    WebElement element;
-    if (!WebBindings::getElement(arguments[0].value.objectValue, &element))
-        return;
-
-    element.removeShadowRoot();
-}
-
-void LayoutTestController::shadowPseudoId(const CppArgumentList& arguments, CppVariant* result)
-{
-    WebElement element;
-    if (!WebBindings::getElement(arguments[0].value.objectValue, &element))
-        result->setNull();
-    else
-        result->set(element.shadowPseudoId().utf8());
-}
-
 void LayoutTestController::showWebInspector(const CppArgumentList&, CppVariant* result)
 {
     m_shell->showDevTools();
index 6113aa93e0ce5d922caa4f1485902af9528fb112..b09a6e562372ce3ed60023b82d7e48be65048e38 100644 (file)
@@ -283,11 +283,6 @@ public:
     void evaluateScriptInIsolatedWorld(const CppArgumentList&, CppVariant*);
     void setIsolatedWorldSecurityOrigin(const CppArgumentList&, CppVariant*);
 
-    void shadowRoot(const CppArgumentList&, CppVariant*);
-    void ensureShadowRoot(const CppArgumentList&, CppVariant*);
-    void removeShadowRoot(const CppArgumentList&, CppVariant*);
-    void shadowPseudoId(const CppArgumentList&, CppVariant*);
-
     // The fallback method is called when a nonexistent method is called on
     // the layout test controller object.
     // It is usefull to catch typos in the JavaScript code (a few layout tests
index 47500809a83b14a1d77929f70bb02c127526c44f..ba8522b64d3b9901006d94f824142084c5f9e3b9 100644 (file)
@@ -924,16 +924,6 @@ JSRetainPtr<JSStringRef> LayoutTestController::markerTextForListItem(JSContextRe
     return markerText;
 }
 
-JSRetainPtr<JSStringRef> LayoutTestController::shadowPseudoId(JSContextRef context, JSValueRef nodeObject) const
-{
-    CString id = DumpRenderTreeSupportGtk::shadowPseudoId(context, nodeObject);
-    if (id.isNull())
-        return 0;
-
-    JSRetainPtr<JSStringRef> result(Adopt, JSStringCreateWithUTF8CString(id.data()));
-    return result;
-}
-
 void LayoutTestController::authenticateSession(JSStringRef, JSStringRef, JSStringRef)
 {
 }
@@ -951,21 +941,6 @@ void LayoutTestController::setEditingBehavior(const char* editingBehavior)
         g_object_set(G_OBJECT(settings), "editing-behavior", WEBKIT_EDITING_BEHAVIOR_UNIX, NULL);
 }
 
-JSValueRef LayoutTestController::shadowRoot(JSContextRef context, JSValueRef element)
-{
-    return DumpRenderTreeSupportGtk::shadowRoot(context, element);
-}
-
-JSValueRef LayoutTestController::ensureShadowRoot(JSContextRef context, JSValueRef element)
-{
-    return DumpRenderTreeSupportGtk::ensureShadowRoot(context, element);
-}
-
-void LayoutTestController::removeShadowRoot(JSContextRef context, JSValueRef element)
-{
-    DumpRenderTreeSupportGtk::removeShadowRoot(context, element);
-}
-
 void LayoutTestController::abortModal()
 {
 }
index c4d82b358b3356d0e3d54ee8989f587b645ce8c2..230a1403dd80eb02ef4731f7a1bb8769a34c5f58 100644 (file)
@@ -293,16 +293,6 @@ JSRetainPtr<JSStringRef> LayoutTestController::markerTextForListItem(JSContextRe
     return markerText;
 }
 
-JSRetainPtr<JSStringRef> LayoutTestController::shadowPseudoId(JSContextRef context, JSValueRef nodeObject) const
-{
-    DOMElement *element = [DOMElement _DOMElementFromJSContext:context value:nodeObject];
-    if (!element)
-        return JSRetainPtr<JSStringRef>();
-
-    JSRetainPtr<JSStringRef> shadowId(Adopt, JSStringCreateWithCFString((CFStringRef)[element _shadowPseudoId]));
-    return shadowId;
-}
-
 int LayoutTestController::pageNumberForElementById(JSStringRef id, float pageWidthInPixels, float pageHeightInPixels)
 {
     RetainPtr<CFStringRef> idCF(AdoptCF, JSStringCopyCFString(kCFAllocatorDefault, id));
@@ -1101,30 +1091,6 @@ void LayoutTestController::setEditingBehavior(const char* editingBehavior)
     [editingBehaviorNS release];
 }
 
-JSValueRef LayoutTestController::shadowRoot(JSContextRef context, JSValueRef jsElement)
-{
-    DOMElement* element = [DOMElement _DOMElementFromJSContext:context value:jsElement];
-    if (!element)
-        return JSValueMakeNull(context);
-    return [element _shadowRoot:context];
-}
-
-JSValueRef LayoutTestController::ensureShadowRoot(JSContextRef context, JSValueRef jsElement)
-{
-    DOMElement* element = [DOMElement _DOMElementFromJSContext:context value:jsElement];
-    if (!element)
-        return JSValueMakeNull(context);
-    return [element _ensureShadowRoot:context];
-}
-
-void LayoutTestController::removeShadowRoot(JSContextRef context, JSValueRef jsElement)
-{
-    DOMElement* element = [DOMElement _DOMElementFromJSContext:context value:jsElement];
-    if (!element)
-        return;
-    [element _removeShadowRoot];
-}
-
 void LayoutTestController::abortModal()
 {
     [NSApp abortModal];
index 2f886a1a011e6732bfb8f5a279e133873d0b83c5..f606b28fe0fcfd6d8650a75c8734235f2c584cd4 100644 (file)
@@ -811,26 +811,6 @@ void LayoutTestController::setMockDeviceOrientation(bool canProvideAlpha, double
     DumpRenderTreeSupportQt::setMockDeviceOrientation(canProvideAlpha, alpha, canProvideBeta, beta, canProvideGamma, gamma);
 }
 
-QVariant LayoutTestController::shadowRoot(const QWebElement& element)
-{
-    return DumpRenderTreeSupportQt::shadowRoot(element);
-}
-
-QVariant LayoutTestController::ensureShadowRoot(const QWebElement& element)
-{
-    return DumpRenderTreeSupportQt::ensureShadowRoot(element);
-}
-
-void LayoutTestController::removeShadowRoot(const QWebElement& element)
-{
-    DumpRenderTreeSupportQt::removeShadowRoot(element);
-}
-
-QString LayoutTestController::shadowPseudoId(const QWebElement& element)
-{
-    return DumpRenderTreeSupportQt::shadowPseudoId(element);
-}
-
 void LayoutTestController::setGeolocationPermission(bool allow)
 {
     setGeolocationPermissionCommon(allow);
index 27b0750d286df8fa6a06bba19d745ede560dd92c..0e1529a813682bba2d013d250f302fb74f51a733 100644 (file)
@@ -254,11 +254,6 @@ public slots:
 
     void setEditingBehavior(const QString& editingBehavior);
 
-    QVariant shadowRoot(const QWebElement&);
-    QVariant ensureShadowRoot(const QWebElement&);
-    void removeShadowRoot(const QWebElement&);
-    QString shadowPseudoId(const QWebElement&);
-
     void evaluateScriptInIsolatedWorld(int worldID, const QString& script);
     bool isPageBoxVisible(int pageIndex);
     QString pageSizeAndMarginsInPixels(int pageIndex, int width, int height, int marginTop, int marginRight, int marginBottom, int marginLeft);
index fd6e4a9407a46421a3e1ea1d101c3d1745882c4a..232a45d5a42dbde48068336682514738eb9425d8 100644 (file)
@@ -227,33 +227,6 @@ JSRetainPtr<JSStringRef> LayoutTestController::markerTextForListItem(JSContextRe
     return markerText;
 }
 
-JSRetainPtr<JSStringRef> LayoutTestController::shadowPseudoId(JSContextRef context, JSValueRef nodeObject) const
-{
-    COMPtr<IWebView> webView;
-    if (FAILED(frame->webView(&webView)))
-        return 0;
-
-    COMPtr<IWebViewPrivate> webViewPrivate(Query, webView);
-    if (!webViewPrivate)
-        return 0;
-
-    COMPtr<IDOMElement> element;
-    if (FAILED(webViewPrivate->elementFromJS(context, nodeObject, &element)))
-        return 0;
-
-    COMPtr<IDOMElementPrivate> elementPrivate(Query, element);
-    if (!elementPrivate)
-        return 0;
-
-    BSTR idBSTR = 0;
-    if (FAILED(elementPrivate->shadowPseudoId(&idBSTR)))
-        return 0;
-
-    JSRetainPtr<JSStringRef> id(Adopt, JSStringCreateWithBSTR(idBSTR));
-    SysFreeString(idBSTR);
-    return id;
-}
-
 void LayoutTestController::waitForPolicyDelegate()
 {
     COMPtr<IWebView> webView;
@@ -1473,23 +1446,6 @@ void LayoutTestController::setEditingBehavior(const char* editingBehavior)
         preferences->setEditingBehavior(WebKitEditingUnixBehavior);
 }
 
-JSValueRef LayoutTestController::shadowRoot(JSContextRef context, JSValueRef jsElement)
-{
-    // FIXME: Implement this.
-    return JSValueMakeUndefined(context);
-}
-
-JSValueRef LayoutTestController::ensureShadowRoot(JSContextRef context, JSValueRef jsElement)
-{
-    // FIXME: Implement this.
-    return JSValueMakeUndefined(context);
-}
-
-void LayoutTestController::removeShadowRoot(JSContextRef context, JSValueRef jsElement)
-{
-    // FIXME: Implement this.
-}
-
 void LayoutTestController::abortModal()
 {
 }
index 25bc8cd817679228a67174f96ec23bca84fde0c1..4349fdc813a68438730166288b515ad70f602ece 100644 (file)
@@ -526,11 +526,6 @@ JSRetainPtr<JSStringRef> LayoutTestController::markerTextForListItem(JSContextRe
     return 0;
 }
 
-JSRetainPtr<JSStringRef> LayoutTestController::shadowPseudoId(JSContextRef context, JSValueRef nodeObject) const
-{
-    return 0;
-}
-
 JSValueRef LayoutTestController::computedStyleIncludingVisitedInfo(JSContextRef, JSValueRef)
 {
     return 0;
@@ -636,23 +631,6 @@ void LayoutTestController::deleteLocalStorageForOrigin(JSStringRef URL)
     // FIXME: Implement.
 }
 
-const OpaqueJSValue* LayoutTestController::shadowRoot(const OpaqueJSContext*, const OpaqueJSValue*)
-{
-    // FIXME: Implement.
-    return 0;
-}
-
-JSValueRef LayoutTestController::ensureShadowRoot(JSContextRef context, JSValueRef jsElement)
-{
-    // FIXME: Implement this.
-    return JSValueMakeUndefined(context);
-}
-
-void LayoutTestController::removeShadowRoot(JSContextRef context, JSValueRef jsElement)
-{
-    // FIXME: Implement this.
-}
-
 void LayoutTestController::setTextDirection(JSStringRef direction)
 {
     // FIXME: Implement.
index c9ee8ccfd890791c2f140f045f00c458cdfd76f2..d72b0a28163367d0cd8c0fcc3663c1dd28d26b43 100644 (file)
@@ -65,12 +65,6 @@ module WTR {
         DOMString markerTextForListItem(in object element);
         unsigned long windowCount();
 
-        // Shadow DOM.
-        object shadowRoot(in object element);
-        object ensureShadowRoot(in object element);
-        void removeShadowRoot(in object element);
-        DOMString shadowPseudoId(in object element);
-
         // Repaint testing.
         void testRepaint();
         void repaintSweepHorizontally();
index 50dfab2ff4e67d5436cc68418e284e99e57e4bae..014f9cad40fe5e187ac2568aaf3ffe814a93d146 100644 (file)
@@ -393,77 +393,6 @@ unsigned LayoutTestController::windowCount()
     return InjectedBundle::shared().pageCount();
 }
 
-JSValueRef LayoutTestController::shadowRoot(JSValueRef element)
-{
-    WKBundleFrameRef mainFrame = WKBundlePageGetMainFrame(InjectedBundle::shared().page()->page());
-    JSContextRef context = WKBundleFrameGetJavaScriptContext(mainFrame);
-
-    if (!element || !JSValueIsObject(context, element))
-        return JSValueMakeNull(context);
-
-    WKRetainPtr<WKBundleNodeHandleRef> domElement = adoptWK(WKBundleNodeHandleCreate(context, const_cast<JSObjectRef>(element)));
-    if (!domElement)
-        return JSValueMakeNull(context);
-
-    WKRetainPtr<WKBundleNodeHandleRef> shadowRootDOMNode = adoptWK(WKBundleNodeHandleCopyElementShadowRoot(domElement.get()));
-    if (!shadowRootDOMNode)
-        return JSValueMakeNull(context);
-
-    return WKBundleFrameGetJavaScriptWrapperForNodeForWorld(mainFrame, shadowRootDOMNode.get(), WKBundleScriptWorldNormalWorld());
-}
-
-JSValueRef LayoutTestController::ensureShadowRoot(JSValueRef element)
-{
-    WKBundleFrameRef mainFrame = WKBundlePageGetMainFrame(InjectedBundle::shared().page()->page());
-    JSContextRef context = WKBundleFrameGetJavaScriptContext(mainFrame);
-
-    if (!element || !JSValueIsObject(context, element))
-        return JSValueMakeNull(context);
-
-    WKRetainPtr<WKBundleNodeHandleRef> domElement = adoptWK(WKBundleNodeHandleCreate(context, const_cast<JSObjectRef>(element)));
-    if (!domElement)
-        return JSValueMakeNull(context);
-
-    WKRetainPtr<WKBundleNodeHandleRef> shadowRootDOMNode = adoptWK(WKBundleNodeHandleCopyElementEnsureShadowRoot(domElement.get()));
-    if (!shadowRootDOMNode)
-        return JSValueMakeNull(context);
-
-    return WKBundleFrameGetJavaScriptWrapperForNodeForWorld(mainFrame, shadowRootDOMNode.get(), WKBundleScriptWorldNormalWorld());
-}
-
-void LayoutTestController::removeShadowRoot(JSValueRef element)
-{
-    WKBundleFrameRef mainFrame = WKBundlePageGetMainFrame(InjectedBundle::shared().page()->page());
-    JSContextRef context = WKBundleFrameGetJavaScriptContext(mainFrame);
-
-    if (!element || !JSValueIsObject(context, element))
-        return;
-
-    WKRetainPtr<WKBundleNodeHandleRef> domElement = adoptWK(WKBundleNodeHandleCreate(context, const_cast<JSObjectRef>(element)));
-    if (!domElement)
-        return;
-
-    WKBundleNodeHandleRemoveShadowRoot(domElement.get());
-}
-
-JSRetainPtr<JSStringRef> LayoutTestController::shadowPseudoId(JSValueRef element) const
-{
-    WKBundleFrameRef mainFrame = WKBundlePageGetMainFrame(InjectedBundle::shared().page()->page());
-    JSContextRef context = WKBundleFrameGetJavaScriptContext(mainFrame);
-
-    if (!element || !JSValueIsObject(context, element))
-        return 0;
-
-    WKRetainPtr<WKBundleNodeHandleRef> domElement = adoptWK(WKBundleNodeHandleCreate(context, const_cast<JSObjectRef>(element)));
-    if (!domElement)
-        return 0;
-
-    WKRetainPtr<WKStringRef> id(AdoptWK, WKBundleNodeHandleShadowPseudoId(domElement.get()));
-    if (WKStringIsEmpty(id.get()))
-        return 0;
-    return toJS(id);
-}
-
 void LayoutTestController::clearBackForwardList()
 {
     WKBundleBackForwardListClear(WKBundlePageGetBackForwardList(InjectedBundle::shared().page()->page()));
index 11b9e5d4fb387aee9ae3ce703d876f890048cc6b..68d8a94536a1b1f1a83f6e3f57a0907930628186 100644 (file)
@@ -96,12 +96,6 @@ public:
     JSRetainPtr<JSStringRef> markerTextForListItem(JSValueRef element);
     unsigned windowCount();
 
-    // Shadow DOM.
-    JSValueRef shadowRoot(JSValueRef element);
-    JSValueRef ensureShadowRoot(JSValueRef element);
-    void removeShadowRoot(JSValueRef element);
-    JSRetainPtr<JSStringRef> shadowPseudoId(JSValueRef) const;
-
     // Repaint testing.
     void testRepaint() { m_testRepaint = true; }
     void repaintSweepHorizontally() { m_testRepaintSweepHorizontally = true; }