Skip to content

Commit 1100ce0

Browse files
committed
[cssom-view] Change "static DOMRect" to note saying "not live"
Fixes w3c#1202.
1 parent 4c98bf2 commit 1100ce0

File tree

1 file changed

+17
-9
lines changed

1 file changed

+17
-9
lines changed

cssom-view/Overview.bs

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1078,11 +1078,13 @@ aborting on the first step that returns a value:
10781078
1. Return the {{DOMRect}} object in <var>list</var> at index 0.
10791079
1. If <a>caret node</a> is a text entry widget that is a replaced element,
10801080
and that is in the document,
1081-
return a static {{DOMRect}} object for the caret in the widget
1081+
return a {{DOMRect}} object for the caret in the widget
10821082
as represented by the <a>caret offset</a> value.
10831083
The <a>transforms</a> that apply to the element and its ancestors are applied.
10841084
1. Return null.
10851085

1086+
Note: This {{DOMRect}} object is not <a spec=html>live</a>.
1087+
10861088
Extensions to the {{Element}} Interface {#extension-to-the-element-interface}
10871089
=============================================================================
10881090

@@ -1119,23 +1121,27 @@ The <dfn method for=Element>getClientRects()</dfn> method, when invoked, must re
11191121

11201122
1. If the element on which it was invoked does not have an associated <a>layout box</a> return an empty sequence and stop this algorithm.
11211123
1. If the element has an associated <a>SVG layout box</a> return a sequence containing a single {{DOMRect}} object that describes the bounding box of the element as defined by the SVG specification, applying the <a>transforms</a> that apply to the element and its ancestors.
1122-
1. Return a sequence containing static {{DOMRect}} objects in content order, one for each <a spec=css-break>box fragment</a>, describing its border area (including those with a height or width of zero) with the following constraints:
1124+
1. Return a sequence containing {{DOMRect}} objects in content order, one for each <a spec=css-break>box fragment</a>, describing its border area (including those with a height or width of zero) with the following constraints:
11231125

11241126
* Apply the <a>transforms</a> that apply to the element and its ancestors.
11251127
* If the element on which the method was invoked has a computed value for the 'display' property of ''table'' or ''inline-table'' include both the table box and the caption box, if any, but not the anonymous container box.
11261128
* Replace each <a>anonymous block box</a> with its child box(es) and repeat this until no anonymous block boxes are left in the final list.
11271129

1130+
Note: The {{DOMRect}} objects returned by {{Element/getClientRects()}} are not <a spec=html>live</a>.
1131+
11281132
The <dfn method for=Element caniuse=getboundingclientrect>getBoundingClientRect()</dfn> method, when invoked, must return the result of the following
11291133
algorithm:
11301134

11311135
1. Let <var>list</var> be the result of invoking {{Element/getClientRects()}} on the same element this method was invoked on.
1132-
1. If the <var>list</var> is empty return a static {{DOMRect}} object
1136+
1. If the <var>list</var> is empty return a {{DOMRect}} object
11331137
whose {{DOMRect/x}}, {{DOMRect/y}}, {{DOMRect/width}} and {{DOMRect/height}} members are zero.
11341138
1. If all rectangles in <var>list</var> have zero width or height, return the first rectangle in
11351139
<var>list</var>.
1136-
1. Otherwise, return a static {{DOMRect}} object describing the smallest rectangle that includes all
1140+
1. Otherwise, return a {{DOMRect}} object describing the smallest rectangle that includes all
11371141
of the rectangles in <var>list</var> of which the height or width is not zero.
11381142

1143+
Note: The {{DOMRect}} object returned by {{Element/getBoundingClientRect()}} is not <a spec=html>live</a>.
1144+
11391145
<div class='example'>
11401146
The following snippet gets the dimensions of the first <code>div</code> element in a document:
11411147

@@ -1476,8 +1482,6 @@ first <a>CSS layout box</a> associated with the element, relative to the <a>init
14761482
Extensions to the {{Range}} Interface {#extensions-to-the-range-interface}
14771483
==========================================================================
14781484

1479-
The objects the methods described below return must be static.
1480-
14811485
<pre class=idl>
14821486
partial interface Range {
14831487
sequence&lt;DOMRect> getClientRects();
@@ -1488,7 +1492,7 @@ partial interface Range {
14881492
The <dfn method for=Range>getClientRects()</dfn> method, when invoked, must return an empty
14891493
sequence if the range is not in the document and
14901494
otherwise a sequence object containing
1491-
static {{DOMRect}} objects in content order that matches the
1495+
{{DOMRect}} objects in content order that matches the
14921496
following constraints:
14931497

14941498
* For each element selected by the range, whose parent is not selected by the range, include the border areas returned by invoking {{Element/getClientRects()}} on the element.
@@ -1502,16 +1506,20 @@ following constraints:
15021506
for the purpose of computing the bounds of the relevant {{DOMRect}}. [[!CSS-TEXT-3]] The
15031507
<a>transforms</a> that apply to the ancestors are applied.
15041508

1509+
Note: The {{DOMRect}} objects returned by {{Range/getClientRects()}} are not <a spec=html>live</a>.
1510+
15051511
The <dfn method for=Range>getBoundingClientRect()</dfn> method, when invoked, must return the result of the following
15061512
algorithm:
15071513

15081514
1. Let <var>list</var> be the result of invoking {{Range/getClientRects()}} on the same range this method was invoked on.
1509-
1. If <var>list</var> is empty return a static {{DOMRect}} object whose {{DOMRect/x}}, {{DOMRect/y}}, {{DOMRect/width}} and {{DOMRect/height}} members are zero.
1515+
1. If <var>list</var> is empty return a {{DOMRect}} object whose {{DOMRect/x}}, {{DOMRect/y}}, {{DOMRect/width}} and {{DOMRect/height}} members are zero.
15101516
1. If all rectangles in <var>list</var> have zero width or height, return the first rectangle in
15111517
<var>list</var>.
1512-
1. Otherwise, return a static {{DOMRect}} object describing the smallest rectangle that includes all
1518+
1. Otherwise, return a {{DOMRect}} object describing the smallest rectangle that includes all
15131519
of the rectangles in <var>list</var> of which the height or width is not zero.
15141520

1521+
Note: The {{DOMRect}} object returned by {{Range/getBoundingClientRect()}} is not <a spec=html>live</a>.
1522+
15151523
Extensions to the {{MouseEvent}} Interface {#extensions-to-the-mouseevent-interface}
15161524
====================================================================================
15171525

0 commit comments

Comments
 (0)