Skip to content

Commit d15ca32

Browse files
author
Simon Pieters
committed
[cssom-view] Make ScrollToOptions left/top unrestricted double. https://lists.w3.org/Archives/Public/www-style/2015Mar/0020.html
1 parent 200413b commit d15ca32

1 file changed

Lines changed: 10 additions & 6 deletions

File tree

cssom-view/Overview.bs

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -391,8 +391,8 @@ dictionary ScrollOptions {
391391
ScrollBehavior behavior = "auto";
392392
};
393393
dictionary ScrollToOptions : ScrollOptions {
394-
double left;
395-
double top;
394+
unrestricted double left;
395+
unrestricted double top;
396396
};
397397

398398
partial interface Window {
@@ -530,7 +530,7 @@ steps must be run:
530530
2. If invoked with two arguments, follow these substeps:
531531
1. Let <var>options</var> be null <a lt="converted to an IDL value">converted</a> to a {{ScrollToOptions}} dictionary. [[!WEBIDL]]
532532
2. Let <var>x</var> and <var>y</var> be the arguments, respectively.
533-
3. <a>Normalize non-finite values</a> for <var>x</var> and <var>y</var>.
533+
3. <a>Normalize non-finite values</a> for <var>x</var> and <var>y</var>.
534534
3. If there is no <a>viewport</a>, abort these steps.
535535
4. Let <var>viewport width</var> be the width of the <a>viewport</a> excluding the width of the scroll bar, if any.
536536
5. Let <var>viewport height</var> be the height of the <a>viewport</a> excluding the height of the scroll bar, if any.
@@ -571,11 +571,11 @@ user agent must run these steps:
571571
1. If invoked with two arguments, follow these substeps:
572572
1. Let <var>options</var> be null <a lt="converted to an IDL value">converted</a> to a {{ScrollToOptions}} dictionary. [[!WEBIDL]]
573573
2. Let <var>x</var> and <var>y</var> be the arguments, respectively.
574-
3. <a>Normalize non-finite values</a> for <var>x</var> and <var>y</var>.
575574
4. Let the {{ScrollToOptions/left}} dictionary member of <var>options</var> have the value <var>x</var>.
576575
5. Let the {{ScrollToOptions/top}} dictionary member of <var>options</var> have the value <var>y</var>.
577-
2. Add the value of {{scrollX}} to the <code>left</code> dictionary member.
578-
3. Add the value of {{scrollY}} to the <code>top</code> dictionary member.
576+
2. <a>Normalize non-finite values</a> for the {{ScrollToOptions/left}} and {{ScrollToOptions/top}} dictionary members of <var>options</var>.
577+
2. Add the value of {{scrollX}} to the {{ScrollToOptions/left}} dictionary member.
578+
3. Add the value of {{scrollY}} to the {{ScrollToOptions/top}} dictionary member.
579579
4. Act as if the {{Window/scroll()}} method was invoked with <var>options</var> as the only argument.
580580

581581
The <dfn attribute for=Window>screenX</dfn> attribute must return the x-coordinate,
@@ -1028,6 +1028,7 @@ The <dfn method for=Element lt="scroll(options)|scroll(x, y)">scroll()</dfn> met
10281028

10291029
1. If invoked with one argument, follow these substeps:
10301030
1. Let <var>options</var> be the argument.
1031+
2. <a>Normalize non-finite values</a> for {{ScrollToOptions/left}} and {{ScrollToOptions/top}} dictionary members of <var>options</var>, if present.
10311032
2. Let <var>x</var> be the value of the {{ScrollToOptions/left}} dictionary member of <var>options</var>, if present, or the element's current scroll position on the x axis otherwise.
10321033
3. Let <var>y</var> be the value of the {{ScrollToOptions/top}} dictionary member of <var>options</var>, if present, or the element's current scroll position on the y axis otherwise.
10331034
2. If invoked with two arguments, follow these substeps:
@@ -1057,6 +1058,9 @@ user agent must act as if the {{Element/scroll()}} method was invoked with the s
10571058
When the <dfn method for=Element lt="scrollBy(options)|scrollBy(x, y)">scrollBy()</dfn> method is invoked, the
10581059
user agent must run these steps:
10591060

1061+
1. If invoked with one argument, follow these substeps:
1062+
1. Let <var>options</var> be the argument.
1063+
2. <a>Normalize non-finite values</a> for {{ScrollToOptions/left}} and {{ScrollToOptions/top}} dictionary members of <var>options</var>, if present.
10601064
1. If invoked with two arguments, follow these substeps:
10611065
1. Let <var>options</var> be null <a lt="converted to an IDL value">converted</a> to a {{ScrollToOptions}} dictionary. [[!WEBIDL]]
10621066
2. Let <var>x</var> and <var>y</var> be the arguments, respectively.

0 commit comments

Comments
 (0)