<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[208082] trunk</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/208082">208082</a></dd>
<dt>Author</dt> <dd>rniwa@webkit.org</dd>
<dt>Date</dt> <dd>2016-10-28 16:49:46 -0700 (Fri, 28 Oct 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Add CEReactions to the remaining HTML DOM APIs
https://bugs.webkit.org/show_bug.cgi?id=163969

Reviewed by Chris Dumez.

Source/WebCore:

Added CEReactions to the remaining DOM and HTML APIs as needed.

Tests: fast/custom-elements/reactions-for-indieui.html
       fast/custom-elements/reactions/Document.html
       fast/custom-elements/reactions/HTMLAnchorElement.html
       fast/custom-elements/reactions/HTMLOptionElement.html
       fast/custom-elements/reactions/HTMLOptionsCollection.html
       fast/custom-elements/reactions/HTMLOutputElement.html
       fast/custom-elements/reactions/HTMLSelectElement.html
       fast/custom-elements/reactions/HTMLTableElement.html
       fast/custom-elements/reactions/HTMLTableRowElement.html
       fast/custom-elements/reactions/HTMLTableSectionElement.html
       fast/custom-elements/reactions/HTMLTitleElement.html
       fast/custom-elements/reactions/ShadowRoot.html

* bindings/js/JSHTMLOptionsCollectionCustom.cpp:
(WebCore::JSHTMLOptionsCollection::setLength):
(WebCore::JSHTMLOptionsCollection::indexSetter):
* bindings/js/JSHTMLSelectElementCustom.cpp:
(WebCore::JSHTMLSelectElement::indexSetter):
* dom/CharacterData.idl:
* dom/Document.idl:
* dom/Element.idl:
* dom/ShadowRoot.idl:
* html/HTMLAnchorElement.idl:
* html/HTMLDocument.idl:
* html/HTMLOptionElement.idl:
* html/HTMLOptionsCollection.idl:
* html/HTMLOutputElement.idl:
* html/HTMLSelectElement.idl:
* html/HTMLTableElement.idl:
* html/HTMLTableRowElement.idl:
* html/HTMLTableSectionElement.idl:
* html/HTMLTitleElement.idl:

LayoutTests:

Added W3C style testharness.js tests for CEReactions to various HTMLElements under fast/custom-elements/reactions.
Also added some WebKit specific tests using the same harness outside that directory.

* fast/custom-elements/reactions-for-indieui-expected.txt: Added.
* fast/custom-elements/reactions-for-indieui.html: Added.
* fast/custom-elements/reactions-for-webkit-extensions-expected.txt:
* fast/custom-elements/reactions-for-webkit-extensions.html:
* fast/custom-elements/reactions/Document-expected.txt: Added.
* fast/custom-elements/reactions/Document.html: Added.
* fast/custom-elements/reactions/HTMLAnchorElement-expected.txt: Added.
* fast/custom-elements/reactions/HTMLAnchorElement.html: Added.
* fast/custom-elements/reactions/HTMLOptionElement-expected.txt: Added.
* fast/custom-elements/reactions/HTMLOptionElement.html: Added.
* fast/custom-elements/reactions/HTMLOptionsCollection-expected.txt: Added.
* fast/custom-elements/reactions/HTMLOptionsCollection.html: Added.
* fast/custom-elements/reactions/HTMLOutputElement-expected.txt: Added.
* fast/custom-elements/reactions/HTMLOutputElement.html: Added.
* fast/custom-elements/reactions/HTMLSelectElement-expected.txt: Added.
* fast/custom-elements/reactions/HTMLSelectElement.html: Added.
* fast/custom-elements/reactions/HTMLTableElement-expected.txt: Added.
* fast/custom-elements/reactions/HTMLTableElement.html: Added.
* fast/custom-elements/reactions/HTMLTableRowElement-expected.txt: Added.
* fast/custom-elements/reactions/HTMLTableRowElement.html: Added.
* fast/custom-elements/reactions/HTMLTableSectionElement-expected.txt: Added.
* fast/custom-elements/reactions/HTMLTableSectionElement.html: Added.
* fast/custom-elements/reactions/HTMLTitleElement-expected.txt: Added.
* fast/custom-elements/reactions/HTMLTitleElement.html: Added.
* fast/custom-elements/reactions/ShadowRoot-expected.txt: Added.
* fast/custom-elements/reactions/ShadowRoot.html: Added.
* fast/custom-elements/resources/additional-helpers.js: Added.
* fast/custom-elements/upgrading-enqueue-reactions-expected.txt:
* fast/custom-elements/upgrading-enqueue-reactions.html:
* platform/efl/TestExpectations:
* platform/gtk/TestExpectations:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsfastcustomelementsreactionsforwebkitextensionsexpectedtxt">trunk/LayoutTests/fast/custom-elements/reactions-for-webkit-extensions-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastcustomelementsreactionsforwebkitextensionshtml">trunk/LayoutTests/fast/custom-elements/reactions-for-webkit-extensions.html</a></li>
<li><a href="#trunkLayoutTestsfastcustomelementsupgradingenqueuereactionsexpectedtxt">trunk/LayoutTests/fast/custom-elements/upgrading-enqueue-reactions-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastcustomelementsupgradingenqueuereactionshtml">trunk/LayoutTests/fast/custom-elements/upgrading-enqueue-reactions.html</a></li>
<li><a href="#trunkLayoutTestsplatformeflTestExpectations">trunk/LayoutTests/platform/efl/TestExpectations</a></li>
<li><a href="#trunkLayoutTestsplatformgtkTestExpectations">trunk/LayoutTests/platform/gtk/TestExpectations</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSHTMLOptionsCollectionCustomcpp">trunk/Source/WebCore/bindings/js/JSHTMLOptionsCollectionCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSHTMLSelectElementCustomcpp">trunk/Source/WebCore/bindings/js/JSHTMLSelectElementCustom.cpp</a></li>
<li><a href="#trunkSourceWebCoredomCharacterDataidl">trunk/Source/WebCore/dom/CharacterData.idl</a></li>
<li><a href="#trunkSourceWebCoredomDocumentidl">trunk/Source/WebCore/dom/Document.idl</a></li>
<li><a href="#trunkSourceWebCoredomElementidl">trunk/Source/WebCore/dom/Element.idl</a></li>
<li><a href="#trunkSourceWebCoredomShadowRootidl">trunk/Source/WebCore/dom/ShadowRoot.idl</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLAnchorElementidl">trunk/Source/WebCore/html/HTMLAnchorElement.idl</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLDocumentidl">trunk/Source/WebCore/html/HTMLDocument.idl</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLOptionElementidl">trunk/Source/WebCore/html/HTMLOptionElement.idl</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLOptionsCollectionidl">trunk/Source/WebCore/html/HTMLOptionsCollection.idl</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLOutputElementidl">trunk/Source/WebCore/html/HTMLOutputElement.idl</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLSelectElementidl">trunk/Source/WebCore/html/HTMLSelectElement.idl</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLTableElementidl">trunk/Source/WebCore/html/HTMLTableElement.idl</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLTableRowElementidl">trunk/Source/WebCore/html/HTMLTableRowElement.idl</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLTableSectionElementidl">trunk/Source/WebCore/html/HTMLTableSectionElement.idl</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLTitleElementidl">trunk/Source/WebCore/html/HTMLTitleElement.idl</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li>trunk/LayoutTests/fast/custom-elements/reactions/</li>
<li><a href="#trunkLayoutTestsfastcustomelementsreactionsDocumentexpectedtxt">trunk/LayoutTests/fast/custom-elements/reactions/Document-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastcustomelementsreactionsDocumenthtml">trunk/LayoutTests/fast/custom-elements/reactions/Document.html</a></li>
<li><a href="#trunkLayoutTestsfastcustomelementsreactionsHTMLAnchorElementexpectedtxt">trunk/LayoutTests/fast/custom-elements/reactions/HTMLAnchorElement-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastcustomelementsreactionsHTMLAnchorElementhtml">trunk/LayoutTests/fast/custom-elements/reactions/HTMLAnchorElement.html</a></li>
<li><a href="#trunkLayoutTestsfastcustomelementsreactionsHTMLOptionElementexpectedtxt">trunk/LayoutTests/fast/custom-elements/reactions/HTMLOptionElement-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastcustomelementsreactionsHTMLOptionElementhtml">trunk/LayoutTests/fast/custom-elements/reactions/HTMLOptionElement.html</a></li>
<li><a href="#trunkLayoutTestsfastcustomelementsreactionsHTMLOptionsCollectionexpectedtxt">trunk/LayoutTests/fast/custom-elements/reactions/HTMLOptionsCollection-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastcustomelementsreactionsHTMLOptionsCollectionhtml">trunk/LayoutTests/fast/custom-elements/reactions/HTMLOptionsCollection.html</a></li>
<li><a href="#trunkLayoutTestsfastcustomelementsreactionsHTMLOutputElementexpectedtxt">trunk/LayoutTests/fast/custom-elements/reactions/HTMLOutputElement-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastcustomelementsreactionsHTMLOutputElementhtml">trunk/LayoutTests/fast/custom-elements/reactions/HTMLOutputElement.html</a></li>
<li><a href="#trunkLayoutTestsfastcustomelementsreactionsHTMLSelectElementexpectedtxt">trunk/LayoutTests/fast/custom-elements/reactions/HTMLSelectElement-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastcustomelementsreactionsHTMLSelectElementhtml">trunk/LayoutTests/fast/custom-elements/reactions/HTMLSelectElement.html</a></li>
<li><a href="#trunkLayoutTestsfastcustomelementsreactionsHTMLTableElementexpectedtxt">trunk/LayoutTests/fast/custom-elements/reactions/HTMLTableElement-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastcustomelementsreactionsHTMLTableElementhtml">trunk/LayoutTests/fast/custom-elements/reactions/HTMLTableElement.html</a></li>
<li><a href="#trunkLayoutTestsfastcustomelementsreactionsHTMLTableRowElementexpectedtxt">trunk/LayoutTests/fast/custom-elements/reactions/HTMLTableRowElement-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastcustomelementsreactionsHTMLTableRowElementhtml">trunk/LayoutTests/fast/custom-elements/reactions/HTMLTableRowElement.html</a></li>
<li><a href="#trunkLayoutTestsfastcustomelementsreactionsHTMLTableSectionElementexpectedtxt">trunk/LayoutTests/fast/custom-elements/reactions/HTMLTableSectionElement-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastcustomelementsreactionsHTMLTableSectionElementhtml">trunk/LayoutTests/fast/custom-elements/reactions/HTMLTableSectionElement.html</a></li>
<li><a href="#trunkLayoutTestsfastcustomelementsreactionsHTMLTitleElementexpectedtxt">trunk/LayoutTests/fast/custom-elements/reactions/HTMLTitleElement-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastcustomelementsreactionsHTMLTitleElementhtml">trunk/LayoutTests/fast/custom-elements/reactions/HTMLTitleElement.html</a></li>
<li><a href="#trunkLayoutTestsfastcustomelementsreactionsShadowRootexpectedtxt">trunk/LayoutTests/fast/custom-elements/reactions/ShadowRoot-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastcustomelementsreactionsShadowRoothtml">trunk/LayoutTests/fast/custom-elements/reactions/ShadowRoot.html</a></li>
<li><a href="#trunkLayoutTestsfastcustomelementsreactionsforindieuiexpectedtxt">trunk/LayoutTests/fast/custom-elements/reactions-for-indieui-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastcustomelementsreactionsforindieuihtml">trunk/LayoutTests/fast/custom-elements/reactions-for-indieui.html</a></li>
<li><a href="#trunkLayoutTestsfastcustomelementsresourcesadditionalhelpersjs">trunk/LayoutTests/fast/custom-elements/resources/additional-helpers.js</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (208081 => 208082)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-10-28 23:39:36 UTC (rev 208081)
+++ trunk/LayoutTests/ChangeLog        2016-10-28 23:49:46 UTC (rev 208082)
</span><span class="lines">@@ -1,3 +1,45 @@
</span><ins>+2016-10-28  Ryosuke Niwa  &lt;rniwa@webkit.org&gt;
+
+        Add CEReactions to the remaining HTML DOM APIs
+        https://bugs.webkit.org/show_bug.cgi?id=163969
+
+        Reviewed by Chris Dumez.
+
+        Added W3C style testharness.js tests for CEReactions to various HTMLElements under fast/custom-elements/reactions.
+        Also added some WebKit specific tests using the same harness outside that directory.
+
+        * fast/custom-elements/reactions-for-indieui-expected.txt: Added.
+        * fast/custom-elements/reactions-for-indieui.html: Added.
+        * fast/custom-elements/reactions-for-webkit-extensions-expected.txt:
+        * fast/custom-elements/reactions-for-webkit-extensions.html:
+        * fast/custom-elements/reactions/Document-expected.txt: Added.
+        * fast/custom-elements/reactions/Document.html: Added.
+        * fast/custom-elements/reactions/HTMLAnchorElement-expected.txt: Added.
+        * fast/custom-elements/reactions/HTMLAnchorElement.html: Added.
+        * fast/custom-elements/reactions/HTMLOptionElement-expected.txt: Added.
+        * fast/custom-elements/reactions/HTMLOptionElement.html: Added.
+        * fast/custom-elements/reactions/HTMLOptionsCollection-expected.txt: Added.
+        * fast/custom-elements/reactions/HTMLOptionsCollection.html: Added.
+        * fast/custom-elements/reactions/HTMLOutputElement-expected.txt: Added.
+        * fast/custom-elements/reactions/HTMLOutputElement.html: Added.
+        * fast/custom-elements/reactions/HTMLSelectElement-expected.txt: Added.
+        * fast/custom-elements/reactions/HTMLSelectElement.html: Added.
+        * fast/custom-elements/reactions/HTMLTableElement-expected.txt: Added.
+        * fast/custom-elements/reactions/HTMLTableElement.html: Added.
+        * fast/custom-elements/reactions/HTMLTableRowElement-expected.txt: Added.
+        * fast/custom-elements/reactions/HTMLTableRowElement.html: Added.
+        * fast/custom-elements/reactions/HTMLTableSectionElement-expected.txt: Added.
+        * fast/custom-elements/reactions/HTMLTableSectionElement.html: Added.
+        * fast/custom-elements/reactions/HTMLTitleElement-expected.txt: Added.
+        * fast/custom-elements/reactions/HTMLTitleElement.html: Added.
+        * fast/custom-elements/reactions/ShadowRoot-expected.txt: Added.
+        * fast/custom-elements/reactions/ShadowRoot.html: Added.
+        * fast/custom-elements/resources/additional-helpers.js: Added.
+        * fast/custom-elements/upgrading-enqueue-reactions-expected.txt:
+        * fast/custom-elements/upgrading-enqueue-reactions.html:
+        * platform/efl/TestExpectations:
+        * platform/gtk/TestExpectations:
+
</ins><span class="cx"> 2016-10-28  Antoine Quint  &lt;graouts@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [Modern Media Controls] Media Controller: volume control support
</span></span></pre></div>
<a id="trunkLayoutTestsfastcustomelementsreactionsDocumentexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/custom-elements/reactions/Document-expected.txt (0 => 208082)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/custom-elements/reactions/Document-expected.txt                                (rev 0)
+++ trunk/LayoutTests/fast/custom-elements/reactions/Document-expected.txt        2016-10-28 23:49:46 UTC (rev 208082)
</span><span class="lines">@@ -0,0 +1,10 @@
</span><ins>+
+PASS title on Document must enqueue disconnectedCallback when removing a custom element 
+PASS body on Document must enqueue disconnectedCallback when removing a custom element 
+PASS body on Document must enqueue connectedCallback when inserting a custom element 
+PASS open on Document must enqueue disconnectedCallback when removing a custom element 
+PASS write on Document must enqueue disconnectedCallback when removing a custom element 
+PASS write on Document must enqueue connectedCallback after constructing a custom element 
+PASS writeln on Document must enqueue disconnectedCallback when removing a custom element 
+PASS writeln on Document must enqueue connectedCallback after constructing a custom element 
+
</ins></span></pre></div>
<a id="trunkLayoutTestsfastcustomelementsreactionsDocumenthtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/custom-elements/reactions/Document.html (0 => 208082)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/custom-elements/reactions/Document.html                                (rev 0)
+++ trunk/LayoutTests/fast/custom-elements/reactions/Document.html        2016-10-28 23:49:46 UTC (rev 208082)
</span><span class="lines">@@ -0,0 +1,112 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;title&gt;Custom Elements: CEReactions on Document interface&lt;/title&gt;
+&lt;meta name=&quot;author&quot; title=&quot;Ryosuke Niwa&quot; href=&quot;mailto:rniwa@webkit.org&quot;&gt;
+&lt;meta name=&quot;assert&quot; content=&quot;title, body, open, write, and writeln of Document interface must have CEReactions&quot;&gt;
+&lt;meta name=&quot;help&quot; content=&quot;https://dom.spec.whatwg.org/#node&quot;&gt;
+&lt;script src=&quot;../../../resources/testharness.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../../../resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../../../imported/w3c/web-platform-tests/custom-elements/resources/custom-elements-helpers.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../../../imported/w3c/web-platform-tests/custom-elements/reactions/resources/reactions.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/additional-helpers.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;div id=&quot;log&quot;&gt;&lt;/div&gt;
+&lt;script&gt;
+
+test_with_window(function (contentWindow) {
+    const element = define_custom_element_in_window(contentWindow, 'custom-element', []);
+
+    const contentDocument = contentWindow.document;
+    contentDocument.title = '';
+    const title = contentDocument.querySelector('title');
+    const instance = document.createElement('custom-element');
+    title.appendChild(instance);
+    instance.textContent = 'hello';
+
+    assert_array_equals(element.takeLog().types(), ['constructed', 'connected']);
+    assert_equals(title.innerHTML, '&lt;custom-element&gt;hello&lt;/custom-element&gt;');
+
+    title.text = 'world';
+    assert_equals(title.innerHTML, 'world');
+    assert_array_equals(element.takeLog().types(), ['disconnected']);
+}, 'title on Document must enqueue disconnectedCallback when removing a custom element');
+
+test_with_window(function (contentWindow) {
+    const element = define_custom_element_in_window(contentWindow, 'custom-element', []);
+
+    const contentDocument = contentWindow.document;
+    const body = contentDocument.body;
+    body.innerHTML = '&lt;custom-element&gt;hello&lt;/custom-element&gt;';
+
+    assert_array_equals(element.takeLog().types(), ['constructed', 'connected']);
+    assert_equals(body.innerHTML, '&lt;custom-element&gt;hello&lt;/custom-element&gt;');
+
+    contentDocument.body = document.createElement('body');
+    assert_array_equals(element.takeLog().types(), ['disconnected']);
+}, 'body on Document must enqueue disconnectedCallback when removing a custom element');
+
+test_with_window(function (contentWindow) {
+    const element = define_custom_element_in_window(contentWindow, 'custom-element', []);
+
+    const contentDocument = contentWindow.document;
+    const instance = contentDocument.createElement('custom-element');
+    const body = contentDocument.createElement('body');
+    body.appendChild(instance);
+
+    assert_array_equals(element.takeLog().types(), ['constructed']);
+    assert_equals(body.innerHTML, '&lt;custom-element&gt;&lt;/custom-element&gt;');
+
+    contentDocument.body = body;
+    assert_array_equals(element.takeLog().types(), ['connected']);
+}, 'body on Document must enqueue connectedCallback when inserting a custom element');
+
+test_with_window(function (contentWindow) {
+    const element = define_custom_element_in_window(contentWindow, 'custom-element', []);
+
+    const contentDocument = contentWindow.document;
+    contentDocument.body.innerHTML = '&lt;custom-element&gt;&lt;/custom-element&gt;';
+    assert_array_equals(element.takeLog().types(), ['constructed', 'connected']);
+
+    contentDocument.open();
+    assert_array_equals(element.takeLog().types(), ['disconnected']);
+}, 'open on Document must enqueue disconnectedCallback when removing a custom element');
+
+test_with_window(function (contentWindow) {
+    const element = define_custom_element_in_window(contentWindow, 'custom-element', []);
+
+    const contentDocument = contentWindow.document;
+    contentDocument.body.innerHTML = '&lt;custom-element&gt;&lt;/custom-element&gt;';
+    assert_array_equals(element.takeLog().types(), ['constructed', 'connected']);
+
+    contentDocument.write('');
+    assert_array_equals(element.takeLog().types(), ['disconnected']);
+}, 'write on Document must enqueue disconnectedCallback when removing a custom element');
+
+test_with_window(function (contentWindow) {
+    const element = define_custom_element_in_window(contentWindow, 'custom-element', []);
+    contentWindow.document.write('&lt;custom-element&gt;&lt;/custom-element&gt;');
+    assert_array_equals(element.takeLog().types(), ['constructed', 'connected']);
+}, 'write on Document must enqueue connectedCallback after constructing a custom element');
+
+test_with_window(function (contentWindow) {
+    const element = define_custom_element_in_window(contentWindow, 'custom-element', []);
+
+    const contentDocument = contentWindow.document;
+    contentDocument.body.innerHTML = '&lt;custom-element&gt;&lt;/custom-element&gt;';
+    assert_array_equals(element.takeLog().types(), ['constructed', 'connected']);
+
+    contentDocument.writeln('');
+    assert_array_equals(element.takeLog().types(), ['disconnected']);
+}, 'writeln on Document must enqueue disconnectedCallback when removing a custom element');
+
+test_with_window(function (contentWindow) {
+    const element = define_custom_element_in_window(contentWindow, 'custom-element', []);
+    contentWindow.document.writeln('&lt;custom-element&gt;&lt;/custom-element&gt;');
+    assert_array_equals(element.takeLog().types(), ['constructed', 'connected']);
+}, 'writeln on Document must enqueue connectedCallback after constructing a custom element');
+
+&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastcustomelementsreactionsHTMLAnchorElementexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/custom-elements/reactions/HTMLAnchorElement-expected.txt (0 => 208082)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/custom-elements/reactions/HTMLAnchorElement-expected.txt                                (rev 0)
+++ trunk/LayoutTests/fast/custom-elements/reactions/HTMLAnchorElement-expected.txt        2016-10-28 23:49:46 UTC (rev 208082)
</span><span class="lines">@@ -0,0 +1,3 @@
</span><ins>+
+PASS text on HTMLAnchorElement must enqueue disconnectedCallback when removing a custom element 
+
</ins></span></pre></div>
<a id="trunkLayoutTestsfastcustomelementsreactionsHTMLAnchorElementhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/custom-elements/reactions/HTMLAnchorElement.html (0 => 208082)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/custom-elements/reactions/HTMLAnchorElement.html                                (rev 0)
+++ trunk/LayoutTests/fast/custom-elements/reactions/HTMLAnchorElement.html        2016-10-28 23:49:46 UTC (rev 208082)
</span><span class="lines">@@ -0,0 +1,35 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;title&gt;Custom Elements: CEReactions on HTMLAnchorElement interface&lt;/title&gt;
+&lt;meta name=&quot;author&quot; title=&quot;Ryosuke Niwa&quot; href=&quot;mailto:rniwa@webkit.org&quot;&gt;
+&lt;meta name=&quot;assert&quot; content=&quot;text of HTMLAnchorElement interface must have CEReactions&quot;&gt;
+&lt;meta name=&quot;help&quot; content=&quot;https://dom.spec.whatwg.org/#node&quot;&gt;
+&lt;script src=&quot;../../../resources/testharness.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../../../resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../../../imported/w3c/web-platform-tests/custom-elements/resources/custom-elements-helpers.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../../../imported/w3c/web-platform-tests/custom-elements/reactions/resources/reactions.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/additional-helpers.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;div id=&quot;log&quot;&gt;&lt;/div&gt;
+&lt;script&gt;
+
+test_with_window(function (contentWindow) {
+    const element = define_custom_element_in_window(contentWindow, 'custom-element', []);
+
+    const contentDocument = contentWindow.document;
+    contentDocument.body.innerHTML = `&lt;a&gt;&lt;custom-element&gt;hello&lt;/custom-element&gt;&lt;/a&gt;`;
+    const anchor = contentDocument.querySelector('a');
+
+    assert_array_equals(element.takeLog().types(), ['constructed', 'connected']);
+    assert_equals(anchor.innerHTML, '&lt;custom-element&gt;hello&lt;/custom-element&gt;');
+
+    anchor.text = 'world';
+    assert_equals(anchor.innerHTML, 'world');
+    assert_array_equals(element.takeLog().types(), ['disconnected']);
+}, 'text on HTMLAnchorElement must enqueue disconnectedCallback when removing a custom element');
+
+&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastcustomelementsreactionsHTMLOptionElementexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/custom-elements/reactions/HTMLOptionElement-expected.txt (0 => 208082)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/custom-elements/reactions/HTMLOptionElement-expected.txt                                (rev 0)
+++ trunk/LayoutTests/fast/custom-elements/reactions/HTMLOptionElement-expected.txt        2016-10-28 23:49:46 UTC (rev 208082)
</span><span class="lines">@@ -0,0 +1,3 @@
</span><ins>+
+PASS text on HTMLOptionElement must enqueue disconnectedCallback when removing a custom element 
+
</ins></span></pre></div>
<a id="trunkLayoutTestsfastcustomelementsreactionsHTMLOptionElementhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/custom-elements/reactions/HTMLOptionElement.html (0 => 208082)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/custom-elements/reactions/HTMLOptionElement.html                                (rev 0)
+++ trunk/LayoutTests/fast/custom-elements/reactions/HTMLOptionElement.html        2016-10-28 23:49:46 UTC (rev 208082)
</span><span class="lines">@@ -0,0 +1,38 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;title&gt;Custom Elements: CEReactions on HTMLOptionElement interface&lt;/title&gt;
+&lt;meta name=&quot;author&quot; title=&quot;Ryosuke Niwa&quot; href=&quot;mailto:rniwa@webkit.org&quot;&gt;
+&lt;meta name=&quot;assert&quot; content=&quot;text of HTMLOptionElement interface must have CEReactions&quot;&gt;
+&lt;meta name=&quot;help&quot; content=&quot;https://dom.spec.whatwg.org/#node&quot;&gt;
+&lt;script src=&quot;../../../resources/testharness.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../../../resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../../../imported/w3c/web-platform-tests/custom-elements/resources/custom-elements-helpers.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../../../imported/w3c/web-platform-tests/custom-elements/reactions/resources/reactions.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/additional-helpers.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;div id=&quot;log&quot;&gt;&lt;/div&gt;
+&lt;script&gt;
+
+test_with_window(function (contentWindow) {
+    const element = define_custom_element_in_window(contentWindow, 'custom-element', []);
+
+    const contentDocument = contentWindow.document;
+    contentDocument.body.innerHTML = `&lt;select&gt;&lt;option&gt;&lt;/option&gt;&lt;/select&gt;`;
+    const option = contentDocument.querySelector('option');
+    const instance = document.createElement('custom-element');
+    option.appendChild(instance);
+    instance.textContent = 'hello';
+
+    assert_array_equals(element.takeLog().types(), ['constructed', 'connected']);
+    assert_equals(option.innerHTML, '&lt;custom-element&gt;hello&lt;/custom-element&gt;');
+
+    option.text = 'world';
+    assert_equals(option.innerHTML, 'world');
+    assert_array_equals(element.takeLog().types(), ['disconnected']);
+}, 'text on HTMLOptionElement must enqueue disconnectedCallback when removing a custom element');
+
+&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastcustomelementsreactionsHTMLOptionsCollectionexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/custom-elements/reactions/HTMLOptionsCollection-expected.txt (0 => 208082)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/custom-elements/reactions/HTMLOptionsCollection-expected.txt                                (rev 0)
+++ trunk/LayoutTests/fast/custom-elements/reactions/HTMLOptionsCollection-expected.txt        2016-10-28 23:49:46 UTC (rev 208082)
</span><span class="lines">@@ -0,0 +1,7 @@
</span><ins>+
+PASS length on HTMLOptionsCollection must enqueue disconnectedCallback when removing a custom element 
+PASS The indexed setter on HTMLOptionsCollection must enqueue connectedCallback when inserting a custom element 
+PASS The indexed setter on HTMLOptionsCollection must enqueue disconnectedCallback when removing a custom element 
+PASS add on HTMLOptionsCollection must enqueue connectedCallback when inserting a custom element 
+PASS remove on HTMLOptionsCollection must enqueue disconnectedCallback when removing a custom element 
+
</ins></span></pre></div>
<a id="trunkLayoutTestsfastcustomelementsreactionsHTMLOptionsCollectionhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/custom-elements/reactions/HTMLOptionsCollection.html (0 => 208082)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/custom-elements/reactions/HTMLOptionsCollection.html                                (rev 0)
+++ trunk/LayoutTests/fast/custom-elements/reactions/HTMLOptionsCollection.html        2016-10-28 23:49:46 UTC (rev 208082)
</span><span class="lines">@@ -0,0 +1,125 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;title&gt;Custom Elements: CEReactions on HTMLOptionsCollection interface&lt;/title&gt;
+&lt;meta name=&quot;author&quot; title=&quot;Ryosuke Niwa&quot; href=&quot;mailto:rniwa@webkit.org&quot;&gt;
+&lt;meta name=&quot;assert&quot; content=&quot;length, the indexed setter, add, and remove of HTMLOptionsCollection interface must have CEReactions&quot;&gt;
+&lt;meta name=&quot;help&quot; content=&quot;https://dom.spec.whatwg.org/#node&quot;&gt;
+&lt;script src=&quot;../../../resources/testharness.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../../../resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../../../imported/w3c/web-platform-tests/custom-elements/resources/custom-elements-helpers.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../../../imported/w3c/web-platform-tests/custom-elements/reactions/resources/reactions.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/additional-helpers.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;div id=&quot;log&quot;&gt;&lt;/div&gt;
+&lt;script&gt;
+
+test_with_window(function (contentWindow) {
+    const element = define_custom_element_in_window(contentWindow, 'custom-element', []);
+
+    const contentDocument = contentWindow.document;
+    contentDocument.body.innerHTML = `&lt;select&gt;&lt;option&gt;&lt;/option&gt;&lt;/select&gt;`;
+    const option = contentDocument.querySelector('option');
+
+    const instance = contentDocument.createElement(element.name);
+    option.appendChild(instance);
+    instance.textContent = 'hello';
+
+    assert_array_equals(element.takeLog().types(), ['constructed', 'connected']);
+    assert_equals(option.innerHTML, '&lt;custom-element&gt;hello&lt;/custom-element&gt;');
+
+    const select = contentDocument.querySelector('select');
+    assert_equals(select.options[0], option);
+    select.options.length = 0;
+    assert_equals(select.firstChild, null);
+    assert_array_equals(element.takeLog().types(), ['disconnected']);
+}, 'length on HTMLOptionsCollection must enqueue disconnectedCallback when removing a custom element');
+
+test_with_window(function (contentWindow) {
+    const element = define_custom_element_in_window(contentWindow, 'custom-element', []);
+
+    const contentDocument = contentWindow.document;
+    contentDocument.body.innerHTML = `&lt;select&gt;&lt;/select&gt;`;
+    const select = contentDocument.querySelector('select');
+
+    const option = contentDocument.createElement('option');
+    const instance = contentDocument.createElement(element.name);
+    option.appendChild(instance);
+    instance.textContent = 'hello';
+
+    assert_array_equals(element.takeLog().types(), ['constructed']);
+    assert_equals(option.innerHTML, '&lt;custom-element&gt;hello&lt;/custom-element&gt;');
+
+    assert_equals(select.options.length, 0);
+    select.options[0] = option;
+    assert_equals(select.options.length, 1);
+    assert_array_equals(element.takeLog().types(), ['connected']);
+}, 'The indexed setter on HTMLOptionsCollection must enqueue connectedCallback when inserting a custom element');
+
+test_with_window(function (contentWindow) {
+    const element = define_custom_element_in_window(contentWindow, 'custom-element', []);
+
+    const contentDocument = contentWindow.document;
+    contentDocument.body.innerHTML = `&lt;select&gt;&lt;option&gt;&lt;/option&gt;&lt;/select&gt;`;
+    const option = contentDocument.querySelector('option');
+
+    const instance = contentDocument.createElement(element.name);
+    option.appendChild(instance);
+    instance.textContent = 'hello';
+
+    assert_array_equals(element.takeLog().types(), ['constructed', 'connected']);
+    assert_equals(option.innerHTML, '&lt;custom-element&gt;hello&lt;/custom-element&gt;');
+
+    const select = contentDocument.querySelector('select');
+    assert_equals(select.options[0], option);
+    select.options[0] = null;
+    assert_equals(select.options.length, 0);
+    assert_array_equals(element.takeLog().types(), ['disconnected']);
+}, 'The indexed setter on HTMLOptionsCollection must enqueue disconnectedCallback when removing a custom element');
+
+test_with_window(function (contentWindow) {
+    const element = define_custom_element_in_window(contentWindow, 'custom-element', []);
+
+    const contentDocument = contentWindow.document;
+    contentDocument.body.innerHTML = `&lt;select&gt;&lt;/select&gt;`;
+    const select = contentDocument.querySelector('select');
+
+    const option = contentDocument.createElement('option');
+    const instance = contentDocument.createElement(element.name);
+    option.appendChild(instance);
+    instance.textContent = 'hello';
+
+    assert_array_equals(element.takeLog().types(), ['constructed']);
+    assert_equals(option.innerHTML, '&lt;custom-element&gt;hello&lt;/custom-element&gt;');
+
+    assert_equals(select.options.length, 0);
+    select.options.add(option);
+    assert_equals(select.options.length, 1);
+    assert_array_equals(element.takeLog().types(), ['connected']);
+}, 'add on HTMLOptionsCollection must enqueue connectedCallback when inserting a custom element');
+
+test_with_window(function (contentWindow) {
+    const element = define_custom_element_in_window(contentWindow, 'custom-element', []);
+
+    const contentDocument = contentWindow.document;
+    contentDocument.body.innerHTML = `&lt;select&gt;&lt;option&gt;&lt;/option&gt;&lt;/select&gt;`;
+    const option = contentDocument.querySelector('option');
+
+    const instance = contentDocument.createElement(element.name);
+    option.appendChild(instance);
+    instance.textContent = 'hello';
+
+    assert_array_equals(element.takeLog().types(), ['constructed', 'connected']);
+    assert_equals(option.innerHTML, '&lt;custom-element&gt;hello&lt;/custom-element&gt;');
+
+    const select = contentDocument.querySelector('select');
+    assert_equals(select.options[0], option);
+    select.options.remove(0);
+    assert_equals(select.options.length, 0);
+    assert_array_equals(element.takeLog().types(), ['disconnected']);
+}, 'remove on HTMLOptionsCollection must enqueue disconnectedCallback when removing a custom element');
+
+&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastcustomelementsreactionsHTMLOutputElementexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/custom-elements/reactions/HTMLOutputElement-expected.txt (0 => 208082)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/custom-elements/reactions/HTMLOutputElement-expected.txt                                (rev 0)
+++ trunk/LayoutTests/fast/custom-elements/reactions/HTMLOutputElement-expected.txt        2016-10-28 23:49:46 UTC (rev 208082)
</span><span class="lines">@@ -0,0 +1,4 @@
</span><ins>+
+PASS value on HTMLOutputElement must enqueue disconnectedCallback when removing a custom element 
+PASS defaultValue on HTMLOutputElement must enqueue disconnectedCallback when removing a custom element 
+
</ins></span></pre></div>
<a id="trunkLayoutTestsfastcustomelementsreactionsHTMLOutputElementhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/custom-elements/reactions/HTMLOutputElement.html (0 => 208082)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/custom-elements/reactions/HTMLOutputElement.html                                (rev 0)
+++ trunk/LayoutTests/fast/custom-elements/reactions/HTMLOutputElement.html        2016-10-28 23:49:46 UTC (rev 208082)
</span><span class="lines">@@ -0,0 +1,50 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;title&gt;Custom Elements: CEReactions on HTMLOutputElement interface&lt;/title&gt;
+&lt;meta name=&quot;author&quot; title=&quot;Ryosuke Niwa&quot; href=&quot;mailto:rniwa@webkit.org&quot;&gt;
+&lt;meta name=&quot;assert&quot; content=&quot;value and defaultValue of HTMLOutputElement interface must have CEReactions&quot;&gt;
+&lt;meta name=&quot;help&quot; content=&quot;https://dom.spec.whatwg.org/#node&quot;&gt;
+&lt;script src=&quot;../../../resources/testharness.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../../../resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../../../imported/w3c/web-platform-tests/custom-elements/resources/custom-elements-helpers.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../../../imported/w3c/web-platform-tests/custom-elements/reactions/resources/reactions.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/additional-helpers.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;div id=&quot;log&quot;&gt;&lt;/div&gt;
+&lt;script&gt;
+
+test_with_window(function (contentWindow) {
+    const element = define_custom_element_in_window(contentWindow, 'custom-element', []);
+
+    const contentDocument = contentWindow.document;
+    contentDocument.body.innerHTML = `&lt;output&gt;&lt;custom-element&gt;hello&lt;/custom-element&gt;&lt;/output&gt;`;
+    const anchor = contentDocument.querySelector('output');
+
+    assert_array_equals(element.takeLog().types(), ['constructed', 'connected']);
+    assert_equals(anchor.innerHTML, '&lt;custom-element&gt;hello&lt;/custom-element&gt;');
+
+    anchor.value = 'world';
+    assert_equals(anchor.innerHTML, 'world');
+    assert_array_equals(element.takeLog().types(), ['disconnected']);
+}, 'value on HTMLOutputElement must enqueue disconnectedCallback when removing a custom element');
+
+test_with_window(function (contentWindow) {
+    const element = define_custom_element_in_window(contentWindow, 'custom-element', []);
+
+    const contentDocument = contentWindow.document;
+    contentDocument.body.innerHTML = `&lt;output&gt;&lt;custom-element&gt;hello&lt;/custom-element&gt;&lt;/output&gt;`;
+    const anchor = contentDocument.querySelector('output');
+
+    assert_array_equals(element.takeLog().types(), ['constructed', 'connected']);
+    assert_equals(anchor.innerHTML, '&lt;custom-element&gt;hello&lt;/custom-element&gt;');
+
+    anchor.defaultValue = 'world';
+    assert_equals(anchor.innerHTML, 'world');
+    assert_array_equals(element.takeLog().types(), ['disconnected']);
+}, 'defaultValue on HTMLOutputElement must enqueue disconnectedCallback when removing a custom element');
+
+&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastcustomelementsreactionsHTMLSelectElementexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/custom-elements/reactions/HTMLSelectElement-expected.txt (0 => 208082)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/custom-elements/reactions/HTMLSelectElement-expected.txt                                (rev 0)
+++ trunk/LayoutTests/fast/custom-elements/reactions/HTMLSelectElement-expected.txt        2016-10-28 23:49:46 UTC (rev 208082)
</span><span class="lines">@@ -0,0 +1,7 @@
</span><ins>+
+PASS length on HTMLSelectElement must enqueue disconnectedCallback when removing a custom element 
+PASS The indexed setter on HTMLSelectElement must enqueue connectedCallback when inserting a custom element 
+PASS The indexed setter on HTMLSelectElement must enqueue disconnectedCallback when removing a custom element 
+PASS add on HTMLSelectElement must enqueue connectedCallback when inserting a custom element 
+PASS remove on HTMLSelectElement must enqueue disconnectedCallback when removing a custom element 
+
</ins></span></pre></div>
<a id="trunkLayoutTestsfastcustomelementsreactionsHTMLSelectElementhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/custom-elements/reactions/HTMLSelectElement.html (0 => 208082)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/custom-elements/reactions/HTMLSelectElement.html                                (rev 0)
+++ trunk/LayoutTests/fast/custom-elements/reactions/HTMLSelectElement.html        2016-10-28 23:49:46 UTC (rev 208082)
</span><span class="lines">@@ -0,0 +1,125 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;title&gt;Custom Elements: CEReactions on HTMLSelectElement interface&lt;/title&gt;
+&lt;meta name=&quot;author&quot; title=&quot;Ryosuke Niwa&quot; href=&quot;mailto:rniwa@webkit.org&quot;&gt;
+&lt;meta name=&quot;assert&quot; content=&quot;length, add, remove, and the setter of HTMLSelectElement interface must have CEReactions&quot;&gt;
+&lt;meta name=&quot;help&quot; content=&quot;https://dom.spec.whatwg.org/#node&quot;&gt;
+&lt;script src=&quot;../../../resources/testharness.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../../../resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../../../imported/w3c/web-platform-tests/custom-elements/resources/custom-elements-helpers.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../../../imported/w3c/web-platform-tests/custom-elements/reactions/resources/reactions.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/additional-helpers.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;div id=&quot;log&quot;&gt;&lt;/div&gt;
+&lt;script&gt;
+
+test_with_window(function (contentWindow) {
+    const element = define_custom_element_in_window(contentWindow, 'custom-element', []);
+
+    const contentDocument = contentWindow.document;
+    contentDocument.body.innerHTML = `&lt;select&gt;&lt;option&gt;&lt;/option&gt;&lt;/select&gt;`;
+    const option = contentDocument.querySelector('option');
+
+    const instance = contentDocument.createElement(element.name);
+    option.appendChild(instance);
+    instance.textContent = 'hello';
+
+    assert_array_equals(element.takeLog().types(), ['constructed', 'connected']);
+    assert_equals(option.innerHTML, '&lt;custom-element&gt;hello&lt;/custom-element&gt;');
+
+    const select = contentDocument.querySelector('select');
+    assert_equals(select.length, 1);
+    select.length = 0;
+    assert_equals(select.firstChild, null);
+    assert_array_equals(element.takeLog().types(), ['disconnected']);
+}, 'length on HTMLSelectElement must enqueue disconnectedCallback when removing a custom element');
+
+test_with_window(function (contentWindow) {
+    const element = define_custom_element_in_window(contentWindow, 'custom-element', []);
+
+    const contentDocument = contentWindow.document;
+    contentDocument.body.innerHTML = `&lt;select&gt;&lt;/select&gt;`;
+    const select = contentDocument.querySelector('select');
+
+    const option = contentDocument.createElement('option');
+    const instance = contentDocument.createElement(element.name);
+    option.appendChild(instance);
+    instance.textContent = 'hello';
+
+    assert_array_equals(element.takeLog().types(), ['constructed']);
+    assert_equals(option.innerHTML, '&lt;custom-element&gt;hello&lt;/custom-element&gt;');
+
+    assert_equals(select.options.length, 0);
+    select[0] = option;
+    assert_equals(select.options.length, 1);
+    assert_array_equals(element.takeLog().types(), ['connected']);
+}, 'The indexed setter on HTMLSelectElement must enqueue connectedCallback when inserting a custom element');
+
+test_with_window(function (contentWindow) {
+    const element = define_custom_element_in_window(contentWindow, 'custom-element', []);
+
+    const contentDocument = contentWindow.document;
+    contentDocument.body.innerHTML = `&lt;select&gt;&lt;option&gt;&lt;/option&gt;&lt;/select&gt;`;
+    const option = contentDocument.querySelector('option');
+
+    const instance = contentDocument.createElement(element.name);
+    option.appendChild(instance);
+    instance.textContent = 'hello';
+
+    assert_array_equals(element.takeLog().types(), ['constructed', 'connected']);
+    assert_equals(option.innerHTML, '&lt;custom-element&gt;hello&lt;/custom-element&gt;');
+
+    const select = contentDocument.querySelector('select');
+    assert_equals(select.options[0], option);
+    select[0] = null;
+    assert_equals(select.options.length, 0);
+    assert_array_equals(element.takeLog().types(), ['disconnected']);
+}, 'The indexed setter on HTMLSelectElement must enqueue disconnectedCallback when removing a custom element');
+
+test_with_window(function (contentWindow) {
+    const element = define_custom_element_in_window(contentWindow, 'custom-element', []);
+
+    const contentDocument = contentWindow.document;
+    contentDocument.body.innerHTML = `&lt;select&gt;&lt;/select&gt;`;
+    const select = contentDocument.querySelector('select');
+
+    const option = contentDocument.createElement('option');
+    const instance = contentDocument.createElement(element.name);
+    option.appendChild(instance);
+    instance.textContent = 'hello';
+
+    assert_array_equals(element.takeLog().types(), ['constructed']);
+    assert_equals(option.innerHTML, '&lt;custom-element&gt;hello&lt;/custom-element&gt;');
+
+    assert_equals(select.options.length, 0);
+    select.add(option);
+    assert_equals(select.options.length, 1);
+    assert_array_equals(element.takeLog().types(), ['connected']);
+}, 'add on HTMLSelectElement must enqueue connectedCallback when inserting a custom element');
+
+test_with_window(function (contentWindow) {
+    const element = define_custom_element_in_window(contentWindow, 'custom-element', []);
+
+    const contentDocument = contentWindow.document;
+    contentDocument.body.innerHTML = `&lt;select&gt;&lt;option&gt;&lt;/option&gt;&lt;/select&gt;`;
+    const option = contentDocument.querySelector('option');
+
+    const instance = contentDocument.createElement(element.name);
+    option.appendChild(instance);
+    instance.textContent = 'hello';
+
+    assert_array_equals(element.takeLog().types(), ['constructed', 'connected']);
+    assert_equals(option.innerHTML, '&lt;custom-element&gt;hello&lt;/custom-element&gt;');
+
+    const select = contentDocument.querySelector('select');
+    assert_equals(select.options[0], option);
+    select.remove(0);
+    assert_equals(select.options.length, 0);
+    assert_array_equals(element.takeLog().types(), ['disconnected']);
+}, 'remove on HTMLSelectElement must enqueue disconnectedCallback when removing a custom element');
+
+&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastcustomelementsreactionsHTMLTableElementexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/custom-elements/reactions/HTMLTableElement-expected.txt (0 => 208082)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/custom-elements/reactions/HTMLTableElement-expected.txt                                (rev 0)
+++ trunk/LayoutTests/fast/custom-elements/reactions/HTMLTableElement-expected.txt        2016-10-28 23:49:46 UTC (rev 208082)
</span><span class="lines">@@ -0,0 +1,12 @@
</span><ins>+
+PASS caption on HTMLTableElement must enqueue connectedCallback when inserting a custom element 
+PASS caption on HTMLTableElement must enqueue disconnectedCallback when removing a custom element 
+PASS deleteCaption() on HTMLTableElement must enqueue disconnectedCallback when removing a custom element 
+PASS tHead on HTMLTableElement must enqueue connectedCallback when inserting a custom element 
+PASS tHead on HTMLTableElement must enqueue disconnectedCallback when removing a custom element 
+PASS deleteTHead() on HTMLTableElement must enqueue disconnectedCallback when removing a custom element 
+PASS tFoot on HTMLTableElement must enqueue connectedCallback when inserting a custom element 
+PASS tFoot on HTMLTableElement must enqueue disconnectedCallback when removing a custom element 
+PASS deleteTFoot() on HTMLTableElement must enqueue disconnectedCallback when removing a custom element 
+PASS deleteRow() on HTMLTableElement must enqueue disconnectedCallback when removing a custom element 
+
</ins></span></pre></div>
<a id="trunkLayoutTestsfastcustomelementsreactionsHTMLTableElementhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/custom-elements/reactions/HTMLTableElement.html (0 => 208082)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/custom-elements/reactions/HTMLTableElement.html                                (rev 0)
+++ trunk/LayoutTests/fast/custom-elements/reactions/HTMLTableElement.html        2016-10-28 23:49:46 UTC (rev 208082)
</span><span class="lines">@@ -0,0 +1,194 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;title&gt;Custom Elements: CEReactions on HTMLTableElement interface&lt;/title&gt;
+&lt;meta name=&quot;author&quot; title=&quot;Ryosuke Niwa&quot; href=&quot;mailto:rniwa@webkit.org&quot;&gt;
+&lt;meta name=&quot;assert&quot; content=&quot;caption, deleteCaption, thead, deleteTHead, tFoot, deleteTFoot, and deleteRow of HTMLTableElement interface must have CEReactions&quot;&gt;
+&lt;meta name=&quot;help&quot; content=&quot;https://dom.spec.whatwg.org/#node&quot;&gt;
+&lt;script src=&quot;../../../resources/testharness.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../../../resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../../../imported/w3c/web-platform-tests/custom-elements/resources/custom-elements-helpers.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../../../imported/w3c/web-platform-tests/custom-elements/reactions/resources/reactions.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/additional-helpers.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;div id=&quot;log&quot;&gt;&lt;/div&gt;
+&lt;script&gt;
+
+test_with_window(function (contentWindow) {
+    const element = define_custom_element_in_window(contentWindow, 'custom-element', []);
+
+    const contentDocument = contentWindow.document;
+    contentDocument.body.innerHTML = `&lt;table&gt;&lt;/table&gt;`;
+    const table = contentDocument.querySelector('table');
+
+    const caption = contentDocument.createElement('caption');
+    caption.innerHTML = '&lt;custom-element&gt;hello&lt;/custom-element&gt;';
+
+    assert_array_equals(element.takeLog().types(), ['constructed']);
+    assert_equals(caption.innerHTML, '&lt;custom-element&gt;hello&lt;/custom-element&gt;');
+
+    assert_equals(table.caption, null);
+    table.caption = caption;
+    assert_array_equals(element.takeLog().types(), ['connected']);
+}, 'caption on HTMLTableElement must enqueue connectedCallback when inserting a custom element');
+
+test_with_window(function (contentWindow) {
+    const element = define_custom_element_in_window(contentWindow, 'custom-element', []);
+
+    const contentDocument = contentWindow.document;
+    contentDocument.body.innerHTML = `&lt;table&gt;&lt;caption&gt;&lt;custom-element&gt;hello&lt;/custom-element&gt;&lt;/caption&gt;&lt;/table&gt;`;
+    const caption = contentDocument.querySelector('caption');
+    assert_array_equals(element.takeLog().types(), ['constructed', 'connected']);
+    assert_equals(caption.innerHTML, '&lt;custom-element&gt;hello&lt;/custom-element&gt;');
+
+    const table = contentDocument.querySelector('table');
+    assert_equals(table.caption, caption);
+    const newCaption = contentDocument.createElement('caption');
+    table.caption = newCaption; // Chrome doesn't support setting to null.
+    assert_equals(table.caption, newCaption);
+    assert_array_equals(element.takeLog().types(), ['disconnected']);
+}, 'caption on HTMLTableElement must enqueue disconnectedCallback when removing a custom element');
+
+test_with_window(function (contentWindow) {
+    const element = define_custom_element_in_window(contentWindow, 'custom-element', []);
+
+    const contentDocument = contentWindow.document;
+    contentDocument.body.innerHTML = `&lt;table&gt;&lt;caption&gt;&lt;custom-element&gt;hello&lt;/custom-element&gt;&lt;/caption&gt;&lt;/table&gt;`;
+    const caption = contentDocument.querySelector('caption');
+    assert_array_equals(element.takeLog().types(), ['constructed', 'connected']);
+    assert_equals(caption.innerHTML, '&lt;custom-element&gt;hello&lt;/custom-element&gt;');
+
+    const table = contentDocument.querySelector('table');
+    assert_equals(table.caption, caption);
+    const newCaption = contentDocument.createElement('caption');
+    table.deleteCaption();
+    assert_equals(table.caption, null);
+    assert_array_equals(element.takeLog().types(), ['disconnected']);
+}, 'deleteCaption() on HTMLTableElement must enqueue disconnectedCallback when removing a custom element');
+
+
+test_with_window(function (contentWindow) {
+    const element = define_custom_element_in_window(contentWindow, 'custom-element', []);
+
+    const contentDocument = contentWindow.document;
+    contentDocument.body.innerHTML = `&lt;table&gt;&lt;/table&gt;`;
+    const table = contentDocument.querySelector('table');
+
+    const thead = contentDocument.createElement('thead');
+    thead.innerHTML = '&lt;tr&gt;&lt;td&gt;&lt;custom-element&gt;hello&lt;/custom-element&gt;&lt;/td&gt;&lt;/tr&gt;';
+
+    assert_array_equals(element.takeLog().types(), ['constructed']);
+    assert_equals(thead.innerHTML, '&lt;tr&gt;&lt;td&gt;&lt;custom-element&gt;hello&lt;/custom-element&gt;&lt;/td&gt;&lt;/tr&gt;');
+
+    assert_equals(table.tHead, null);
+    table.tHead = thead;
+    assert_array_equals(element.takeLog().types(), ['connected']);
+}, 'tHead on HTMLTableElement must enqueue connectedCallback when inserting a custom element');
+
+test_with_window(function (contentWindow) {
+    const element = define_custom_element_in_window(contentWindow, 'custom-element', []);
+
+    const contentDocument = contentWindow.document;
+    contentDocument.body.innerHTML = `&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;td&gt;&lt;custom-element&gt;hello&lt;/custom-element&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;/table&gt;`;
+    const thead = contentDocument.querySelector('thead');
+    assert_array_equals(element.takeLog().types(), ['constructed', 'connected']);
+    assert_equals(thead.innerHTML, '&lt;tr&gt;&lt;td&gt;&lt;custom-element&gt;hello&lt;/custom-element&gt;&lt;/td&gt;&lt;/tr&gt;');
+
+    const table = contentDocument.querySelector('table');
+    assert_equals(table.tHead, thead);
+    const newThead = contentDocument.createElement('thead');
+    table.tHead = newThead; // Chrome doesn't support setting to null.
+    assert_equals(table.tHead, newThead);
+    assert_array_equals(element.takeLog().types(), ['disconnected']);
+}, 'tHead on HTMLTableElement must enqueue disconnectedCallback when removing a custom element');
+
+test_with_window(function (contentWindow) {
+    const element = define_custom_element_in_window(contentWindow, 'custom-element', []);
+
+    const contentDocument = contentWindow.document;
+    contentDocument.body.innerHTML = `&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;td&gt;&lt;custom-element&gt;hello&lt;/custom-element&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;/table&gt;`;
+    const thead = contentDocument.querySelector('thead');
+    assert_array_equals(element.takeLog().types(), ['constructed', 'connected']);
+    assert_equals(thead.innerHTML, '&lt;tr&gt;&lt;td&gt;&lt;custom-element&gt;hello&lt;/custom-element&gt;&lt;/td&gt;&lt;/tr&gt;');
+
+    const table = contentDocument.querySelector('table');
+    assert_equals(table.tHead, thead);
+    table.deleteTHead();
+    assert_equals(table.tHead, null);
+    assert_array_equals(element.takeLog().types(), ['disconnected']);
+}, 'deleteTHead() on HTMLTableElement must enqueue disconnectedCallback when removing a custom element');
+
+
+test_with_window(function (contentWindow) {
+    const element = define_custom_element_in_window(contentWindow, 'custom-element', []);
+
+    const contentDocument = contentWindow.document;
+    contentDocument.body.innerHTML = `&lt;table&gt;&lt;/table&gt;`;
+    const table = contentDocument.querySelector('table');
+
+    const tfoot = contentDocument.createElement('tfoot');
+    tfoot.innerHTML = '&lt;tr&gt;&lt;td&gt;&lt;custom-element&gt;hello&lt;/custom-element&gt;&lt;/td&gt;&lt;/tr&gt;';
+
+    assert_array_equals(element.takeLog().types(), ['constructed']);
+    assert_equals(tfoot.innerHTML, '&lt;tr&gt;&lt;td&gt;&lt;custom-element&gt;hello&lt;/custom-element&gt;&lt;/td&gt;&lt;/tr&gt;');
+
+    assert_equals(table.tFoot, null);
+    table.tFoot = tfoot;
+    assert_array_equals(element.takeLog().types(), ['connected']);
+}, 'tFoot on HTMLTableElement must enqueue connectedCallback when inserting a custom element');
+
+test_with_window(function (contentWindow) {
+    const element = define_custom_element_in_window(contentWindow, 'custom-element', []);
+
+    const contentDocument = contentWindow.document;
+    contentDocument.body.innerHTML = `&lt;table&gt;&lt;tfoot&gt;&lt;tr&gt;&lt;td&gt;&lt;custom-element&gt;hello&lt;/custom-element&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tfoot&gt;&lt;/table&gt;`;
+    const tfoot = contentDocument.querySelector('tfoot');
+    assert_array_equals(element.takeLog().types(), ['constructed', 'connected']);
+    assert_equals(tfoot.innerHTML, '&lt;tr&gt;&lt;td&gt;&lt;custom-element&gt;hello&lt;/custom-element&gt;&lt;/td&gt;&lt;/tr&gt;');
+
+    const table = contentDocument.querySelector('table');
+    assert_equals(table.tFoot, tfoot);
+    const newThead = contentDocument.createElement('tfoot');
+    table.tFoot = newThead; // Chrome doesn't support setting to null.
+    assert_equals(table.tFoot, newThead);
+    assert_array_equals(element.takeLog().types(), ['disconnected']);
+}, 'tFoot on HTMLTableElement must enqueue disconnectedCallback when removing a custom element');
+
+test_with_window(function (contentWindow) {
+    const element = define_custom_element_in_window(contentWindow, 'custom-element', []);
+
+    const contentDocument = contentWindow.document;
+    contentDocument.body.innerHTML = `&lt;table&gt;&lt;tfoot&gt;&lt;tr&gt;&lt;td&gt;&lt;custom-element&gt;hello&lt;/custom-element&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tfoot&gt;&lt;/table&gt;`;
+    const tfoot = contentDocument.querySelector('tfoot');
+    assert_array_equals(element.takeLog().types(), ['constructed', 'connected']);
+    assert_equals(tfoot.innerHTML, '&lt;tr&gt;&lt;td&gt;&lt;custom-element&gt;hello&lt;/custom-element&gt;&lt;/td&gt;&lt;/tr&gt;');
+
+    const table = contentDocument.querySelector('table');
+    assert_equals(table.tFoot, tfoot);
+    table.deleteTFoot();
+    assert_equals(table.tFoot, null);
+    assert_array_equals(element.takeLog().types(), ['disconnected']);
+}, 'deleteTFoot() on HTMLTableElement must enqueue disconnectedCallback when removing a custom element');
+
+
+test_with_window(function (contentWindow) {
+    const element = define_custom_element_in_window(contentWindow, 'custom-element', []);
+
+    const contentDocument = contentWindow.document;
+    contentDocument.body.innerHTML = `&lt;table&gt;&lt;tr&gt;&lt;td&gt;&lt;custom-element&gt;hello&lt;/custom-element&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;`;
+    const tr = contentDocument.querySelector('tr');
+    assert_array_equals(element.takeLog().types(), ['constructed', 'connected']);
+    assert_equals(tr.innerHTML, '&lt;td&gt;&lt;custom-element&gt;hello&lt;/custom-element&gt;&lt;/td&gt;');
+
+    const table = contentDocument.querySelector('table');
+    assert_equals(table.rows.length, 1);
+    assert_equals(table.rows[0], tr);
+    table.deleteRow(0);
+    assert_equals(table.rows.length, 0);
+    assert_array_equals(element.takeLog().types(), ['disconnected']);
+}, 'deleteRow() on HTMLTableElement must enqueue disconnectedCallback when removing a custom element');
+
+&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastcustomelementsreactionsHTMLTableRowElementexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/custom-elements/reactions/HTMLTableRowElement-expected.txt (0 => 208082)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/custom-elements/reactions/HTMLTableRowElement-expected.txt                                (rev 0)
+++ trunk/LayoutTests/fast/custom-elements/reactions/HTMLTableRowElement-expected.txt        2016-10-28 23:49:46 UTC (rev 208082)
</span><span class="lines">@@ -0,0 +1,3 @@
</span><ins>+
+PASS deleteCell() on HTMLTableRowElement must enqueue disconnectedCallback when removing a custom element 
+
</ins></span></pre></div>
<a id="trunkLayoutTestsfastcustomelementsreactionsHTMLTableRowElementhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/custom-elements/reactions/HTMLTableRowElement.html (0 => 208082)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/custom-elements/reactions/HTMLTableRowElement.html                                (rev 0)
+++ trunk/LayoutTests/fast/custom-elements/reactions/HTMLTableRowElement.html        2016-10-28 23:49:46 UTC (rev 208082)
</span><span class="lines">@@ -0,0 +1,37 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;title&gt;Custom Elements: CEReactions on HTMLTableRowElement interface&lt;/title&gt;
+&lt;meta name=&quot;author&quot; title=&quot;Ryosuke Niwa&quot; href=&quot;mailto:rniwa@webkit.org&quot;&gt;
+&lt;meta name=&quot;assert&quot; content=&quot;deleteCell of HTMLTableRowElement interface must have CEReactions&quot;&gt;
+&lt;meta name=&quot;help&quot; content=&quot;https://dom.spec.whatwg.org/#node&quot;&gt;
+&lt;script src=&quot;../../../resources/testharness.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../../../resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../../../imported/w3c/web-platform-tests/custom-elements/resources/custom-elements-helpers.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../../../imported/w3c/web-platform-tests/custom-elements/reactions/resources/reactions.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/additional-helpers.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;div id=&quot;log&quot;&gt;&lt;/div&gt;
+&lt;script&gt;
+
+test_with_window(function (contentWindow) {
+    const element = define_custom_element_in_window(contentWindow, 'custom-element', []);
+
+    const contentDocument = contentWindow.document;
+    contentDocument.body.innerHTML = `&lt;table&gt;&lt;tr&gt;&lt;td&gt;&lt;custom-element&gt;hello&lt;/custom-element&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;`;
+    const td = contentDocument.querySelector('td');
+    assert_array_equals(element.takeLog().types(), ['constructed', 'connected']);
+    assert_equals(td.innerHTML, '&lt;custom-element&gt;hello&lt;/custom-element&gt;');
+
+    const table = contentDocument.querySelector('table');
+    const row = table.rows[0];
+    assert_equals(row.cells[0], td);
+    row.deleteCell(0);
+    assert_equals(row.cells.length, 0);
+    assert_array_equals(element.takeLog().types(), ['disconnected']);
+}, 'deleteCell() on HTMLTableRowElement must enqueue disconnectedCallback when removing a custom element');
+
+&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastcustomelementsreactionsHTMLTableSectionElementexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/custom-elements/reactions/HTMLTableSectionElement-expected.txt (0 => 208082)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/custom-elements/reactions/HTMLTableSectionElement-expected.txt                                (rev 0)
+++ trunk/LayoutTests/fast/custom-elements/reactions/HTMLTableSectionElement-expected.txt        2016-10-28 23:49:46 UTC (rev 208082)
</span><span class="lines">@@ -0,0 +1,4 @@
</span><ins>+
+PASS deleteRow() on HTMLTableSectionElement on thead must enqueue disconnectedCallback when removing a custom element 
+PASS deleteRow() on HTMLTableSectionElement on tfoot must enqueue disconnectedCallback when removing a custom element 
+
</ins></span></pre></div>
<a id="trunkLayoutTestsfastcustomelementsreactionsHTMLTableSectionElementhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/custom-elements/reactions/HTMLTableSectionElement.html (0 => 208082)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/custom-elements/reactions/HTMLTableSectionElement.html                                (rev 0)
+++ trunk/LayoutTests/fast/custom-elements/reactions/HTMLTableSectionElement.html        2016-10-28 23:49:46 UTC (rev 208082)
</span><span class="lines">@@ -0,0 +1,50 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;title&gt;Custom Elements: CEReactions on HTMLTableSectionElement interface&lt;/title&gt;
+&lt;meta name=&quot;author&quot; title=&quot;Ryosuke Niwa&quot; href=&quot;mailto:rniwa@webkit.org&quot;&gt;
+&lt;meta name=&quot;assert&quot; content=&quot;deleteRow of HTMLTableSectionElement interface must have CEReactions&quot;&gt;
+&lt;meta name=&quot;help&quot; content=&quot;https://dom.spec.whatwg.org/#node&quot;&gt;
+&lt;script src=&quot;../../../resources/testharness.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../../../resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../../../imported/w3c/web-platform-tests/custom-elements/resources/custom-elements-helpers.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../../../imported/w3c/web-platform-tests/custom-elements/reactions/resources/reactions.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/additional-helpers.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;div id=&quot;log&quot;&gt;&lt;/div&gt;
+&lt;script&gt;
+
+test_with_window(function (contentWindow) {
+    const element = define_custom_element_in_window(contentWindow, 'custom-element', []);
+
+    const contentDocument = contentWindow.document;
+    contentDocument.body.innerHTML = `&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;td&gt;&lt;custom-element&gt;hello&lt;/custom-element&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;/table&gt;`;
+    const thead = contentDocument.querySelector('thead');
+    assert_array_equals(element.takeLog().types(), ['constructed', 'connected']);
+    assert_equals(thead.innerHTML, '&lt;tr&gt;&lt;td&gt;&lt;custom-element&gt;hello&lt;/custom-element&gt;&lt;/td&gt;&lt;/tr&gt;');
+
+    const table = contentDocument.querySelector('table');
+    assert_equals(table.tHead, thead);
+    table.tHead.deleteRow(0);
+    assert_array_equals(element.takeLog().types(), ['disconnected']);
+}, 'deleteRow() on HTMLTableSectionElement on thead must enqueue disconnectedCallback when removing a custom element');
+
+test_with_window(function (contentWindow) {
+    const element = define_custom_element_in_window(contentWindow, 'custom-element', []);
+
+    const contentDocument = contentWindow.document;
+    contentDocument.body.innerHTML = `&lt;table&gt;&lt;tfoot&gt;&lt;tr&gt;&lt;td&gt;&lt;custom-element&gt;hello&lt;/custom-element&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tfoot&gt;&lt;/table&gt;`;
+    const tfoot = contentDocument.querySelector('tfoot');
+    assert_array_equals(element.takeLog().types(), ['constructed', 'connected']);
+    assert_equals(tfoot.innerHTML, '&lt;tr&gt;&lt;td&gt;&lt;custom-element&gt;hello&lt;/custom-element&gt;&lt;/td&gt;&lt;/tr&gt;');
+
+    const table = contentDocument.querySelector('table');
+    assert_equals(table.tFoot, tfoot);
+    table.tFoot.deleteRow(0);
+    assert_array_equals(element.takeLog().types(), ['disconnected']);
+}, 'deleteRow() on HTMLTableSectionElement on tfoot must enqueue disconnectedCallback when removing a custom element');
+
+&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastcustomelementsreactionsHTMLTitleElementexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/custom-elements/reactions/HTMLTitleElement-expected.txt (0 => 208082)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/custom-elements/reactions/HTMLTitleElement-expected.txt                                (rev 0)
+++ trunk/LayoutTests/fast/custom-elements/reactions/HTMLTitleElement-expected.txt        2016-10-28 23:49:46 UTC (rev 208082)
</span><span class="lines">@@ -0,0 +1,3 @@
</span><ins>+
+PASS text on HTMLTitleElement must enqueue disconnectedCallback when removing a custom element 
+
</ins></span></pre></div>
<a id="trunkLayoutTestsfastcustomelementsreactionsHTMLTitleElementhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/custom-elements/reactions/HTMLTitleElement.html (0 => 208082)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/custom-elements/reactions/HTMLTitleElement.html                                (rev 0)
+++ trunk/LayoutTests/fast/custom-elements/reactions/HTMLTitleElement.html        2016-10-28 23:49:46 UTC (rev 208082)
</span><span class="lines">@@ -0,0 +1,36 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;title&gt;Custom Elements: CEReactions on HTMLTitleElement interface&lt;/title&gt;
+&lt;meta name=&quot;author&quot; title=&quot;Ryosuke Niwa&quot; href=&quot;mailto:rniwa@webkit.org&quot;&gt;
+&lt;meta name=&quot;assert&quot; content=&quot;text of HTMLTitleElement interface must have CEReactions&quot;&gt;
+&lt;meta name=&quot;help&quot; content=&quot;https://dom.spec.whatwg.org/#node&quot;&gt;
+&lt;script src=&quot;../../../resources/testharness.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../../../resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../../../imported/w3c/web-platform-tests/custom-elements/resources/custom-elements-helpers.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../../../imported/w3c/web-platform-tests/custom-elements/reactions/resources/reactions.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/additional-helpers.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;div id=&quot;log&quot;&gt;&lt;/div&gt;
+&lt;script&gt;
+
+test_with_window(function (contentWindow) {
+    const element = define_custom_element_in_window(contentWindow, 'custom-element', []);
+    const instance = contentWindow.document.createElement(element.name);
+    assert_array_equals(element.takeLog().types(), ['constructed']);
+
+    contentWindow.document.title = 'hello';
+    var titleElement = contentWindow.document.querySelector('title');
+    titleElement.appendChild(instance);
+    assert_array_equals(element.takeLog().types(), ['connected']);
+    assert_equals(titleElement.childNodes.length, 2);
+
+    titleElement.text = 'world';
+    assert_equals(titleElement.childNodes.length, 1);
+    assert_array_equals(element.takeLog().types(), ['disconnected']);
+}, 'text on HTMLTitleElement must enqueue disconnectedCallback when removing a custom element');
+
+&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastcustomelementsreactionsShadowRootexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/custom-elements/reactions/ShadowRoot-expected.txt (0 => 208082)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/custom-elements/reactions/ShadowRoot-expected.txt                                (rev 0)
+++ trunk/LayoutTests/fast/custom-elements/reactions/ShadowRoot-expected.txt        2016-10-28 23:49:46 UTC (rev 208082)
</span><span class="lines">@@ -0,0 +1,5 @@
</span><ins>+
+PASS innerHTML on ShadowRoot must upgrade a custom element 
+PASS innerHTML on ShadowRoot must enqueue connectedCallback on newly upgraded custom elements when the shadow root is connected 
+PASS innerHTML on ShadowRoot must enqueue disconnectedCallback when removing a custom element 
+
</ins></span></pre></div>
<a id="trunkLayoutTestsfastcustomelementsreactionsShadowRoothtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/custom-elements/reactions/ShadowRoot.html (0 => 208082)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/custom-elements/reactions/ShadowRoot.html                                (rev 0)
+++ trunk/LayoutTests/fast/custom-elements/reactions/ShadowRoot.html        2016-10-28 23:49:46 UTC (rev 208082)
</span><span class="lines">@@ -0,0 +1,59 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;title&gt;Custom Elements: CEReactions on ShadowRoot interface&lt;/title&gt;
+&lt;meta name=&quot;author&quot; title=&quot;Ryosuke Niwa&quot; href=&quot;mailto:rniwa@webkit.org&quot;&gt;
+&lt;meta name=&quot;assert&quot; content=&quot;innerHTML of ShadowRoot interface must have CEReactions&quot;&gt;
+&lt;meta name=&quot;help&quot; content=&quot;https://dom.spec.whatwg.org/#node&quot;&gt;
+&lt;script src=&quot;../../../resources/testharness.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../../../resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../../../imported/w3c/web-platform-tests/custom-elements/resources/custom-elements-helpers.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../../../imported/w3c/web-platform-tests/custom-elements/reactions/resources/reactions.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/additional-helpers.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;div id=&quot;log&quot;&gt;&lt;/div&gt;
+&lt;script&gt;
+
+test_with_window(function (contentWindow) {
+    const element = define_custom_element_in_window(contentWindow, 'custom-element', []);
+
+    const contentDocument = contentWindow.document;
+    const host = contentDocument.createElement('div');
+    const shadowRoot = host.attachShadow({mode: 'closed'});
+    shadowRoot.innerHTML = '&lt;custom-element&gt;&lt;/custom-element&gt;';
+
+    assert_array_equals(element.takeLog().types(), ['constructed']);
+}, 'innerHTML on ShadowRoot must upgrade a custom element');
+
+test_with_window(function (contentWindow) {
+    const element = define_custom_element_in_window(contentWindow, 'custom-element', []);
+
+    const contentDocument = contentWindow.document;
+    const host = contentDocument.createElement('div');
+    contentDocument.body.appendChild(host);
+    const shadowRoot = host.attachShadow({mode: 'closed'});
+    shadowRoot.innerHTML = '&lt;custom-element&gt;&lt;/custom-element&gt;';
+
+    assert_array_equals(element.takeLog().types(), ['constructed', 'connected']);
+}, 'innerHTML on ShadowRoot must enqueue connectedCallback on newly upgraded custom elements when the shadow root is connected');
+
+test_with_window(function (contentWindow) {
+    const element = define_custom_element_in_window(contentWindow, 'custom-element', []);
+
+    const contentDocument = contentWindow.document;
+    const host = contentDocument.createElement('div');
+    contentDocument.body.appendChild(host);
+
+    const shadowRoot = host.attachShadow({mode: 'closed'});
+    shadowRoot.innerHTML = '&lt;custom-element&gt;&lt;/custom-element&gt;';
+    assert_array_equals(element.takeLog().types(), ['constructed', 'connected']);
+
+    shadowRoot.innerHTML = '';
+    assert_array_equals(element.takeLog().types(), ['disconnected']);
+
+}, 'innerHTML on ShadowRoot must enqueue disconnectedCallback when removing a custom element');
+
+&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastcustomelementsreactionsforindieuiexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/custom-elements/reactions-for-indieui-expected.txt (0 => 208082)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/custom-elements/reactions-for-indieui-expected.txt                                (rev 0)
+++ trunk/LayoutTests/fast/custom-elements/reactions-for-indieui-expected.txt        2016-10-28 23:49:46 UTC (rev 208082)
</span><span class="lines">@@ -0,0 +1,4 @@
</span><ins>+
+PASS uiactions on Element must enqueue an attributeChanged reaction when adding uiactions content attribute 
+PASS uiactions on Element must enqueue an attributeChanged reaction when replacing an existing attribute 
+
</ins></span></pre></div>
<a id="trunkLayoutTestsfastcustomelementsreactionsforindieuihtmlfromrev208081trunkLayoutTestsfastcustomelementsreactionsforwebkitextensionshtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/fast/custom-elements/reactions-for-indieui.html (from rev 208081, trunk/LayoutTests/fast/custom-elements/reactions-for-webkit-extensions.html) (0 => 208082)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/custom-elements/reactions-for-indieui.html                                (rev 0)
+++ trunk/LayoutTests/fast/custom-elements/reactions-for-indieui.html        2016-10-28 23:49:46 UTC (rev 208082)
</span><span class="lines">@@ -0,0 +1,21 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;title&gt;Custom Elements: CEReactions on uiactions of Element interface&lt;/title&gt;
+&lt;meta name=&quot;author&quot; title=&quot;Ryosuke Niwa&quot; href=&quot;mailto:rniwa@webkit.org&quot;&gt;
+&lt;meta name=&quot;assert&quot; content=&quot;uiactions of Element interface must have CEReactions&quot;&gt;
+&lt;meta name=&quot;help&quot; content=&quot;https://dom.spec.whatwg.org/#node&quot;&gt;
+&lt;script src=&quot;../../resources/testharness.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../../resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../../imported/w3c/web-platform-tests/custom-elements/resources/custom-elements-helpers.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../../imported/w3c/web-platform-tests/custom-elements/reactions/resources/reactions.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;div id=&quot;log&quot;&gt;&lt;/div&gt;
+&lt;script&gt;
+
+testReflectAttribute('uiactions', 'uiactions', 'delete', 'dismiss', 'uiactions on Element');
+
+&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastcustomelementsreactionsforwebkitextensionsexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/custom-elements/reactions-for-webkit-extensions-expected.txt (208081 => 208082)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/custom-elements/reactions-for-webkit-extensions-expected.txt        2016-10-28 23:39:36 UTC (rev 208081)
+++ trunk/LayoutTests/fast/custom-elements/reactions-for-webkit-extensions-expected.txt        2016-10-28 23:49:46 UTC (rev 208082)
</span><span class="lines">@@ -1,4 +1,12 @@
</span><span class="cx"> 
</span><span class="cx"> PASS dropzone on HTMLElement must enqueue an attributeChanged reaction when adding webkitdropzone content attribute 
</span><span class="cx"> PASS dropzone on HTMLElement must enqueue an attributeChanged reaction when replacing an existing attribute 
</span><ins>+PASS data on CharacterData must enqueue an attributeChanged reaction when replacing an existing attribute 
+PASS data on CharacterData must not enqueue an attributeChanged reaction when replacing an existing unobserved attribute 
+PASS appendData on CharacterData must enqueue an attributeChangedCallback when mutating an existing attribute 
+PASS insertData on CharacterData must enqueue an attributeChangedCallback when mutating an existing attribute 
+PASS deleteData on CharacterData must enqueue an attributeChangedCallback when mutating an existing attribute 
+PASS replaceData on CharacterData must enqueue an attributeChangedCallback when mutating an existing attribute 
+PASS remove(HTMLOptionElement) on HTMLOptionsCollection must enqueue disconnectedCallback when removing a custom element 
+PASS remove(HTMLOptionElement) on HTMLSelectElement must enqueue disconnectedCallback when removing a custom element 
</ins><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsfastcustomelementsreactionsforwebkitextensionshtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/custom-elements/reactions-for-webkit-extensions.html (208081 => 208082)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/custom-elements/reactions-for-webkit-extensions.html        2016-10-28 23:39:36 UTC (rev 208081)
+++ trunk/LayoutTests/fast/custom-elements/reactions-for-webkit-extensions.html        2016-10-28 23:49:46 UTC (rev 208082)
</span><span class="lines">@@ -1,14 +1,15 @@
</span><span class="cx"> &lt;!DOCTYPE html&gt;
</span><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><del>-&lt;title&gt;Custom Elements: CEReactions on HTMLElement interface&lt;/title&gt;
</del><ins>+&lt;title&gt;Custom Elements: CEReactions on HTMLElement and Attr interfaces&lt;/title&gt;
</ins><span class="cx"> &lt;meta name=&quot;author&quot; title=&quot;Ryosuke Niwa&quot; href=&quot;mailto:rniwa@webkit.org&quot;&gt;
</span><del>-&lt;meta name=&quot;assert&quot; content=&quot;webkitdropzone of HTMLElement interface must have CEReactions&quot;&gt;
</del><ins>+&lt;meta name=&quot;assert&quot; content=&quot;webkitdropzone of HTMLElement and Attr interface must have CEReactions&quot;&gt;
</ins><span class="cx"> &lt;meta name=&quot;help&quot; content=&quot;https://dom.spec.whatwg.org/#node&quot;&gt;
</span><span class="cx"> &lt;script src=&quot;../../resources/testharness.js&quot;&gt;&lt;/script&gt;
</span><span class="cx"> &lt;script src=&quot;../../resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
</span><span class="cx"> &lt;script src=&quot;../../imported/w3c/web-platform-tests/custom-elements/resources/custom-elements-helpers.js&quot;&gt;&lt;/script&gt;
</span><span class="cx"> &lt;script src=&quot;../../imported/w3c/web-platform-tests/custom-elements/reactions/resources/reactions.js&quot;&gt;&lt;/script&gt;
</span><ins>+&lt;script src=&quot;resources/additional-helpers.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body&gt;
</span><span class="cx"> &lt;div id=&quot;log&quot;&gt;&lt;/div&gt;
</span><span class="lines">@@ -16,6 +17,96 @@
</span><span class="cx"> 
</span><span class="cx"> testReflectAttribute('webkitdropzone', 'webkitdropzone', 'copy', 'move', 'dropzone on HTMLElement');
</span><span class="cx"> 
</span><ins>+testAttributeMutator(function (element, name, value) {
+    element.attributes[name].firstChild.data = value;
+}, 'data on CharacterData');
+
+test(function () {
+    var element = define_new_custom_element(['title']);
+    var instance = document.createElement(element.name);
+    instance.setAttribute('title', 'hello');
+    assert_array_equals(element.takeLog().types(), ['constructed', 'attributeChanged']);
+    instance.attributes.title.firstChild.appendData(' world');
+    var logEntries = element.takeLog();
+    assert_array_equals(logEntries.types(), ['attributeChanged']);
+    assert_attribute_log_entry(logEntries.last(), {name: 'title', oldValue: 'hello', newValue: 'hello world', namespace: null});
+}, 'appendData on CharacterData must enqueue an attributeChangedCallback when mutating an existing attribute');
+
+test(function () {
+    var element = define_new_custom_element(['title']);
+    var instance = document.createElement(element.name);
+    instance.setAttribute('title', 'foo');
+    assert_array_equals(element.takeLog().types(), ['constructed', 'attributeChanged']);
+    instance.attributes.title.firstChild.insertData(2, 'bar');
+    var logEntries = element.takeLog();
+    assert_array_equals(logEntries.types(), ['attributeChanged']);
+    assert_attribute_log_entry(logEntries.last(), {name: 'title', oldValue: 'foo', newValue: 'fobaro', namespace: null});
+}, 'insertData on CharacterData must enqueue an attributeChangedCallback when mutating an existing attribute');
+
+test(function () {
+    var element = define_new_custom_element(['title']);
+    var instance = document.createElement(element.name);
+    instance.setAttribute('title', 'hello world');
+    assert_array_equals(element.takeLog().types(), ['constructed', 'attributeChanged']);
+    instance.attributes.title.firstChild.deleteData(5, 100);
+    var logEntries = element.takeLog();
+    assert_array_equals(logEntries.types(), ['attributeChanged']);
+    assert_attribute_log_entry(logEntries.last(), {name: 'title', oldValue: 'hello world', newValue: 'hello', namespace: null});
+}, 'deleteData on CharacterData must enqueue an attributeChangedCallback when mutating an existing attribute');
+
+test(function () {
+    var element = define_new_custom_element(['title']);
+    var instance = document.createElement(element.name);
+    instance.setAttribute('title', 'hello');
+    assert_array_equals(element.takeLog().types(), ['constructed', 'attributeChanged']);
+    instance.attributes.title.firstChild.replaceData(1, 4, 'i');
+    var logEntries = element.takeLog();
+    assert_array_equals(logEntries.types(), ['attributeChanged']);
+    assert_attribute_log_entry(logEntries.last(), {name: 'title', oldValue: 'hello', newValue: 'hi', namespace: null});
+}, 'replaceData on CharacterData must enqueue an attributeChangedCallback when mutating an existing attribute');
+
+test_with_window(function (contentWindow) {
+    const element = define_custom_element_in_window(contentWindow, 'custom-element', []);
+
+    const contentDocument = contentWindow.document;
+    contentDocument.body.innerHTML = `&lt;select&gt;&lt;option&gt;&lt;/option&gt;&lt;/select&gt;`;
+    const option = contentDocument.querySelector('option');
+
+    const instance = contentDocument.createElement(element.name);
+    option.appendChild(instance);
+    instance.textContent = 'hello';
+
+    assert_array_equals(element.takeLog().types(), ['constructed', 'connected']);
+    assert_equals(option.innerHTML, '&lt;custom-element&gt;hello&lt;/custom-element&gt;');
+
+    const select = contentDocument.querySelector('select');
+    assert_equals(select.options[0], option);
+    select.options.remove(option);
+    assert_equals(select.options.length, 0);
+    assert_array_equals(element.takeLog().types(), ['disconnected']);
+}, 'remove(HTMLOptionElement) on HTMLOptionsCollection must enqueue disconnectedCallback when removing a custom element');
+
+test_with_window(function (contentWindow) {
+    const element = define_custom_element_in_window(contentWindow, 'custom-element', []);
+
+    const contentDocument = contentWindow.document;
+    contentDocument.body.innerHTML = `&lt;select&gt;&lt;option&gt;&lt;/option&gt;&lt;/select&gt;`;
+    const option = contentDocument.querySelector('option');
+
+    const instance = contentDocument.createElement(element.name);
+    option.appendChild(instance);
+    instance.textContent = 'hello';
+
+    assert_array_equals(element.takeLog().types(), ['constructed', 'connected']);
+    assert_equals(option.innerHTML, '&lt;custom-element&gt;hello&lt;/custom-element&gt;');
+
+    const select = contentDocument.querySelector('select');
+    assert_equals(select.options[0], option);
+    select.remove(option);
+    assert_equals(select.options.length, 0);
+    assert_array_equals(element.takeLog().types(), ['disconnected']);
+}, 'remove(HTMLOptionElement) on HTMLSelectElement must enqueue disconnectedCallback when removing a custom element');
+
</ins><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;/body&gt;
</span><span class="cx"> &lt;/html&gt;
</span></span></pre></div>
<a id="trunkLayoutTestsfastcustomelementsresourcesadditionalhelpersjs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/custom-elements/resources/additional-helpers.js (0 => 208082)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/custom-elements/resources/additional-helpers.js                                (rev 0)
+++ trunk/LayoutTests/fast/custom-elements/resources/additional-helpers.js        2016-10-28 23:49:46 UTC (rev 208082)
</span><span class="lines">@@ -0,0 +1,48 @@
</span><ins>+function create_constructor_log(element) {
+    return {type: 'constructed', element: element};
+}
+
+function assert_constructor_log_entry(log, element) {
+    assert_equals(log.type, 'constructed');
+    assert_equals(log.element, element);
+}
+
+function create_connected_callback_log(element) {
+    return {type: 'connected', element: element};
+}
+
+function assert_connected_log_entry(log, element) {
+    assert_equals(log.type, 'connected');
+    assert_equals(log.element, element);
+}
+
+function define_custom_element_in_window(window, name, observedAttributes) {
+    let log = [];
+
+    class CustomElement extends window.HTMLElement {
+        constructor() {
+            super();
+            log.push({type: 'constructed', element: this});
+        }
+        attributeChangedCallback(...args) {
+            log.push(create_attribute_changed_callback_log(this, ...args));
+        }
+        connectedCallback() { log.push({type: 'connected', element: this}); }
+        disconnectedCallback() { log.push({type: 'disconnected', element: this}); }
+        adoptedCallback(oldDocument, newDocument) { log.push({type: 'adopted', element: this, oldDocument: oldDocument, newDocument: newDocument}); }
+    }
+    CustomElement.observedAttributes = observedAttributes;
+
+    window.customElements.define(name, CustomElement);
+
+    return {
+        name: name,
+        class: CustomElement,
+        takeLog: function () {
+            let currentLog = log; log = [];
+            currentLog.types = () =&gt; currentLog.map((entry) =&gt; entry.type);
+            currentLog.last = () =&gt; currentLog[currentLog.length - 1];
+            return currentLog;
+        }
+    };
+}
</ins></span></pre></div>
<a id="trunkLayoutTestsfastcustomelementsupgradingenqueuereactionsexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/custom-elements/upgrading-enqueue-reactions-expected.txt (208081 => 208082)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/custom-elements/upgrading-enqueue-reactions-expected.txt        2016-10-28 23:39:36 UTC (rev 208081)
+++ trunk/LayoutTests/fast/custom-elements/upgrading-enqueue-reactions-expected.txt        2016-10-28 23:49:46 UTC (rev 208082)
</span><span class="lines">@@ -1,4 +1,4 @@
</span><del>-CONSOLE MESSAGE: line 157: Exception thrown as a part of test
</del><ins>+CONSOLE MESSAGE: line 140: Exception thrown as a part of test
</ins><span class="cx"> 
</span><span class="cx"> PASS Upgrading a custom element must enqueue attributeChangedCallback on each attribute 
</span><span class="cx"> PASS Upgrading a custom element not must enqueue attributeChangedCallback on unobserved attributes 
</span></span></pre></div>
<a id="trunkLayoutTestsfastcustomelementsupgradingenqueuereactionshtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/custom-elements/upgrading-enqueue-reactions.html (208081 => 208082)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/custom-elements/upgrading-enqueue-reactions.html        2016-10-28 23:39:36 UTC (rev 208081)
+++ trunk/LayoutTests/fast/custom-elements/upgrading-enqueue-reactions.html        2016-10-28 23:49:46 UTC (rev 208082)
</span><span class="lines">@@ -8,6 +8,7 @@
</span><span class="cx"> &lt;script src=&quot;../../resources/testharness.js&quot;&gt;&lt;/script&gt;
</span><span class="cx"> &lt;script src=&quot;../../resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
</span><span class="cx"> &lt;script src=&quot;../../imported/w3c/web-platform-tests/custom-elements/resources/custom-elements-helpers.js&quot;&gt;&lt;/script&gt;
</span><ins>+&lt;script src=&quot;resources/additional-helpers.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body&gt;
</span><span class="cx"> &lt;div id=&quot;log&quot;&gt;&lt;/div&gt;
</span><span class="lines">@@ -14,24 +15,6 @@
</span><span class="cx"> &lt;script&gt;
</span><span class="cx"> setup({allow_uncaught_exception:true});
</span><span class="cx"> 
</span><del>-function create_constructor_log(element) {
-    return {type: 'constructed', element: element};
-}
-
-function assert_constructor_log_entry(log, element) {
-    assert_equals(log.type, 'constructed');
-    assert_equals(log.element, element);
-}
-
-function create_connected_callback_log(element) {
-    return {type: 'connected', element: element};
-}
-
-function assert_connected_log_entry(log, element) {
-    assert_equals(log.type, 'connected');
-    assert_equals(log.element, element);
-}
-
</del><span class="cx"> test_with_window(function (contentWindow) {
</span><span class="cx">     const contentDocument = contentWindow.document;
</span><span class="cx">     contentDocument.write('&lt;test-element id=&quot;some&quot; title=&quot;This is a test&quot;&gt;');
</span></span></pre></div>
<a id="trunkLayoutTestsplatformeflTestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/efl/TestExpectations (208081 => 208082)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/efl/TestExpectations        2016-10-28 23:39:36 UTC (rev 208081)
+++ trunk/LayoutTests/platform/efl/TestExpectations        2016-10-28 23:49:46 UTC (rev 208082)
</span><span class="lines">@@ -1636,6 +1636,7 @@
</span><span class="cx"> 
</span><span class="cx"> # Requires INDIE_UI support
</span><span class="cx"> webkit.org/b/111446 indieui [ Skip ]
</span><ins>+webkit.org/b/111446 fast/custom-elements/reactions-for-indieui.html [ Skip ]
</ins><span class="cx"> 
</span><span class="cx"> # Requires support for Web notifications
</span><span class="cx"> webkit.org/b/73544 fast/notifications [ Skip ]
</span></span></pre></div>
<a id="trunkLayoutTestsplatformgtkTestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/gtk/TestExpectations (208081 => 208082)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/gtk/TestExpectations        2016-10-28 23:39:36 UTC (rev 208081)
+++ trunk/LayoutTests/platform/gtk/TestExpectations        2016-10-28 23:49:46 UTC (rev 208082)
</span><span class="lines">@@ -176,6 +176,7 @@
</span><span class="cx"> 
</span><span class="cx"> # Datalist is not yet enabled.
</span><span class="cx"> webkit.org/b/98934 fast/forms/datalist [ Skip ]
</span><ins>+webkit.org/b/98934 fast/custom-elements/reactions-for-indieui.html [ Skip ]
</ins><span class="cx"> 
</span><span class="cx"> # ENABLE_INPUT_TYPE_* are not enabled.
</span><span class="cx"> webkit.org/b/98936 fast/forms/date [ Skip ]
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (208081 => 208082)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-10-28 23:39:36 UTC (rev 208081)
+++ trunk/Source/WebCore/ChangeLog        2016-10-28 23:49:46 UTC (rev 208082)
</span><span class="lines">@@ -1,3 +1,45 @@
</span><ins>+2016-10-28  Ryosuke Niwa  &lt;rniwa@webkit.org&gt;
+
+        Add CEReactions to the remaining HTML DOM APIs
+        https://bugs.webkit.org/show_bug.cgi?id=163969
+
+        Reviewed by Chris Dumez.
+
+        Added CEReactions to the remaining DOM and HTML APIs as needed.
+
+        Tests: fast/custom-elements/reactions-for-indieui.html
+               fast/custom-elements/reactions/Document.html
+               fast/custom-elements/reactions/HTMLAnchorElement.html
+               fast/custom-elements/reactions/HTMLOptionElement.html
+               fast/custom-elements/reactions/HTMLOptionsCollection.html
+               fast/custom-elements/reactions/HTMLOutputElement.html
+               fast/custom-elements/reactions/HTMLSelectElement.html
+               fast/custom-elements/reactions/HTMLTableElement.html
+               fast/custom-elements/reactions/HTMLTableRowElement.html
+               fast/custom-elements/reactions/HTMLTableSectionElement.html
+               fast/custom-elements/reactions/HTMLTitleElement.html
+               fast/custom-elements/reactions/ShadowRoot.html
+
+        * bindings/js/JSHTMLOptionsCollectionCustom.cpp:
+        (WebCore::JSHTMLOptionsCollection::setLength):
+        (WebCore::JSHTMLOptionsCollection::indexSetter):
+        * bindings/js/JSHTMLSelectElementCustom.cpp:
+        (WebCore::JSHTMLSelectElement::indexSetter):
+        * dom/CharacterData.idl:
+        * dom/Document.idl:
+        * dom/Element.idl:
+        * dom/ShadowRoot.idl:
+        * html/HTMLAnchorElement.idl:
+        * html/HTMLDocument.idl:
+        * html/HTMLOptionElement.idl:
+        * html/HTMLOptionsCollection.idl:
+        * html/HTMLOutputElement.idl:
+        * html/HTMLSelectElement.idl:
+        * html/HTMLTableElement.idl:
+        * html/HTMLTableRowElement.idl:
+        * html/HTMLTableSectionElement.idl:
+        * html/HTMLTitleElement.idl:
+
</ins><span class="cx"> 2016-10-28  Antoine Quint  &lt;graouts@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [Modern Media Controls] Media Controller: volume control support
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSHTMLOptionsCollectionCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSHTMLOptionsCollectionCustom.cpp (208081 => 208082)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSHTMLOptionsCollectionCustom.cpp        2016-10-28 23:39:36 UTC (rev 208081)
+++ trunk/Source/WebCore/bindings/js/JSHTMLOptionsCollectionCustom.cpp        2016-10-28 23:49:46 UTC (rev 208082)
</span><span class="lines">@@ -20,6 +20,7 @@
</span><span class="cx"> #include &quot;config.h&quot;
</span><span class="cx"> #include &quot;JSHTMLOptionsCollection.h&quot;
</span><span class="cx"> 
</span><ins>+#include &quot;CustomElementReactionQueue.h&quot;
</ins><span class="cx"> #include &quot;ExceptionCode.h&quot;
</span><span class="cx"> #include &quot;HTMLNames.h&quot;
</span><span class="cx"> #include &quot;HTMLOptionElement.h&quot;
</span><span class="lines">@@ -49,6 +50,10 @@
</span><span class="cx"> 
</span><span class="cx"> void JSHTMLOptionsCollection::setLength(ExecState&amp; state, JSValue value)
</span><span class="cx"> {
</span><ins>+#if ENABLE(CUSTOM_ELEMENTS)
+    CustomElementReactionStack customElementReactionStack;
+#endif
+
</ins><span class="cx">     ExceptionCode ec = 0;
</span><span class="cx">     unsigned newLength = 0;
</span><span class="cx">     double lengthValue = value.toNumber(&amp;state);
</span><span class="lines">@@ -67,6 +72,10 @@
</span><span class="cx"> 
</span><span class="cx"> void JSHTMLOptionsCollection::indexSetter(ExecState* exec, unsigned index, JSValue value)
</span><span class="cx"> {
</span><ins>+#if ENABLE(CUSTOM_ELEMENTS)
+    CustomElementReactionStack customElementReactionStack;
+#endif
+
</ins><span class="cx">     selectIndexSetter(&amp;wrapped().selectElement(), exec, index, value);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSHTMLSelectElementCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSHTMLSelectElementCustom.cpp (208081 => 208082)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSHTMLSelectElementCustom.cpp        2016-10-28 23:39:36 UTC (rev 208081)
+++ trunk/Source/WebCore/bindings/js/JSHTMLSelectElementCustom.cpp        2016-10-28 23:49:46 UTC (rev 208082)
</span><span class="lines">@@ -21,6 +21,7 @@
</span><span class="cx"> #include &quot;config.h&quot;
</span><span class="cx"> #include &quot;JSHTMLSelectElementCustom.h&quot;
</span><span class="cx"> 
</span><ins>+#include &quot;CustomElementReactionQueue.h&quot;
</ins><span class="cx"> #include &quot;ExceptionCode.h&quot;
</span><span class="cx"> #include &quot;HTMLNames.h&quot;
</span><span class="cx"> #include &quot;HTMLOptionElement.h&quot;
</span><span class="lines">@@ -49,6 +50,9 @@
</span><span class="cx"> 
</span><span class="cx"> void JSHTMLSelectElement::indexSetter(JSC::ExecState* exec, unsigned index, JSC::JSValue value)
</span><span class="cx"> {
</span><ins>+#if ENABLE(CUSTOM_ELEMENTS)
+    CustomElementReactionStack customElementReactionStack;
+#endif
</ins><span class="cx">     selectIndexSetter(&amp;wrapped(), exec, index, value);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoredomCharacterDataidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/CharacterData.idl (208081 => 208082)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/CharacterData.idl        2016-10-28 23:39:36 UTC (rev 208081)
+++ trunk/Source/WebCore/dom/CharacterData.idl        2016-10-28 23:49:46 UTC (rev 208082)
</span><span class="lines">@@ -18,15 +18,15 @@
</span><span class="cx">  */
</span><span class="cx"> 
</span><span class="cx"> interface CharacterData : Node {
</span><del>-    [TreatNullAs=EmptyString] attribute DOMString data;
</del><ins>+    [CEReactions, TreatNullAs=EmptyString] attribute DOMString data;
</ins><span class="cx">     readonly attribute unsigned long length;
</span><span class="cx"> 
</span><span class="cx">     [MayThrowLegacyException] DOMString? substringData(unsigned long offset, unsigned long length);
</span><span class="cx"> 
</span><del>-    void appendData(DOMString data);
-    [MayThrowLegacyException] void insertData(unsigned long offset, DOMString data);
-    [MayThrowLegacyException] void deleteData(unsigned long offset, unsigned long length);
-    [MayThrowLegacyException] void replaceData(unsigned long offset, unsigned long length, DOMString data);
</del><ins>+    [CEReactions] void appendData(DOMString data);
+    [CEReactions, MayThrowLegacyException] void insertData(unsigned long offset, DOMString data);
+    [CEReactions, MayThrowLegacyException] void deleteData(unsigned long offset, unsigned long length);
+    [CEReactions, MayThrowLegacyException] void replaceData(unsigned long offset, unsigned long length, DOMString data);
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> CharacterData implements ChildNode;
</span></span></pre></div>
<a id="trunkSourceWebCoredomDocumentidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Document.idl (208081 => 208082)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Document.idl        2016-10-28 23:39:36 UTC (rev 208081)
+++ trunk/Source/WebCore/dom/Document.idl        2016-10-28 23:49:46 UTC (rev 208082)
</span><span class="lines">@@ -91,7 +91,7 @@
</span><span class="cx">     boolean queryCommandSupported(DOMString command);
</span><span class="cx">     DOMString queryCommandValue(DOMString command);
</span><span class="cx"> 
</span><del>-    attribute DOMString title;
</del><ins>+    [CEReactions] attribute DOMString title;
</ins><span class="cx">     attribute DOMString dir;
</span><span class="cx">     attribute DOMString designMode;
</span><span class="cx"> 
</span><span class="lines">@@ -101,7 +101,7 @@
</span><span class="cx"> 
</span><span class="cx">     [GetterMayThrowLegacyException, SetterMayThrowLegacyException] attribute USVString cookie;
</span><span class="cx"> 
</span><del>-    [SetterMayThrowLegacyException, ImplementedAs=bodyOrFrameset] attribute HTMLElement? body;
</del><ins>+    [CEReactions, ImplementedAs=bodyOrFrameset, SetterMayThrowLegacyException] attribute HTMLElement? body;
</ins><span class="cx"> 
</span><span class="cx">     readonly attribute HTMLHeadElement? head;
</span><span class="cx">     readonly attribute HTMLCollection images;
</span></span></pre></div>
<a id="trunkSourceWebCoredomElementidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Element.idl (208081 => 208082)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Element.idl        2016-10-28 23:39:36 UTC (rev 208081)
+++ trunk/Source/WebCore/dom/Element.idl        2016-10-28 23:49:46 UTC (rev 208082)
</span><span class="lines">@@ -121,7 +121,7 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if defined(ENABLE_INDIE_UI) &amp;&amp; ENABLE_INDIE_UI
</span><del>-    [Reflect] attribute DOMString uiactions;
</del><ins>+    [CEReactions, Reflect] attribute DOMString uiactions;
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     [CEReactions, MayThrowLegacyException] Element insertAdjacentElement(DOMString where, Element element);
</span></span></pre></div>
<a id="trunkSourceWebCoredomShadowRootidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/ShadowRoot.idl (208081 => 208082)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/ShadowRoot.idl        2016-10-28 23:39:36 UTC (rev 208081)
+++ trunk/Source/WebCore/dom/ShadowRoot.idl        2016-10-28 23:49:46 UTC (rev 208082)
</span><span class="lines">@@ -30,7 +30,7 @@
</span><span class="cx">     readonly attribute ShadowRootMode   mode;
</span><span class="cx">     readonly attribute Element          host;
</span><span class="cx"> 
</span><del>-    [TreatNullAs=EmptyString, SetterMayThrowLegacyException] attribute DOMString innerHTML;
</del><ins>+    [CEReactions, SetterMayThrowLegacyException, TreatNullAs=EmptyString] attribute DOMString innerHTML;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> ShadowRoot implements DocumentOrShadowRoot;
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLAnchorElementidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLAnchorElement.idl (208081 => 208082)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLAnchorElement.idl        2016-10-28 23:39:36 UTC (rev 208081)
+++ trunk/Source/WebCore/html/HTMLAnchorElement.idl        2016-10-28 23:49:46 UTC (rev 208082)
</span><span class="lines">@@ -31,7 +31,7 @@
</span><span class="cx">     [Reflect] attribute DOMString target;
</span><span class="cx">     [Reflect] attribute DOMString type;
</span><span class="cx"> 
</span><del>-    attribute DOMString text;
</del><ins>+    [CEReactions] attribute DOMString text;
</ins><span class="cx"> 
</span><span class="cx">     [PutForwards=value] readonly attribute DOMTokenList relList;
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLDocumentidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLDocument.idl (208081 => 208082)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLDocument.idl        2016-10-28 23:39:36 UTC (rev 208081)
+++ trunk/Source/WebCore/html/HTMLDocument.idl        2016-10-28 23:49:46 UTC (rev 208082)
</span><span class="lines">@@ -25,10 +25,10 @@
</span><span class="cx">     NewImpurePropertyFiresWatchpoints,
</span><span class="cx">     OverrideBuiltins,
</span><span class="cx"> ] interface HTMLDocument : Document {
</span><del>-    [Custom, ForwardDeclareInHeader] void open();
</del><ins>+    [CEReactions, Custom, ForwardDeclareInHeader] void open();
</ins><span class="cx">     void close();
</span><del>-    [Custom] void write(optional DOMString text);
-    [Custom] void writeln(optional DOMString text);
</del><ins>+    [CEReactions, Custom] void write(optional DOMString text);
+    [CEReactions, Custom] void writeln(optional DOMString text);
</ins><span class="cx"> 
</span><span class="cx">     [Custom, Replaceable] readonly attribute HTMLAllCollection all;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLOptionElementidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLOptionElement.idl (208081 => 208082)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLOptionElement.idl        2016-10-28 23:39:36 UTC (rev 208081)
+++ trunk/Source/WebCore/html/HTMLOptionElement.idl        2016-10-28 23:49:46 UTC (rev 208082)
</span><span class="lines">@@ -30,6 +30,6 @@
</span><span class="cx">     attribute boolean selected;
</span><span class="cx">     attribute DOMString value;
</span><span class="cx"> 
</span><del>-    attribute DOMString text;
</del><ins>+    [CEReactions] attribute DOMString text;
</ins><span class="cx">     readonly attribute long index;
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLOptionsCollectionidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLOptionsCollection.idl (208081 => 208082)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLOptionsCollection.idl        2016-10-28 23:39:36 UTC (rev 208081)
+++ trunk/Source/WebCore/html/HTMLOptionsCollection.idl        2016-10-28 23:49:46 UTC (rev 208082)
</span><span class="lines">@@ -25,14 +25,14 @@
</span><span class="cx">     JSGenerateToNativeObject,
</span><span class="cx"> ] interface HTMLOptionsCollection : HTMLCollection {
</span><span class="cx">     attribute long selectedIndex;
</span><del>-    [CustomSetter, SetterMayThrowLegacyException] attribute unsigned long length;
</del><ins>+    [CEReactions, CustomSetter, SetterMayThrowLegacyException] attribute unsigned long length;
</ins><span class="cx"> 
</span><span class="cx">     getter HTMLOptionElement? item(unsigned long index);
</span><span class="cx">     getter HTMLOptionElement? namedItem(DOMString name);
</span><span class="cx"> 
</span><del>-    [MayThrowException] void add((HTMLOptionElement or HTMLOptGroupElement) element, optional (HTMLElement or long)? before = null);
</del><ins>+    [CEReactions, MayThrowException] void add((HTMLOptionElement or HTMLOptGroupElement) element, optional (HTMLElement or long)? before = null);
</ins><span class="cx"> 
</span><del>-    void remove(long index);
</del><ins>+    [CEReactions] void remove(long index);
</ins><span class="cx">     // FIXME: This overload is not in the specification and has been dropped in Blink.
</span><del>-    void remove(HTMLOptionElement option);
</del><ins>+    [CEReactions] void remove(HTMLOptionElement option);
</ins><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLOutputElementidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLOutputElement.idl (208081 => 208082)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLOutputElement.idl        2016-10-28 23:39:36 UTC (rev 208081)
+++ trunk/Source/WebCore/html/HTMLOutputElement.idl        2016-10-28 23:49:46 UTC (rev 208082)
</span><span class="lines">@@ -29,8 +29,8 @@
</span><span class="cx">     [Reflect] attribute DOMString name;
</span><span class="cx"> 
</span><span class="cx">     readonly attribute DOMString type;
</span><del>-    [TreatNullAs=EmptyString] attribute DOMString defaultValue;
-    [TreatNullAs=EmptyString] attribute DOMString value;
</del><ins>+    [CEReactions, TreatNullAs=EmptyString] attribute DOMString defaultValue;
+    [CEReactions, TreatNullAs=EmptyString] attribute DOMString value;
</ins><span class="cx"> 
</span><span class="cx">     readonly attribute boolean willValidate;
</span><span class="cx">     readonly attribute ValidityState validity;
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLSelectElementidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLSelectElement.idl (208081 => 208082)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLSelectElement.idl        2016-10-28 23:39:36 UTC (rev 208081)
+++ trunk/Source/WebCore/html/HTMLSelectElement.idl        2016-10-28 23:49:46 UTC (rev 208082)
</span><span class="lines">@@ -35,17 +35,17 @@
</span><span class="cx">     readonly attribute DOMString type;
</span><span class="cx"> 
</span><span class="cx">     readonly attribute HTMLOptionsCollection options;
</span><del>-    [SetterMayThrowLegacyException] attribute unsigned long length;
</del><ins>+    [CEReactions, SetterMayThrowLegacyException] attribute unsigned long length;
</ins><span class="cx"> 
</span><span class="cx">     getter HTMLOptionElement? item(unsigned long index);
</span><span class="cx">     HTMLOptionElement? namedItem(DOMString name);
</span><span class="cx"> 
</span><del>-    [MayThrowException] void add((HTMLOptionElement or HTMLOptGroupElement) element, optional (HTMLElement or long)? before = null);
</del><ins>+    [CEReactions, MayThrowException] void add((HTMLOptionElement or HTMLOptGroupElement) element, optional (HTMLElement or long)? before = null);
</ins><span class="cx"> 
</span><span class="cx">     [MayThrowLegacyException] void remove(); // ChildNode overload
</span><span class="cx">     // FIXME: This overload is not in the specification and was dropped in Blink.
</span><del>-    void remove(HTMLOptionElement option);
-    [ImplementedAs=removeByIndex] void remove(long index);
</del><ins>+    [CEReactions] void remove(HTMLOptionElement option);
+    [CEReactions, ImplementedAs=removeByIndex] void remove(long index);
</ins><span class="cx"> 
</span><span class="cx">     readonly attribute HTMLCollection selectedOptions;
</span><span class="cx">     attribute long selectedIndex;
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLTableElementidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLTableElement.idl (208081 => 208082)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLTableElement.idl        2016-10-28 23:39:36 UTC (rev 208081)
+++ trunk/Source/WebCore/html/HTMLTableElement.idl        2016-10-28 23:49:46 UTC (rev 208082)
</span><span class="lines">@@ -19,9 +19,9 @@
</span><span class="cx">  */
</span><span class="cx"> 
</span><span class="cx"> interface HTMLTableElement : HTMLElement {
</span><del>-    [SetterMayThrowLegacyException] attribute HTMLTableCaptionElement? caption;
-    [SetterMayThrowLegacyException] attribute HTMLTableSectionElement? tHead;
-    [SetterMayThrowLegacyException] attribute HTMLTableSectionElement? tFoot;
</del><ins>+    [CEReactions, SetterMayThrowLegacyException] attribute HTMLTableCaptionElement? caption;
+    [CEReactions, SetterMayThrowLegacyException] attribute HTMLTableSectionElement? tHead;
+    [CEReactions, SetterMayThrowLegacyException] attribute HTMLTableSectionElement? tFoot;
</ins><span class="cx"> 
</span><span class="cx">     readonly attribute HTMLCollection rows;
</span><span class="cx">     readonly attribute HTMLCollection tBodies;
</span><span class="lines">@@ -38,14 +38,14 @@
</span><span class="cx">     [Reflect] attribute DOMString width;
</span><span class="cx"> 
</span><span class="cx">     HTMLElement createTHead();
</span><del>-    void deleteTHead();
</del><ins>+    [CEReactions] void deleteTHead();
</ins><span class="cx">     HTMLElement createTFoot();
</span><del>-    void deleteTFoot();
</del><ins>+    [CEReactions] void deleteTFoot();
</ins><span class="cx">     HTMLElement createTBody();
</span><span class="cx">     HTMLElement createCaption();
</span><del>-    void deleteCaption();
</del><ins>+    [CEReactions] void deleteCaption();
</ins><span class="cx"> 
</span><span class="cx">     [MayThrowLegacyException] HTMLElement insertRow(optional long index = -1);
</span><del>-    [MayThrowLegacyException] void deleteRow(long index);
</del><ins>+    [CEReactions, MayThrowLegacyException] void deleteRow(long index);
</ins><span class="cx"> };
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLTableRowElementidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLTableRowElement.idl (208081 => 208082)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLTableRowElement.idl        2016-10-28 23:39:36 UTC (rev 208081)
+++ trunk/Source/WebCore/html/HTMLTableRowElement.idl        2016-10-28 23:49:46 UTC (rev 208082)
</span><span class="lines">@@ -28,6 +28,6 @@
</span><span class="cx">     [Reflect=charoff] attribute DOMString chOff;
</span><span class="cx">     [Reflect] attribute DOMString vAlign;
</span><span class="cx">     [MayThrowLegacyException] HTMLElement insertCell(optional long index = -1);
</span><del>-    [MayThrowLegacyException] void deleteCell(long index);
</del><ins>+    [CEReactions, MayThrowLegacyException] void deleteCell(long index);
</ins><span class="cx"> };
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLTableSectionElementidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLTableSectionElement.idl (208081 => 208082)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLTableSectionElement.idl        2016-10-28 23:39:36 UTC (rev 208081)
+++ trunk/Source/WebCore/html/HTMLTableSectionElement.idl        2016-10-28 23:49:46 UTC (rev 208082)
</span><span class="lines">@@ -27,6 +27,6 @@
</span><span class="cx">     [Reflect] attribute DOMString vAlign;
</span><span class="cx">     readonly attribute HTMLCollection rows;
</span><span class="cx">     [MayThrowLegacyException] HTMLElement insertRow(optional long index = -1);
</span><del>-    [MayThrowLegacyException] void deleteRow(long index);
</del><ins>+    [CEReactions, MayThrowLegacyException] void deleteRow(long index);
</ins><span class="cx"> };
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLTitleElementidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLTitleElement.idl (208081 => 208082)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLTitleElement.idl        2016-10-28 23:39:36 UTC (rev 208081)
+++ trunk/Source/WebCore/html/HTMLTitleElement.idl        2016-10-28 23:49:46 UTC (rev 208082)
</span><span class="lines">@@ -18,6 +18,6 @@
</span><span class="cx">  */
</span><span class="cx"> 
</span><span class="cx"> interface HTMLTitleElement : HTMLElement {
</span><del>-    attribute DOMString text;
</del><ins>+    [CEReactions] attribute DOMString text;
</ins><span class="cx"> };
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>