Title: [207170] trunk
Revision
207170
Author
[email protected]
Date
2016-10-11 15:07:50 -0700 (Tue, 11 Oct 2016)

Log Message

Annotate DOM API with CEReactions
https://bugs.webkit.org/show_bug.cgi?id=163268

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Rebaseline tests now that more test cases are passing.

* web-platform-tests/custom-elements/reactions/Attr-expected.txt:
* web-platform-tests/custom-elements/reactions/ChildNode-expected.txt:
* web-platform-tests/custom-elements/reactions/DOMTokenList-expected.txt:
* web-platform-tests/custom-elements/reactions/Document-expected.txt:
* web-platform-tests/custom-elements/reactions/Element-expected.txt:
* web-platform-tests/custom-elements/reactions/NamedNodeMap-expected.txt:
* web-platform-tests/custom-elements/reactions/Node-expected.txt:
* web-platform-tests/custom-elements/reactions/ParentNode-expected.txt:
* web-platform-tests/custom-elements/reactions/Range-expected.txt:

Source/WebCore:

Added CEReactions IDL attribute to APIs defined in https://dom.spec.whatwg.org.

No new tests since existing tests cover the code change.
Added a dedicated code generation test: JSTestCEReactions.idl and TestCEReactionsStringifier.idl.

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation): Generate CustomElementReactionStack in attribute setters. In the case of PutForwards,
check the extended attributes of the target attribute's stringifier.
* bindings/scripts/test/JS/JSTestCEReactions.cpp: Added.
* bindings/scripts/test/JS/JSTestCEReactions.h: Added.
* bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp: Added.
* bindings/scripts/test/JS/JSTestCEReactionsStringifier.h: Added.
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::jsTestObjPrototypeFunctionMethodWithNeedsCustomElementReactionStack): Deleted.
* bindings/scripts/test/TestCEReactions.idl: Added.
* bindings/scripts/test/TestCEReactionsStringifier.idl: Added.
* bindings/scripts/test/TestObj.idl:
* dom/Attr.idl:
* dom/ChildNode.idl:
* dom/Document.idl:
* dom/Element.idl:
* dom/NamedNodeMap.idl:
* dom/Node.idl:
* dom/ParentNode.idl:
* dom/Range.idl:
* html/DOMTokenList.idl:

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (207169 => 207170)


--- trunk/LayoutTests/imported/w3c/ChangeLog	2016-10-11 22:03:04 UTC (rev 207169)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2016-10-11 22:07:50 UTC (rev 207170)
@@ -1,3 +1,22 @@
+2016-10-10  Ryosuke Niwa  <[email protected]>
+
+        Annotate DOM API with CEReactions
+        https://bugs.webkit.org/show_bug.cgi?id=163268
+
+        Reviewed by Darin Adler.
+
+        Rebaseline tests now that more test cases are passing.
+
+        * web-platform-tests/custom-elements/reactions/Attr-expected.txt:
+        * web-platform-tests/custom-elements/reactions/ChildNode-expected.txt:
+        * web-platform-tests/custom-elements/reactions/DOMTokenList-expected.txt:
+        * web-platform-tests/custom-elements/reactions/Document-expected.txt:
+        * web-platform-tests/custom-elements/reactions/Element-expected.txt:
+        * web-platform-tests/custom-elements/reactions/NamedNodeMap-expected.txt:
+        * web-platform-tests/custom-elements/reactions/Node-expected.txt:
+        * web-platform-tests/custom-elements/reactions/ParentNode-expected.txt:
+        * web-platform-tests/custom-elements/reactions/Range-expected.txt:
+
 2016-10-11  Alex Christensen  <[email protected]>
 
         Enable URLParser by default

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/Attr-expected.txt (207169 => 207170)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/Attr-expected.txt	2016-10-11 22:03:04 UTC (rev 207169)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/Attr-expected.txt	2016-10-11 22:07:50 UTC (rev 207170)
@@ -1,4 +1,4 @@
 
-FAIL value on Attr must enqueue an attributeChanged reaction when replacing an existing attribute assert_array_equals: lengths differ, expected 1 got 0
+PASS value on Attr must enqueue an attributeChanged reaction when replacing an existing attribute 
 PASS value on Attr must not enqueue an attributeChanged reaction when replacing an existing unobserved attribute 
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/ChildNode-expected.txt (207169 => 207170)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/ChildNode-expected.txt	2016-10-11 22:03:04 UTC (rev 207169)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/ChildNode-expected.txt	2016-10-11 22:07:50 UTC (rev 207170)
@@ -1,9 +1,9 @@
 
-FAIL before on ChildNode must enqueue a connected reaction assert_array_equals: lengths differ, expected 1 got 0
-FAIL before on ChildNode must enqueue a disconnected reaction, an adopted reaction, and a connected reaction when the custom element was in another document assert_array_equals: lengths differ, expected 1 got 0
-FAIL after on ChildNode must enqueue a connected reaction assert_array_equals: lengths differ, expected 1 got 0
-FAIL after on ChildNode must enqueue a disconnected reaction, an adopted reaction, and a connected reaction when the custom element was in another document assert_array_equals: lengths differ, expected 1 got 0
-FAIL replaceWith on ChildNode must enqueue a connected reaction assert_array_equals: lengths differ, expected 1 got 0
-FAIL replaceWith on ChildNode must enqueue a disconnected reaction, an adopted reaction, and a connected reaction when the custom element was in another document assert_array_equals: lengths differ, expected 1 got 0
-FAIL replaceWith on ChildNode must enqueue a disconnected reaction assert_array_equals: lengths differ, expected 1 got 0
+PASS before on ChildNode must enqueue a connected reaction 
+PASS before on ChildNode must enqueue a disconnected reaction, an adopted reaction, and a connected reaction when the custom element was in another document 
+PASS after on ChildNode must enqueue a connected reaction 
+PASS after on ChildNode must enqueue a disconnected reaction, an adopted reaction, and a connected reaction when the custom element was in another document 
+PASS replaceWith on ChildNode must enqueue a connected reaction 
+PASS replaceWith on ChildNode must enqueue a disconnected reaction, an adopted reaction, and a connected reaction when the custom element was in another document 
+PASS replaceWith on ChildNode must enqueue a disconnected reaction 
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/DOMTokenList-expected.txt (207169 => 207170)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/DOMTokenList-expected.txt	2016-10-11 22:03:04 UTC (rev 207169)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/DOMTokenList-expected.txt	2016-10-11 22:07:50 UTC (rev 207170)
@@ -1,22 +1,22 @@
 
-FAIL add on DOMTokenList must enqueue an attributeChanged reaction when adding an attribute assert_array_equals: lengths differ, expected 1 got 0
+PASS add on DOMTokenList must enqueue an attributeChanged reaction when adding an attribute 
 PASS add on DOMTokenList must not enqueue an attributeChanged reaction when adding an unobserved attribute 
-FAIL add on DOMTokenList must enqueue an attributeChanged reaction when adding a value to an existing attribute assert_array_equals: lengths differ, expected 1 got 0
+PASS add on DOMTokenList must enqueue an attributeChanged reaction when adding a value to an existing attribute 
 PASS add on DOMTokenList must not enqueue an attributeChanged reaction when adding a value to an unobserved attribute 
-FAIL add on DOMTokenList must enqueue exactly one attributeChanged reaction when adding multiple values to an attribute assert_array_equals: lengths differ, expected 1 got 0
-FAIL remove on DOMTokenList must enqueue an attributeChanged reaction when removing a value from an attribute assert_array_equals: lengths differ, expected 1 got 0
-FAIL remove on DOMTokenList must enqueue exactly one attributeChanged reaction when removing multiple values to an attribute assert_array_equals: lengths differ, expected 1 got 0
-PASS remove on DOMTokenList must not enqueue an attributeChanged reaction when removing a non-existent value from an attribute 
+PASS add on DOMTokenList must enqueue exactly one attributeChanged reaction when adding multiple values to an attribute 
+PASS remove on DOMTokenList must enqueue an attributeChanged reaction when removing a value from an attribute 
+PASS remove on DOMTokenList must enqueue exactly one attributeChanged reaction when removing multiple values to an attribute 
+FAIL remove on DOMTokenList must not enqueue an attributeChanged reaction when removing a non-existent value from an attribute assert_array_equals: lengths differ, expected 0 got 1
 PASS remove on DOMTokenList must not enqueue an attributeChanged reaction when removing a value from an unobserved attribute 
-FAIL toggle on DOMTokenList must enqueue an attributeChanged reaction when adding a value to an attribute assert_array_equals: lengths differ, expected 1 got 0
-FAIL toggle on DOMTokenList must enqueue an attributeChanged reaction when removing a value from an attribute assert_array_equals: lengths differ, expected 1 got 0
+PASS toggle on DOMTokenList must enqueue an attributeChanged reaction when adding a value to an attribute 
+PASS toggle on DOMTokenList must enqueue an attributeChanged reaction when removing a value from an attribute 
 PASS remove on DOMTokenList must not enqueue an attributeChanged reaction when removing a value from an unobserved attribute 
-FAIL replace on DOMTokenList must enqueue an attributeChanged reaction when replacing a value in an attribute assert_array_equals: lengths differ, expected 1 got 0
+PASS replace on DOMTokenList must enqueue an attributeChanged reaction when replacing a value in an attribute 
 PASS replace on DOMTokenList must not enqueue an attributeChanged reaction when the token to replace does not exist in the attribute 
 PASS replace on DOMTokenList must not enqueue an attributeChanged reaction when replacing a value in an unobserved attribute 
-FAIL the stringifier of DOMTokenList must enqueue an attributeChanged reaction when adding an observed attribute assert_array_equals: lengths differ, expected 1 got 0
+PASS the stringifier of DOMTokenList must enqueue an attributeChanged reaction when adding an observed attribute 
 PASS the stringifier of DOMTokenList must not enqueue an attributeChanged reaction when adding an unobserved attribute 
-FAIL the stringifier of DOMTokenList must enqueue an attributeChanged reaction when mutating the value of an observed attribute assert_array_equals: lengths differ, expected 1 got 0
+PASS the stringifier of DOMTokenList must enqueue an attributeChanged reaction when mutating the value of an observed attribute 
 PASS the stringifier of DOMTokenList must not enqueue an attributeChanged reaction when mutating the value of an unobserved attribute 
-FAIL the stringifier of DOMTokenList must enqueue an attributeChanged reaction when the setter is called with the original value of the attribute assert_array_equals: lengths differ, expected 1 got 0
+PASS the stringifier of DOMTokenList must enqueue an attributeChanged reaction when the setter is called with the original value of the attribute 
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/Document-expected.txt (207169 => 207170)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/Document-expected.txt	2016-10-11 22:03:04 UTC (rev 207169)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/Document-expected.txt	2016-10-11 22:07:50 UTC (rev 207170)
@@ -1,4 +1,4 @@
 
 FAIL importNode on Document must construct a new custom element when importing a custom element assert_array_equals: lengths differ, expected 1 got 0
-FAIL adoptNode on Document must enqueue an adopted reaction when importing a custom element assert_array_equals: lengths differ, expected 1 got 0
+PASS adoptNode on Document must enqueue an adopted reaction when importing a custom element 
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/Element-expected.txt (207169 => 207170)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/Element-expected.txt	2016-10-11 22:03:04 UTC (rev 207169)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/Element-expected.txt	2016-10-11 22:07:50 UTC (rev 207170)
@@ -1,10 +1,10 @@
 
-FAIL id on Element must enqueue an attributeChanged reaction when adding id content attribute assert_array_equals: lengths differ, expected 1 got 0
-FAIL id on Element must enqueue an attributeChanged reaction when replacing an existing attribute assert_array_equals: lengths differ, expected 2 got 1
-FAIL className on Element must enqueue an attributeChanged reaction when adding class content attribute assert_array_equals: lengths differ, expected 1 got 0
-FAIL className on Element must enqueue an attributeChanged reaction when replacing an existing attribute assert_array_equals: lengths differ, expected 2 got 1
-FAIL slot on Element must enqueue an attributeChanged reaction when adding slot content attribute assert_array_equals: lengths differ, expected 1 got 0
-FAIL slot on Element must enqueue an attributeChanged reaction when replacing an existing attribute assert_array_equals: lengths differ, expected 2 got 1
+PASS id on Element must enqueue an attributeChanged reaction when adding id content attribute 
+PASS id on Element must enqueue an attributeChanged reaction when replacing an existing attribute 
+PASS className on Element must enqueue an attributeChanged reaction when adding class content attribute 
+PASS className on Element must enqueue an attributeChanged reaction when replacing an existing attribute 
+PASS slot on Element must enqueue an attributeChanged reaction when adding slot content attribute 
+PASS slot on Element must enqueue an attributeChanged reaction when replacing an existing attribute 
 PASS setAttribute on Element must enqueue an attributeChanged reaction when adding an attribute 
 PASS setAttribute on Element must not enqueue an attributeChanged reaction when adding an unobserved attribute 
 PASS setAttribute on Element must enqueue an attributeChanged reaction when replacing an existing attribute 
@@ -33,6 +33,6 @@
 PASS removeAttributeNode on Element must not enqueue an attributeChanged reaction when removing an unobserved attribute 
 PASS removeAttributeNode on Element must enqueue an attributeChanged reaction when removing an existing attribute 
 PASS removeAttributeNode on Element must not enqueue an attributeChanged reaction when removing an existing unobserved attribute 
-FAIL undefined must enqueue a connected reaction assert_array_equals: lengths differ, expected 1 got 0
-FAIL undefined must enqueue a disconnected reaction, an adopted reaction, and a connected reaction when the custom element was in another document assert_array_equals: lengths differ, expected 1 got 0
+PASS undefined must enqueue a connected reaction 
+PASS undefined must enqueue a disconnected reaction, an adopted reaction, and a connected reaction when the custom element was in another document 
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/NamedNodeMap-expected.txt (207169 => 207170)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/NamedNodeMap-expected.txt	2016-10-11 22:03:04 UTC (rev 207169)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/NamedNodeMap-expected.txt	2016-10-11 22:07:50 UTC (rev 207170)
@@ -1,18 +1,18 @@
 
-FAIL setNamedItem on NamedNodeMap must enqueue an attributeChanged reaction when adding an attribute assert_array_equals: lengths differ, expected 1 got 0
+PASS setNamedItem on NamedNodeMap must enqueue an attributeChanged reaction when adding an attribute 
 PASS setNamedItem on NamedNodeMap must not enqueue an attributeChanged reaction when adding an unobserved attribute 
-FAIL setNamedItem on NamedNodeMap must enqueue an attributeChanged reaction when replacing an existing attribute assert_array_equals: lengths differ, expected 1 got 0
+PASS setNamedItem on NamedNodeMap must enqueue an attributeChanged reaction when replacing an existing attribute 
 PASS setNamedItem on NamedNodeMap must enqueue an attributeChanged reaction when replacing an existing unobserved attribute 
-FAIL setNamedItemNS on NamedNodeMap must enqueue an attributeChanged reaction when adding an attribute assert_array_equals: lengths differ, expected 1 got 0
+PASS setNamedItemNS on NamedNodeMap must enqueue an attributeChanged reaction when adding an attribute 
 PASS setNamedItemNS on NamedNodeMap must not enqueue an attributeChanged reaction when adding an unobserved attribute 
-FAIL setNamedItemNS on NamedNodeMap must enqueue an attributeChanged reaction when replacing an existing attribute assert_array_equals: lengths differ, expected 1 got 0
+PASS setNamedItemNS on NamedNodeMap must enqueue an attributeChanged reaction when replacing an existing attribute 
 PASS setNamedItemNS on NamedNodeMap must enqueue an attributeChanged reaction when replacing an existing unobserved attribute 
 FAIL removeNamedItem on NamedNodeMap must not enqueue an attributeChanged reaction when removing an attribute that does not exist The object can not be found here.
 PASS removeNamedItem on NamedNodeMap must not enqueue an attributeChanged reaction when removing an unobserved attribute 
-FAIL removeNamedItem on NamedNodeMap must enqueue an attributeChanged reaction when removing an existing attribute assert_array_equals: lengths differ, expected 1 got 0
+PASS removeNamedItem on NamedNodeMap must enqueue an attributeChanged reaction when removing an existing attribute 
 PASS removeNamedItem on NamedNodeMap must not enqueue an attributeChanged reaction when removing an existing unobserved attribute 
 FAIL removeNamedItemNS on NamedNodeMap must not enqueue an attributeChanged reaction when removing an attribute that does not exist The object can not be found here.
 PASS removeNamedItemNS on NamedNodeMap must not enqueue an attributeChanged reaction when removing an unobserved attribute 
-FAIL removeNamedItemNS on NamedNodeMap must enqueue an attributeChanged reaction when removing an existing attribute assert_array_equals: lengths differ, expected 1 got 0
+PASS removeNamedItemNS on NamedNodeMap must enqueue an attributeChanged reaction when removing an existing attribute 
 PASS removeNamedItemNS on NamedNodeMap must not enqueue an attributeChanged reaction when removing an existing unobserved attribute 
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/Node-expected.txt (207169 => 207170)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/Node-expected.txt	2016-10-11 22:03:04 UTC (rev 207169)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/Node-expected.txt	2016-10-11 22:07:50 UTC (rev 207170)
@@ -1,16 +1,16 @@
 
-FAIL nodeValue on Node must enqueue an attributeChanged reaction when replacing an existing attribute assert_array_equals: lengths differ, expected 1 got 0
+PASS nodeValue on Node must enqueue an attributeChanged reaction when replacing an existing attribute 
 PASS nodeValue on Node must not enqueue an attributeChanged reaction when replacing an existing unobserved attribute 
-FAIL textContent on Node must enqueue an attributeChanged reaction when replacing an existing attribute assert_array_equals: lengths differ, expected 1 got 0
+FAIL textContent on Node must enqueue an attributeChanged reaction when replacing an existing attribute assert_array_equals: lengths differ, expected 1 got 2
 PASS textContent on Node must not enqueue an attributeChanged reaction when replacing an existing unobserved attribute 
 FAIL cloneNode on Node must enqueue an attributeChanged reaction when cloning an element with an observed attribute assert_array_equals: lengths differ, expected 2 got 1
 PASS cloneNode on Node must not enqueue an attributeChanged reaction when cloning an element with an unobserved attribute 
-FAIL cloneNode on Node must enqueue an attributeChanged reaction when cloning an element only for observed attributes assert_array_equals: lengths differ, expected 4 got 3
-FAIL insertBefore on ChildNode must enqueue a connected reaction assert_array_equals: lengths differ, expected 1 got 0
-FAIL insertBefore on ChildNode must enqueue a disconnected reaction, an adopted reaction, and a connected reaction when the custom element was in another document assert_array_equals: lengths differ, expected 1 got 0
+FAIL cloneNode on Node must enqueue an attributeChanged reaction when cloning an element only for observed attributes assert_array_equals: lengths differ, expected 3 got 1
+PASS insertBefore on ChildNode must enqueue a connected reaction 
+PASS insertBefore on ChildNode must enqueue a disconnected reaction, an adopted reaction, and a connected reaction when the custom element was in another document 
 PASS appendChild on ChildNode must enqueue a connected reaction 
 PASS appendChild on ChildNode must enqueue a disconnected reaction, an adopted reaction, and a connected reaction when the custom element was in another document 
-FAIL replaceChild on ChildNode must enqueue a connected reaction assert_array_equals: lengths differ, expected 1 got 0
-FAIL replaceChild on ChildNode must enqueue a disconnected reaction, an adopted reaction, and a connected reaction when the custom element was in another document assert_array_equals: lengths differ, expected 1 got 0
+PASS replaceChild on ChildNode must enqueue a connected reaction 
+PASS replaceChild on ChildNode must enqueue a disconnected reaction, an adopted reaction, and a connected reaction when the custom element was in another document 
 PASS removeChild on ChildNode must enqueue a disconnected reaction 
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/ParentNode-expected.txt (207169 => 207170)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/ParentNode-expected.txt	2016-10-11 22:03:04 UTC (rev 207169)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/ParentNode-expected.txt	2016-10-11 22:07:50 UTC (rev 207170)
@@ -1,6 +1,6 @@
 
-FAIL prepend on ParentNode must enqueue a connected reaction assert_array_equals: lengths differ, expected 1 got 0
-FAIL prepend on ParentNode must enqueue a disconnected reaction, an adopted reaction, and a connected reaction when the custom element was in another document assert_array_equals: lengths differ, expected 1 got 0
-FAIL append on ParentNode must enqueue a connected reaction assert_array_equals: lengths differ, expected 1 got 0
-FAIL append on ParentNode must enqueue a disconnected reaction, an adopted reaction, and a connected reaction when the custom element was in another document assert_array_equals: lengths differ, expected 1 got 0
+PASS prepend on ParentNode must enqueue a connected reaction 
+PASS prepend on ParentNode must enqueue a disconnected reaction, an adopted reaction, and a connected reaction when the custom element was in another document 
+PASS append on ParentNode must enqueue a connected reaction 
+PASS append on ParentNode must enqueue a disconnected reaction, an adopted reaction, and a connected reaction when the custom element was in another document 
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/Range-expected.txt (207169 => 207170)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/Range-expected.txt	2016-10-11 22:03:04 UTC (rev 207169)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/Range-expected.txt	2016-10-11 22:07:50 UTC (rev 207170)
@@ -1,11 +1,11 @@
 
-FAIL deleteContents on Range must enqueue a disconnected reaction assert_array_equals: lengths differ, expected 1 got 0
-FAIL extractContents on Range must enqueue a disconnected reaction assert_array_equals: lengths differ, expected 1 got 0
-FAIL cloneContents on Range must enqueue an attributeChanged reaction when cloning an element with an observed attribute assert_array_equals: lengths differ, expected 2 got 0
-FAIL cloneContents on Range must not enqueue an attributeChanged reaction when cloning an element with an unobserved attribute assert_array_equals: lengths differ, expected 1 got 0
-FAIL cloneContents on Range must enqueue an attributeChanged reaction when cloning an element only for observed attributes assert_array_equals: lengths differ, expected 4 got 3
-FAIL insertNode on Range must enqueue a connected reaction assert_array_equals: lengths differ, expected 1 got 0
-FAIL insertNode on Range must enqueue a disconnected reaction, an adopted reaction, and a connected reaction when the custom element was in another document assert_array_equals: lengths differ, expected 1 got 0
-FAIL insertNode on Range must enqueue a connected reaction assert_array_equals: lengths differ, expected 1 got 0
-FAIL insertNode on Range must enqueue a disconnected reaction, an adopted reaction, and a connected reaction when the custom element was in another document assert_array_equals: lengths differ, expected 1 got 0
+PASS deleteContents on Range must enqueue a disconnected reaction 
+PASS extractContents on Range must enqueue a disconnected reaction 
+FAIL cloneContents on Range must enqueue an attributeChanged reaction when cloning an element with an observed attribute assert_array_equals: lengths differ, expected 2 got 1
+PASS cloneContents on Range must not enqueue an attributeChanged reaction when cloning an element with an unobserved attribute 
+FAIL cloneContents on Range must enqueue an attributeChanged reaction when cloning an element only for observed attributes assert_array_equals: lengths differ, expected 3 got 1
+PASS insertNode on Range must enqueue a connected reaction 
+PASS insertNode on Range must enqueue a disconnected reaction, an adopted reaction, and a connected reaction when the custom element was in another document 
+PASS insertNode on Range must enqueue a connected reaction 
+PASS insertNode on Range must enqueue a disconnected reaction, an adopted reaction, and a connected reaction when the custom element was in another document 
 

Modified: trunk/Source/WebCore/ChangeLog (207169 => 207170)


--- trunk/Source/WebCore/ChangeLog	2016-10-11 22:03:04 UTC (rev 207169)
+++ trunk/Source/WebCore/ChangeLog	2016-10-11 22:07:50 UTC (rev 207170)
@@ -1,3 +1,37 @@
+2016-10-10  Ryosuke Niwa  <[email protected]>
+
+        Annotate DOM API with CEReactions
+        https://bugs.webkit.org/show_bug.cgi?id=163268
+
+        Reviewed by Darin Adler.
+
+        Added CEReactions IDL attribute to APIs defined in https://dom.spec.whatwg.org.
+
+        No new tests since existing tests cover the code change.
+        Added a dedicated code generation test: JSTestCEReactions.idl and TestCEReactionsStringifier.idl.
+
+        * bindings/scripts/CodeGeneratorJS.pm:
+        (GenerateImplementation): Generate CustomElementReactionStack in attribute setters. In the case of PutForwards,
+        check the extended attributes of the target attribute's stringifier.
+        * bindings/scripts/test/JS/JSTestCEReactions.cpp: Added.
+        * bindings/scripts/test/JS/JSTestCEReactions.h: Added.
+        * bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp: Added.
+        * bindings/scripts/test/JS/JSTestCEReactionsStringifier.h: Added.
+        * bindings/scripts/test/JS/JSTestObj.cpp:
+        (WebCore::jsTestObjPrototypeFunctionMethodWithNeedsCustomElementReactionStack): Deleted.
+        * bindings/scripts/test/TestCEReactions.idl: Added.
+        * bindings/scripts/test/TestCEReactionsStringifier.idl: Added.
+        * bindings/scripts/test/TestObj.idl:
+        * dom/Attr.idl:
+        * dom/ChildNode.idl:
+        * dom/Document.idl:
+        * dom/Element.idl:
+        * dom/NamedNodeMap.idl:
+        * dom/Node.idl:
+        * dom/ParentNode.idl:
+        * dom/Range.idl:
+        * html/DOMTokenList.idl:
+
 2016-10-11  Chris Dumez  <[email protected]>
 
         Update CloseEvent to stop using legacy [ConstructorTemplate=Event]

Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (207169 => 207170)


--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm	2016-10-11 22:03:04 UTC (rev 207169)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm	2016-10-11 22:07:50 UTC (rev 207170)
@@ -3298,6 +3298,13 @@
                 push(@implContent, "    UNUSED_PARAM(state);\n");
             }
 
