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
This commit is contained in:
Brad Werth 2018-08-01 11:52:21 -07:00
Родитель 0abff42b51
Коммит 1fd862a606
1 изменённых файлов: 31 добавлений и 22 удалений

Просмотреть файл

@ -71,8 +71,6 @@ interface Element : Node {
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
@ -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<Grid> 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<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();
};