From 949df1e3d97831e110a43ddd083b0fd2764088ed Mon Sep 17 00:00:00 2001 From: Brad Werth Date: Wed, 1 Aug 2018 11:52:21 -0700 Subject: [PATCH] Bug 1479508 Part 1: Move devtools-specific function definitions in Element.webidl into a better-documented partial interface. r=bz MozReview-Commit-ID: 6227lasylzN --HG-- extra : rebase_source : f9cf8938d4cd01ceebc1adc2ffd078a98d928fae --- dom/webidl/Element.webidl | 53 +++++++++++++++++++++++---------------- 1 file changed, 31 insertions(+), 22 deletions(-) diff --git a/dom/webidl/Element.webidl b/dom/webidl/Element.webidl index 6650925ba4bd..f4bf25bef9e8 100644 --- a/dom/webidl/Element.webidl +++ b/dom/webidl/Element.webidl @@ -71,9 +71,7 @@ interface Element : Node { HTMLCollection getElementsByTagNameNS(DOMString? namespace, DOMString localName); [Pure] HTMLCollection getElementsByClassName(DOMString classNames); - [ChromeOnly, Pure] - sequence getElementsWithGrid(); - + [CEReactions, Throws, Pure] Element? insertAdjacentElement(DOMString where, Element element); // historical @@ -156,25 +154,6 @@ interface Element : Node { */ boolean scrollByNoFlush(long dx, long dy); - // Support reporting of Flexbox properties - /** - * If this element has a display:flex or display:inline-flex style, - * this property returns an object with computed values for flex - * properties, as well as a property that exposes the flex lines - * in this container. - */ - [ChromeOnly, Pure] - Flex? getAsFlexContainer(); - - // Support reporting of Grid properties - /** - * If this element has a display:grid or display:inline-grid style, - * this property returns an object with computed values for grid - * tracks and lines. - */ - [ChromeOnly, Pure] - sequence getGridFragments(); - [ChromeOnly] DOMMatrixReadOnly getTransformToAncestor(Element ancestor); [ChromeOnly] @@ -293,3 +272,33 @@ partial interface Element { [NeedsCallerType] void requestPointerLock(); }; + +// Mozilla-specific additions to support devtools +partial interface Element { + // Support reporting of Flexbox properties + /** + * If this element has a display:flex or display:inline-flex style, + * this property returns an object with computed values for flex + * properties, as well as a property that exposes the flex lines + * in this container. + */ + [ChromeOnly, Pure] + Flex? getAsFlexContainer(); + + // Support reporting of Grid properties + /** + * If this element has a display:grid or display:inline-grid style, + * this property returns an object with computed values for grid + * tracks and lines. + */ + [ChromeOnly, Pure] + sequence getGridFragments(); + + /** + * Returns a sequence of all the descendent elements of this element + * that have display:grid or display:inline-grid style and generate + * a frame. + */ + [ChromeOnly, Pure] + sequence getElementsWithGrid(); +};