Title: [118902] trunk
- Revision
- 118902
- Author
- [email protected]
- Date
- 2012-05-30 00:26:37 -0700 (Wed, 30 May 2012)
Log Message
[Shadow DOM] HTMLContentElement and HTMLShadowElement constructors should be visible.
https://bugs.webkit.org/show_bug.cgi?id=87818
Source/WebCore:
Reviewed by Kentaro Hara.
Added them as DOMWindow properties
Tests: fast/dom/shadow/content-element-api.html
fast/dom/shadow/shadow-element.html
* page/DOMWindow.idl:
LayoutTests:
Added constructor checks.
Reviewed by Kentaro Hara.
* fast/dom/shadow/content-element-api-expected.txt:
* fast/dom/shadow/content-element-api.html:
* fast/dom/shadow/shadow-element-expected.txt:
* fast/dom/shadow/shadow-element.html:
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (118901 => 118902)
--- trunk/LayoutTests/ChangeLog 2012-05-30 07:17:05 UTC (rev 118901)
+++ trunk/LayoutTests/ChangeLog 2012-05-30 07:26:37 UTC (rev 118902)
@@ -1,3 +1,17 @@
+2012-05-30 MORITA Hajime <[email protected]>
+
+ [Shadow DOM] HTMLContentElement and HTMLShadowElement constructors should be visible.
+ https://bugs.webkit.org/show_bug.cgi?id=87818
+
+ Added constructor checks.
+
+ Reviewed by Kentaro Hara.
+
+ * fast/dom/shadow/content-element-api-expected.txt:
+ * fast/dom/shadow/content-element-api.html:
+ * fast/dom/shadow/shadow-element-expected.txt:
+ * fast/dom/shadow/shadow-element.html:
+
2012-05-30 Mike Lawther <[email protected]>
CSS3 calc: Implement CSSOM support
Modified: trunk/LayoutTests/fast/dom/shadow/content-element-api-expected.txt (118901 => 118902)
--- trunk/LayoutTests/fast/dom/shadow/content-element-api-expected.txt 2012-05-30 07:17:05 UTC (rev 118901)
+++ trunk/LayoutTests/fast/dom/shadow/content-element-api-expected.txt 2012-05-30 07:26:37 UTC (rev 118902)
@@ -6,6 +6,8 @@
PASS contentSimplest.select is ''
PASS contentSimplest.select is 'foo'
PASS contentSimplest.getAttribute('select') is 'bar'
+PASS 0 <= contentSimplest.constructor.toString().indexOf('HTMLContentElement') is true
+PASS typeof window.HTMLContentElement is 'function'
PASS successfullyParsed is true
TEST COMPLETE
Modified: trunk/LayoutTests/fast/dom/shadow/content-element-api.html (118901 => 118902)
--- trunk/LayoutTests/fast/dom/shadow/content-element-api.html 2012-05-30 07:17:05 UTC (rev 118901)
+++ trunk/LayoutTests/fast/dom/shadow/content-element-api.html 2012-05-30 07:26:37 UTC (rev 118902)
@@ -15,6 +15,8 @@
shouldBe("contentSimplest.select", "'foo'");
contentSimplest.select = "bar"
shouldBe("contentSimplest.getAttribute('select')", "'bar'");
+shouldBeTrue("0 <= contentSimplest.constructor.toString().indexOf('HTMLContentElement')");
+shouldBe("typeof window.HTMLContentElement", "'function'");
</script>
<script src=""
</body>
Modified: trunk/LayoutTests/fast/dom/shadow/shadow-element-expected.txt (118901 => 118902)
--- trunk/LayoutTests/fast/dom/shadow/shadow-element-expected.txt 2012-05-30 07:17:05 UTC (rev 118901)
+++ trunk/LayoutTests/fast/dom/shadow/shadow-element-expected.txt 2012-05-30 07:26:37 UTC (rev 118902)
@@ -4,6 +4,8 @@
PASS shadow.nodeName is 'SHADOW'
+PASS 0 <= shadow.constructor.toString().indexOf('HTMLShadowElement') is true
+PASS typeof window.HTMLShadowElement is 'function'
PASS successfullyParsed is true
TEST COMPLETE
Modified: trunk/LayoutTests/fast/dom/shadow/shadow-element.html (118901 => 118902)
--- trunk/LayoutTests/fast/dom/shadow/shadow-element.html 2012-05-30 07:17:05 UTC (rev 118901)
+++ trunk/LayoutTests/fast/dom/shadow/shadow-element.html 2012-05-30 07:26:37 UTC (rev 118902)
@@ -9,10 +9,11 @@
</div>
<script>
description("This test ensures that the shadow element is available.")
-// Since shadow element does not have its own APIS, it acts like a normal element.
-// We don't have to guard this by SHADOW_DOM flag for now.
var shadow = document.getElementById("shadow");
shouldBe("shadow.nodeName", "'SHADOW'");
+shouldBeTrue("0 <= shadow.constructor.toString().indexOf('HTMLShadowElement')");
+shouldBe("typeof window.HTMLShadowElement", "'function'");
+
</script>
<script src=""
</body>
Modified: trunk/Source/WebCore/ChangeLog (118901 => 118902)
--- trunk/Source/WebCore/ChangeLog 2012-05-30 07:17:05 UTC (rev 118901)
+++ trunk/Source/WebCore/ChangeLog 2012-05-30 07:26:37 UTC (rev 118902)
@@ -1,3 +1,17 @@
+2012-05-30 MORITA Hajime <[email protected]>
+
+ [Shadow DOM] HTMLContentElement and HTMLShadowElement constructors should be visible.
+ https://bugs.webkit.org/show_bug.cgi?id=87818
+
+ Reviewed by Kentaro Hara.
+
+ Added them as DOMWindow properties
+
+ Tests: fast/dom/shadow/content-element-api.html
+ fast/dom/shadow/shadow-element.html
+
+ * page/DOMWindow.idl:
+
2012-05-30 Mike Lawther <[email protected]>
CSS3 calc: Implement CSSOM support
Modified: trunk/Source/WebCore/page/DOMWindow.idl (118901 => 118902)
--- trunk/Source/WebCore/page/DOMWindow.idl 2012-05-30 07:17:05 UTC (rev 118901)
+++ trunk/Source/WebCore/page/DOMWindow.idl 2012-05-30 07:26:37 UTC (rev 118902)
@@ -388,6 +388,8 @@
attribute EntityReferenceConstructor EntityReference;
attribute ProcessingInstructionConstructor ProcessingInstruction;
attribute [Conditional=SHADOW_DOM, V8EnabledPerContext=shadowDOM] ShadowRootConstructor WebKitShadowRoot;
+ attribute [Conditional=SHADOW_DOM, V8EnabledPerContext=shadowDOM] HTMLContentElementConstructor HTMLContentElement;
+ attribute [Conditional=SHADOW_DOM, V8EnabledPerContext=shadowDOM] HTMLShadowElementConstructor HTMLShadowElement;
attribute DOMSelectionConstructor Selection;
attribute DOMWindowConstructor Window;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes