Title: [88002] trunk
Revision
88002
Author
[email protected]
Date
2011-06-03 03:35:54 -0700 (Fri, 03 Jun 2011)

Log Message

2011-06-03  Dominic Cooney  <[email protected]>

        Reviewed by Kent Tamura.

        Adds a test that keygen clones have the right shadow pseudoclass.
        https://bugs.webkit.org/show_bug.cgi?id=61984

        * fast/html/clone-keygen-expected.txt: Added.
        * fast/html/clone-keygen.html: Added.
        * platform/win/Skipped: Test needs DRT functionality not in this port.
2011-06-03  Dominic Cooney  <[email protected]>

        Reviewed by Kent Tamura.

        Cloned keygen shadows should have -webkit-keygen-select pseudoclass.
        https://bugs.webkit.org/show_bug.cgi?id=61984

        When cloneNode's tag name-based cloning algorithm clones the
        KeygenSelectElements of a keygen shadow as select elements. These
        lack the -webkit-keygen-select pseudoclass.

        Test: fast/html/clone-keygen.html

        * html/HTMLKeygenElement.cpp:
        (WebCore::KeygenSelectElement::cloneElementWithoutAttributesAndChildren): Create a KeygenSelectElement when being cloned.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (88001 => 88002)


--- trunk/LayoutTests/ChangeLog	2011-06-03 10:31:13 UTC (rev 88001)
+++ trunk/LayoutTests/ChangeLog	2011-06-03 10:35:54 UTC (rev 88002)
@@ -1,3 +1,14 @@
+2011-06-03  Dominic Cooney  <[email protected]>
+
+        Reviewed by Kent Tamura.
+
+        Adds a test that keygen clones have the right shadow pseudoclass.
+        https://bugs.webkit.org/show_bug.cgi?id=61984
+
+        * fast/html/clone-keygen-expected.txt: Added.
+        * fast/html/clone-keygen.html: Added.
+        * platform/win/Skipped: Test needs DRT functionality not in this port.
+
 2011-06-03  Mario Sanchez Prada  <[email protected]>
 
         Unreviewed, skipping test with different results in 32-bit and 64-bit.

Added: trunk/LayoutTests/fast/html/clone-keygen-expected.txt (0 => 88002)


--- trunk/LayoutTests/fast/html/clone-keygen-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/html/clone-keygen-expected.txt	2011-06-03 10:35:54 UTC (rev 88002)
@@ -0,0 +1,9 @@
+Tests that a cloned keygen has the right shadow pseudo ID. You should see two big keygens with purple text (they should look the same.)
+
+
+PASS specialK.clientHeight is k.clientHeight
+PASS layoutTestController.shadowPseudoId(cloneShadow.firstChild) is layoutTestController.shadowPseudoId(kShadow.firstChild)
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Added: trunk/LayoutTests/fast/html/clone-keygen.html (0 => 88002)


--- trunk/LayoutTests/fast/html/clone-keygen.html	                        (rev 0)
+++ trunk/LayoutTests/fast/html/clone-keygen.html	2011-06-03 10:35:54 UTC (rev 88002)
@@ -0,0 +1,39 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src=""
+<link rel="stylesheet" href=""
+<style type="text/css">
+*::-webkit-keygen-select {
+  color: purple;
+  zoom: 1.5;  /* to work around bug 57966 */
+}
+</style>
+</head>
+<body>
+<p>
+Tests that a cloned keygen has the right shadow pseudo ID. You should
+see two big keygens with purple text (they should look the same.)
+</p>
+<keygen id="k" style="display: block;">
+<div id="console"></div>
+<script>
+var k = document.querySelector('#k');
+var specialK = k.cloneNode();
+
+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)');
+}
+
+var successfullyParsed = true;
+</script>
+<script src=""
+</body>
+</html>

Modified: trunk/LayoutTests/platform/win/Skipped (88001 => 88002)


--- trunk/LayoutTests/platform/win/Skipped	2011-06-03 10:31:13 UTC (rev 88001)
+++ trunk/LayoutTests/platform/win/Skipped	2011-06-03 10:35:54 UTC (rev 88002)
@@ -1285,6 +1285,7 @@
 # Windows DRT needs an implementation of shadowRoot
 # https://bugs.webkit.org/show_bug.cgi?id=59081
 fast/dom/shadow
+fast/html/clone-keygen.html
 fast/html/clone-range.html
 inspector/elements/shadow-dom.html
 media/audio-controls-do-not-fade-out.html

Modified: trunk/Source/WebCore/ChangeLog (88001 => 88002)


--- trunk/Source/WebCore/ChangeLog	2011-06-03 10:31:13 UTC (rev 88001)
+++ trunk/Source/WebCore/ChangeLog	2011-06-03 10:35:54 UTC (rev 88002)
@@ -1,3 +1,19 @@
+2011-06-03  Dominic Cooney  <[email protected]>
+
+        Reviewed by Kent Tamura.
+
+        Cloned keygen shadows should have -webkit-keygen-select pseudoclass.
+        https://bugs.webkit.org/show_bug.cgi?id=61984
+
+        When cloneNode's tag name-based cloning algorithm clones the
+        KeygenSelectElements of a keygen shadow as select elements. These
+        lack the -webkit-keygen-select pseudoclass.
+
+        Test: fast/html/clone-keygen.html
+
+        * html/HTMLKeygenElement.cpp:
+        (WebCore::KeygenSelectElement::cloneElementWithoutAttributesAndChildren): Create a KeygenSelectElement when being cloned.
+
 2011-06-02  MORITA Hajime  <[email protected]>
         
         Unreviewed ChangeLog fix.

Modified: trunk/Source/WebCore/html/HTMLKeygenElement.cpp (88001 => 88002)


--- trunk/Source/WebCore/html/HTMLKeygenElement.cpp	2011-06-03 10:31:13 UTC (rev 88001)
+++ trunk/Source/WebCore/html/HTMLKeygenElement.cpp	2011-06-03 10:35:54 UTC (rev 88002)
@@ -60,6 +60,12 @@
         : HTMLSelectElement(selectTag, document, 0)
     {
     }
+
+private:
+    virtual PassRefPtr<Element> cloneElementWithoutAttributesAndChildren() const
+    {
+        return create(document());
+    }
 };
 
 inline HTMLKeygenElement::HTMLKeygenElement(const QualifiedName& tagName, Document* document, HTMLFormElement* form)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to