<!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>[190134] 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/190134">190134</a></dd>
<dt>Author</dt> <dd>cdumez@apple.com</dd>
<dt>Date</dt> <dd>2015-09-22 14:24:28 -0700 (Tue, 22 Sep 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>HTMLOutputElement.htmlFor should be settable
https://bugs.webkit.org/show_bug.cgi?id=149418

Reviewed by Darin Adler.

Source/WebCore:

HTMLOutputElement.htmlFor should be settable as per the latest HTML
specification:
- https://html.spec.whatwg.org/multipage/forms.html#the-output-element

It is supposed to call DOMSettableTokenList.setValue() with the input
String. This patch adds support for this by adding [PutForwards=value]
IDL extended attribute.

This aligns our behavior with the specification, Firefox and Chrome.

No new tests, already covered by existing test.

* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::classList):
* dom/Element.cpp:
(WebCore::Element::classList):
* dom/ElementRareData.h:
(WebCore::ElementRareData::setClassList):
* html/AttributeDOMTokenList.h:
* html/DOMSettableTokenList.h:
* html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::relList):
* html/HTMLAnchorElement.h:
* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::relList):
* html/HTMLLinkElement.h:
* html/HTMLOutputElement.cpp:
(WebCore::HTMLOutputElement::HTMLOutputElement):
(WebCore::HTMLOutputElement::parseAttribute):
(WebCore::HTMLOutputElement::childrenChanged): Deleted.
* html/HTMLOutputElement.h:
* html/HTMLOutputElement.idl:

LayoutTests:

Update existing layout test now that HTMLOutputElement.htmlFor is
settable.

