Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 7 additions & 9 deletions cssom-view/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1080,7 +1080,7 @@ dictionary ScrollIntoViewOptions : ScrollOptions {
};

partial interface Element {
sequence<DOMRect> getClientRects();
DOMRectList getClientRects();
[NewObject] DOMRect getBoundingClientRect();
void scrollIntoView();
void scrollIntoView((boolean or object) arg);
Expand All @@ -1103,9 +1103,9 @@ partial interface Element {

The <dfn method for=Element>getClientRects()</dfn> method, when invoked, must return the result of the following algorithm:

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.
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.
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:
1. If the element on which it was invoked does not have an associated <a>layout box</a> return an empty {{DOMRectList}} object and stop this algorithm.
1. If the element has an associated <a>SVG layout box</a> return a {{DOMRectList}} object 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.
1. Return a {{DOMRectList}} object 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:

* Apply the <a>transforms</a> that apply to the element and its ancestors.
* 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.
Expand Down Expand Up @@ -1464,16 +1464,14 @@ first <a>CSS layout box</a> associated with the element, relative to the <a>init

<pre class=idl>
partial interface Range {
sequence&lt;DOMRect> getClientRects();
DOMRectList getClientRects();
[NewObject] DOMRect getBoundingClientRect();
};
</pre>

The <dfn method for=Range>getClientRects()</dfn> method, when invoked, must return an empty
sequence if the range is not in the document and
otherwise a sequence object containing
{{DOMRect}} objects in content order that matches the
following constraints:
{{DOMRectList}} object if the range is not in the document and otherwise a {{DOMRectList}} object
containing a list of {{DOMRect}} objects in content order that matches the following constraints:

* 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.
* For each {{Text}} node selected or partially selected by the range (including when the
Expand Down