<!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>[197260] 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/197260">197260</a></dd>
<dt>Author</dt> <dd>cdumez@apple.com</dd>
<dt>Date</dt> <dd>2016-02-27 16:35:18 -0800 (Sat, 27 Feb 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Align HTMLMarqueeElement.scrollAmount / scrollDelay with the specification
https://bugs.webkit.org/show_bug.cgi?id=154781

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Rebaseline now that more checks are passing.

* web-platform-tests/html/dom/reflection-obsolete-expected.txt:

Source/WebCore:

Align HTMLMarqueeElement.scrollAmount / scrollDelay with the
specification:
- https://www.w3.org/TR/html5/obsolete.html#the-marquee-element-0

In particular:
- The attributes should have unsigned long type
- We should not throw for negative values
- Values should be in the range [0, 2147483647] as per:
- https://html.spec.whatwg.org/multipage/infrastructure.html#reflect

No new tests, already covered by existing tests.

* html/HTMLMarqueeElement.cpp:
(WebCore::HTMLMarqueeElement::scrollAmount):
(WebCore::HTMLMarqueeElement::setScrollAmount):
(WebCore::HTMLMarqueeElement::scrollDelay):
(WebCore::HTMLMarqueeElement::setScrollDelay):
(WebCore::HTMLMarqueeElement::loop): Deleted.
* html/HTMLMarqueeElement.h:
* html/HTMLMarqueeElement.idl:

LayoutTests:

Update existing test to reflect the behavior changes.

* fast/html/marquee-element-expected.txt:
* fast/html/marquee-element.html:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsfasthtmlmarqueeelementexpectedtxt">trunk/LayoutTests/fast/html/marquee-element-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfasthtmlmarqueeelementhtml">trunk/LayoutTests/fast/html/marquee-element.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cChangeLog">trunk/LayoutTests/imported/w3c/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmldomreflectionobsoleteexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/reflection-obsolete-expected.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLMarqueeElementcpp">trunk/Source/WebCore/html/HTMLMarqueeElement.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLMarqueeElementh">trunk/Source/WebCore/html/HTMLMarqueeElement.h</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLMarqueeElementidl">trunk/Source/WebCore/html/HTMLMarqueeElement.idl</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (197259 => 197260)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-02-27 21:05:24 UTC (rev 197259)
+++ trunk/LayoutTests/ChangeLog        2016-02-28 00:35:18 UTC (rev 197260)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2016-02-27  Chris Dumez  &lt;cdumez@apple.com&gt;
+
+        Align HTMLMarqueeElement.scrollAmount / scrollDelay with the specification
+        https://bugs.webkit.org/show_bug.cgi?id=154781
+
+        Reviewed by Darin Adler.
+
+        Update existing test to reflect the behavior changes.
+
+        * fast/html/marquee-element-expected.txt:
+        * fast/html/marquee-element.html:
+
</ins><span class="cx"> 2016-02-27  Alexey Proskuryakov  &lt;ap@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Mark failing reftests as such, now that we detect reftest failures.
</span></span></pre></div>
<a id="trunkLayoutTestsfasthtmlmarqueeelementexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/html/marquee-element-expected.txt (197259 => 197260)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/html/marquee-element-expected.txt        2016-02-27 21:05:24 UTC (rev 197259)
+++ trunk/LayoutTests/fast/html/marquee-element-expected.txt        2016-02-28 00:35:18 UTC (rev 197260)
</span><span class="lines">@@ -67,10 +67,12 @@
</span><span class="cx"> PASS marquee.scrollAmount is 5
</span><span class="cx"> &quot;scrollAmount&quot; can contain trailing non-numeric values:
</span><span class="cx"> PASS marquee.scrollAmount is 5
</span><del>-Setting &quot;scrollAmount&quot; to a negative value raises an exception:
-PASS document.getElementById(&quot;marquee&quot;).scrollAmount = -1; threw exception Error: IndexSizeError: DOM Exception 1.
-Setting &quot;scrollAmount&quot; to a value that is too large raises an exception:
-PASS document.getElementById(&quot;marquee&quot;).scrollAmount = 2147483648; threw exception Error: IndexSizeError: DOM Exception 1.
</del><ins>+Setting &quot;scrollAmount&quot; to a negative value should set to the default value:
+PASS marquee.scrollAmount = -1; did not throw exception.
+PASS marquee.scrollAmount is 6
+Setting &quot;scrollAmount&quot; to a value that is too large should set to the default value:
+PASS marquee.scrollAmount = 2147483648; did not throw exception.
+PASS marquee.scrollAmount is 6
</ins><span class="cx"> Default &quot;scrollDelay&quot; value is 85:
</span><span class="cx"> PASS marquee.scrollDelay is 85
</span><span class="cx"> &quot;scrollDelay&quot; uses default value when content attribute is not a number:
</span><span class="lines">@@ -87,10 +89,12 @@
</span><span class="cx"> PASS marquee.scrollDelay is 5
</span><span class="cx"> &quot;scrollDelay&quot; can contain trailing non-numeric values:
</span><span class="cx"> PASS marquee.scrollDelay is 5
</span><del>-Setting &quot;scrollDelay&quot; to a negative value raises an exception:
-PASS document.getElementById(&quot;marquee&quot;).scrollDelay = -1; threw exception Error: IndexSizeError: DOM Exception 1.
-Setting &quot;scrollDelay&quot; to a value that is too large raises an exception:
-PASS document.getElementById(&quot;marquee&quot;).scrollDelay = 2147483648; threw exception Error: IndexSizeError: DOM Exception 1.
</del><ins>+Setting &quot;scrollDelay&quot; to a negative value should set to the default value:
+PASS marquee.scrollDelay = -1; did not throw exception.
+PASS marquee.scrollDelay is 85
+Setting &quot;scrollDelay&quot; to a value that is too large should set to the default value:
+PASS marquee.scrollDelay = 2147483648; did not throw exception.
+PASS marquee.scrollDelay is 85
</ins><span class="cx"> Default &quot;loop&quot; value is -1:
</span><span class="cx"> PASS marquee.loop is -1
</span><span class="cx"> &quot;loop&quot; uses default value when content attribute is not a number:
</span><span class="lines">@@ -112,7 +116,7 @@
</span><span class="cx"> Setting &quot;loop&quot; to 0 raises an exception:
</span><span class="cx"> PASS document.getElementById(&quot;marquee&quot;).loop = 0; threw exception Error: IndexSizeError: DOM Exception 1.
</span><span class="cx"> Setting &quot;loop&quot; to a negative value raises an exception:
</span><del>-PASS document.getElementById(&quot;marquee&quot;).scrollDelay = -5; threw exception Error: IndexSizeError: DOM Exception 1.
</del><ins>+PASS document.getElementById(&quot;marquee&quot;).loop = -5; threw exception Error: IndexSizeError: DOM Exception 1.
</ins><span class="cx"> &quot;loop&quot; can be set to -1 by script:
</span><span class="cx"> PASS marquee.loop is -1
</span><span class="cx"> PASS successfullyParsed is true
</span></span></pre></div>
<a id="trunkLayoutTestsfasthtmlmarqueeelementhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/html/marquee-element.html (197259 => 197260)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/html/marquee-element.html        2016-02-27 21:05:24 UTC (rev 197259)
+++ trunk/LayoutTests/fast/html/marquee-element.html        2016-02-28 00:35:18 UTC (rev 197260)
</span><span class="lines">@@ -181,13 +181,17 @@
</span><span class="cx"> marquee = document.getElementById('marquee');
</span><span class="cx"> shouldBe('marquee.scrollAmount', '5');
</span><span class="cx"> 
</span><del>-debug('Setting &quot;scrollAmount&quot; to a negative value raises an exception:');
</del><ins>+debug('Setting &quot;scrollAmount&quot; to a negative value should set to the default value:');
</ins><span class="cx"> testParent.innerHTML = '&lt;marquee id=&quot;marquee&quot;&gt;test&lt;/marquee&gt;';
</span><del>-shouldThrow('document.getElementById(&quot;marquee&quot;).scrollAmount = -1;');
</del><ins>+marquee = document.getElementById('marquee');
+shouldNotThrow('marquee.scrollAmount = -1;');
+shouldBe('marquee.scrollAmount', '6');
</ins><span class="cx"> 
</span><del>-debug('Setting &quot;scrollAmount&quot; to a value that is too large raises an exception:');
</del><ins>+debug('Setting &quot;scrollAmount&quot; to a value that is too large should set to the default value:');
</ins><span class="cx"> testParent.innerHTML = '&lt;marquee id=&quot;marquee&quot;&gt;test&lt;/marquee&gt;';
</span><del>-shouldThrow('document.getElementById(&quot;marquee&quot;).scrollAmount = 2147483648;');
</del><ins>+marquee = document.getElementById('marquee');
+shouldNotThrow('marquee.scrollAmount = 2147483648;');
+shouldBe('marquee.scrollAmount', '6');
</ins><span class="cx"> 
</span><span class="cx"> debug('Default &quot;scrollDelay&quot; value is 85:');
</span><span class="cx"> testParent.innerHTML = '&lt;marquee id=&quot;marquee&quot;&gt;test&lt;/marquee&gt;';
</span><span class="lines">@@ -229,13 +233,17 @@
</span><span class="cx"> marquee = document.getElementById('marquee');
</span><span class="cx"> shouldBe('marquee.scrollDelay', '5');
</span><span class="cx"> 
</span><del>-debug('Setting &quot;scrollDelay&quot; to a negative value raises an exception:');
</del><ins>+debug('Setting &quot;scrollDelay&quot; to a negative value should set to the default value:');
</ins><span class="cx"> testParent.innerHTML = '&lt;marquee id=&quot;marquee&quot;&gt;test&lt;/marquee&gt;';
</span><del>-shouldThrow('document.getElementById(&quot;marquee&quot;).scrollDelay = -1;');
</del><ins>+marquee = document.getElementById('marquee');
+shouldNotThrow('marquee.scrollDelay = -1;');
+shouldBe('marquee.scrollDelay', '85');
</ins><span class="cx"> 
</span><del>-debug('Setting &quot;scrollDelay&quot; to a value that is too large raises an exception:');
</del><ins>+debug('Setting &quot;scrollDelay&quot; to a value that is too large should set to the default value:');
</ins><span class="cx"> testParent.innerHTML = '&lt;marquee id=&quot;marquee&quot;&gt;test&lt;/marquee&gt;';
</span><del>-shouldThrow('document.getElementById(&quot;marquee&quot;).scrollDelay = 2147483648;');
</del><ins>+marquee = document.getElementById('marquee');
+shouldNotThrow('marquee.scrollDelay = 2147483648;');
+shouldBe('marquee.scrollDelay', '85');
</ins><span class="cx"> 
</span><span class="cx"> debug('Default &quot;loop&quot; value is -1:');
</span><span class="cx"> testParent.innerHTML = '&lt;marquee id=&quot;marquee&quot;&gt;test&lt;/marquee&gt;';
</span><span class="lines">@@ -288,7 +296,7 @@
</span><span class="cx"> 
</span><span class="cx"> debug('Setting &quot;loop&quot; to a negative value raises an exception:');
</span><span class="cx"> testParent.innerHTML = '&lt;marquee id=&quot;marquee&quot;&gt;test&lt;/marquee&gt;';
</span><del>-shouldThrow('document.getElementById(&quot;marquee&quot;).scrollDelay = -5;');
</del><ins>+shouldThrow('document.getElementById(&quot;marquee&quot;).loop = -5;');
</ins><span class="cx"> 
</span><span class="cx"> debug('&quot;loop&quot; can be set to -1 by script:');
</span><span class="cx"> testParent.innerHTML = '&lt;marquee id=&quot;marquee&quot; loop=&quot;5&quot;&gt;test&lt;/marquee&gt;';
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/ChangeLog (197259 => 197260)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/ChangeLog        2016-02-27 21:05:24 UTC (rev 197259)
+++ trunk/LayoutTests/imported/w3c/ChangeLog        2016-02-28 00:35:18 UTC (rev 197260)
</span><span class="lines">@@ -1,3 +1,14 @@
</span><ins>+2016-02-27  Chris Dumez  &lt;cdumez@apple.com&gt;
+
+        Align HTMLMarqueeElement.scrollAmount / scrollDelay with the specification
+        https://bugs.webkit.org/show_bug.cgi?id=154781
+
+        Reviewed by Darin Adler.
+
+        Rebaseline now that more checks are passing.
+
+        * web-platform-tests/html/dom/reflection-obsolete-expected.txt:
+
</ins><span class="cx"> 2016-02-26  Chris Dumez  &lt;cdumez@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Fix the behavior of reflecting IDL attributes of type unsigned long
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmldomreflectionobsoleteexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/reflection-obsolete-expected.txt (197259 => 197260)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/reflection-obsolete-expected.txt        2016-02-27 21:05:24 UTC (rev 197259)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/reflection-obsolete-expected.txt        2016-02-28 00:35:18 UTC (rev 197260)
</span><span class="lines">@@ -2813,7 +2813,7 @@
</span><span class="cx"> PASS marquee.scrollAmount: setAttribute() to &quot;\t7&quot; followed by getAttribute() 
</span><span class="cx"> PASS marquee.scrollAmount: setAttribute() to &quot;\t7&quot; followed by IDL get 
</span><span class="cx"> PASS marquee.scrollAmount: setAttribute() to &quot;\v7&quot; followed by getAttribute() 
</span><del>-FAIL marquee.scrollAmount: setAttribute() to &quot;\v7&quot; followed by IDL get assert_equals: expected 6 but got 7
</del><ins>+PASS marquee.scrollAmount: setAttribute() to &quot;\v7&quot; followed by IDL get 
</ins><span class="cx"> PASS marquee.scrollAmount: setAttribute() to &quot;\f7&quot; followed by getAttribute() 
</span><span class="cx"> PASS marquee.scrollAmount: setAttribute() to &quot;\f7&quot; followed by IDL get 
</span><span class="cx"> PASS marquee.scrollAmount: setAttribute() to &quot; 7&quot; followed by getAttribute() 
</span><span class="lines">@@ -2827,39 +2827,39 @@
</span><span class="cx"> PASS marquee.scrollAmount: setAttribute() to &quot;\r7&quot; followed by getAttribute() 
</span><span class="cx"> PASS marquee.scrollAmount: setAttribute() to &quot;\r7&quot; followed by IDL get 
</span><span class="cx"> PASS marquee.scrollAmount: setAttribute() to &quot;
7&quot; followed by getAttribute() 
</span><del>-FAIL marquee.scrollAmount: setAttribute() to &quot;
7&quot; followed by IDL get assert_equals: expected 6 but got 7
</del><ins>+PASS marquee.scrollAmount: setAttribute() to &quot;
7&quot; followed by IDL get 
</ins><span class="cx"> PASS marquee.scrollAmount: setAttribute() to &quot;
7&quot; followed by getAttribute() 
</span><span class="cx"> PASS marquee.scrollAmount: setAttribute() to &quot;
7&quot; followed by IDL get 
</span><span class="cx"> PASS marquee.scrollAmount: setAttribute() to &quot; 7&quot; followed by getAttribute() 
</span><del>-FAIL marquee.scrollAmount: setAttribute() to &quot; 7&quot; followed by IDL get assert_equals: expected 6 but got 7
</del><ins>+PASS marquee.scrollAmount: setAttribute() to &quot; 7&quot; followed by IDL get 
</ins><span class="cx"> PASS marquee.scrollAmount: setAttribute() to &quot;᠎7&quot; followed by getAttribute() 
</span><span class="cx"> PASS marquee.scrollAmount: setAttribute() to &quot;᠎7&quot; followed by IDL get 
</span><span class="cx"> PASS marquee.scrollAmount: setAttribute() to &quot; 7&quot; followed by getAttribute() 
</span><del>-FAIL marquee.scrollAmount: setAttribute() to &quot; 7&quot; followed by IDL get assert_equals: expected 6 but got 7
</del><ins>+PASS marquee.scrollAmount: setAttribute() to &quot; 7&quot; followed by IDL get 
</ins><span class="cx"> PASS marquee.scrollAmount: setAttribute() to &quot; 7&quot; followed by getAttribute() 
</span><del>-FAIL marquee.scrollAmount: setAttribute() to &quot; 7&quot; followed by IDL get assert_equals: expected 6 but got 7
</del><ins>+PASS marquee.scrollAmount: setAttribute() to &quot; 7&quot; followed by IDL get 
</ins><span class="cx"> PASS marquee.scrollAmount: setAttribute() to &quot; 7&quot; followed by getAttribute() 
</span><del>-FAIL marquee.scrollAmount: setAttribute() to &quot; 7&quot; followed by IDL get assert_equals: expected 6 but got 7
</del><ins>+PASS marquee.scrollAmount: setAttribute() to &quot; 7&quot; followed by IDL get 
</ins><span class="cx"> PASS marquee.scrollAmount: setAttribute() to &quot; 7&quot; followed by getAttribute() 
</span><del>-FAIL marquee.scrollAmount: setAttribute() to &quot; 7&quot; followed by IDL get assert_equals: expected 6 but got 7
</del><ins>+PASS marquee.scrollAmount: setAttribute() to &quot; 7&quot; followed by IDL get 
</ins><span class="cx"> PASS marquee.scrollAmount: setAttribute() to &quot; 7&quot; followed by getAttribute() 
</span><del>-FAIL marquee.scrollAmount: setAttribute() to &quot; 7&quot; followed by IDL get assert_equals: expected 6 but got 7
</del><ins>+PASS marquee.scrollAmount: setAttribute() to &quot; 7&quot; followed by IDL get 
</ins><span class="cx"> PASS marquee.scrollAmount: setAttribute() to &quot; 7&quot; followed by getAttribute() 
</span><del>-FAIL marquee.scrollAmount: setAttribute() to &quot; 7&quot; followed by IDL get assert_equals: expected 6 but got 7
</del><ins>+PASS marquee.scrollAmount: setAttribute() to &quot; 7&quot; followed by IDL get 
</ins><span class="cx"> PASS marquee.scrollAmount: setAttribute() to &quot; 7&quot; followed by getAttribute() 
</span><del>-FAIL marquee.scrollAmount: setAttribute() to &quot; 7&quot; followed by IDL get assert_equals: expected 6 but got 7
</del><ins>+PASS marquee.scrollAmount: setAttribute() to &quot; 7&quot; followed by IDL get 
</ins><span class="cx"> PASS marquee.scrollAmount: setAttribute() to &quot; 7&quot; followed by getAttribute() 
</span><del>-FAIL marquee.scrollAmount: setAttribute() to &quot; 7&quot; followed by IDL get assert_equals: expected 6 but got 7
</del><ins>+PASS marquee.scrollAmount: setAttribute() to &quot; 7&quot; followed by IDL get 
</ins><span class="cx"> PASS marquee.scrollAmount: setAttribute() to &quot; 7&quot; followed by getAttribute() 
</span><del>-FAIL marquee.scrollAmount: setAttribute() to &quot; 7&quot; followed by IDL get assert_equals: expected 6 but got 7
</del><ins>+PASS marquee.scrollAmount: setAttribute() to &quot; 7&quot; followed by IDL get 
</ins><span class="cx"> PASS marquee.scrollAmount: setAttribute() to &quot; 7&quot; followed by getAttribute() 
</span><del>-FAIL marquee.scrollAmount: setAttribute() to &quot; 7&quot; followed by IDL get assert_equals: expected 6 but got 7
</del><ins>+PASS marquee.scrollAmount: setAttribute() to &quot; 7&quot; followed by IDL get 
</ins><span class="cx"> PASS marquee.scrollAmount: setAttribute() to &quot; 7&quot; followed by getAttribute() 
</span><del>-FAIL marquee.scrollAmount: setAttribute() to &quot; 7&quot; followed by IDL get assert_equals: expected 6 but got 7
</del><ins>+PASS marquee.scrollAmount: setAttribute() to &quot; 7&quot; followed by IDL get 
</ins><span class="cx"> PASS marquee.scrollAmount: setAttribute() to &quot; 7&quot; followed by getAttribute() 
</span><span class="cx"> PASS marquee.scrollAmount: setAttribute() to &quot; 7&quot; followed by IDL get 
</span><span class="cx"> PASS marquee.scrollAmount: setAttribute() to &quot; 7&quot; followed by getAttribute() 
</span><del>-FAIL marquee.scrollAmount: setAttribute() to &quot; 7&quot; followed by IDL get assert_equals: expected 6 but got 7
</del><ins>+PASS marquee.scrollAmount: setAttribute() to &quot; 7&quot; followed by IDL get 
</ins><span class="cx"> PASS marquee.scrollAmount: setAttribute() to &quot; \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f  foo &quot; followed by getAttribute() 
</span><span class="cx"> PASS marquee.scrollAmount: setAttribute() to &quot; \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f  foo &quot; followed by IDL get 
</span><span class="cx"> PASS marquee.scrollAmount: setAttribute() to undefined followed by getAttribute() 
</span><span class="lines">@@ -2899,8 +2899,12 @@
</span><span class="cx"> PASS marquee.scrollAmount: IDL set to &quot;-0&quot; should not throw 
</span><span class="cx"> PASS marquee.scrollAmount: IDL set to &quot;-0&quot; followed by getAttribute() 
</span><span class="cx"> PASS marquee.scrollAmount: IDL set to &quot;-0&quot; followed by IDL get 
</span><del>-FAIL marquee.scrollAmount: IDL set to 2147483648 should not throw IndexSizeError: DOM Exception 1
-FAIL marquee.scrollAmount: IDL set to 4294967295 should not throw IndexSizeError: DOM Exception 1
</del><ins>+PASS marquee.scrollAmount: IDL set to 2147483648 should not throw 
+PASS marquee.scrollAmount: IDL set to 2147483648 followed by getAttribute() 
+PASS marquee.scrollAmount: IDL set to 2147483648 followed by IDL get 
+PASS marquee.scrollAmount: IDL set to 4294967295 should not throw 
+PASS marquee.scrollAmount: IDL set to 4294967295 followed by getAttribute() 
+PASS marquee.scrollAmount: IDL set to 4294967295 followed by IDL get 
</ins><span class="cx"> PASS marquee.scrollDelay: typeof IDL attribute 
</span><span class="cx"> PASS marquee.scrollDelay: IDL get with DOM attribute unset 
</span><span class="cx"> PASS marquee.scrollDelay: setAttribute() to -2147483649 followed by getAttribute() 
</span><span class="lines">@@ -2938,7 +2942,7 @@
</span><span class="cx"> PASS marquee.scrollDelay: setAttribute() to &quot;\t7&quot; followed by getAttribute() 
</span><span class="cx"> PASS marquee.scrollDelay: setAttribute() to &quot;\t7&quot; followed by IDL get 
</span><span class="cx"> PASS marquee.scrollDelay: setAttribute() to &quot;\v7&quot; followed by getAttribute() 
</span><del>-FAIL marquee.scrollDelay: setAttribute() to &quot;\v7&quot; followed by IDL get assert_equals: expected 85 but got 7
</del><ins>+PASS marquee.scrollDelay: setAttribute() to &quot;\v7&quot; followed by IDL get 
</ins><span class="cx"> PASS marquee.scrollDelay: setAttribute() to &quot;\f7&quot; followed by getAttribute() 
</span><span class="cx"> PASS marquee.scrollDelay: setAttribute() to &quot;\f7&quot; followed by IDL get 
</span><span class="cx"> PASS marquee.scrollDelay: setAttribute() to &quot; 7&quot; followed by getAttribute() 
</span><span class="lines">@@ -2952,39 +2956,39 @@
</span><span class="cx"> PASS marquee.scrollDelay: setAttribute() to &quot;\r7&quot; followed by getAttribute() 
</span><span class="cx"> PASS marquee.scrollDelay: setAttribute() to &quot;\r7&quot; followed by IDL get 
</span><span class="cx"> PASS marquee.scrollDelay: setAttribute() to &quot;
7&quot; followed by getAttribute() 
</span><del>-FAIL marquee.scrollDelay: setAttribute() to &quot;
7&quot; followed by IDL get assert_equals: expected 85 but got 7
</del><ins>+PASS marquee.scrollDelay: setAttribute() to &quot;
7&quot; followed by IDL get 
</ins><span class="cx"> PASS marquee.scrollDelay: setAttribute() to &quot;
7&quot; followed by getAttribute() 
</span><span class="cx"> PASS marquee.scrollDelay: setAttribute() to &quot;
7&quot; followed by IDL get 
</span><span class="cx"> PASS marquee.scrollDelay: setAttribute() to &quot; 7&quot; followed by getAttribute() 
</span><del>-FAIL marquee.scrollDelay: setAttribute() to &quot; 7&quot; followed by IDL get assert_equals: expected 85 but got 7
</del><ins>+PASS marquee.scrollDelay: setAttribute() to &quot; 7&quot; followed by IDL get 
</ins><span class="cx"> PASS marquee.scrollDelay: setAttribute() to &quot;᠎7&quot; followed by getAttribute() 
</span><span class="cx"> PASS marquee.scrollDelay: setAttribute() to &quot;᠎7&quot; followed by IDL get 
</span><span class="cx"> PASS marquee.scrollDelay: setAttribute() to &quot; 7&quot; followed by getAttribute() 
</span><del>-FAIL marquee.scrollDelay: setAttribute() to &quot; 7&quot; followed by IDL get assert_equals: expected 85 but got 7
</del><ins>+PASS marquee.scrollDelay: setAttribute() to &quot; 7&quot; followed by IDL get 
</ins><span class="cx"> PASS marquee.scrollDelay: setAttribute() to &quot; 7&quot; followed by getAttribute() 
</span><del>-FAIL marquee.scrollDelay: setAttribute() to &quot; 7&quot; followed by IDL get assert_equals: expected 85 but got 7
</del><ins>+PASS marquee.scrollDelay: setAttribute() to &quot; 7&quot; followed by IDL get 
</ins><span class="cx"> PASS marquee.scrollDelay: setAttribute() to &quot; 7&quot; followed by getAttribute() 
</span><del>-FAIL marquee.scrollDelay: setAttribute() to &quot; 7&quot; followed by IDL get assert_equals: expected 85 but got 7
</del><ins>+PASS marquee.scrollDelay: setAttribute() to &quot; 7&quot; followed by IDL get 
</ins><span class="cx"> PASS marquee.scrollDelay: setAttribute() to &quot; 7&quot; followed by getAttribute() 
</span><del>-FAIL marquee.scrollDelay: setAttribute() to &quot; 7&quot; followed by IDL get assert_equals: expected 85 but got 7
</del><ins>+PASS marquee.scrollDelay: setAttribute() to &quot; 7&quot; followed by IDL get 
</ins><span class="cx"> PASS marquee.scrollDelay: setAttribute() to &quot; 7&quot; followed by getAttribute() 
</span><del>-FAIL marquee.scrollDelay: setAttribute() to &quot; 7&quot; followed by IDL get assert_equals: expected 85 but got 7
</del><ins>+PASS marquee.scrollDelay: setAttribute() to &quot; 7&quot; followed by IDL get 
</ins><span class="cx"> PASS marquee.scrollDelay: setAttribute() to &quot; 7&quot; followed by getAttribute() 
</span><del>-FAIL marquee.scrollDelay: setAttribute() to &quot; 7&quot; followed by IDL get assert_equals: expected 85 but got 7
</del><ins>+PASS marquee.scrollDelay: setAttribute() to &quot; 7&quot; followed by IDL get 
</ins><span class="cx"> PASS marquee.scrollDelay: setAttribute() to &quot; 7&quot; followed by getAttribute() 
</span><del>-FAIL marquee.scrollDelay: setAttribute() to &quot; 7&quot; followed by IDL get assert_equals: expected 85 but got 7
</del><ins>+PASS marquee.scrollDelay: setAttribute() to &quot; 7&quot; followed by IDL get 
</ins><span class="cx"> PASS marquee.scrollDelay: setAttribute() to &quot; 7&quot; followed by getAttribute() 
</span><del>-FAIL marquee.scrollDelay: setAttribute() to &quot; 7&quot; followed by IDL get assert_equals: expected 85 but got 7
</del><ins>+PASS marquee.scrollDelay: setAttribute() to &quot; 7&quot; followed by IDL get 
</ins><span class="cx"> PASS marquee.scrollDelay: setAttribute() to &quot; 7&quot; followed by getAttribute() 
</span><del>-FAIL marquee.scrollDelay: setAttribute() to &quot; 7&quot; followed by IDL get assert_equals: expected 85 but got 7
</del><ins>+PASS marquee.scrollDelay: setAttribute() to &quot; 7&quot; followed by IDL get 
</ins><span class="cx"> PASS marquee.scrollDelay: setAttribute() to &quot; 7&quot; followed by getAttribute() 
</span><del>-FAIL marquee.scrollDelay: setAttribute() to &quot; 7&quot; followed by IDL get assert_equals: expected 85 but got 7
</del><ins>+PASS marquee.scrollDelay: setAttribute() to &quot; 7&quot; followed by IDL get 
</ins><span class="cx"> PASS marquee.scrollDelay: setAttribute() to &quot; 7&quot; followed by getAttribute() 
</span><del>-FAIL marquee.scrollDelay: setAttribute() to &quot; 7&quot; followed by IDL get assert_equals: expected 85 but got 7
</del><ins>+PASS marquee.scrollDelay: setAttribute() to &quot; 7&quot; followed by IDL get 
</ins><span class="cx"> PASS marquee.scrollDelay: setAttribute() to &quot; 7&quot; followed by getAttribute() 
</span><span class="cx"> PASS marquee.scrollDelay: setAttribute() to &quot; 7&quot; followed by IDL get 
</span><span class="cx"> PASS marquee.scrollDelay: setAttribute() to &quot; 7&quot; followed by getAttribute() 
</span><del>-FAIL marquee.scrollDelay: setAttribute() to &quot; 7&quot; followed by IDL get assert_equals: expected 85 but got 7
</del><ins>+PASS marquee.scrollDelay: setAttribute() to &quot; 7&quot; followed by IDL get 
</ins><span class="cx"> PASS marquee.scrollDelay: setAttribute() to &quot; \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f  foo &quot; followed by getAttribute() 
</span><span class="cx"> PASS marquee.scrollDelay: setAttribute() to &quot; \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f  foo &quot; followed by IDL get 
</span><span class="cx"> PASS marquee.scrollDelay: setAttribute() to undefined followed by getAttribute() 
</span><span class="lines">@@ -3024,8 +3028,12 @@
</span><span class="cx"> PASS marquee.scrollDelay: IDL set to &quot;-0&quot; should not throw 
</span><span class="cx"> PASS marquee.scrollDelay: IDL set to &quot;-0&quot; followed by getAttribute() 
</span><span class="cx"> PASS marquee.scrollDelay: IDL set to &quot;-0&quot; followed by IDL get 
</span><del>-FAIL marquee.scrollDelay: IDL set to 2147483648 should not throw IndexSizeError: DOM Exception 1
-FAIL marquee.scrollDelay: IDL set to 4294967295 should not throw IndexSizeError: DOM Exception 1
</del><ins>+PASS marquee.scrollDelay: IDL set to 2147483648 should not throw 
+PASS marquee.scrollDelay: IDL set to 2147483648 followed by getAttribute() 
+PASS marquee.scrollDelay: IDL set to 2147483648 followed by IDL get 
+PASS marquee.scrollDelay: IDL set to 4294967295 should not throw 
+PASS marquee.scrollDelay: IDL set to 4294967295 followed by getAttribute() 
+PASS marquee.scrollDelay: IDL set to 4294967295 followed by IDL get 
</ins><span class="cx"> PASS marquee.trueSpeed: typeof IDL attribute 
</span><span class="cx"> PASS marquee.trueSpeed: IDL get with DOM attribute unset 
</span><span class="cx"> PASS marquee.trueSpeed: setAttribute() to &quot;&quot; followed by getAttribute() 
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (197259 => 197260)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-02-27 21:05:24 UTC (rev 197259)
+++ trunk/Source/WebCore/ChangeLog        2016-02-28 00:35:18 UTC (rev 197260)
</span><span class="lines">@@ -1,3 +1,31 @@
</span><ins>+2016-02-27  Chris Dumez  &lt;cdumez@apple.com&gt;
+
+        Align HTMLMarqueeElement.scrollAmount / scrollDelay with the specification
+        https://bugs.webkit.org/show_bug.cgi?id=154781
+
+        Reviewed by Darin Adler.
+
+        Align HTMLMarqueeElement.scrollAmount / scrollDelay with the
+        specification:
+        - https://www.w3.org/TR/html5/obsolete.html#the-marquee-element-0
+
+        In particular:
+        - The attributes should have unsigned long type
+        - We should not throw for negative values
+        - Values should be in the range [0, 2147483647] as per:
+        - https://html.spec.whatwg.org/multipage/infrastructure.html#reflect
+
+        No new tests, already covered by existing tests.
+
+        * html/HTMLMarqueeElement.cpp:
+        (WebCore::HTMLMarqueeElement::scrollAmount):
+        (WebCore::HTMLMarqueeElement::setScrollAmount):
+        (WebCore::HTMLMarqueeElement::scrollDelay):
+        (WebCore::HTMLMarqueeElement::setScrollDelay):
+        (WebCore::HTMLMarqueeElement::loop): Deleted.
+        * html/HTMLMarqueeElement.h:
+        * html/HTMLMarqueeElement.idl:
+
</ins><span class="cx"> 2016-02-27  Commit Queue  &lt;commit-queue@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         Unreviewed, rolling out r197204, r197207, r197211, r197217,
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLMarqueeElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLMarqueeElement.cpp (197259 => 197260)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLMarqueeElement.cpp        2016-02-27 21:05:24 UTC (rev 197259)
+++ trunk/Source/WebCore/html/HTMLMarqueeElement.cpp        2016-02-28 00:35:18 UTC (rev 197260)
</span><span class="lines">@@ -28,6 +28,7 @@
</span><span class="cx"> #include &quot;CSSValueKeywords.h&quot;
</span><span class="cx"> #include &quot;ExceptionCode.h&quot;
</span><span class="cx"> #include &quot;HTMLNames.h&quot;
</span><ins>+#include &quot;HTMLParserIdioms.h&quot;
</ins><span class="cx"> #include &quot;RenderLayer.h&quot;
</span><span class="cx"> #include &quot;RenderMarquee.h&quot;
</span><span class="cx"> 
</span><span class="lines">@@ -121,34 +122,24 @@
</span><span class="cx">         marqueeRenderer-&gt;stop();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-int HTMLMarqueeElement::scrollAmount() const
</del><ins>+unsigned HTMLMarqueeElement::scrollAmount() const
</ins><span class="cx"> {
</span><del>-    bool ok;
-    int scrollAmount = fastGetAttribute(scrollamountAttr).toInt(&amp;ok);
-    return ok &amp;&amp; scrollAmount &gt;= 0 ? scrollAmount : RenderStyle::initialMarqueeIncrement().intValue();
</del><ins>+    return limitToOnlyHTMLNonNegative(fastGetAttribute(scrollamountAttr), RenderStyle::initialMarqueeIncrement().intValue());
</ins><span class="cx"> }
</span><span class="cx">     
</span><del>-void HTMLMarqueeElement::setScrollAmount(int scrollAmount, ExceptionCode&amp; ec)
</del><ins>+void HTMLMarqueeElement::setScrollAmount(unsigned scrollAmount)
</ins><span class="cx"> {
</span><del>-    if (scrollAmount &lt; 0)
-        ec = INDEX_SIZE_ERR;
-    else
-        setIntegralAttribute(scrollamountAttr, scrollAmount);
</del><ins>+    setUnsignedIntegralAttribute(scrollamountAttr, limitToOnlyHTMLNonNegative(scrollAmount, RenderStyle::initialMarqueeIncrement().intValue()));
</ins><span class="cx"> }
</span><span class="cx">     
</span><del>-int HTMLMarqueeElement::scrollDelay() const
</del><ins>+unsigned HTMLMarqueeElement::scrollDelay() const
</ins><span class="cx"> {
</span><del>-    bool ok;
-    int scrollDelay = fastGetAttribute(scrolldelayAttr).toInt(&amp;ok);
-    return ok &amp;&amp; scrollDelay &gt;= 0 ? scrollDelay : RenderStyle::initialMarqueeSpeed();
</del><ins>+    return limitToOnlyHTMLNonNegative(fastGetAttribute(scrolldelayAttr), RenderStyle::initialMarqueeSpeed());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void HTMLMarqueeElement::setScrollDelay(int scrollDelay, ExceptionCode&amp; ec)
</del><ins>+void HTMLMarqueeElement::setScrollDelay(unsigned scrollDelay)
</ins><span class="cx"> {
</span><del>-    if (scrollDelay &lt; 0)
-        ec = INDEX_SIZE_ERR;
-    else
-        setIntegralAttribute(scrolldelayAttr, scrollDelay);
</del><ins>+    setUnsignedIntegralAttribute(scrolldelayAttr, limitToOnlyHTMLNonNegative(scrollDelay, RenderStyle::initialMarqueeSpeed()));
</ins><span class="cx"> }
</span><span class="cx">     
</span><span class="cx"> int HTMLMarqueeElement::loop() const
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLMarqueeElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLMarqueeElement.h (197259 => 197260)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLMarqueeElement.h        2016-02-27 21:05:24 UTC (rev 197259)
+++ trunk/Source/WebCore/html/HTMLMarqueeElement.h        2016-02-28 00:35:18 UTC (rev 197260)
</span><span class="lines">@@ -41,11 +41,11 @@
</span><span class="cx">     void start();
</span><span class="cx">     virtual void stop() override;
</span><span class="cx">     
</span><del>-    int scrollAmount() const;
-    void setScrollAmount(int, ExceptionCode&amp;);
</del><ins>+    unsigned scrollAmount() const;
+    void setScrollAmount(unsigned);
</ins><span class="cx">     
</span><del>-    int scrollDelay() const;
-    void setScrollDelay(int, ExceptionCode&amp;);
</del><ins>+    unsigned scrollDelay() const;
+    void setScrollDelay(unsigned);
</ins><span class="cx">     
</span><span class="cx">     int loop() const;
</span><span class="cx">     void setLoop(int, ExceptionCode&amp;);
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLMarqueeElementidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLMarqueeElement.idl (197259 => 197260)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLMarqueeElement.idl        2016-02-27 21:05:24 UTC (rev 197259)
+++ trunk/Source/WebCore/html/HTMLMarqueeElement.idl        2016-02-28 00:35:18 UTC (rev 197260)
</span><span class="lines">@@ -27,8 +27,8 @@
</span><span class="cx">     [Reflect] attribute DOMString height;
</span><span class="cx">     [Reflect] attribute unsigned long hspace;
</span><span class="cx">     [SetterRaisesException] attribute long loop;
</span><del>-    [SetterRaisesException] attribute long scrollAmount;
-    [SetterRaisesException] attribute long scrollDelay;
</del><ins>+    attribute unsigned long scrollAmount;
+    attribute unsigned long scrollDelay;
</ins><span class="cx">     [Reflect] attribute boolean trueSpeed;
</span><span class="cx">     [Reflect] attribute unsigned long vspace;
</span><span class="cx">     [Reflect] attribute DOMString width;
</span></span></pre>
</div>
</div>

</body>
</html>