[cssom-view] Don't throw for infinity/NaN in moveTo, moveBy, resizeTo, resizeBy, scroll, scrollTo, scrollBy, scrollTop, scrollLeft. Fixes https://www.w3.org/Bugs/Public/show_bug.cgi?id=26775

Fri, 12 Sep 2014 09:41:27 +0200

author
Simon Pieters <simonp@opera.com>
date
Fri, 12 Sep 2014 09:41:27 +0200
changeset 14516
0bd322b87db6
parent 14515
35e5556bf277
child 14517
32d1ecbff2a1

[cssom-view] Don't throw for infinity/NaN in moveTo, moveBy, resizeTo, resizeBy, scroll, scrollTo, scrollBy, scrollTop, scrollLeft. Fixes https://www.w3.org/Bugs/Public/show_bug.cgi?id=26775

cssom-view/Overview.html file | annotate | diff | comparison | revisions
cssom-view/Overview.src.html file | annotate | diff | comparison | revisions
     1.1 --- a/cssom-view/Overview.html	Wed Sep 10 16:32:35 2014 +0200
     1.2 +++ b/cssom-view/Overview.html	Fri Sep 12 09:41:27 2014 +0200
     1.3 @@ -16,7 +16,7 @@
     1.4  
     1.5   <h1>CSSOM View Module</h1>
     1.6  
     1.7 - <h2 class="no-num no-toc" id="w3c-doctype">Editor's Draft 9 June 2014</h2>
     1.8 + <h2 class="no-num no-toc" id="w3c-doctype">Editor's Draft 12 September 2014</h2>
     1.9  
    1.10   <dl>
    1.11  
    1.12 @@ -83,7 +83,7 @@
    1.13  can be found in the <a href="http://www.w3.org/TR/">W3C technical reports
    1.14  index at http://www.w3.org/TR/.</a></em>
    1.15  
    1.16 -<p>This is the 9 June 2014 Editor's Draft of CSSOM View. Please send
    1.17 +<p>This is the 12 September 2014 Editor's Draft of CSSOM View. Please send
    1.18  comments to
    1.19  <a href="mailto:www-style@w3.org?subject=%5Bcssom-view%5D%20">www-style@w3.org</a>
    1.20  (<a href="http://lists.w3.org/Archives/Public/www-style/">archived</a>)
    1.21 @@ -121,7 +121,8 @@
    1.22     <li><a href="#zooming"><span class="secno">3.2 </span>Zooming</a></ul></li>
    1.23   <li><a href="#common-infrastructure"><span class="secno">4 </span>Common Infrastructure</a>
    1.24    <ul class="toc">
    1.25 -   <li><a href="#scrolling"><span class="secno">4.1 </span>Scrolling</a></ul></li>
    1.26 +   <li><a href="#scrolling"><span class="secno">4.1 </span>Scrolling</a></li>
    1.27 +   <li><a href="#webidl-values"><span class="secno">4.2 </span>WebIDL values</a></ul></li>
    1.28   <li><a href="#extensions-to-the-window-interface"><span class="secno">5 </span>Extensions to the <code title="">Window</code> Interface</a>
    1.29    <ul class="toc">
    1.30     <li><a href="#the-features-argument-to-the-open()-method"><span class="secno">5.1 </span>The <var>features</var> argument to the <code title="">open()</code> method</a></li>
    1.31 @@ -508,6 +509,15 @@
    1.32  
    1.33  <p class="note">This algorithm is used when navigating to the <code title="">#top</code> fragment identifier, as defined in HTML. <a href="#refsHTML">[HTML]</a>
    1.34  
    1.35 +
    1.36 +<h3 id="webidl-values"><span class="secno">4.2 </span>WebIDL values</h3>
    1.37 +
    1.38 +<p>When asked to <dfn id="normalize-non-finite-values">normalize non-finite values</dfn> for a value <var>x</var>,
    1.39 +if <var>x</var> is one of the three special floating point literal values
    1.40 +(<code title="">Infinity</code>, <code title="">-Infinity</code> or <code title="">NaN</code>),
    1.41 +then <var>x</var> must be changed to the value <code title="">0</code>. <a href="#refsWEBIDL">[WEBIDL]</a>
    1.42 +
    1.43 +
    1.44  <h2 id="extensions-to-the-window-interface"><span class="secno">5 </span>Extensions to the <code title="">Window</code> Interface</h2>
    1.45  
    1.46  <pre class="idl">enum <dfn id="scrollbehavior">ScrollBehavior</dfn> { "auto", "instant", "smooth" };
    1.47 @@ -521,10 +531,10 @@
    1.48    [SameObject] readonly attribute <a href="#screen">Screen</a> <a href="#dom-window-screen" title="dom-Window-screen">screen</a>;
    1.49  
    1.50    // browsing context
    1.51 -  void <a href="#dom-window-moveto" title="dom-Window-moveTo">moveTo</a>(double x, double y);
    1.52 -  void <a href="#dom-window-moveby" title="dom-Window-moveBy">moveBy</a>(double x, double y);
    1.53 -  void <a href="#dom-window-resizeto" title="dom-Window-resizeTo">resizeTo</a>(double x, double y);
    1.54 -  void <a href="#dom-window-resizeby" title="dom-Window-resizeBy">resizeBy</a>(double x, double y);
    1.55 +  void <a href="#dom-window-moveto" title="dom-Window-moveTo">moveTo</a>(unrestricted double x, unrestricted double y);
    1.56 +  void <a href="#dom-window-moveby" title="dom-Window-moveBy">moveBy</a>(unrestricted double x, unrestricted double y);
    1.57 +  void <a href="#dom-window-resizeto" title="dom-Window-resizeTo">resizeTo</a>(unrestricted double x, unrestricted double y);
    1.58 +  void <a href="#dom-window-resizeby" title="dom-Window-resizeBy">resizeBy</a>(unrestricted double x, unrestricted double y);
    1.59  
    1.60    // viewport
    1.61    readonly attribute double <a href="#dom-window-innerwidth" title="dom-Window-innerWidth">innerWidth</a>;
    1.62 @@ -535,9 +545,9 @@
    1.63    readonly attribute double <a href="#dom-window-pagexoffset" title="dom-Window-pageXOffset">pageXOffset</a>;
    1.64    readonly attribute double <a href="#dom-window-scrolly" title="dom-Window-scrollY">scrollY</a>;
    1.65    readonly attribute double <a href="#dom-window-pageyoffset" title="dom-Window-pageYOffset">pageYOffset</a>;
    1.66 -  void <a href="#dom-window-scroll" title="dom-Window-scroll">scroll</a>(double x, double y, optional <a href="#scrolloptions">ScrollOptions</a> options);
    1.67 -  void <a href="#dom-window-scrollto" title="dom-Window-scrollTo">scrollTo</a>(double x, double y, optional <a href="#scrolloptions">ScrollOptions</a> options);
    1.68 -  void <a href="#dom-window-scrollby" title="dom-Window-scrollBy">scrollBy</a>(double x, double y, optional <a href="#scrolloptions">ScrollOptions</a> options);
    1.69 +  void <a href="#dom-window-scroll" title="dom-Window-scroll">scroll</a>(unrestricted double x, unrestricted double y, optional <a href="#scrolloptions">ScrollOptions</a> options);
    1.70 +  void <a href="#dom-window-scrollto" title="dom-Window-scrollTo">scrollTo</a>(unrestricted double x, unrestricted double y, optional <a href="#scrolloptions">ScrollOptions</a> options);
    1.71 +  void <a href="#dom-window-scrollby" title="dom-Window-scrollBy">scrollBy</a>(unrestricted double x, unrestricted double y, optional <a href="#scrolloptions">ScrollOptions</a> options);
    1.72  
    1.73    // client
    1.74    readonly attribute double <a href="#dom-window-screenx" title="dom-Window-screenX">screenX</a>;
    1.75 @@ -567,6 +577,7 @@
    1.76  
    1.77  <ol>
    1.78   <li><p>Optionally, terminate these steps.
    1.79 + <li><p><a href="#normalize-non-finite-values">Normalize non-finite values</a> for <var>x</var> and <var>y</var>.
    1.80   <li><p>Let <var>target</var> be the <a class="external" data-anolis-spec="html" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/browsers.html#browsing-context">browsing context</a> of the <a class="external" data-anolis-spec="dom" href="http://dom.spec.whatwg.org/#context-object">context
    1.81   object</a>.
    1.82   <li><p>Let <var>source</var> be the <a class="external" data-anolis-spec="html" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#responsible-browsing-context">responsible browsing context</a> of the <a class="external" data-anolis-spec="html" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#incumbent-settings-object">incumbent settings
    1.83 @@ -581,6 +592,7 @@
    1.84  
    1.85  <ol>
    1.86   <li><p>Optionally, terminate these steps.
    1.87 + <li><p><a href="#normalize-non-finite-values">Normalize non-finite values</a> for <var>x</var> and <var>y</var>.
    1.88   <li><p>Let <var>target</var> be the <a class="external" data-anolis-spec="html" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/browsers.html#browsing-context">browsing context</a> of the <a class="external" data-anolis-spec="dom" href="http://dom.spec.whatwg.org/#context-object">context
    1.89   object</a>.
    1.90   <li><p>Let <var>source</var> be the <a class="external" data-anolis-spec="html" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#responsible-browsing-context">responsible browsing context</a> of the <a class="external" data-anolis-spec="html" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#incumbent-settings-object">incumbent settings
    1.91 @@ -595,6 +607,7 @@
    1.92  
    1.93  <ol>
    1.94   <li><p>Optionally, terminate these steps.
    1.95 + <li><p><a href="#normalize-non-finite-values">Normalize non-finite values</a> for <var>x</var> and <var>y</var>.
    1.96   <li><p>Let <var>target</var> be the <a class="external" data-anolis-spec="html" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/browsers.html#browsing-context">browsing context</a> of the <a class="external" data-anolis-spec="dom" href="http://dom.spec.whatwg.org/#context-object">context
    1.97   object</a>.
    1.98   <li><p>Let <var>source</var> be the <a class="external" data-anolis-spec="html" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#responsible-browsing-context">responsible browsing context</a> of the <a class="external" data-anolis-spec="html" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#incumbent-settings-object">incumbent settings
    1.99 @@ -659,6 +672,7 @@
   1.100  <p>When the <dfn id="dom-window-scroll" title="dom-Window-scroll"><code>scroll(<var>x</var>, <var>y</var>, <var>options</var>)</code></dfn> method is invoked these
   1.101  steps must be run:</p>
   1.102  <ol>
   1.103 + <li><p><a href="#normalize-non-finite-values">Normalize non-finite values</a> for <var>x</var> and <var>y</var>.
   1.104   <li><p>If there is no <a href="#viewport">viewport</a>, abort these steps.
   1.105   <li><p>Let <var>viewport width</var> be the width of the <a href="#viewport">viewport</a> excluding the width of the scroll bar, if any.
   1.106   <li><p>Let <var>viewport height</var> be the height of the <a href="#viewport">viewport</a> excluding the height of the scroll bar, if any.
   1.107 @@ -746,24 +760,24 @@
   1.108  <ol>
   1.109   <li><p>If the method does not result in a new <a class="external" data-anolis-spec="html" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/browsers.html#auxiliary-browsing-context">auxiliary browsing context</a> being created, terminate these steps.
   1.110   <li><p>Let <var>target</var> be the new <a class="external" data-anolis-spec="html" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/browsers.html#auxiliary-browsing-context">auxiliary browsing context</a>.
   1.111 - <li><p>Let <var>tokens</var> be the result of <a class="external" data-anolis-spec="html" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/common-microsyntaxes.html#split-a-string-on-commas" title="split a string on commas">splitting <var>features</var> on commas</a>.
   1.112 + <li><p>Let <var>tokens</var> be the result of <a class="external" data-anolis-spec="html" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/infrastructure.html#split-a-string-on-commas" title="split a string on commas">splitting <var>features</var> on commas</a>.
   1.113   <li><p>Let <var>parsed features</var> be a new empty dictionary.
   1.114   <li><p><i>Token loop</i>: For each token <var>token</var> in <var>tokens</var>, follow these substeps:
   1.115    <ol>
   1.116     <li><p>Let <var>input</var> be <var>token</var>.
   1.117     <li><p>Let <var>position</var> point at the first character of <var>input</var>.
   1.118 -   <li><p><a class="external" data-anolis-spec="html" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/common-microsyntaxes.html#skip-whitespace">Skip whitespace</a>.
   1.119 -   <li><p><a class="external" data-anolis-spec="html" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/common-microsyntaxes.html#collect-a-sequence-of-characters">Collect a sequence of characters</a> that are not <a class="external" data-anolis-spec="html" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/common-microsyntaxes.html#space-character" title="space character">space
   1.120 +   <li><p><a class="external" data-anolis-spec="html" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/infrastructure.html#skip-whitespace">Skip whitespace</a>.
   1.121 +   <li><p><a class="external" data-anolis-spec="html" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/infrastructure.html#collect-a-sequence-of-characters">Collect a sequence of characters</a> that are not <a class="external" data-anolis-spec="html" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/infrastructure.html#space-character" title="space character">space
   1.122     characters</a> nor "<code title="">=</code>" (U+003D). Let <var>name</var> be the collected characters, <a class="external" data-anolis-spec="dom" href="http://dom.spec.whatwg.org/#converted-to-ascii-lowercase">converted to ASCII
   1.123     lowercase</a>.
   1.124     <li><p>If <var>name</var> is in <var>parsed features</var> or if <var>name</var> is not a <a href="#supported-open()-feature-name">supported <code title="">open()</code> feature name</a>,
   1.125     continue <i>token loop</i>.
   1.126 -   <li><p><a class="external" data-anolis-spec="html" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/common-microsyntaxes.html#skip-whitespace">Skip whitespace</a>.
   1.127 +   <li><p><a class="external" data-anolis-spec="html" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/infrastructure.html#skip-whitespace">Skip whitespace</a>.
   1.128     <li><p>If the character at <var>position</var> is not "<code title="">=</code>" (U+003D), continue <i>token loop</i>.
   1.129     <li><p>Advance <var>position</var> by one.
   1.130     <li><p>If <var>position</var> is past the end of <var>input</var>, continue <i>token loop</i>.
   1.131 -   <li><p><a class="external" data-anolis-spec="html" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/common-microsyntaxes.html#collect-a-sequence-of-characters">Collect a sequence of characters</a> that are any characters. Let <var>raw value</var> be the collected characters.
   1.132 -   <li><p>Let <var>value</var> be the result of invoking the <a class="external" data-anolis-spec="html" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/common-microsyntaxes.html#rules-for-parsing-integers">rules for parsing integers</a> on <var>raw value</var>.
   1.133 +   <li><p><a class="external" data-anolis-spec="html" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/infrastructure.html#collect-a-sequence-of-characters">Collect a sequence of characters</a> that are any characters. Let <var>raw value</var> be the collected characters.
   1.134 +   <li><p>Let <var>value</var> be the result of invoking the <a class="external" data-anolis-spec="html" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/infrastructure.html#rules-for-parsing-integers">rules for parsing integers</a> on <var>raw value</var>.
   1.135     <li><p>If <var>value</var> is an error, continue <i>token loop</i>.
   1.136     <li><p>Set <var>name</var> in <var>parsed features</var> to <var>value</var>.
   1.137    </ol>
   1.138 @@ -1096,8 +1110,8 @@
   1.139    <a href="#domrect">DOMRect</a> <a href="#dom-element-getboundingclientrect" title="dom-Element-getBoundingClientRect">getBoundingClientRect</a>();
   1.140    void <a href="#dom-element-scrollintoview" title="dom-Element-scrollIntoView">scrollIntoView</a>();
   1.141    void <a href="#dom-element-scrollintoview" title="dom-Element-scrollIntoView">scrollIntoView</a>(boolean top, optional <a href="#scrolloptions">ScrollOptions</a> options);
   1.142 -  attribute (double or <a href="#scrolloptionsvertical">ScrollOptionsVertical</a>) <a href="#dom-element-scrolltop" title="dom-Element-scrollTop">scrollTop</a>;
   1.143 -  attribute (double or <a href="#scrolloptionshorizontal">ScrollOptionsHorizontal</a>) <a href="#dom-element-scrollleft" title="dom-Element-scrollLeft">scrollLeft</a>;
   1.144 +  attribute (unrestricted double or <a href="#scrolloptionsvertical">ScrollOptionsVertical</a>) <a href="#dom-element-scrolltop" title="dom-Element-scrollTop">scrollTop</a>;
   1.145 +  attribute (unrestricted double or <a href="#scrolloptionshorizontal">ScrollOptionsHorizontal</a>) <a href="#dom-element-scrollleft" title="dom-Element-scrollLeft">scrollLeft</a>;
   1.146    readonly attribute double <a href="#dom-element-scrollwidth" title="dom-Element-scrollWidth">scrollWidth</a>;
   1.147    readonly attribute double <a href="#dom-element-scrollheight" title="dom-Element-scrollHeight">scrollHeight</a>;
   1.148    readonly attribute double <a href="#dom-element-clienttop" title="dom-Element-clientTop">clientTop</a>;
   1.149 @@ -1187,6 +1201,7 @@
   1.150  </ol>
   1.151  <p>When setting the <code title="dom-Element-scrollTop"><a href="#dom-element-scrolltop">scrollTop</a></code> attribute these steps must be run:</p>
   1.152  <ol>
   1.153 + <li><p>If the given value is not a <code><a href="#scrolloptionsvertical">ScrollOptionsVertical</a></code> object, <a href="#normalize-non-finite-values">normalize non-finite values</a> for the given value.
   1.154   <li><p>If the given value is a <code><a href="#scrolloptionsvertical">ScrollOptionsVertical</a></code> object, and the <code title="">y</code> dictionary member is not present, abort these steps.
   1.155   <li><p>If the given value is a <code><a href="#scrolloptionsvertical">ScrollOptionsVertical</a></code> object, let <var>y</var> be the value of the <code title="">y</code> dictionary member.
   1.156   Otherwise, let <var>y</var> be the given value.</li>
   1.157 @@ -1226,6 +1241,7 @@
   1.158  </ol>
   1.159  <p>When setting the <code title="dom-Element-scrollLeft"><a href="#dom-element-scrollleft">scrollLeft</a></code> attribute these steps must be run:</p>
   1.160  <ol>
   1.161 + <li><p>If the given value is not a <code><a href="#scrolloptionshorizontal">ScrollOptionsHorizontal</a></code> object, <a href="#normalize-non-finite-values">normalize non-finite values</a> for the given value.
   1.162   <li><p>If the given value is a <code><a href="#scrolloptionshorizontal">ScrollOptionsHorizontal</a></code> object, and the <code title="">x</code> dictionary member is not present, abort these steps.
   1.163   <li><p>If the given value is a <code><a href="#scrolloptionshorizontal">ScrollOptionsHorizontal</a></code> object, let <var>x</var> be the value of the <code title="">x</code> dictionary member.
   1.164   Otherwise, let <var>x</var> be the given value.</li>
   1.165 @@ -1334,7 +1350,7 @@
   1.166  
   1.167  <ol>
   1.168   <li><p>If the <code class="external" data-anolis-spec="dom"><a href="http://dom.spec.whatwg.org/#document">Document</a></code> associated
   1.169 - with <var>element</var> is not <a class="external" data-anolis-spec="html" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/origin-0.html#same-origin">same origin</a> with the
   1.170 + with <var>element</var> is not <a class="external" data-anolis-spec="html" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/browsers.html#same-origin">same origin</a> with the
   1.171   <code class="external" data-anolis-spec="dom"><a href="http://dom.spec.whatwg.org/#document">Document</a></code> associated with the element or
   1.172   <a href="#viewport">viewport</a> associated with <var>box</var>, terminate these
   1.173   steps.</li>
   1.174 @@ -1471,7 +1487,7 @@
   1.175  
   1.176  <h2 id="extensions-to-the-htmlelement-interface"><span class="secno">8 </span>Extensions to the <code title="">HTMLElement</code> Interface</h2>
   1.177  
   1.178 -<pre class="idl">partial interface <a class="external" data-anolis-spec="html" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/elements.html#htmlelement">HTMLElement</a> {
   1.179 +<pre class="idl">partial interface <a class="external" data-anolis-spec="html" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/dom.html#htmlelement">HTMLElement</a> {
   1.180    readonly attribute <a class="external" data-anolis-spec="dom" href="http://dom.spec.whatwg.org/#element">Element</a>? <a href="#dom-htmlelement-offsetparent" title="dom-HTMLElement-offsetParent">offsetParent</a>;
   1.181    readonly attribute double <a href="#dom-htmlelement-offsettop" title="dom-HTMLElement-offsetTop">offsetTop</a>;
   1.182    readonly attribute double <a href="#dom-htmlelement-offsetleft" title="dom-HTMLElement-offsetLeft">offsetLeft</a>;
   1.183 @@ -1566,7 +1582,7 @@
   1.184  
   1.185  <h2 id="excensions-to-the-htmlimageelement-interface"><span class="secno">9 </span>Excensions to the <code title="">HTMLImageElement</code> Interface</h2>
   1.186  
   1.187 -<pre class="idl">partial interface <a class="external" data-anolis-spec="html" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/edits.html#htmlimageelement">HTMLImageElement</a> {
   1.188 +<pre class="idl">partial interface <a class="external" data-anolis-spec="html" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/embedded-content.html#htmlimageelement">HTMLImageElement</a> {
   1.189    readonly attribute double <a href="#dom-htmlimageelement-x" title="dom-HTMLImageElement-x">x</a>;
   1.190    readonly attribute double <a href="#dom-htmlimageelement-y" title="dom-HTMLImageElement-y">y</a>;
   1.191  };</pre>
     2.1 --- a/cssom-view/Overview.src.html	Wed Sep 10 16:32:35 2014 +0200
     2.2 +++ b/cssom-view/Overview.src.html	Fri Sep 12 09:41:27 2014 +0200
     2.3 @@ -465,6 +465,15 @@
     2.4  
     2.5  <p class=note>This algorithm is used when navigating to the <code title>#top</code> fragment identifier, as defined in HTML. <span data-anolis-ref>HTML</span>
     2.6  
     2.7 +
     2.8 +<h3>WebIDL values</h3>
     2.9 +
    2.10 +<p>When asked to <dfn>normalize non-finite values</dfn> for a value <var>x</var>,
    2.11 +if <var>x</var> is one of the three special floating point literal values
    2.12 +(<code title>Infinity</code>, <code title>-Infinity</code> or <code title>NaN</code>),
    2.13 +then <var>x</var> must be changed to the value <code title>0</code>. <span data-anolis-ref>WEBIDL</span>
    2.14 +
    2.15 +
    2.16  <h2>Extensions to the <code title>Window</code> Interface</h2>
    2.17  
    2.18  <pre class=idl>enum <dfn>ScrollBehavior</dfn> { "auto", "instant", "smooth" };
    2.19 @@ -478,10 +487,10 @@
    2.20    [SameObject] readonly attribute <span>Screen</span> <span title=dom-Window-screen>screen</span>;
    2.21  
    2.22    // browsing context
    2.23 -  void <span title=dom-Window-moveTo>moveTo</span>(double x, double y);
    2.24 -  void <span title=dom-Window-moveBy>moveBy</span>(double x, double y);
    2.25 -  void <span title=dom-Window-resizeTo>resizeTo</span>(double x, double y);
    2.26 -  void <span title=dom-Window-resizeBy>resizeBy</span>(double x, double y);
    2.27 +  void <span title=dom-Window-moveTo>moveTo</span>(unrestricted double x, unrestricted double y);
    2.28 +  void <span title=dom-Window-moveBy>moveBy</span>(unrestricted double x, unrestricted double y);
    2.29 +  void <span title=dom-Window-resizeTo>resizeTo</span>(unrestricted double x, unrestricted double y);
    2.30 +  void <span title=dom-Window-resizeBy>resizeBy</span>(unrestricted double x, unrestricted double y);
    2.31  
    2.32    // viewport
    2.33    readonly attribute double <span title=dom-Window-innerWidth>innerWidth</span>;
    2.34 @@ -492,9 +501,9 @@
    2.35    readonly attribute double <span title=dom-Window-pageXOffset>pageXOffset</span>;
    2.36    readonly attribute double <span title=dom-Window-scrollY>scrollY</span>;
    2.37    readonly attribute double <span title=dom-Window-pageYOffset>pageYOffset</span>;
    2.38 -  void <span title=dom-Window-scroll>scroll</span>(double x, double y, optional <span>ScrollOptions</span> options);
    2.39 -  void <span title=dom-Window-scrollTo>scrollTo</span>(double x, double y, optional <span>ScrollOptions</span> options);
    2.40 -  void <span title=dom-Window-scrollBy>scrollBy</span>(double x, double y, optional <span>ScrollOptions</span> options);
    2.41 +  void <span title=dom-Window-scroll>scroll</span>(unrestricted double x, unrestricted double y, optional <span>ScrollOptions</span> options);
    2.42 +  void <span title=dom-Window-scrollTo>scrollTo</span>(unrestricted double x, unrestricted double y, optional <span>ScrollOptions</span> options);
    2.43 +  void <span title=dom-Window-scrollBy>scrollBy</span>(unrestricted double x, unrestricted double y, optional <span>ScrollOptions</span> options);
    2.44  
    2.45    // client
    2.46    readonly attribute double <span title=dom-Window-screenX>screenX</span>;
    2.47 @@ -524,6 +533,7 @@
    2.48  
    2.49  <ol>
    2.50   <li><p>Optionally, terminate these steps.
    2.51 + <li><p><span>Normalize non-finite values</span> for <var>x</var> and <var>y</var>.
    2.52   <li><p>Let <var>target</var> be the <span data-anolis-spec=html>browsing context</span> of the <span data-anolis-spec=dom>context
    2.53   object</span>.
    2.54   <li><p>Let <var>source</var> be the <span data-anolis-spec=html>responsible browsing context</span> of the <span data-anolis-spec=html>incumbent settings
    2.55 @@ -538,6 +548,7 @@
    2.56  
    2.57  <ol>
    2.58   <li><p>Optionally, terminate these steps.
    2.59 + <li><p><span>Normalize non-finite values</span> for <var>x</var> and <var>y</var>.
    2.60   <li><p>Let <var>target</var> be the <span data-anolis-spec=html>browsing context</span> of the <span data-anolis-spec=dom>context
    2.61   object</span>.
    2.62   <li><p>Let <var>source</var> be the <span data-anolis-spec=html>responsible browsing context</span> of the <span data-anolis-spec=html>incumbent settings
    2.63 @@ -552,6 +563,7 @@
    2.64  
    2.65  <ol>
    2.66   <li><p>Optionally, terminate these steps.
    2.67 + <li><p><span>Normalize non-finite values</span> for <var>x</var> and <var>y</var>.
    2.68   <li><p>Let <var>target</var> be the <span data-anolis-spec=html>browsing context</span> of the <span data-anolis-spec=dom>context
    2.69   object</span>.
    2.70   <li><p>Let <var>source</var> be the <span data-anolis-spec=html>responsible browsing context</span> of the <span data-anolis-spec=html>incumbent settings
    2.71 @@ -616,6 +628,7 @@
    2.72  <p>When the <dfn title=dom-Window-scroll><code>scroll(<var>x</var>, <var>y</var>, <var>options</var>)</code></dfn> method is invoked these
    2.73  steps must be run:</p>
    2.74  <ol>
    2.75 + <li><p><span>Normalize non-finite values</span> for <var>x</var> and <var>y</var>.
    2.76   <li><p>If there is no <span>viewport</span>, abort these steps.
    2.77   <li><p>Let <var>viewport width</var> be the width of the <span>viewport</span> excluding the width of the scroll bar, if any.
    2.78   <li><p>Let <var>viewport height</var> be the height of the <span>viewport</span> excluding the height of the scroll bar, if any.
    2.79 @@ -1053,8 +1066,8 @@
    2.80    <span>DOMRect</span> <span title=dom-Element-getBoundingClientRect>getBoundingClientRect</span>();
    2.81    void <span title=dom-Element-scrollIntoView>scrollIntoView</span>();
    2.82    void <span title=dom-Element-scrollIntoView>scrollIntoView</span>(boolean top, optional <span>ScrollOptions</span> options);
    2.83 -  attribute (double or <span>ScrollOptionsVertical</span>) <span title=dom-Element-scrollTop>scrollTop</span>;
    2.84 -  attribute (double or <span>ScrollOptionsHorizontal</span>) <span title=dom-Element-scrollLeft>scrollLeft</span>;
    2.85 +  attribute (unrestricted double or <span>ScrollOptionsVertical</span>) <span title=dom-Element-scrollTop>scrollTop</span>;
    2.86 +  attribute (unrestricted double or <span>ScrollOptionsHorizontal</span>) <span title=dom-Element-scrollLeft>scrollLeft</span>;
    2.87    readonly attribute double <span title=dom-Element-scrollWidth>scrollWidth</span>;
    2.88    readonly attribute double <span title=dom-Element-scrollHeight>scrollHeight</span>;
    2.89    readonly attribute double <span title=dom-Element-clientTop>clientTop</span>;
    2.90 @@ -1144,6 +1157,7 @@
    2.91  </ol>
    2.92  <p>When setting the <code title=dom-Element-scrollTop>scrollTop</code> attribute these steps must be run:</p>
    2.93  <ol>
    2.94 + <li><p>If the given value is not a <code>ScrollOptionsVertical</code> object, <span>normalize non-finite values</span> for the given value.
    2.95   <li><p>If the given value is a <code>ScrollOptionsVertical</code> object, and the <code title>y</code> dictionary member is not present, abort these steps.
    2.96   <li><p>If the given value is a <code>ScrollOptionsVertical</code> object, let <var>y</var> be the value of the <code title>y</code> dictionary member.
    2.97   Otherwise, let <var>y</var> be the given value.</p></li>
    2.98 @@ -1183,6 +1197,7 @@
    2.99  </ol>
   2.100  <p>When setting the <code title=dom-Element-scrollLeft>scrollLeft</code> attribute these steps must be run:</p>
   2.101  <ol>
   2.102 + <li><p>If the given value is not a <code>ScrollOptionsHorizontal</code> object, <span>normalize non-finite values</span> for the given value.
   2.103   <li><p>If the given value is a <code>ScrollOptionsHorizontal</code> object, and the <code title>x</code> dictionary member is not present, abort these steps.
   2.104   <li><p>If the given value is a <code>ScrollOptionsHorizontal</code> object, let <var>x</var> be the value of the <code title>x</code> dictionary member.
   2.105   Otherwise, let <var>x</var> be the given value.</p></li>

mercurial