From a068adbeed1bd47ee6fff60437ccb57e5dfc4014 Mon Sep 17 00:00:00 2001 From: Simon Pieters Date: Mon, 5 Jun 2017 11:03:20 +0200 Subject: [PATCH 1/2] Revert "[cssom-view] Kill DOMRectList. Fixes https://www.w3.org/Bugs/Public/show_bug.cgi?id=26200" This reverts commit ebc0d23a692d703ef48dd634b01db9be433ca6c6. See https://github.com/w3c/csswg-drafts/issues/1479 --- cssom-view/Overview.bs | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/cssom-view/Overview.bs b/cssom-view/Overview.bs index 0ec0ef761ac..b80ba7187d5 100644 --- a/cssom-view/Overview.bs +++ b/cssom-view/Overview.bs @@ -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); @@ -1103,9 +1103,9 @@ partial interface Element { The getClientRects() 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 layout box return an empty sequence and stop this algorithm. -1. If the element has an associated SVG layout box return a sequence containing a single {{DOMRect}} object that describes the bounding box of the element as defined by the SVG specification, applying the transforms that apply to the element and its ancestors. -1. Return a sequence containing {{DOMRect}} objects in content order, one for each box fragment, 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 layout box return an empty {{DOMRectList}} and stop this algorithm. +1. If the element has an associated SVG layout box 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 transforms that apply to the element and its ancestors. +1. Return a {{DOMRectList}} object containing {{DOMRect}} objects in content order, one for each box fragment, describing its border area (including those with a height or width of zero) with the following constraints: * Apply the transforms 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. @@ -1464,16 +1464,14 @@ first CSS layout box associated with the element, relative to the init
 partial interface Range {
-  sequence<DOMRect> getClientRects();
+  DOMRectList getClientRects();
   [NewObject] DOMRect getBoundingClientRect();
 };
 
The getClientRects() 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 From 051a3bb075677a588d61671d2ccea0ef8b3fb3cc Mon Sep 17 00:00:00 2001 From: Tab Atkins Jr Date: Thu, 3 Aug 2017 04:23:24 -0700 Subject: [PATCH 2/2] grammar nit --- cssom-view/Overview.bs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cssom-view/Overview.bs b/cssom-view/Overview.bs index b80ba7187d5..73f4da91835 100644 --- a/cssom-view/Overview.bs +++ b/cssom-view/Overview.bs @@ -1103,7 +1103,7 @@ partial interface Element { The getClientRects() 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
layout box return an empty {{DOMRectList}} and stop this algorithm. +1. If the element on which it was invoked does not have an associated layout box return an empty {{DOMRectList}} object and stop this algorithm. 1. If the element has an associated SVG layout box 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 transforms that apply to the element and its ancestors. 1. Return a {{DOMRectList}} object containing {{DOMRect}} objects in content order, one for each box fragment, describing its border area (including those with a height or width of zero) with the following constraints: