Skip to content

Commit 4ad2344

Browse files
author
Simon Pieters
committed
[cssom-view] Don't check for Infinity/-Infinity/NaN since WebIDL does that (missed an instance)
1 parent db494d5 commit 4ad2344

2 files changed

Lines changed: 1 addition & 2 deletions

File tree

cssom-view/Overview.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ <h2 id="extensions-to-the-window-interface"><span class="secno">4 </span>Extensi
316316
<dt class="method" id="widl-Window-scroll-void-long-x-long-y">
317317
<code>scroll</code> (<span class="idlParam"><span class="idlParamType"><a>long</a></span> <span class="idlParamName">x</span></span>, <span class="idlParam"><span class="idlParamType"><a>long</a></span> <span class="idlParamName">y</span></span>), returns <span class="idlMethType"><a>void</a></span></dt>
318318
<dd>
319-
<p>When the <code>scroll</code> operation is invoked these steps must be run:</p> <ol> <li><p>If either <var title="">x</var> or <var title="">y</var> is infinite or NaN terminate this algorithm.</li> <li> <dl> <dt>If <a href="#document-content">document content</a> can have overflow to the right <dd><p>Let <var title="">x</var> be max(0, min(<var title="">x</var>, <a href="#content">content</a> width - <a href="#content-edge">content edge</a> width)).</dd> <dt>If <a href="#document-content">document content</a> can have overflow to the left (under right-to-left conditions) <dd><p>Let <var title="">x</var> be min(0, max(<var title="">x</var>, <a href="#content-edge">content edge</a> width - <a href="#content">content</a> width)).</dd> </dl> </li> <li><p>Let <var title="">y</var> be max(0, min(<var title="">y</var>, <a href="#document-content">document content</a> height - <a href="#viewport">viewport</a> height excluding the size of a rendered scroll bar (if any))).</li> <li><p>Align the x-coordinate <var title="">x</var> of the <a href="#document-content">document content</a> with the left of the <a href="#viewport">viewport</a> and align the y-coordinate <var title="">y</var> of the <a href="#document-content">document content</a> with the top of the <a href="#viewport">viewport</a>.</li> <li><p>If the aligning caused content to move <a class="external" href="http://dev.w3.org/html5/spec/single-page.html#queue-a-task">queue a task</a> to <a class="external" href="http://dom.spec.whatwg.org/#concept-event-fire" title="concept-event-fire">fire an event</a> named <code title="event-scroll">scroll</code> that bubbles at the <code class="external"><a href="http://dom.spec.whatwg.org/#document">Document</a></code> object, unless a <a class="external" href="http://dev.w3.org/html5/spec/single-page.html#concept-task" title="concept-task">task</a> to fire that event at the <code class="external"><a href="http://dom.spec.whatwg.org/#document">Document</a></code> object was already <a class="external" href="http://dev.w3.org/html5/spec/single-page.html#queue-a-task" title="queue a task">queued</a>.</li> </ol></dd>
319+
<p>When the <code>scroll</code> operation is invoked these steps must be run:</p> <ol> <li> <dl> <dt>If <a href="#document-content">document content</a> can have overflow to the right <dd><p>Let <var title="">x</var> be max(0, min(<var title="">x</var>, <a href="#content">content</a> width - <a href="#content-edge">content edge</a> width)).</dd> <dt>If <a href="#document-content">document content</a> can have overflow to the left (under right-to-left conditions) <dd><p>Let <var title="">x</var> be min(0, max(<var title="">x</var>, <a href="#content-edge">content edge</a> width - <a href="#content">content</a> width)).</dd> </dl> </li> <li><p>Let <var title="">y</var> be max(0, min(<var title="">y</var>, <a href="#document-content">document content</a> height - <a href="#viewport">viewport</a> height excluding the size of a rendered scroll bar (if any))).</li> <li><p>Align the x-coordinate <var title="">x</var> of the <a href="#document-content">document content</a> with the left of the <a href="#viewport">viewport</a> and align the y-coordinate <var title="">y</var> of the <a href="#document-content">document content</a> with the top of the <a href="#viewport">viewport</a>.</li> <li><p>If the aligning caused content to move <a class="external" href="http://dev.w3.org/html5/spec/single-page.html#queue-a-task">queue a task</a> to <a class="external" href="http://dom.spec.whatwg.org/#concept-event-fire" title="concept-event-fire">fire an event</a> named <code title="event-scroll">scroll</code> that bubbles at the <code class="external"><a href="http://dom.spec.whatwg.org/#document">Document</a></code> object, unless a <a class="external" href="http://dev.w3.org/html5/spec/single-page.html#concept-task" title="concept-task">task</a> to fire that event at the <code class="external"><a href="http://dom.spec.whatwg.org/#document">Document</a></code> object was already <a class="external" href="http://dev.w3.org/html5/spec/single-page.html#queue-a-task" title="queue a task">queued</a>.</li> </ol></dd>
320320
<dt class="method" id="widl-Window-scrollTo-void-long-x-long-y">
321321
<code>scrollTo</code> (<span class="idlParam"><span class="idlParamType"><a>long</a></span> <span class="idlParamName">x</span></span>, <span class="idlParam"><span class="idlParamType"><a>long</a></span> <span class="idlParamName">y</span></span>), returns <span class="idlMethType"><a>void</a></span></dt>
322322
<dd>

cssom-view/idl/Window.idl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ partial interface Window {
6363
[Documentation=
6464
"<p>When the {@name} {@type} is invoked these steps must be run:</p>\
6565
<ol>\
66-
<li><p>If either <var title>x</var> or <var title>y</var> is infinite or NaN terminate this algorithm.</p></li>\
6766
<li>\
6867
<dl>\
6968
<dt>If <span>document content</span> can have overflow to the right\

0 commit comments

Comments
 (0)