+            if ($attribute->signature->extendedAttributes->{CEReactions}) {
+                push(@implContent, "#if ENABLE(CUSTOM_ELEMENTS)\n");
+                push(@implContent, "    CustomElementReactionStack customElementReactionStack;\n");
+                push(@implContent, "#endif\n");
+                $implIncludes{"CustomElementReactionQueue.h"} = 1;
+            }
+
             if ($interface->extendedAttributes->{CheckSecurity} && !$attribute->signature->extendedAttributes->{DoNotCheckSecurity} && !$attribute->signature->extendedAttributes->{DoNotCheckSecurityOnSetter}) {
                 if ($interfaceName eq "DOMWindow") {
                     push(@implContent, "    if (!BindingSecurity::shouldAllowAccessToDOMWindow(state, castedThis->wrapped(), ThrowSecurityError))\n");
@@ -3348,6 +3355,15 @@
                     my $putForwards = $attribute->signature->extendedAttributes->{PutForwards};
                     if ($putForwards) {
                         my $implGetterFunctionName = $codeGenerator->WK_lcfirst($attribute->signature->extendedAttributes->{ImplementedAs} || $name);
+                        my $forwardedAttribute = $codeGenerator->GetAttributeFromInterface($interface, $type, $putForwards);
+
+                        if ($forwardedAttribute->signature->extendedAttributes->{CEReactions}) {
+                            push(@implContent, "#if ENABLE(CUSTOM_ELEMENTS)\n");
+                            push(@implContent, "    CustomElementReactionStack customElementReactionStack;\n");
+                            push(@implContent, "#endif\n");
+                            $implIncludes{"CustomElementReactionQueue.h"} = 1;
+                        }
+
                         if ($attribute->signature->isNullable) {
                             push(@implContent, "    RefPtr<${type}> forwardedImpl = castedThis->wrapped().${implGetterFunctionName}();\n");
                             push(@implContent, "    if (!forwardedImpl)\n");
@@ -3358,7 +3374,7 @@
                             push(@implContent, "    Ref<${type}> forwardedImpl = castedThis->wrapped().${implGetterFunctionName}();\n");
                             push(@implContent, "    auto& impl = forwardedImpl.get();\n");
                         }
-                        $attribute = $codeGenerator->GetAttributeFromInterface($interface, $type, $putForwards);
+                        $attribute = $forwardedAttribute;
                         $type = $attribute->signature->type;
                     } else {
                         push(@implContent, "    auto& impl = castedThis->wrapped();\n");

Added: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCEReactions.cpp (0 => 207170)


--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCEReactions.cpp	                        (rev 0)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCEReactions.cpp	2016-10-11 22:07:50 UTC (rev 207170)
@@ -0,0 +1,365 @@
+/*
+    This file is part of the WebKit open source project.
+    This file has been generated by generate-bindings.pl. DO NOT MODIFY!
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Library General Public
+    License as published by the Free Software Foundation; either
+    version 2 of the License, or (at your option) any later version.
+
+    This library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Library General Public License for more details.
+
+    You should have received a copy of the GNU Library General Public License
+    along with this library; see the file COPYING.LIB.  If not, write to
+    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+    Boston, MA 02110-1301, USA.
+*/
+
+#include "config.h"
+#include "JSTestCEReactions.h"
+
+#include "CustomElementReactionQueue.h"
+#include "ExceptionCode.h"
+#include "HTMLNames.h"
+#include "JSDOMBinding.h"
+#include "JSDOMConstructor.h"
+#include "JSTestCEReactionsStringifier.h"
+#include "URL.h"
+#include <runtime/Error.h>
+#include <runtime/FunctionPrototype.h>
+#include <runtime/JSString.h>
+#include <wtf/GetPtr.h>
+
+using namespace JSC;
+
+namespace WebCore {
+
+// Functions
+
+JSC::EncodedJSValue JSC_HOST_CALL jsTestCEReactionsPrototypeFunctionMethodWithCEReactions(JSC::ExecState*);
+
+// Attributes
+
+JSC::EncodedJSValue jsTestCEReactionsAttributeWithCEReactions(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
+bool setJSTestCEReactionsAttributeWithCEReactions(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
+JSC::EncodedJSValue jsTestCEReactionsReflectAttributeWithCEReactions(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
+bool setJSTestCEReactionsReflectAttributeWithCEReactions(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
+JSC::EncodedJSValue jsTestCEReactionsStringifierAttribute(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
+bool setJSTestCEReactionsStringifierAttribute(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
+JSC::EncodedJSValue jsTestCEReactionsConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
+bool setJSTestCEReactionsConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
+
+class JSTestCEReactionsPrototype : public JSC::JSNonFinalObject {
+public:
+    using Base = JSC::JSNonFinalObject;
+    static JSTestCEReactionsPrototype* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
+    {
+        JSTestCEReactionsPrototype* ptr = new (NotNull, JSC::allocateCell<JSTestCEReactionsPrototype>(vm.heap)) JSTestCEReactionsPrototype(vm, globalObject, structure);
+        ptr->finishCreation(vm);
+        return ptr;
+    }
+
+    DECLARE_INFO;
+    static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
+    {
+        return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
+    }
+
+private:
+    JSTestCEReactionsPrototype(JSC::VM& vm, JSC::JSGlobalObject*, JSC::Structure* structure)
+        : JSC::JSNonFinalObject(vm, structure)
+    {
+    }
+
+    void finishCreation(JSC::VM&);
+};
+
+using JSTestCEReactionsConstructor = JSDOMConstructorNotConstructable<JSTestCEReactions>;
+
+template<> JSValue JSTestCEReactionsConstructor::prototypeForStructure(JSC::VM& vm, const JSDOMGlobalObject& globalObject)
+{
+    UNUSED_PARAM(vm);
+    return globalObject.functionPrototype();
+}
+
+template<> void JSTestCEReactionsConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject)
+{
+    putDirect(vm, vm.propertyNames->prototype, JSTestCEReactions::prototype(vm, &globalObject), DontDelete | ReadOnly | DontEnum);
+    putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestCEReactions"))), ReadOnly | DontEnum);
+    putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum);
+}
+
+template<> const ClassInfo JSTestCEReactionsConstructor::s_info = { "TestCEReactions", &Base::s_info, 0, CREATE_METHOD_TABLE(JSTestCEReactionsConstructor) };
+
+/* Hash table for prototype */
+
+static const HashTableValue JSTestCEReactionsPrototypeTableValues[] =
+{
+    { "constructor", DontEnum, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestCEReactionsConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestCEReactionsConstructor) } },
+    { "attributeWithCEReactions", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestCEReactionsAttributeWithCEReactions), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestCEReactionsAttributeWithCEReactions) } },
+    { "reflectAttributeWithCEReactions", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestCEReactionsReflectAttributeWithCEReactions), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestCEReactionsReflectAttributeWithCEReactions) } },
+    { "stringifierAttribute", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestCEReactionsStringifierAttribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestCEReactionsStringifierAttribute) } },
+    { "methodWithCEReactions", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestCEReactionsPrototypeFunctionMethodWithCEReactions), (intptr_t) (0) } },
+};
+
+const ClassInfo JSTestCEReactionsPrototype::s_info = { "TestCEReactionsPrototype", &Base::s_info, 0, CREATE_METHOD_TABLE(JSTestCEReactionsPrototype) };
+
+void JSTestCEReactionsPrototype::finishCreation(VM& vm)
+{
+    Base::finishCreation(vm);
+    reifyStaticProperties(vm, JSTestCEReactionsPrototypeTableValues, *this);
+}
+
+const ClassInfo JSTestCEReactions::s_info = { "TestCEReactions", &Base::s_info, 0, CREATE_METHOD_TABLE(JSTestCEReactions) };
+
+JSTestCEReactions::JSTestCEReactions(Structure* structure, JSDOMGlobalObject& globalObject, Ref<TestCEReactions>&& impl)
+    : JSDOMWrapper<TestCEReactions>(structure, globalObject, WTFMove(impl))
+{
+}
+
+JSObject* JSTestCEReactions::createPrototype(VM& vm, JSGlobalObject* globalObject)
+{
+    return JSTestCEReactionsPrototype::create(vm, globalObject, JSTestCEReactionsPrototype::createStructure(vm, globalObject, globalObject->objectPrototype()));
+}
+
+JSObject* JSTestCEReactions::prototype(VM& vm, JSGlobalObject* globalObject)
+{
+    return getDOMPrototype<JSTestCEReactions>(vm, globalObject);
+}
+
+void JSTestCEReactions::destroy(JSC::JSCell* cell)
+{
+    JSTestCEReactions* thisObject = static_cast<JSTestCEReactions*>(cell);
+    thisObject->JSTestCEReactions::~JSTestCEReactions();
+}
+
+inline JSTestCEReactions* JSTestCEReactions::castForAttribute(JSC::ExecState*, EncodedJSValue thisValue)
+{
+    return jsDynamicCast<JSTestCEReactions*>(JSValue::decode(thisValue));
+}
+
+static inline JSValue jsTestCEReactionsAttributeWithCEReactionsGetter(ExecState&, JSTestCEReactions&, ThrowScope& throwScope);
+
+EncodedJSValue jsTestCEReactionsAttributeWithCEReactions(ExecState* state, EncodedJSValue thisValue, PropertyName)
+{
+    return BindingCaller<JSTestCEReactions>::attribute<jsTestCEReactionsAttributeWithCEReactionsGetter>(state, thisValue, "attributeWithCEReactions");
+}
+
+static inline JSValue jsTestCEReactionsAttributeWithCEReactionsGetter(ExecState& state, JSTestCEReactions& thisObject, ThrowScope& throwScope)
+{
+    UNUSED_PARAM(throwScope);
+    UNUSED_PARAM(state);
+    auto& impl = thisObject.wrapped();
+    JSValue result = jsStringWithCache(&state, impl.attributeWithCEReactions());
+    return result;
+}
+
+static inline JSValue jsTestCEReactionsReflectAttributeWithCEReactionsGetter(ExecState&, JSTestCEReactions&, ThrowScope& throwScope);
+
+EncodedJSValue jsTestCEReactionsReflectAttributeWithCEReactions(ExecState* state, EncodedJSValue thisValue, PropertyName)
+{
+    return BindingCaller<JSTestCEReactions>::attribute<jsTestCEReactionsReflectAttributeWithCEReactionsGetter>(state, thisValue, "reflectAttributeWithCEReactions");
+}
+
+static inline JSValue jsTestCEReactionsReflectAttributeWithCEReactionsGetter(ExecState& state, JSTestCEReactions& thisObject, ThrowScope& throwScope)
+{
+    UNUSED_PARAM(throwScope);
+    UNUSED_PARAM(state);
+    auto& impl = thisObject.wrapped();
+    JSValue result = jsStringWithCache(&state, impl.attributeWithoutSynchronization(WebCore::HTMLNames::reflectattributewithcereactionsAttr));
+    return result;
+}
+
+static inline JSValue jsTestCEReactionsStringifierAttributeGetter(ExecState&, JSTestCEReactions&, ThrowScope& throwScope);
+
+EncodedJSValue jsTestCEReactionsStringifierAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
+{
+    return BindingCaller<JSTestCEReactions>::attribute<jsTestCEReactionsStringifierAttributeGetter>(state, thisValue, "stringifierAttribute");
+}
+
+static inline JSValue jsTestCEReactionsStringifierAttributeGetter(ExecState& state, JSTestCEReactions& thisObject, ThrowScope& throwScope)
+{
+    UNUSED_PARAM(throwScope);
+    UNUSED_PARAM(state);
+    auto& impl = thisObject.wrapped();
+    JSValue result = toJS(&state, thisObject.globalObject(), impl.stringifierAttribute());
+    return result;
+}
+
+EncodedJSValue jsTestCEReactionsConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
+{
+    VM& vm = state->vm();
+    auto throwScope = DECLARE_THROW_SCOPE(vm);
+    JSTestCEReactionsPrototype* domObject = jsDynamicCast<JSTestCEReactionsPrototype*>(JSValue::decode(thisValue));
+    if (UNLIKELY(!domObject))
+        return throwVMTypeError(state, throwScope);
+    return JSValue::encode(JSTestCEReactions::getConstructor(state->vm(), domObject->globalObject()));
+}
+
+bool setJSTestCEReactionsConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
+{
+    VM& vm = state->vm();
+    auto throwScope = DECLARE_THROW_SCOPE(vm);
+    JSValue value = JSValue::decode(encodedValue);
+    JSTestCEReactionsPrototype* domObject = jsDynamicCast<JSTestCEReactionsPrototype*>(JSValue::decode(thisValue));
+    if (UNLIKELY(!domObject)) {
+        throwVMTypeError(state, throwScope);
+        return false;
+    }
+    // Shadowing a built-in constructor
+    return domObject->putDirect(state->vm(), state->propertyNames().constructor, value);
+}
+
+static inline bool setJSTestCEReactionsAttributeWithCEReactionsFunction(ExecState*, JSTestCEReactions*, JSValue, ThrowScope&);
+
+bool setJSTestCEReactionsAttributeWithCEReactions(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
+{
+    return BindingCaller<JSTestCEReactions>::setAttribute<setJSTestCEReactionsAttributeWithCEReactionsFunction>(state, thisValue, encodedValue, "attributeWithCEReactions");
+}
+
+static inline bool setJSTestCEReactionsAttributeWithCEReactionsFunction(ExecState* state, JSTestCEReactions* castedThis, JSValue value, ThrowScope& throwScope)
+{
+    UNUSED_PARAM(state);
+    UNUSED_PARAM(throwScope);
+#if ENABLE(CUSTOM_ELEMENTS)
+    CustomElementReactionStack customElementReactionStack;
+#endif
+    auto& impl = castedThis->wrapped();
+    auto nativeValue = value.toWTFString(state);
+    RETURN_IF_EXCEPTION(throwScope, false);
+    impl.setAttributeWithCEReactions(WTFMove(nativeValue));
+    return true;
+}
+
+
+static inline bool setJSTestCEReactionsReflectAttributeWithCEReactionsFunction(ExecState*, JSTestCEReactions*, JSValue, ThrowScope&);
+
+bool setJSTestCEReactionsReflectAttributeWithCEReactions(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
+{
+    return BindingCaller<JSTestCEReactions>::setAttribute<setJSTestCEReactionsReflectAttributeWithCEReactionsFunction>(state, thisValue, encodedValue, "reflectAttributeWithCEReactions");
+}
+
+static inline bool setJSTestCEReactionsReflectAttributeWithCEReactionsFunction(ExecState* state, JSTestCEReactions* castedThis, JSValue value, ThrowScope& throwScope)
+{
+    UNUSED_PARAM(state);
+    UNUSED_PARAM(throwScope);
+#if ENABLE(CUSTOM_ELEMENTS)
+    CustomElementReactionStack customElementReactionStack;
+#endif
+    auto& impl = castedThis->wrapped();
+    auto nativeValue = value.toWTFString(state);
+    RETURN_IF_EXCEPTION(throwScope, false);
+    impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::reflectattributewithcereactionsAttr, WTFMove(nativeValue));
+    return true;
+}
+
+
+static inline bool setJSTestCEReactionsStringifierAttributeFunction(ExecState*, JSTestCEReactions*, JSValue, ThrowScope&);
+
+bool setJSTestCEReactionsStringifierAttribute(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
+{
+    return BindingCaller<JSTestCEReactions>::setAttribute<setJSTestCEReactionsStringifierAttributeFunction>(state, thisValue, encodedValue, "stringifierAttribute");
+}
+
+static inline bool setJSTestCEReactionsStringifierAttributeFunction(ExecState* state, JSTestCEReactions* castedThis, JSValue value, ThrowScope& throwScope)
+{
+    UNUSED_PARAM(state);
+    UNUSED_PARAM(throwScope);
+#if ENABLE(CUSTOM_ELEMENTS)
+    CustomElementReactionStack customElementReactionStack;
+#endif
+    Ref<TestCEReactionsStringifier> forwardedImpl = castedThis->wrapped().stringifierAttribute();
+    auto& impl = forwardedImpl.get();
+    auto nativeValue = value.toWTFString(state);
+    RETURN_IF_EXCEPTION(throwScope, false);
+    impl.setValue(WTFMove(nativeValue));
+    return true;
+}
+
+
+JSValue JSTestCEReactions::getConstructor(VM& vm, const JSGlobalObject* globalObject)
+{
+    return getDOMConstructor<JSTestCEReactionsConstructor>(vm, *jsCast<const JSDOMGlobalObject*>(globalObject));
+}
+
+EncodedJSValue JSC_HOST_CALL jsTestCEReactionsPrototypeFunctionMethodWithCEReactions(ExecState* state)
+{
+    VM& vm = state->vm();
+    auto throwScope = DECLARE_THROW_SCOPE(vm);
+    UNUSED_PARAM(throwScope);
+#if ENABLE(CUSTOM_ELEMENTS)
+    CustomElementReactionStack customElementReactionStack;
+#endif
+    JSValue thisValue = state->thisValue();
+    auto castedThis = jsDynamicCast<JSTestCEReactions*>(thisValue);
+    if (UNLIKELY(!castedThis))
+        return throwThisTypeError(*state, throwScope, "TestCEReactions", "methodWithCEReactions");
+    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestCEReactions::info());
+    auto& impl = castedThis->wrapped();
+    impl.methodWithCEReactions();
+    return JSValue::encode(jsUndefined());
+}
+
+bool JSTestCEReactionsOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> handle, void*, SlotVisitor& visitor)
+{
+    UNUSED_PARAM(handle);
+    UNUSED_PARAM(visitor);
+    return false;
+}
+
+void JSTestCEReactionsOwner::finalize(JSC::Handle<JSC::Unknown> handle, void* context)
+{
+    auto* jsTestCEReactions = jsCast<JSTestCEReactions*>(handle.slot()->asCell());
+    auto& world = *static_cast<DOMWrapperWorld*>(context);
+    uncacheWrapper(world, &jsTestCEReactions->wrapped(), jsTestCEReactions);
+}
+
+#if ENABLE(BINDING_INTEGRITY)
+#if PLATFORM(WIN)
+#pragma warning(disable: 4483)
+extern "C" { extern void (*const __identifier("??_7TestCEReactions@WebCore@@6B@")[])(); }
+#else
+extern "C" { extern void* _ZTVN7WebCore15TestCEReactionsE[]; }
+#endif
+#endif
+
+JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject* globalObject, Ref<TestCEReactions>&& impl)
+{
+
+#if ENABLE(BINDING_INTEGRITY)
+    void* actualVTablePointer = *(reinterpret_cast<void**>(impl.ptr()));
+#if PLATFORM(WIN)
+    void* expectedVTablePointer = reinterpret_cast<void*>(__identifier("??_7TestCEReactions@WebCore@@6B@"));
+#else
+    void* expectedVTablePointer = &_ZTVN7WebCore15TestCEReactionsE[2];
+#if COMPILER(CLANG)
+    // If this fails TestCEReactions does not have a vtable, so you need to add the
+    // ImplementationLacksVTable attribute to the interface definition
+    static_assert(__is_polymorphic(TestCEReactions), "TestCEReactions is not polymorphic");
+#endif
+#endif
+    // If you hit this assertion you either have a use after free bug, or
+    // TestCEReactions has subclasses. If TestCEReactions has subclasses that get passed
+    // to toJS() we currently require TestCEReactions you to opt out of binding hardening
+    // by adding the SkipVTableValidation attribute to the interface IDL definition
+    RELEASE_ASSERT(actualVTablePointer == expectedVTablePointer);
+#endif
+    return createWrapper<TestCEReactions>(globalObject, WTFMove(impl));
+}
+
+JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, TestCEReactions& impl)
+{
+    return wrap(state, globalObject, impl);
+}
+
+TestCEReactions* JSTestCEReactions::toWrapped(JSC::JSValue value)
+{
+    if (auto* wrapper = jsDynamicCast<JSTestCEReactions*>(value))
+        return &wrapper->wrapped();
+    return nullptr;
+}
+
+}

Added: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCEReactions.h (0 => 207170)


--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCEReactions.h	                        (rev 0)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCEReactions.h	2016-10-11 22:07:50 UTC (rev 207170)
@@ -0,0 +1,90 @@
+/*
+    This file is part of the WebKit open source project.
+    This file has been generated by generate-bindings.pl. DO NOT MODIFY!
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Library General Public
+    License as published by the Free Software Foundation; either
+    version 2 of the License, or (at your option) any later version.
+
+    This library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Library General Public License for more details.
+
+    You should have received a copy of the GNU Library General Public License
+    along with this library; see the file COPYING.LIB.  If not, write to
+    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+    Boston, MA 02110-1301, USA.
+*/
+
+#pragma once
+
+#include "JSDOMWrapper.h"
+#include "TestCEReactions.h"
+#include <wtf/NeverDestroyed.h>
+
+namespace WebCore {
+
+class JSTestCEReactions : public JSDOMWrapper<TestCEReactions> {
+public:
+    using Base = JSDOMWrapper<TestCEReactions>;
+    static JSTestCEReactions* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, Ref<TestCEReactions>&& impl)
+    {
+        JSTestCEReactions* ptr = new (NotNull, JSC::allocateCell<JSTestCEReactions>(globalObject->vm().heap)) JSTestCEReactions(structure, *globalObject, WTFMove(impl));
+        ptr->finishCreation(globalObject->vm());
+        return ptr;
+    }
+
+    static JSC::JSObject* createPrototype(JSC::VM&, JSC::JSGlobalObject*);
+    static JSC::JSObject* prototype(JSC::VM&, JSC::JSGlobalObject*);
+    static TestCEReactions* toWrapped(JSC::JSValue);
+    static void destroy(JSC::JSCell*);
+
+    DECLARE_INFO;
+
+    static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
+    {
+        return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
+    }
+
+    static JSC::JSValue getConstructor(JSC::VM&, const JSC::JSGlobalObject*);
+    static JSTestCEReactions* castForAttribute(JSC::ExecState*, JSC::EncodedJSValue);
+protected:
+    JSTestCEReactions(JSC::Structure*, JSDOMGlobalObject&, Ref<TestCEReactions>&&);
+
+    void finishCreation(JSC::VM& vm)
+    {
+        Base::finishCreation(vm);
+        ASSERT(inherits(info()));
+    }
+
+};
+
+class JSTestCEReactionsOwner : public JSC::WeakHandleOwner {
+public:
+    virtual bool isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown>, void* context, JSC::SlotVisitor&);
+    virtual void finalize(JSC::Handle<JSC::Unknown>, void* context);
+};
+
+inline JSC::WeakHandleOwner* wrapperOwner(DOMWrapperWorld&, TestCEReactions*)
+{
+    static NeverDestroyed<JSTestCEReactionsOwner> owner;
+    return &owner.get();
+}
+
+inline void* wrapperKey(TestCEReactions* wrappableObject)
+{
+    return wrappableObject;
+}
+
+JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestCEReactions&);
+inline JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, TestCEReactions* impl) { return impl ? toJS(state, globalObject, *impl) : JSC::jsNull(); }
+JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject*, Ref<TestCEReactions>&&);
+inline JSC::JSValue toJSNewlyCreated(JSC::ExecState* state, JSDOMGlobalObject* globalObject, RefPtr<TestCEReactions>&& impl) { return impl ? toJSNewlyCreated(state, globalObject, impl.releaseNonNull()) : JSC::jsNull(); }
+
+template<> struct JSDOMWrapperConverterTraits<TestCEReactions> {
+    using WrapperClass = JSTestCEReactions;
+};
+
+} // namespace WebCore

Added: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp (0 => 207170)


