Bug 1479508 Part 1: Move devtools-specific function definitions in Element.webidl into a better-documented partial interface. draft
authorBrad Werth <bwerth@mozilla.com>
Wed, 01 Aug 2018 11:52:21 -0700
changeset 826357 a9065d571214c7a43c931a3f542a99a09c8d3ab3
parent 826308 3d107866825433ab1168c7d23e94eac727e0f673
child 826358 9cd4f463cd2c081cf25b8e09c903e4211798a215
push id118307
push userbwerth@mozilla.com
push dateFri, 03 Aug 2018 18:02:24 +0000
bugs1479508
milestone63.0a1
Bug 1479508 Part 1: Move devtools-specific function definitions in Element.webidl into a better-documented partial interface. MozReview-Commit-ID: 6227lasylzN
dom/webidl/Element.webidl
--- a/dom/webidl/Element.webidl
+++ b/dom/webidl/Element.webidl
@@ -66,19 +66,17 @@ interface Element : Node {
   boolean webkitMatchesSelector(DOMString selector);
 
   [Pure]
   HTMLCollection getElementsByTagName(DOMString localName);
   [Throws, Pure]
   HTMLCollection getElementsByTagNameNS(DOMString? namespace, DOMString localName);
   [Pure]
   HTMLCollection getElementsByClassName(DOMString classNames);
-  [ChromeOnly, Pure]
-  sequence<Element> getElementsWithGrid();
-
+ 
   [CEReactions, Throws, Pure]
   Element? insertAdjacentElement(DOMString where, Element element); // historical
 
   [Throws]
   void insertAdjacentText(DOMString where, DOMString data); // historical
 
   /**
    * The ratio of font-size-inflated text font size to computed font
@@ -151,35 +149,16 @@ interface Element : Node {
 
   [ChromeOnly]
   /**
    * Scrolls the element by (dx, dy) CSS pixels without doing any
    * layout flushing.
    */
   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<Grid> getGridFragments();
-
   [ChromeOnly]
   DOMMatrixReadOnly getTransformToAncestor(Element ancestor);
   [ChromeOnly]
   DOMMatrixReadOnly getTransformToParent();
   [ChromeOnly]
   DOMMatrixReadOnly getTransformToViewport();
 };
 
@@ -288,8 +267,38 @@ partial interface Element {
   void mozRequestFullScreen();
 };
 
 // https://w3c.github.io/pointerlock/#extensions-to-the-element-interface
 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<Grid> 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<Element> getElementsWithGrid();
+};