* fast/dom/HTMLOutputElement/dom-settable-token-list-expected.txt:
* fast/dom/HTMLOutputElement/script-tests/dom-settable-token-list.js:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsfastdomHTMLOutputElementdomsettabletokenlistexpectedtxt">trunk/LayoutTests/fast/dom/HTMLOutputElement/dom-settable-token-list-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastdomHTMLOutputElementscripttestsdomsettabletokenlistjs">trunk/LayoutTests/fast/dom/HTMLOutputElement/script-tests/dom-settable-token-list.js</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoredomElementcpp">trunk/Source/WebCore/dom/Element.cpp</a></li>
<li><a href="#trunkSourceWebCoredomElementRareDatah">trunk/Source/WebCore/dom/ElementRareData.h</a></li>
<li><a href="#trunkSourceWebCorehtmlAttributeDOMTokenListcpp">trunk/Source/WebCore/html/AttributeDOMTokenList.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlAttributeDOMTokenListh">trunk/Source/WebCore/html/AttributeDOMTokenList.h</a></li>
<li><a href="#trunkSourceWebCorehtmlDOMSettableTokenListcpp">trunk/Source/WebCore/html/DOMSettableTokenList.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlDOMSettableTokenListh">trunk/Source/WebCore/html/DOMSettableTokenList.h</a></li>
<li><a href="#trunkSourceWebCorehtmlDOMTokenListcpp">trunk/Source/WebCore/html/DOMTokenList.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlDOMTokenListh">trunk/Source/WebCore/html/DOMTokenList.h</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLAnchorElementcpp">trunk/Source/WebCore/html/HTMLAnchorElement.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLAnchorElementh">trunk/Source/WebCore/html/HTMLAnchorElement.h</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLLinkElementcpp">trunk/Source/WebCore/html/HTMLLinkElement.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLLinkElementh">trunk/Source/WebCore/html/HTMLLinkElement.h</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLOutputElementcpp">trunk/Source/WebCore/html/HTMLOutputElement.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLOutputElementh">trunk/Source/WebCore/html/HTMLOutputElement.h</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLOutputElementidl">trunk/Source/WebCore/html/HTMLOutputElement.idl</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (190133 => 190134)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2015-09-22 21:11:35 UTC (rev 190133)
+++ trunk/LayoutTests/ChangeLog        2015-09-22 21:24:28 UTC (rev 190134)
</span><span class="lines">@@ -1,3 +1,16 @@
</span><ins>+2015-09-22  Chris Dumez  &lt;cdumez@apple.com&gt;
+
+        HTMLOutputElement.htmlFor should be settable
+        https://bugs.webkit.org/show_bug.cgi?id=149418
+
+        Reviewed by Darin Adler.
+
+        Update existing layout test now that HTMLOutputElement.htmlFor is
+        settable.
+
+        * fast/dom/HTMLOutputElement/dom-settable-token-list-expected.txt:
+        * fast/dom/HTMLOutputElement/script-tests/dom-settable-token-list.js:
+
</ins><span class="cx"> 2015-09-22  Tim Horton  &lt;timothy_horton@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Demystify why a few text tests depend on threaded scrolling being disabled
</span></span></pre></div>
<a id="trunkLayoutTestsfastdomHTMLOutputElementdomsettabletokenlistexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/dom/HTMLOutputElement/dom-settable-token-list-expected.txt (190133 => 190134)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/HTMLOutputElement/dom-settable-token-list-expected.txt        2015-09-22 21:11:35 UTC (rev 190133)
+++ trunk/LayoutTests/fast/dom/HTMLOutputElement/dom-settable-token-list-expected.txt        2015-09-22 21:24:28 UTC (rev 190134)
</span><span class="lines">@@ -4,7 +4,10 @@
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> - Tests from http://simon.html5.org/test/html/dom/reflecting/DOMTokenList/
</span><del>-PASS String(element.htmlFor) is &quot;x&quot;
</del><ins>+PASS element.htmlFor.__proto__ is DOMSettableTokenList.prototype
+PASS String(element.htmlFor) is &quot;y z&quot;
+PASS element.getAttribute(&quot;for&quot;) is &quot;y z&quot;
+PASS String(element.htmlFor) is &quot;r s t&quot;
</ins><span class="cx"> PASS element.htmlFor.length is 0
</span><span class="cx"> PASS element.htmlFor.length is 1
</span><span class="cx"> PASS element.htmlFor.length is 1
</span></span></pre></div>
<a id="trunkLayoutTestsfastdomHTMLOutputElementscripttestsdomsettabletokenlistjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/dom/HTMLOutputElement/script-tests/dom-settable-token-list.js (190133 => 190134)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/HTMLOutputElement/script-tests/dom-settable-token-list.js        2015-09-22 21:11:35 UTC (rev 190133)
+++ trunk/LayoutTests/fast/dom/HTMLOutputElement/script-tests/dom-settable-token-list.js        2015-09-22 21:24:28 UTC (rev 190134)
</span><span class="lines">@@ -14,10 +14,14 @@
</span><span class="cx"> 
</span><span class="cx"> debug('- Tests from http://simon.html5.org/test/html/dom/reflecting/DOMTokenList/');
</span><span class="cx"> 
</span><del>-// HTMLOutputElement::htmlFor is readonly attribute.
</del><ins>+// HTMLOutputElement::htmlFor should be settable.
</ins><span class="cx"> createElement('x');
</span><del>-element.htmlFor = 'y';
-shouldBeEqualToString('String(element.htmlFor)', 'x');
</del><ins>+shouldBe('element.htmlFor.__proto__', 'DOMSettableTokenList.prototype');
+element.htmlFor = 'y  z';
+shouldBeEqualToString('String(element.htmlFor)', 'y z');
+shouldBeEqualToString('element.getAttribute(&quot;for&quot;)', 'y z');
+element.setAttribute('for', 'r s t');
+shouldBeEqualToString('String(element.htmlFor)', 'r s t');
</ins><span class="cx"> 
</span><span class="cx"> // http://simon.html5.org/test/html/dom/reflecting/DOMTokenList/getting/001.htm
</span><span class="cx"> createElement('');
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (190133 => 190134)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-09-22 21:11:35 UTC (rev 190133)
+++ trunk/Source/WebCore/ChangeLog        2015-09-22 21:24:28 UTC (rev 190134)
</span><span class="lines">@@ -1,3 +1,43 @@
</span><ins>+2015-09-22  Chris Dumez  &lt;cdumez@apple.com&gt;
+
+        HTMLOutputElement.htmlFor should be settable
+        https://bugs.webkit.org/show_bug.cgi?id=149418
+
+        Reviewed by Darin Adler.
+
+        HTMLOutputElement.htmlFor should be settable as per the latest HTML
+        specification:
+        - https://html.spec.whatwg.org/multipage/forms.html#the-output-element
+
+        It is supposed to call DOMSettableTokenList.setValue() with the input
+        String. This patch adds support for this by adding [PutForwards=value]
+        IDL extended attribute.
+
+        This aligns our behavior with the specification, Firefox and Chrome.
+
+        No new tests, already covered by existing test.
+
+        * accessibility/AccessibilityObject.cpp:
+        (WebCore::AccessibilityObject::classList):
+        * dom/Element.cpp:
+        (WebCore::Element::classList):
+        * dom/ElementRareData.h:
+        (WebCore::ElementRareData::setClassList):
+        * html/AttributeDOMTokenList.h:
+        * html/DOMSettableTokenList.h:
+        * html/HTMLAnchorElement.cpp:
+        (WebCore::HTMLAnchorElement::relList):
+        * html/HTMLAnchorElement.h:
+        * html/HTMLLinkElement.cpp:
+        (WebCore::HTMLLinkElement::relList):
+        * html/HTMLLinkElement.h:
+        * html/HTMLOutputElement.cpp:
+        (WebCore::HTMLOutputElement::HTMLOutputElement):
+        (WebCore::HTMLOutputElement::parseAttribute):
+        (WebCore::HTMLOutputElement::childrenChanged): Deleted.
+        * html/HTMLOutputElement.h:
+        * html/HTMLOutputElement.idl:
+
</ins><span class="cx"> 2015-09-22  Filip Pizlo  &lt;fpizlo@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Get rid of ENABLE(GGC)
</span></span></pre></div>
<a id="trunkSourceWebCoredomElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Element.cpp (190133 => 190134)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Element.cpp        2015-09-22 21:11:35 UTC (rev 190133)
+++ trunk/Source/WebCore/dom/Element.cpp        2015-09-22 21:24:28 UTC (rev 190134)
</span><span class="lines">@@ -2715,7 +2715,7 @@
</span><span class="cx"> {
</span><span class="cx">     ElementRareData&amp; data = ensureElementRareData();
</span><span class="cx">     if (!data.classList())
</span><del>-        data.setClassList(std::make_unique&lt;AttributeDOMTokenList&gt;(*this, HTMLNames::classAttr));
</del><ins>+        data.setClassList(AttributeDOMTokenList::create(*this, HTMLNames::classAttr));
</ins><span class="cx">     return *data.classList();
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoredomElementRareDatah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/ElementRareData.h (190133 => 190134)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/ElementRareData.h        2015-09-22 21:11:35 UTC (rev 190133)
+++ trunk/Source/WebCore/dom/ElementRareData.h        2015-09-22 21:24:28 UTC (rev 190134)
</span><span class="lines">@@ -93,7 +93,7 @@
</span><span class="cx">     void setComputedStyle(Ref&lt;RenderStyle&gt;&amp;&amp; computedStyle) { m_computedStyle = WTF::move(computedStyle); }
</span><span class="cx"> 
</span><span class="cx">     AttributeDOMTokenList* classList() const { return m_classList.get(); }
</span><del>-    void setClassList(std::unique_ptr&lt;AttributeDOMTokenList&gt; classList) { m_classList = WTF::move(classList); }
</del><ins>+    void setClassList(RefPtr&lt;AttributeDOMTokenList&gt;&amp;&amp; classList) { m_classList = WTF::move(classList); }
</ins><span class="cx"> 
</span><span class="cx">     DatasetDOMStringMap* dataset() const { return m_dataset.get(); }
</span><span class="cx">     void setDataset(std::unique_ptr&lt;DatasetDOMStringMap&gt; dataset) { m_dataset = WTF::move(dataset); }
</span><span class="lines">@@ -134,7 +134,7 @@
</span><span class="cx">     RefPtr&lt;RenderStyle&gt; m_computedStyle;
</span><span class="cx"> 
</span><span class="cx">     std::unique_ptr&lt;DatasetDOMStringMap&gt; m_dataset;
</span><del>-    std::unique_ptr&lt;AttributeDOMTokenList&gt; m_classList;
</del><ins>+    RefPtr&lt;AttributeDOMTokenList&gt; m_classList;
</ins><span class="cx">     RefPtr&lt;ShadowRoot&gt; m_shadowRoot;
</span><span class="cx">     std::unique_ptr&lt;NamedNodeMap&gt; m_attributeMap;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlAttributeDOMTokenListcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/AttributeDOMTokenList.cpp (190133 => 190134)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/AttributeDOMTokenList.cpp        2015-09-22 21:11:35 UTC (rev 190133)
+++ trunk/Source/WebCore/html/AttributeDOMTokenList.cpp        2015-09-22 21:24:28 UTC (rev 190134)
</span><span class="lines">@@ -34,7 +34,7 @@
</span><span class="cx">     : m_element(element)
</span><span class="cx">     , m_attributeName(attributeName)
</span><span class="cx"> {
</span><del>-    setValue(m_element.getAttribute(m_attributeName));
</del><ins>+    setValueInternal(m_element.getAttribute(m_attributeName));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void AttributeDOMTokenList::attributeValueChanged(const AtomicString&amp; newValue)
</span><span class="lines">@@ -43,7 +43,7 @@
</span><span class="cx">     if (m_isUpdatingAttributeValue)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    DOMTokenList::setValue(newValue);
</del><ins>+    setValueInternal(newValue);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void AttributeDOMTokenList::updateAfterTokenChange()
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlAttributeDOMTokenListh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/AttributeDOMTokenList.h (190133 => 190134)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/AttributeDOMTokenList.h        2015-09-22 21:11:35 UTC (rev 190133)
+++ trunk/Source/WebCore/html/AttributeDOMTokenList.h        2015-09-22 21:24:28 UTC (rev 190134)
</span><span class="lines">@@ -26,19 +26,22 @@
</span><span class="cx"> #ifndef AttributeDOMTokenList_h
</span><span class="cx"> #define AttributeDOMTokenList_h
</span><span class="cx"> 
</span><del>-#include &quot;DOMTokenList.h&quot;
</del><ins>+#include &quot;DOMSettableTokenList.h&quot;
</ins><span class="cx"> #include &quot;Element.h&quot;
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-class AttributeDOMTokenList final : public DOMTokenList {
</del><ins>+class AttributeDOMTokenList final : public DOMSettableTokenList {
</ins><span class="cx"> public:
</span><del>-    AttributeDOMTokenList(Element&amp;, const QualifiedName&amp; attributeName);
</del><ins>+    static Ref&lt;AttributeDOMTokenList&gt; create(Element&amp; element, const QualifiedName&amp; attributeName)
+    {
+        return adoptRef(*new AttributeDOMTokenList(element, attributeName));
+    }
+
</ins><span class="cx">     void attributeValueChanged(const AtomicString&amp;);
</span><span class="cx"> 
</span><span class="cx"> private:
</span><del>-    virtual void ref() override { m_element.ref(); }
-    virtual void deref() override { m_element.deref(); }
</del><ins>+    AttributeDOMTokenList(Element&amp;, const QualifiedName&amp; attributeName);
</ins><span class="cx"> 
</span><span class="cx">     virtual Element* element() const override { return &amp;m_element; }
</span><span class="cx">     virtual void updateAfterTokenChange() override;
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlDOMSettableTokenListcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/DOMSettableTokenList.cpp (190133 => 190134)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/DOMSettableTokenList.cpp        2015-09-22 21:11:35 UTC (rev 190133)
+++ trunk/Source/WebCore/html/DOMSettableTokenList.cpp        2015-09-22 21:24:28 UTC (rev 190134)
</span><span class="lines">@@ -38,4 +38,10 @@
</span><span class="cx">     RefCounted&lt;DOMSettableTokenList&gt;::deref();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void DOMSettableTokenList::setValue(const String&amp; value)
+{
+    setValueInternal(value);
+    updateAfterTokenChange();
+}
+
</ins><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlDOMSettableTokenListh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/DOMSettableTokenList.h (190133 => 190134)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/DOMSettableTokenList.h        2015-09-22 21:11:35 UTC (rev 190133)
+++ trunk/Source/WebCore/html/DOMSettableTokenList.h        2015-09-22 21:24:28 UTC (rev 190134)
</span><span class="lines">@@ -35,7 +35,7 @@
</span><span class="cx"> 
</span><span class="cx"> typedef int ExceptionCode;
</span><span class="cx"> 
</span><del>-class DOMSettableTokenList final : public DOMTokenList, public RefCounted&lt;DOMSettableTokenList&gt; {
</del><ins>+class DOMSettableTokenList : public DOMTokenList, public RefCounted&lt;DOMSettableTokenList&gt; {
</ins><span class="cx">     WTF_MAKE_FAST_ALLOCATED;
</span><span class="cx"> public:
</span><span class="cx">     static Ref&lt;DOMSettableTokenList&gt; create()
</span><span class="lines">@@ -43,12 +43,13 @@
</span><span class="cx">         return adoptRef(*new DOMSettableTokenList);
</span><span class="cx">     }
</span><span class="cx"> 
</span><ins>+    void setValue(const String&amp;);
+
</ins><span class="cx">     // Make public.
</span><span class="cx">     using DOMTokenList::value;
</span><del>-    using DOMTokenList::setValue;
</del><span class="cx"> 
</span><del>-    virtual void ref() override;
-    virtual void deref() override;
</del><ins>+    virtual void ref() override final;
+    virtual void deref() override final;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlDOMTokenListcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/DOMTokenList.cpp (190133 => 190134)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/DOMTokenList.cpp        2015-09-22 21:11:35 UTC (rev 190133)
+++ trunk/Source/WebCore/html/DOMTokenList.cpp        2015-09-22 21:24:28 UTC (rev 190134)
</span><span class="lines">@@ -158,7 +158,7 @@
</span><span class="cx">     return m_cachedValue;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void DOMTokenList::setValue(const String&amp; value)
</del><ins>+void DOMTokenList::setValueInternal(const WTF::String&amp; value)
</ins><span class="cx"> {
</span><span class="cx">     // Clear tokens but not capacity.
</span><span class="cx">     m_tokens.shrink(0);
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlDOMTokenListh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/DOMTokenList.h (190133 => 190134)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/DOMTokenList.h        2015-09-22 21:11:35 UTC (rev 190133)
+++ trunk/Source/WebCore/html/DOMTokenList.h        2015-09-22 21:24:28 UTC (rev 190134)
</span><span class="lines">@@ -61,7 +61,7 @@
</span><span class="cx"> protected:
</span><span class="cx">     DOMTokenList() = default;
</span><span class="cx">     const AtomicString&amp; value() const;
</span><del>-    void setValue(const String&amp;);
</del><ins>+    void setValueInternal(const String&amp;);
</ins><span class="cx"> 
</span><span class="cx">     virtual void updateAfterTokenChange() { m_cachedValue = nullAtom; }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLAnchorElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLAnchorElement.cpp (190133 => 190134)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLAnchorElement.cpp        2015-09-22 21:11:35 UTC (rev 190133)
+++ trunk/Source/WebCore/html/HTMLAnchorElement.cpp        2015-09-22 21:24:28 UTC (rev 190134)
</span><span class="lines">@@ -316,7 +316,7 @@
</span><span class="cx"> DOMTokenList&amp; HTMLAnchorElement::relList()
</span><span class="cx"> {
</span><span class="cx">     if (!m_relList) 
</span><del>-        m_relList = std::make_unique&lt;AttributeDOMTokenList&gt;(*this, HTMLNames::relAttr);
</del><ins>+        m_relList = AttributeDOMTokenList::create(*this, HTMLNames::relAttr);
</ins><span class="cx">     return *m_relList;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLAnchorElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLAnchorElement.h (190133 => 190134)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLAnchorElement.h        2015-09-22 21:11:35 UTC (rev 190133)
+++ trunk/Source/WebCore/html/HTMLAnchorElement.h        2015-09-22 21:24:28 UTC (rev 190134)
</span><span class="lines">@@ -145,7 +145,7 @@
</span><span class="cx">     uint32_t m_linkRelations : 30;
</span><span class="cx">     mutable LinkHash m_cachedVisitedLinkHash;
</span><span class="cx"> 
</span><del>-    std::unique_ptr&lt;AttributeDOMTokenList&gt; m_relList;
</del><ins>+    RefPtr&lt;AttributeDOMTokenList&gt; m_relList;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> inline LinkHash HTMLAnchorElement::visitedLinkHash() const
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLLinkElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLLinkElement.cpp (190133 => 190134)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLLinkElement.cpp        2015-09-22 21:11:35 UTC (rev 190133)
+++ trunk/Source/WebCore/html/HTMLLinkElement.cpp        2015-09-22 21:24:28 UTC (rev 190134)
</span><span class="lines">@@ -403,7 +403,7 @@
</span><span class="cx"> DOMTokenList&amp; HTMLLinkElement::relList()
</span><span class="cx"> {
</span><span class="cx">     if (!m_relList) 
</span><del>-        m_relList = std::make_unique&lt;AttributeDOMTokenList&gt;(*this, HTMLNames::relAttr);
</del><ins>+        m_relList = AttributeDOMTokenList::create(*this, HTMLNames::relAttr);
</ins><span class="cx">     return *m_relList;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLLinkElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLLinkElement.h (190133 => 190134)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLLinkElement.h        2015-09-22 21:11:35 UTC (rev 190133)
+++ trunk/Source/WebCore/html/HTMLLinkElement.h        2015-09-22 21:24:28 UTC (rev 190134)
</span><span class="lines">@@ -139,7 +139,7 @@
</span><span class="cx"> 
</span><span class="cx">     PendingSheetType m_pendingSheetType;
</span><span class="cx"> 
</span><del>-    std::unique_ptr&lt;AttributeDOMTokenList&gt; m_relList;
</del><ins>+    RefPtr&lt;AttributeDOMTokenList&gt; m_relList;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } //namespace
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLOutputElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLOutputElement.cpp (190133 => 190134)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLOutputElement.cpp        2015-09-22 21:11:35 UTC (rev 190133)
+++ trunk/Source/WebCore/html/HTMLOutputElement.cpp        2015-09-22 21:24:28 UTC (rev 190134)
</span><span class="lines">@@ -37,12 +37,14 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><ins>+using namespace HTMLNames;
+
</ins><span class="cx"> inline HTMLOutputElement::HTMLOutputElement(const QualifiedName&amp; tagName, Document&amp; document, HTMLFormElement* form)
</span><span class="cx">     : HTMLFormControlElement(tagName, document, form)
</span><span class="cx">     , m_isDefaultValueMode(true)
</span><span class="cx">     , m_isSetTextContentInProgress(false)
</span><span class="cx">     , m_defaultValue(&quot;&quot;)
</span><del>-    , m_tokens(DOMSettableTokenList::create())
</del><ins>+    , m_tokens(AttributeDOMTokenList::create(*this, forAttr))
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -64,17 +66,12 @@
</span><span class="cx"> 
</span><span class="cx"> void HTMLOutputElement::parseAttribute(const QualifiedName&amp; name, const AtomicString&amp; value)
</span><span class="cx"> {
</span><del>-    if (name == HTMLNames::forAttr)
-        setFor(value);
</del><ins>+    if (name == forAttr)
+        m_tokens-&gt;attributeValueChanged(value);
</ins><span class="cx">     else
</span><span class="cx">         HTMLFormControlElement::parseAttribute(name, value);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void HTMLOutputElement::setFor(const String&amp; value)
-{
-    m_tokens-&gt;setValue(value);
-}
-
</del><span class="cx"> void HTMLOutputElement::childrenChanged(const ChildChange&amp; change)
</span><span class="cx"> {
</span><span class="cx">     HTMLFormControlElement::childrenChanged(change);
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLOutputElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLOutputElement.h (190133 => 190134)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLOutputElement.h        2015-09-22 21:11:35 UTC (rev 190133)
+++ trunk/Source/WebCore/html/HTMLOutputElement.h        2015-09-22 21:24:28 UTC (rev 190134)
</span><span class="lines">@@ -31,7 +31,7 @@
</span><span class="cx"> #ifndef HTMLOutputElement_h
</span><span class="cx"> #define HTMLOutputElement_h
</span><span class="cx"> 
</span><del>-#include &quot;DOMSettableTokenList.h&quot;
</del><ins>+#include &quot;AttributeDOMTokenList.h&quot;
</ins><span class="cx"> #include &quot;HTMLFormControlElement.h&quot;
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="lines">@@ -44,7 +44,6 @@
</span><span class="cx">     void setValue(const String&amp;);
</span><span class="cx">     String defaultValue() const;
</span><span class="cx">     void setDefaultValue(const String&amp;);
</span><del>-    void setFor(const String&amp;);
</del><span class="cx">     DOMSettableTokenList&amp; htmlFor() { return m_tokens.get(); }
</span><span class="cx">     
</span><span class="cx">     virtual bool canContainRangeEndPoint() const override { return false; }
</span><span class="lines">@@ -66,7 +65,7 @@
</span><span class="cx">     bool m_isDefaultValueMode;
</span><span class="cx">     bool m_isSetTextContentInProgress;
</span><span class="cx">     String m_defaultValue;
</span><del>-    Ref&lt;DOMSettableTokenList&gt; m_tokens;
</del><ins>+    Ref&lt;AttributeDOMTokenList&gt; m_tokens;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLOutputElementidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLOutputElement.idl (190133 => 190134)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLOutputElement.idl        2015-09-22 21:11:35 UTC (rev 190133)
+++ trunk/Source/WebCore/html/HTMLOutputElement.idl        2015-09-22 21:24:28 UTC (rev 190134)
</span><span class="lines">@@ -23,9 +23,7 @@
</span><span class="cx">  */
</span><span class="cx"> 
</span><span class="cx"> interface HTMLOutputElement : HTMLElement {
</span><del>-    // FIXME: This is supposed to be:
-    // [PutForwards=value] readonly attribute DOMSettableTokenList htmlFor;
-    readonly attribute DOMSettableTokenList htmlFor;
</del><ins>+    [PutForwards=value] readonly attribute DOMSettableTokenList htmlFor;
</ins><span class="cx"> 
</span><span class="cx">     readonly attribute HTMLFormElement form;
</span><span class="cx">     [Reflect] attribute DOMString name;
</span></span></pre>
</div>
</div>

</body>
</html>