--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp	                        (rev 0)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp	2016-10-11 22:07:50 UTC (rev 207170)
@@ -0,0 +1,277 @@
+/*
+    This file is part of the WebKit open source project.
+    This file has been generated by generate-bindings.pl. DO NOT MODIFY!
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Library General Public
+    License as published by the Free Software Foundation; either
+    version 2 of the License, or (at your option) any later version.
+
+    This library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Library General Public License for more details.
+
+    You should have received a copy of the GNU Library General Public License
+    along with this library; see the file COPYING.LIB.  If not, write to
+    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+    Boston, MA 02110-1301, USA.
+*/
+
+#include "config.h"
+#include "JSTestCEReactionsStringifier.h"
+
+#include "CustomElementReactionQueue.h"
+#include "ExceptionCode.h"
+#include "JSDOMBinding.h"
+#include "JSDOMConstructor.h"
+#include "URL.h"
+#include <runtime/Error.h>
+#include <runtime/FunctionPrototype.h>
+#include <runtime/JSString.h>
+#include <wtf/GetPtr.h>
+
+using namespace JSC;
+
+namespace WebCore {
+
+// Functions
+
+JSC::EncodedJSValue JSC_HOST_CALL jsTestCEReactionsStringifierPrototypeFunctionToString(JSC::ExecState*);
+
+// Attributes
+
+JSC::EncodedJSValue jsTestCEReactionsStringifierValue(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
+bool setJSTestCEReactionsStringifierValue(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
+JSC::EncodedJSValue jsTestCEReactionsStringifierConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
+bool setJSTestCEReactionsStringifierConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
+
+class JSTestCEReactionsStringifierPrototype : public JSC::JSNonFinalObject {
+public:
+    using Base = JSC::JSNonFinalObject;
+    static JSTestCEReactionsStringifierPrototype* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
+    {
+        JSTestCEReactionsStringifierPrototype* ptr = new (NotNull, JSC::allocateCell<JSTestCEReactionsStringifierPrototype>(vm.heap)) JSTestCEReactionsStringifierPrototype(vm, globalObject, structure);
+        ptr->finishCreation(vm);
+        return ptr;
+    }
+
+    DECLARE_INFO;
+    static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
+    {
+        return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
+    }
+
+private:
+    JSTestCEReactionsStringifierPrototype(JSC::VM& vm, JSC::JSGlobalObject*, JSC::Structure* structure)
+        : JSC::JSNonFinalObject(vm, structure)
+    {
+    }
+
+    void finishCreation(JSC::VM&);
+};
+
+using JSTestCEReactionsStringifierConstructor = JSDOMConstructorNotConstructable<JSTestCEReactionsStringifier>;
+
+template<> JSValue JSTestCEReactionsStringifierConstructor::prototypeForStructure(JSC::VM& vm, const JSDOMGlobalObject& globalObject)
+{
+    UNUSED_PARAM(vm);
+    return globalObject.functionPrototype();
+}
+
+template<> void JSTestCEReactionsStringifierConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject)
+{
+    putDirect(vm, vm.propertyNames->prototype, JSTestCEReactionsStringifier::prototype(vm, &globalObject), DontDelete | ReadOnly | DontEnum);
+    putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestCEReactionsStringifier"))), ReadOnly | DontEnum);
+    putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum);
+}
+
+template<> const ClassInfo JSTestCEReactionsStringifierConstructor::s_info = { "TestCEReactionsStringifier", &Base::s_info, 0, CREATE_METHOD_TABLE(JSTestCEReactionsStringifierConstructor) };
+
+/* Hash table for prototype */
+
+static const HashTableValue JSTestCEReactionsStringifierPrototypeTableValues[] =
+{
+    { "constructor", DontEnum, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestCEReactionsStringifierConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestCEReactionsStringifierConstructor) } },
+    { "value", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestCEReactionsStringifierValue), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestCEReactionsStringifierValue) } },
+    { "toString", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestCEReactionsStringifierPrototypeFunctionToString), (intptr_t) (0) } },
+};
+
+const ClassInfo JSTestCEReactionsStringifierPrototype::s_info = { "TestCEReactionsStringifierPrototype", &Base::s_info, 0, CREATE_METHOD_TABLE(JSTestCEReactionsStringifierPrototype) };
+
+void JSTestCEReactionsStringifierPrototype::finishCreation(VM& vm)
+{
+    Base::finishCreation(vm);
+    reifyStaticProperties(vm, JSTestCEReactionsStringifierPrototypeTableValues, *this);
+}
+
+const ClassInfo JSTestCEReactionsStringifier::s_info = { "TestCEReactionsStringifier", &Base::s_info, 0, CREATE_METHOD_TABLE(JSTestCEReactionsStringifier) };
+
+JSTestCEReactionsStringifier::JSTestCEReactionsStringifier(Structure* structure, JSDOMGlobalObject& globalObject, Ref<TestCEReactionsStringifier>&& impl)
+    : JSDOMWrapper<TestCEReactionsStringifier>(structure, globalObject, WTFMove(impl))
+{
+}
+
+JSObject* JSTestCEReactionsStringifier::createPrototype(VM& vm, JSGlobalObject* globalObject)
+{
+    return JSTestCEReactionsStringifierPrototype::create(vm, globalObject, JSTestCEReactionsStringifierPrototype::createStructure(vm, globalObject, globalObject->objectPrototype()));
+}
+
+JSObject* JSTestCEReactionsStringifier::prototype(VM& vm, JSGlobalObject* globalObject)
+{
+    return getDOMPrototype<JSTestCEReactionsStringifier>(vm, globalObject);
+}
+
+void JSTestCEReactionsStringifier::destroy(JSC::JSCell* cell)
+{
+    JSTestCEReactionsStringifier* thisObject = static_cast<JSTestCEReactionsStringifier*>(cell);
+    thisObject->JSTestCEReactionsStringifier::~JSTestCEReactionsStringifier();
+}
+
+inline JSTestCEReactionsStringifier* JSTestCEReactionsStringifier::castForAttribute(JSC::ExecState*, EncodedJSValue thisValue)
+{
+    return jsDynamicCast<JSTestCEReactionsStringifier*>(JSValue::decode(thisValue));
+}
+
+static inline JSValue jsTestCEReactionsStringifierValueGetter(ExecState&, JSTestCEReactionsStringifier&, ThrowScope& throwScope);
+
+EncodedJSValue jsTestCEReactionsStringifierValue(ExecState* state, EncodedJSValue thisValue, PropertyName)
+{
+    return BindingCaller<JSTestCEReactionsStringifier>::attribute<jsTestCEReactionsStringifierValueGetter>(state, thisValue, "value");
+}
+
+static inline JSValue jsTestCEReactionsStringifierValueGetter(ExecState& state, JSTestCEReactionsStringifier& thisObject, ThrowScope& throwScope)
+{
+    UNUSED_PARAM(throwScope);
+    UNUSED_PARAM(state);
+    auto& impl = thisObject.wrapped();
+    JSValue result = jsStringWithCache(&state, impl.value());
+    return result;
+}
+
+EncodedJSValue jsTestCEReactionsStringifierConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
+{
+    VM& vm = state->vm();
+    auto throwScope = DECLARE_THROW_SCOPE(vm);
+    JSTestCEReactionsStringifierPrototype* domObject = jsDynamicCast<JSTestCEReactionsStringifierPrototype*>(JSValue::decode(thisValue));
+    if (UNLIKELY(!domObject))
+        return throwVMTypeError(state, throwScope);
+    return JSValue::encode(JSTestCEReactionsStringifier::getConstructor(state->vm(), domObject->globalObject()));
+}
+
+bool setJSTestCEReactionsStringifierConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
+{
+    VM& vm = state->vm();
+    auto throwScope = DECLARE_THROW_SCOPE(vm);
+    JSValue value = JSValue::decode(encodedValue);
+    JSTestCEReactionsStringifierPrototype* domObject = jsDynamicCast<JSTestCEReactionsStringifierPrototype*>(JSValue::decode(thisValue));
+    if (UNLIKELY(!domObject)) {
+        throwVMTypeError(state, throwScope);
+        return false;
+    }
+    // Shadowing a built-in constructor
+    return domObject->putDirect(state->vm(), state->propertyNames().constructor, value);
+}
+
+static inline bool setJSTestCEReactionsStringifierValueFunction(ExecState*, JSTestCEReactionsStringifier*, JSValue, ThrowScope&);
+
+bool setJSTestCEReactionsStringifierValue(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
+{
+    return BindingCaller<JSTestCEReactionsStringifier>::setAttribute<setJSTestCEReactionsStringifierValueFunction>(state, thisValue, encodedValue, "value");
+}
+
+static inline bool setJSTestCEReactionsStringifierValueFunction(ExecState* state, JSTestCEReactionsStringifier* castedThis, JSValue value, ThrowScope& throwScope)
+{
+    UNUSED_PARAM(state);
+    UNUSED_PARAM(throwScope);
+#if ENABLE(CUSTOM_ELEMENTS)
+    CustomElementReactionStack customElementReactionStack;
+#endif
+    auto& impl = castedThis->wrapped();
+    auto nativeValue = value.toWTFString(state);
+    RETURN_IF_EXCEPTION(throwScope, false);
+    impl.setValue(WTFMove(nativeValue));
+    return true;
+}
+
+
+JSValue JSTestCEReactionsStringifier::getConstructor(VM& vm, const JSGlobalObject* globalObject)
+{
+    return getDOMConstructor<JSTestCEReactionsStringifierConstructor>(vm, *jsCast<const JSDOMGlobalObject*>(globalObject));
+}
+
+EncodedJSValue JSC_HOST_CALL jsTestCEReactionsStringifierPrototypeFunctionToString(ExecState* state)
+{
+    VM& vm = state->vm();
+    auto throwScope = DECLARE_THROW_SCOPE(vm);
+    UNUSED_PARAM(throwScope);
+    JSValue thisValue = state->thisValue();
+    auto castedThis = jsDynamicCast<JSTestCEReactionsStringifier*>(thisValue);
+    if (UNLIKELY(!castedThis))
+        return throwThisTypeError(*state, throwScope, "TestCEReactionsStringifier", "toString");
+    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestCEReactionsStringifier::info());
+    auto& impl = castedThis->wrapped();
+    JSValue result = jsStringWithCache(state, impl.value());
+    return JSValue::encode(result);
+}
+
+bool JSTestCEReactionsStringifierOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> handle, void*, SlotVisitor& visitor)
+{
+    UNUSED_PARAM(handle);
+    UNUSED_PARAM(visitor);
+    return false;
+}
+
+void JSTestCEReactionsStringifierOwner::finalize(JSC::Handle<JSC::Unknown> handle, void* context)
+{
+    auto* jsTestCEReactionsStringifier = jsCast<JSTestCEReactionsStringifier*>(handle.slot()->asCell());
+    auto& world = *static_cast<DOMWrapperWorld*>(context);
+    uncacheWrapper(world, &jsTestCEReactionsStringifier->wrapped(), jsTestCEReactionsStringifier);
+}
+
+#if ENABLE(BINDING_INTEGRITY)
+#if PLATFORM(WIN)
+#pragma warning(disable: 4483)
+extern "C" { extern void (*const __identifier("??_7TestCEReactionsStringifier@WebCore@@6B@")[])(); }
+#else
+extern "C" { extern void* _ZTVN7WebCore26TestCEReactionsStringifierE[]; }
+#endif
+#endif
+
+JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject* globalObject, Ref<TestCEReactionsStringifier>&& impl)
+{
+
+#if ENABLE(BINDING_INTEGRITY)
+    void* actualVTablePointer = *(reinterpret_cast<void**>(impl.ptr()));
+#if PLATFORM(WIN)
+    void* expectedVTablePointer = reinterpret_cast<void*>(__identifier("??_7TestCEReactionsStringifier@WebCore@@6B@"));
+#else
+    void* expectedVTablePointer = &_ZTVN7WebCore26TestCEReactionsStringifierE[2];
+#if COMPILER(CLANG)
+    // If this fails TestCEReactionsStringifier does not have a vtable, so you need to add the
+    // ImplementationLacksVTable attribute to the interface definition
+    static_assert(__is_polymorphic(TestCEReactionsStringifier), "TestCEReactionsStringifier is not polymorphic");
+#endif
+#endif
+    // If you hit this assertion you either have a use after free bug, or
+    // TestCEReactionsStringifier has subclasses. If TestCEReactionsStringifier has subclasses that get passed
+    // to toJS() we currently require TestCEReactionsStringifier you to opt out of binding hardening
+    // by adding the SkipVTableValidation attribute to the interface IDL definition
+    RELEASE_ASSERT(actualVTablePointer == expectedVTablePointer);
+#endif
+    return createWrapper<TestCEReactionsStringifier>(globalObject, WTFMove(impl));
+}
+
+JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, TestCEReactionsStringifier& impl)
+{
+    return wrap(state, globalObject, impl);
+}
+
+TestCEReactionsStringifier* JSTestCEReactionsStringifier::toWrapped(JSC::JSValue value)
+{
+    if (auto* wrapper = jsDynamicCast<JSTestCEReactionsStringifier*>(value))
+        return &wrapper->wrapped();
+    return nullptr;
+}
+
+}

Added: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCEReactionsStringifier.h (0 => 207170)


--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCEReactionsStringifier.h	                        (rev 0)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCEReactionsStringifier.h	2016-10-11 22:07:50 UTC (rev 207170)
@@ -0,0 +1,90 @@
+/*
+    This file is part of the WebKit open source project.
+    This file has been generated by generate-bindings.pl. DO NOT MODIFY!
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Library General Public
+    License as published by the Free Software Foundation; either
+    version 2 of the License, or (at your option) any later version.
+
+    This library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Library General Public License for more details.
+
+    You should have received a copy of the GNU Library General Public License
+    along with this library; see the file COPYING.LIB.  If not, write to
+    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+    Boston, MA 02110-1301, USA.
+*/
+
+#pragma once
+
+#include "JSDOMWrapper.h"
+#include "TestCEReactionsStringifier.h"
+#include <wtf/NeverDestroyed.h>
+
+namespace WebCore {
+
+class JSTestCEReactionsStringifier : public JSDOMWrapper<TestCEReactionsStringifier> {
+public:
+    using Base = JSDOMWrapper<TestCEReactionsStringifier>;
+    static JSTestCEReactionsStringifier* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, Ref<TestCEReactionsStringifier>&& impl)
+    {
+        JSTestCEReactionsStringifier* ptr = new (NotNull, JSC::allocateCell<JSTestCEReactionsStringifier>(globalObject->vm().heap)) JSTestCEReactionsStringifier(structure, *globalObject, WTFMove(impl));
+        ptr->finishCreation(globalObject->vm());
+        return ptr;
+    }
+
+    static JSC::JSObject* createPrototype(JSC::VM&, JSC::JSGlobalObject*);
+    static JSC::JSObject* prototype(JSC::VM&, JSC::JSGlobalObject*);
+    static TestCEReactionsStringifier* toWrapped(JSC::JSValue);
+    static void destroy(JSC::JSCell*);
+
+    DECLARE_INFO;
+
+    static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
+    {
+        return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
+    }
+
+    static JSC::JSValue getConstructor(JSC::VM&, const JSC::JSGlobalObject*);
+    static JSTestCEReactionsStringifier* castForAttribute(JSC::ExecState*, JSC::EncodedJSValue);
+protected:
+    JSTestCEReactionsStringifier(JSC::Structure*, JSDOMGlobalObject&, Ref<TestCEReactionsStringifier>&&);
+
+    void finishCreation(JSC::VM& vm)
+    {
+        Base::finishCreation(vm);
+        ASSERT(inherits(info()));
+    }
+
+};
+
+class JSTestCEReactionsStringifierOwner : public JSC::WeakHandleOwner {
+public:
+    virtual bool isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown>, void* context, JSC::SlotVisitor&);
+    virtual void finalize(JSC::Handle<JSC::Unknown>, void* context);
+};
+
+inline JSC::WeakHandleOwner* wrapperOwner(DOMWrapperWorld&, TestCEReactionsStringifier*)
+{
+    static NeverDestroyed<JSTestCEReactionsStringifierOwner> owner;
+    return &owner.get();
+}
+
+inline void* wrapperKey(TestCEReactionsStringifier* wrappableObject)
+{
+    return wrappableObject;
+}
+
+JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestCEReactionsStringifier&);
+inline JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, TestCEReactionsStringifier* impl) { return impl ? toJS(state, globalObject, *impl) : JSC::jsNull(); }
+JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject*, Ref<TestCEReactionsStringifier>&&);
+inline JSC::JSValue toJSNewlyCreated(JSC::ExecState* state, JSDOMGlobalObject* globalObject, RefPtr<TestCEReactionsStringifier>&& impl) { return impl ? toJSNewlyCreated(state, globalObject, impl.releaseNonNull()) : JSC::jsNull(); }
+
+template<> struct JSDOMWrapperConverterTraits<TestCEReactionsStringifier> {
+    using WrapperClass = JSTestCEReactionsStringifier;
+};
+
+} // namespace WebCore

Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp (207169 => 207170)


