Skip to content

Commit

Permalink
Revert "[cssom-view] Kill DOMRectList. Fixes https://www.w3.org/Bugs/… (
Browse files Browse the repository at this point in the history
#1499)

* Revert "[cssom-view] Kill DOMRectList. Fixes https://www.w3.org/Bugs/Public/show_bug.cgi?id=26200"

This reverts commit ebc0d23.

See #1479

* grammar nit
  • Loading branch information
zcorpan authored and tabatkins committed Aug 3, 2017
1 parent 2614704 commit 64776a9
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions cssom-view/Overview.bs
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

0 comments on commit 64776a9

Please sign in to comment.