Title: [216228] trunk
Revision
216228
Author
cdu...@apple.com
Date
2017-05-04 19:19:14 -0700 (Thu, 04 May 2017)

Log Message

Element.slot should be marked as [Unscopable]
https://bugs.webkit.org/show_bug.cgi?id=171683

Reviewed by Darin Adler.

Source/WebCore:

Element.slot should be marked as [Unscopable]:
- https://dom.spec.whatwg.org/#interface-element
- https://heycam.github.io/webidl/#Unscopable

Test: fast/shadow-dom/Element-slot-unscopable.html

* dom/Element.idl:

LayoutTests:

Add layout test coverage. This test is passing in Firefox and Chrome.

* fast/shadow-dom/Element-slot-unscopable-expected.txt: Added.
* fast/shadow-dom/Element-slot-unscopable.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (216227 => 216228)


--- trunk/LayoutTests/ChangeLog	2017-05-05 02:11:26 UTC (rev 216227)
+++ trunk/LayoutTests/ChangeLog	2017-05-05 02:19:14 UTC (rev 216228)
@@ -1,3 +1,15 @@
+2017-05-04  Chris Dumez  <cdu...@apple.com>
+
+        Element.slot should be marked as [Unscopable]
+        https://bugs.webkit.org/show_bug.cgi?id=171683
+
+        Reviewed by Darin Adler.
+
+        Add layout test coverage. This test is passing in Firefox and Chrome.
+
+        * fast/shadow-dom/Element-slot-unscopable-expected.txt: Added.
+        * fast/shadow-dom/Element-slot-unscopable.html: Added.
+
 2017-05-04  Said Abou-Hallawa  <sabouhall...@apple.com>
 
         Change the asynchronous image decoding tests to use the event webkitImageFrameReady

Added: trunk/LayoutTests/fast/shadow-dom/Element-slot-unscopable-expected.txt (0 => 216228)


--- trunk/LayoutTests/fast/shadow-dom/Element-slot-unscopable-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/shadow-dom/Element-slot-unscopable-expected.txt	2017-05-05 02:19:14 UTC (rev 216228)
@@ -0,0 +1,10 @@
+Tests that Element.slot is [Unscopable].
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS exception.name is "ReferenceError"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Added: trunk/LayoutTests/fast/shadow-dom/Element-slot-unscopable.html (0 => 216228)


--- trunk/LayoutTests/fast/shadow-dom/Element-slot-unscopable.html	                        (rev 0)
+++ trunk/LayoutTests/fast/shadow-dom/Element-slot-unscopable.html	2017-05-05 02:19:14 UTC (rev 216228)
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+<body>
+<script src=""
+<script>
+description("Tests that Element.slot is [Unscopable].");
+
+with (document.body) {
+    try {
+        slot;
+        testFailed("Element.body is not [Unscopable]");
+    } catch(e) {
+        exception = e;
+        shouldBeEqualToString("exception.name", "ReferenceError");
+    }
+}
+</script>
+<script src=""
+</body>
+</html>

Modified: trunk/Source/WebCore/ChangeLog (216227 => 216228)


--- trunk/Source/WebCore/ChangeLog	2017-05-05 02:11:26 UTC (rev 216227)
+++ trunk/Source/WebCore/ChangeLog	2017-05-05 02:19:14 UTC (rev 216228)
@@ -1,3 +1,18 @@
+2017-05-04  Chris Dumez  <cdu...@apple.com>
+
+        Element.slot should be marked as [Unscopable]
+        https://bugs.webkit.org/show_bug.cgi?id=171683
+
+        Reviewed by Darin Adler.
+
+        Element.slot should be marked as [Unscopable]:
+        - https://dom.spec.whatwg.org/#interface-element
+        - https://heycam.github.io/webidl/#Unscopable
+
+        Test: fast/shadow-dom/Element-slot-unscopable.html
+
+        * dom/Element.idl:
+
 2017-05-04  Don Olmstead  <don.olmst...@am.sony.com>
 
         [Win] Remove redundant macros that are set in the CMake config

Modified: trunk/Source/WebCore/dom/Element.idl (216227 => 216228)


--- trunk/Source/WebCore/dom/Element.idl	2017-05-05 02:11:26 UTC (rev 216227)
+++ trunk/Source/WebCore/dom/Element.idl	2017-05-05 02:19:14 UTC (rev 216228)
@@ -132,7 +132,7 @@
     // Shadow DOM API
     [EnabledAtRuntime=ShadowDOM, MayThrowException] ShadowRoot attachShadow(ShadowRootInit init);
     [EnabledAtRuntime=ShadowDOM, ImplementedAs=shadowRootForBindings, CallWith=ScriptState] readonly attribute ShadowRoot shadowRoot;
-    [CEReactions, EnabledAtRuntime=ShadowDOM, Reflect] attribute DOMString slot;
+    [CEReactions, EnabledAtRuntime=ShadowDOM, Reflect, Unscopable] attribute DOMString slot;
 
     // Event Handlers
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to