--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp	2016-10-11 22:03:04 UTC (rev 207169)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp	2016-10-11 22:07:50 UTC (rev 207170)
@@ -22,7 +22,6 @@
 #include "JSTestObj.h"
 
 #include "CallbackFunction.h"
-#include "CustomElementReactionQueue.h"
 #include "DOMStringList.h"
 #include "Dictionary.h"
 #include "Document.h"
@@ -978,7 +977,6 @@
 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjConstructorFunctionTestStaticPromiseFunction(JSC::ExecState*);
 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjConstructorFunctionTestStaticPromiseFunctionWithException(JSC::ExecState*);
 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionTestCustomPromiseFunction(JSC::ExecState*);
-JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithNeedsCustomElementReactionStack(JSC::ExecState*);
 #if ENABLE(CONDITION1) || ENABLE(CONDITION2)
 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionConditionalOverload(JSC::ExecState*);
 #endif
@@ -1588,7 +1586,6 @@
     { "testPromiseFunctionWithOptionalIntArgument", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionTestPromiseFunctionWithOptionalIntArgument), (intptr_t) (0) } },
     { "testPromiseOverloadedFunction", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionTestPromiseOverloadedFunction), (intptr_t) (1) } },
     { "testCustomPromiseFunction", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionTestCustomPromiseFunction), (intptr_t) (0) } },
-    { "methodWithNeedsCustomElementReactionStack", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithNeedsCustomElementReactionStack), (intptr_t) (0) } },
 #if ENABLE(CONDITION1) || ENABLE(CONDITION2)
     { "conditionalOverload", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionConditionalOverload), (intptr_t) (1) } },
 #else
@@ -7422,24 +7419,6 @@
     return JSValue::encode(castedThis->testCustomPromiseFunction(*state));
 }
 
-EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithNeedsCustomElementReactionStack(ExecState* state)
-{
-    VM& vm = state->vm();
-    auto throwScope = DECLARE_THROW_SCOPE(vm);
-    UNUSED_PARAM(throwScope);
-#if ENABLE(CUSTOM_ELEMENTS)
-    CustomElementReactionStack customElementReactionStack;
-#endif
-    JSValue thisValue = state->thisValue();
-    auto castedThis = jsDynamicCast<JSTestObj*>(thisValue);
-    if (UNLIKELY(!castedThis))
-        return throwThisTypeError(*state, throwScope, "TestObject", "methodWithNeedsCustomElementReactionStack");
-    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    auto& impl = castedThis->wrapped();
-    impl.methodWithNeedsCustomElementReactionStack();
-    return JSValue::encode(jsUndefined());
-}
-
 #if ENABLE(CONDITION1)
 static inline EncodedJSValue jsTestObjPrototypeFunctionConditionalOverload1(ExecState* state)
 {

Added: trunk/Source/WebCore/bindings/scripts/test/TestCEReactions.idl (0 => 207170)


--- trunk/Source/WebCore/bindings/scripts/test/TestCEReactions.idl	                        (rev 0)
+++ trunk/Source/WebCore/bindings/scripts/test/TestCEReactions.idl	2016-10-11 22:07:50 UTC (rev 207170)
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary form, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ * 3.  Neither the name of Apple Inc. ("Apple") nor the names of
+ *     its contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+interface TestCEReactions {
+    [CEReactions] void methodWithCEReactions();
+    [CEReactions] attribute DOMString attributeWithCEReactions;
+    [CEReactions, Reflect] attribute DOMString reflectAttributeWithCEReactions;
+
+    [PutForwards=value] attribute TestCEReactionsStringifier stringifierAttribute;
+};
+

Added: trunk/Source/WebCore/bindings/scripts/test/TestCEReactionsStringifier.idl (0 => 207170)


--- trunk/Source/WebCore/bindings/scripts/test/TestCEReactionsStringifier.idl	                        (rev 0)
+++ trunk/Source/WebCore/bindings/scripts/test/TestCEReactionsStringifier.idl	2016-10-11 22:07:50 UTC (rev 207170)
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary form, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ * 3.  Neither the name of Apple Inc. ("Apple") nor the names of
+ *     its contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+interface TestCEReactionsStringifier {
+    [CEReactions] stringifier attribute DOMString value;
+};
\ No newline at end of file

Modified: trunk/Source/WebCore/bindings/scripts/test/TestObj.idl (207169 => 207170)


--- trunk/Source/WebCore/bindings/scripts/test/TestObj.idl	2016-10-11 22:03:04 UTC (rev 207169)
+++ trunk/Source/WebCore/bindings/scripts/test/TestObj.idl	2016-10-11 22:07:50 UTC (rev 207170)
@@ -401,10 +401,6 @@
     [PutForwards=name] readonly attribute TestNode? putForwardsNullableAttribute;
 
 #if defined(TESTING_JS)
-    [CEReactions] void methodWithNeedsCustomElementReactionStack();
-#endif
-
-#if defined(TESTING_JS)
     // Overloading with conditionals.
     [Conditional=CONDITION1] void conditionalOverload(DOMString str);
     [Conditional=CONDITION2] void conditionalOverload(long a);

Modified: trunk/Source/WebCore/dom/Attr.idl (207169 => 207170)


--- trunk/Source/WebCore/dom/Attr.idl	2016-10-11 22:03:04 UTC (rev 207169)
+++ trunk/Source/WebCore/dom/Attr.idl	2016-10-11 22:07:50 UTC (rev 207170)
@@ -27,7 +27,7 @@
 
     readonly attribute boolean specified;
 
-    [ImplementedAs=valueForBindings] attribute DOMString value;
+    [CEReactions, ImplementedAs=valueForBindings] attribute DOMString value;
 
     readonly attribute Element ownerElement;
 

Modified: trunk/Source/WebCore/dom/ChildNode.idl (207169 => 207170)


--- trunk/Source/WebCore/dom/ChildNode.idl	2016-10-11 22:03:04 UTC (rev 207169)
+++ trunk/Source/WebCore/dom/ChildNode.idl	2016-10-11 22:07:50 UTC (rev 207170)
@@ -22,8 +22,8 @@
 [
     NoInterfaceObject,
 ] interface ChildNode {
-    [Unscopable, MayThrowLegacyException] void before((Node or DOMString)... nodes);
-    [Unscopable, MayThrowLegacyException] void after((Node or DOMString)... nodes);
-    [Unscopable, MayThrowLegacyException] void replaceWith((Node or DOMString)... nodes);
-    [Unscopable, MayThrowLegacyException] void remove();
+    [CEReactions, Unscopable, MayThrowLegacyException] void before((Node or DOMString)... nodes);
+    [CEReactions, Unscopable, MayThrowLegacyException] void after((Node or DOMString)... nodes);
+    [CEReactions, Unscopable, MayThrowLegacyException] void replaceWith((Node or DOMString)... nodes);
+    [CEReactions, Unscopable, MayThrowLegacyException] void remove();
 };

Modified: trunk/Source/WebCore/dom/Document.idl (207169 => 207170)


--- trunk/Source/WebCore/dom/Document.idl	2016-10-11 22:03:04 UTC (rev 207169)
+++ trunk/Source/WebCore/dom/Document.idl	2016-10-11 22:07:50 UTC (rev 207170)
@@ -42,7 +42,7 @@
 
     HTMLCollection getElementsByTagName(DOMString tagname);
 
-    [NewObject, MayThrowLegacyException] Node importNode(Node importedNode, optional boolean deep = false);
+    [CEReactions, MayThrowLegacyException, NewObject] Node importNode(Node importedNode, optional boolean deep = false);
 
     [NewObject, MayThrowLegacyException] Element createElementNS(DOMString? namespaceURI, DOMString qualifiedName);
     [NewObject, MayThrowLegacyException] Attr createAttributeNS(DOMString? namespaceURI, DOMString qualifiedName);
@@ -55,7 +55,7 @@
     [SetterMayThrowLegacyException] attribute DOMString? xmlVersion;
     attribute boolean xmlStandalone;
 
-    [MayThrowLegacyException] Node adoptNode(Node source);
+    [CEReactions, MayThrowLegacyException] Node adoptNode(Node source);
 
     [ImplementedAs=urlForBindings] readonly attribute USVString documentURI;
 

Modified: trunk/Source/WebCore/dom/Element.idl (207169 => 207170)


--- trunk/Source/WebCore/dom/Element.idl	2016-10-11 22:03:04 UTC (rev 207169)
+++ trunk/Source/WebCore/dom/Element.idl	2016-10-11 22:07:50 UTC (rev 207170)
@@ -28,13 +28,13 @@
 
     DOMString? getAttribute(DOMString name);
 
-    [MayThrowLegacyException, CEReactions] void setAttribute(DOMString name, DOMString value);
+    [CEReactions, MayThrowLegacyException] void setAttribute(DOMString name, DOMString value);
 
     [CEReactions] void removeAttribute(DOMString name);
     Attr? getAttributeNode(DOMString name);
 
-    [MayThrowLegacyException, CEReactions] Attr? setAttributeNode(Attr newAttr);
-    [MayThrowLegacyException, CEReactions] Attr removeAttributeNode(Attr oldAttr);
+    [CEReactions, MayThrowLegacyException] Attr? setAttributeNode(Attr newAttr);
+    [CEReactions, MayThrowLegacyException] Attr removeAttributeNode(Attr oldAttr);
 
     HTMLCollection getElementsByTagName(DOMString name);
 
@@ -43,13 +43,13 @@
 
     DOMString? getAttributeNS(DOMString? namespaceURI, DOMString localName);
 
-    [MayThrowLegacyException, CEReactions] void setAttributeNS(DOMString? namespaceURI, DOMString qualifiedName, DOMString value);
+    [CEReactions, MayThrowLegacyException] void setAttributeNS(DOMString? namespaceURI, DOMString qualifiedName, DOMString value);
     [CEReactions] void removeAttributeNS(DOMString? namespaceURI, DOMString localName);
 
     HTMLCollection getElementsByTagNameNS(DOMString? namespaceURI, DOMString localName);
 
     Attr? getAttributeNodeNS(DOMString? namespaceURI, DOMString localName);
-    [MayThrowLegacyException, CEReactions] Attr? setAttributeNodeNS(Attr newAttr);
+    [CEReactions, MayThrowLegacyException] Attr? setAttributeNodeNS(Attr newAttr);
     boolean hasAttribute(DOMString name);
 
     boolean hasAttributeNS(DOMString? namespaceURI, DOMString localName);
@@ -56,7 +56,7 @@
 
     [ImplementedAs=cssomStyle] readonly attribute CSSStyleDeclaration style;
 
-    [Reflect] attribute DOMString id;
+    [CEReactions, Reflect] attribute DOMString id;
 
     readonly attribute DOMString? namespaceURI;
     readonly attribute DOMString? prefix;
@@ -100,7 +100,7 @@
     [TreatNullAs=EmptyString, SetterMayThrowLegacyException] attribute DOMString innerHTML;
     [TreatNullAs=EmptyString, SetterMayThrowLegacyException] attribute DOMString outerHTML;
 
-    [Reflect=class] attribute DOMString className;
+    [CEReactions, Reflect=class] attribute DOMString className;
     [PutForwards=value] readonly attribute DOMTokenList classList;
 
     [MayThrowLegacyException] boolean matches(DOMString selectors);
@@ -124,7 +124,7 @@
     [Reflect] attribute DOMString uiactions;
 #endif
 
-    [MayThrowLegacyException] Element insertAdjacentElement(DOMString where, Element element);
+    [CEReactions, MayThrowLegacyException] Element insertAdjacentElement(DOMString where, Element element);
     [MayThrowLegacyException] void insertAdjacentHTML(DOMString where, DOMString html);
     [MayThrowLegacyException] void insertAdjacentText(DOMString where, DOMString text);
 
@@ -137,7 +137,7 @@
     // Shadow DOM API
     [EnabledAtRuntime=ShadowDOM, MayThrowLegacyException] ShadowRoot attachShadow(ShadowRootInit init);
     [EnabledAtRuntime=ShadowDOM, ImplementedAs=shadowRootForBindings, CallWith=ScriptState] readonly attribute ShadowRoot shadowRoot;
-    [EnabledAtRuntime=ShadowDOM, Reflect] attribute DOMString slot;
+    [CEReactions, EnabledAtRuntime=ShadowDOM, Reflect] attribute DOMString slot;
 
     // Event Handlers
 

Modified: trunk/Source/WebCore/dom/NamedNodeMap.idl (207169 => 207170)


--- trunk/Source/WebCore/dom/NamedNodeMap.idl	2016-10-11 22:03:04 UTC (rev 207169)
+++ trunk/Source/WebCore/dom/NamedNodeMap.idl	2016-10-11 22:07:50 UTC (rev 207170)
@@ -26,10 +26,10 @@
     readonly attribute unsigned long length;
 
     getter Attr? getNamedItem(DOMString name);
-    [MayThrowLegacyException] Attr? setNamedItem(Attr attr);
-    [MayThrowLegacyException] Attr removeNamedItem(DOMString name);
+    [CEReactions, MayThrowLegacyException] Attr? setNamedItem(Attr attr);
+    [CEReactions, MayThrowLegacyException] Attr removeNamedItem(DOMString name);
     getter Attr? item(unsigned long index);
     Attr? getNamedItemNS(DOMString? namespaceURI, DOMString localName);
-    [MayThrowLegacyException, ImplementedAs=setNamedItem] Attr? setNamedItemNS(Attr attr);
-    [MayThrowLegacyException] Attr removeNamedItemNS(DOMString? namespaceURI, DOMString localName);
+    [CEReactions, MayThrowLegacyException, ImplementedAs=setNamedItem] Attr? setNamedItemNS(Attr attr);
+    [CEReactions, MayThrowLegacyException] Attr removeNamedItemNS(DOMString? namespaceURI, DOMString localName);
 };

