Skip to content

Commit 4e888a2

Browse files
author
Simon Pieters
committed
[cssom-view] Revert some APIs to use long instead of double. https://lists.w3.org/Archives/Public/www-style/2015Feb/0195.html
1 parent 107993a commit 4e888a2

1 file changed

Lines changed: 26 additions & 29 deletions

File tree

cssom-view/Overview.bs

Lines changed: 26 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -399,14 +399,14 @@ partial interface Window {
399399
[SameObject] readonly attribute Screen screen;
400400

401401
// browsing context
402-
void moveTo(unrestricted double x, unrestricted double y);
403-
void moveBy(unrestricted double x, unrestricted double y);
404-
void resizeTo(unrestricted double x, unrestricted double y);
405-
void resizeBy(unrestricted double x, unrestricted double y);
402+
void moveTo(long x, long y);
403+
void moveBy(long x, long y);
404+
void resizeTo(long x, long y);
405+
void resizeBy(long x, long y);
406406

407407
// viewport
408-
readonly attribute double innerWidth;
409-
readonly attribute double innerHeight;
408+
readonly attribute long innerWidth;
409+
readonly attribute long innerHeight;
410410

411411
// viewport scrolling
412412
readonly attribute double scrollX;
@@ -421,10 +421,10 @@ partial interface Window {
421421
void scrollBy(unrestricted double x, unrestricted double y);
422422

423423
// client
424-
readonly attribute double screenX;
425-
readonly attribute double screenY;
426-
readonly attribute double outerWidth;
427-
readonly attribute double outerHeight;
424+
readonly attribute long screenX;
425+
readonly attribute long screenY;
426+
readonly attribute long outerWidth;
427+
readonly attribute long outerHeight;
428428
readonly attribute double devicePixelRatio;
429429
};
430430
</pre>
@@ -450,7 +450,6 @@ results when the {{Document}} is navigated.
450450
The <dfn method for=Window>moveTo(<var>x</var>, <var>y</var>)</dfn> method must follow these steps:
451451

452452
1. Optionally, terminate these steps.
453-
2. <a>Normalize non-finite values</a> for <var>x</var> and <var>y</var>.
454453
3. Let <var>target</var> be the <a>browsing context</a> of the <a>context object</a>.
455454
4. Let <var>source</var> be the <a>responsible browsing context</a> of the <a>incumbent settings object</a>.
456455
5. If <var>source</var> is not <a>allowed to resize and move</a> <var>target</var>, terminate these steps.
@@ -460,7 +459,6 @@ The <dfn method for=Window>moveTo(<var>x</var>, <var>y</var>)</dfn> method must
460459
The <dfn method for=Window>moveBy(<var>x</var>, <var>y</var>)</dfn> method must follow these steps:
461460

462461
1. Optionally, terminate these steps.
463-
2. <a>Normalize non-finite values</a> for <var>x</var> and <var>y</var>.
464462
3. Let <var>target</var> be the <a>browsing context</a> of the <a>context object</a>.
465463
4. Let <var>source</var> be the <a>responsible browsing context</a> of the <a>incumbent settings object</a>.
466464
5. If <var>source</var> is not <a>allowed to resize and move</a> <var>target</var>, terminate these steps.
@@ -471,7 +469,6 @@ The <dfn method for=Window>moveBy(<var>x</var>, <var>y</var>)</dfn> method must
471469
The <dfn method for=Window>resizeTo(<var>x</var>, <var>y</var>)</dfn> method must follow these steps:
472470

473471
1. Optionally, terminate these steps.
474-
2. <a>Normalize non-finite values</a> for <var>x</var> and <var>y</var>.
475472
3. Let <var>target</var> be the <a>browsing context</a> of the <a>context object</a>.
476473
4. Let <var>source</var> be the <a>responsible browsing context</a> of the <a>incumbent settings object</a>.
477474
5. If <var>source</var> is not <a>allowed to resize and move</a> <var>target</var>, terminate these steps.
@@ -805,10 +802,10 @@ As its name suggests, the {{Screen}} interface represents information about the
805802

806803
<pre class=idl>
807804
interface Screen {
808-
readonly attribute double availWidth;
809-
readonly attribute double availHeight;
810-
readonly attribute double width;
811-
readonly attribute double height;
805+
readonly attribute long availWidth;
806+
readonly attribute long availHeight;
807+
readonly attribute long width;
808+
readonly attribute long height;
812809
readonly attribute unsigned long colorDepth;
813810
readonly attribute unsigned long pixelDepth;
814811
};
@@ -973,12 +970,12 @@ partial interface Element {
973970
void scrollBy(unrestricted double x, unrestricted double y);
974971
attribute unrestricted double scrollTop;
975972
attribute unrestricted double scrollLeft;
976-
readonly attribute double scrollWidth;
977-
readonly attribute double scrollHeight;
978-
readonly attribute double clientTop;
979-
readonly attribute double clientLeft;
980-
readonly attribute double clientWidth;
981-
readonly attribute double clientHeight;
973+
readonly attribute long scrollWidth;
974+
readonly attribute long scrollHeight;
975+
readonly attribute long clientTop;
976+
readonly attribute long clientLeft;
977+
readonly attribute long clientWidth;
978+
readonly attribute long clientHeight;
982979
};
983980
</pre>
984981

@@ -1227,10 +1224,10 @@ Extensions to the {{HTMLElement}} Interface {#extensions-to-the-htmlelement-inte
12271224
<pre class=idl>
12281225
partial interface HTMLElement {
12291226
readonly attribute Element? offsetParent;
1230-
readonly attribute double offsetTop;
1231-
readonly attribute double offsetLeft;
1232-
readonly attribute double offsetWidth;
1233-
readonly attribute double offsetHeight;
1227+
readonly attribute long offsetTop;
1228+
readonly attribute long offsetLeft;
1229+
readonly attribute long offsetWidth;
1230+
readonly attribute long offsetHeight;
12341231
};
12351232
</pre>
12361233

@@ -1282,8 +1279,8 @@ Extensions to the {{HTMLImageElement}} Interface {#extensions-to-the-htmlimageel
12821279

12831280
<pre class=idl>
12841281
partial interface HTMLImageElement {
1285-
readonly attribute double x;
1286-
readonly attribute double y;
1282+
readonly attribute long x;
1283+
readonly attribute long y;
12871284
};
12881285
</pre>
12891286

0 commit comments

Comments
 (0)