Modified: trunk/Source/WebCore/dom/Node.idl (207169 => 207170)


--- trunk/Source/WebCore/dom/Node.idl	2016-10-11 22:03:04 UTC (rev 207169)
+++ trunk/Source/WebCore/dom/Node.idl	2016-10-11 22:07:50 UTC (rev 207170)
@@ -44,7 +44,7 @@
     readonly attribute DOMString nodeName;
 
     // FIXME: the spec says this can also raise on retrieval.
-    [SetterMayThrowLegacyException] attribute DOMString? nodeValue;
+    [CEReactions, SetterMayThrowLegacyException] attribute DOMString? nodeValue;
 
     readonly attribute unsigned short nodeType;
     [DOMJIT] readonly attribute Node? parentNode;
@@ -55,14 +55,14 @@
     [DOMJIT] readonly attribute Node? nextSibling;
     readonly attribute Document? ownerDocument;
 
-    [Custom, MayThrowLegacyException] Node insertBefore([CustomReturn] Node newChild, Node? refChild);
-    [Custom, MayThrowLegacyException] Node replaceChild(Node newChild, [CustomReturn] Node oldChild);
-    [Custom, MayThrowLegacyException, CEReactions] Node removeChild([CustomReturn] Node oldChild);
-    [Custom, MayThrowLegacyException, CEReactions] Node appendChild([CustomReturn] Node newChild);
+    [CEReactions, Custom, MayThrowLegacyException] Node insertBefore([CustomReturn] Node newChild, Node? refChild);
+    [CEReactions, Custom, MayThrowLegacyException] Node replaceChild(Node newChild, [CustomReturn] Node oldChild);
+    [CEReactions, Custom, MayThrowLegacyException] Node removeChild([CustomReturn] Node oldChild);
+    [CEReactions, Custom, MayThrowLegacyException] Node appendChild([CustomReturn] Node newChild);
 
     boolean hasChildNodes();
 
-    [NewObject, MayThrowLegacyException, ImplementedAs=cloneNodeForBindings, CEReactions] Node cloneNode(optional boolean deep = false);
+    [CEReactions, ImplementedAs=cloneNodeForBindings, MayThrowLegacyException, NewObject] Node cloneNode(optional boolean deep = false);
 
     void normalize();
 
@@ -69,7 +69,7 @@
     readonly attribute USVString baseURI;
 
     // FIXME: the spec says this can also raise on retrieval.
-    [SetterMayThrowLegacyException] attribute DOMString? textContent;
+    [CEReactions, SetterMayThrowLegacyException] attribute DOMString? textContent;
 
     boolean isSameNode(Node? other);
     boolean isEqualNode(Node? other);

Modified: trunk/Source/WebCore/dom/ParentNode.idl (207169 => 207170)


--- trunk/Source/WebCore/dom/ParentNode.idl	2016-10-11 22:03:04 UTC (rev 207169)
+++ trunk/Source/WebCore/dom/ParentNode.idl	2016-10-11 22:07:50 UTC (rev 207170)
@@ -33,8 +33,8 @@
     readonly attribute Element lastElementChild;
     readonly attribute unsigned long childElementCount;
 
-    [Unscopable, MayThrowLegacyException] void prepend((Node or DOMString)... nodes);
-    [Unscopable, MayThrowLegacyException] void append((Node or DOMString)... nodes);
+    [CEReactions, Unscopable, MayThrowLegacyException] void prepend((Node or DOMString)... nodes);
+    [CEReactions, Unscopable, MayThrowLegacyException] void append((Node or DOMString)... nodes);
 
     // [Unscopable] Element? query(DOMString relativeSelectors);
     // [NewObject, Unscopable] Elements queryAll(DOMString relativeSelectors);

Modified: trunk/Source/WebCore/dom/Range.idl (207169 => 207170)


--- trunk/Source/WebCore/dom/Range.idl	2016-10-11 22:03:04 UTC (rev 207169)
+++ trunk/Source/WebCore/dom/Range.idl	2016-10-11 22:07:50 UTC (rev 207170)
@@ -41,6 +41,8 @@
     [MayThrowLegacyException] void setEndBefore(Node refNode);
     [MayThrowLegacyException] void setEndAfter(Node refNode);
     void collapse(optional boolean toStart = false);
+    // FIXME: Using "undefined" as default parameter value is wrong.
+    [MayThrowLegacyException] void expand(optional DOMString unit = "undefined");
     [MayThrowLegacyException] void selectNode(Node refNode);
     [MayThrowLegacyException] void selectNodeContents(Node refNode);
 
@@ -52,11 +54,11 @@
 
     [MayThrowLegacyException, ImplementedAs=compareBoundaryPointsForBindings] short compareBoundaryPoints(unsigned short how, Range sourceRange);
 
-    [MayThrowLegacyException] void deleteContents();
-    [MayThrowLegacyException, NewObject] DocumentFragment extractContents();
-    [MayThrowLegacyException, NewObject] DocumentFragment cloneContents();
-    [MayThrowLegacyException] void insertNode(Node newNode);
-    [MayThrowLegacyException] void surroundContents(Node newParent);
+    [CEReactions, MayThrowLegacyException] void deleteContents();
+    [CEReactions, MayThrowLegacyException, NewObject] DocumentFragment extractContents();
+    [CEReactions, MayThrowLegacyException, NewObject] DocumentFragment cloneContents();
+    [CEReactions, MayThrowLegacyException] void insertNode(Node newNode);
+    [CEReactions, MayThrowLegacyException] void surroundContents(Node newParent);
     [NewObject] Range cloneRange();
     DOMString toString();
 
@@ -79,7 +81,4 @@
 
     [MayThrowLegacyException] short comparePoint(Node refNode, unsigned long offset);
     [MayThrowLegacyException] boolean isPointInRange(Node refNode, unsigned long offset);
-
-    // FIXME: Using "undefined" as default parameter value is wrong.
-    [MayThrowLegacyException] void expand(optional DOMString unit = "undefined");
 };

Modified: trunk/Source/WebCore/html/DOMTokenList.idl (207169 => 207170)


--- trunk/Source/WebCore/html/DOMTokenList.idl	2016-10-11 22:03:04 UTC (rev 207169)
+++ trunk/Source/WebCore/html/DOMTokenList.idl	2016-10-11 22:07:50 UTC (rev 207170)
@@ -30,13 +30,13 @@
     readonly attribute unsigned long length;
     getter DOMString? item(unsigned long index);
     boolean contains(DOMString token);
-    [MayThrowLegacyException] void add(DOMString... tokens);
-    [MayThrowLegacyException] void remove(DOMString... tokens);
-    [MayThrowLegacyException] boolean toggle(DOMString token, optional boolean force);
-    [MayThrowLegacyException] void replace(DOMString token, DOMString newToken);
+    [CEReactions, MayThrowLegacyException] void add(DOMString... tokens);
+    [CEReactions, MayThrowLegacyException] void remove(DOMString... tokens);
+    [CEReactions, MayThrowLegacyException] boolean toggle(DOMString token, optional boolean force);
+    [CEReactions, MayThrowLegacyException] void replace(DOMString token, DOMString newToken);
     [MayThrowLegacyException] boolean supports(DOMString token);
 
     iterable<DOMString>;
 
-    stringifier attribute DOMString value;
+    [CEReactions] stringifier attribute DOMString value;
 };
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to