mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-17 15:25:52 +00:00
Bug 1473811 [wpt PR 11819] - Update the cssom IDL file, a=testonly
Automatic update from web-platform-testsUpdate the cssom IDL file + test (#11819) -- wpt-commits: 8b48137d3999ede7ba459419a5d986abc0e2e184 wpt-pr: 11819
This commit is contained in:
parent
0f12587b23
commit
ed16ad9e8c
@ -562758,7 +562758,7 @@
|
||||
"testharness"
|
||||
],
|
||||
"css/cssom/interfaces.html": [
|
||||
"08d04c076d91aedb929d992f8523a91a852dde9a",
|
||||
"d409e48159d2d5efe97f6a1fb628b640ab220ddc",
|
||||
"testharness"
|
||||
],
|
||||
"css/cssom/medialist-dynamic-001-ref.html": [
|
||||
@ -601670,7 +601670,7 @@
|
||||
"support"
|
||||
],
|
||||
"interfaces/cssom.idl": [
|
||||
"b99bbc7a3c60c0c9e74fe20b63d7e835355012cf",
|
||||
"510fa4db51824e2e58f4a97b6d36afbd2322d7c8",
|
||||
"support"
|
||||
],
|
||||
"interfaces/dedicated-workers.idl": [
|
||||
|
@ -28,70 +28,50 @@ Use a non-empty style attribute to get a non-empty CSSStyleDeclaration.
|
||||
<div id=log></div>
|
||||
|
||||
<script>
|
||||
"use strict";
|
||||
var style_element, svg_element, xmlss_pi;
|
||||
'use strict';
|
||||
|
||||
function doTest([html, dom, uievents, cssom]) {
|
||||
style_element = document.getElementById('styleElement');
|
||||
svg_element = document.getElementById('svgElement');
|
||||
xmlss_pi = document.getElementById('xmlssPiIframe').contentDocument.firstChild;
|
||||
|
||||
var idlArray = new IdlArray();
|
||||
var svg = "interface SVGElement : Element {};";
|
||||
idlArray.add_untested_idls(html + dom + svg);
|
||||
idlArray.add_untested_idls(uievents, { only: [
|
||||
'UIEvent',
|
||||
'UIEventInit',
|
||||
'MouseEvent',
|
||||
'MouseEventInit',
|
||||
'EventModifierInit'
|
||||
]});
|
||||
idlArray.add_idls(cssom);
|
||||
const waitForLoad = new Promise(r => { addEventListener('load', r); });
|
||||
|
||||
idl_test(
|
||||
['cssom'],
|
||||
['SVG', 'uievents', 'html', 'dom'],
|
||||
async idlArray => {
|
||||
idlArray.add_objects({
|
||||
"Document": ["document", "new Document()"],
|
||||
"StyleSheetList": ["document.styleSheets"],
|
||||
"CSSStyleSheet": ["style_element.sheet"],
|
||||
"MediaList": ["style_element.sheet.media"],
|
||||
"CSSRuleList": ["style_element.sheet.cssRules"],
|
||||
"CSSImportRule": ["style_element.sheet.cssRules[0]"],
|
||||
"CSSNamespaceRule": ["style_element.sheet.cssRules[1]"],
|
||||
"CSSPageRule": ["style_element.sheet.cssRules[2]"],
|
||||
"CSSMarginRule": ["style_element.sheet.cssRules[2].cssRules[0]"],
|
||||
"CSSMediaRule": ["style_element.sheet.cssRules[3]"],
|
||||
"CSSStyleRule": ["style_element.sheet.cssRules[4]"],
|
||||
"CSSStyleDeclaration": ["style_element.sheet.cssRules[4].style", // CSSStyleRule
|
||||
"style_element.sheet.cssRules[2].style", // CSSPageRule
|
||||
"style_element.sheet.cssRules[2].cssRules[0].style", // CSSMarginRule
|
||||
"style_element.style", // ElementCSSInlineStyle for HTMLElement
|
||||
"svg_element.style", // ElementCSSInlineStyle for SVGElement
|
||||
"getComputedStyle(svg_element)"],
|
||||
"ProcessingInstruction": ["xmlss_pi"],
|
||||
"Window": ["window"],
|
||||
"HTMLElement": ["style_element", "document.createElement('unknownelement')"],
|
||||
"SVGElement": ["svg_element"],
|
||||
Document: ['document', 'new Document()'],
|
||||
StyleSheetList: ['document.styleSheets'],
|
||||
CSSStyleSheet: ['sheet'],
|
||||
MediaList: ['sheet.media'],
|
||||
CSSRuleList: ['sheet.cssRules'],
|
||||
CSSImportRule: ['sheet.cssRules[0]'],
|
||||
CSSNamespaceRule: ['sheet.cssRules[1]'],
|
||||
CSSPageRule: ['sheet.cssRules[2]'],
|
||||
CSSMarginRule: ['sheet.cssRules[2].cssRules[0]'],
|
||||
CSSMediaRule: ['sheet.cssRules[3]'],
|
||||
CSSStyleRule: ['sheet.cssRules[4]'],
|
||||
CSSStyleDeclaration: [
|
||||
'sheet.cssRules[4].style', // CSSStyleRule
|
||||
'sheet.cssRules[2].style', // CSSPageRule
|
||||
'sheet.cssRules[2].cssRules[0].style', // CSSMarginRule
|
||||
'style_element.style', // ElementCSSInlineStyle for HTMLElement
|
||||
'svg_element.style', // ElementCSSInlineStyle for SVGElement
|
||||
'getComputedStyle(svg_element)'
|
||||
],
|
||||
ProcessingInstruction: ['xmlss_pi'],
|
||||
Window: ['window'],
|
||||
HTMLElement: [
|
||||
'style_element',
|
||||
'document.createElement("unknownelement")'
|
||||
],
|
||||
SVGElement: ['svg_element'],
|
||||
});
|
||||
idlArray.test();
|
||||
};
|
||||
|
||||
function fetchData(url) {
|
||||
return fetch(url).then((response) => response.text());
|
||||
}
|
||||
|
||||
function waitForLoad() {
|
||||
return new Promise(function(resolve) {
|
||||
addEventListener("load", resolve);
|
||||
});
|
||||
}
|
||||
|
||||
promise_test(function() {
|
||||
// Have to wait for onload
|
||||
return Promise.all([fetchData("/interfaces/html.idl"),
|
||||
fetchData("/interfaces/dom.idl"),
|
||||
fetchData("/interfaces/uievents.idl"),
|
||||
fetchData("/interfaces/cssom.idl"),
|
||||
waitForLoad()])
|
||||
.then(doTest);
|
||||
}, "Test driver");
|
||||
await waitForLoad;
|
||||
self.style_element = document.getElementById('styleElement');
|
||||
self.sheet = style_element.sheet;
|
||||
self.svg_element = document.getElementById('svgElement');
|
||||
self.xmlss_pi = document.getElementById('xmlssPiIframe').contentDocument.firstChild;
|
||||
},
|
||||
'Test driver'
|
||||
);
|
||||
|
||||
</script>
|
||||
|
@ -1,6 +1,7 @@
|
||||
// GENERATED CONTENT - DO NOT EDIT
|
||||
// Content of this file was automatically extracted from the CSS Object Model (CSSOM) spec.
|
||||
// See https://drafts.csswg.org/cssom/
|
||||
// Content of this file was automatically extracted from the
|
||||
// "CSS Object Model (CSSOM)" spec.
|
||||
// See: https://drafts.csswg.org/cssom/
|
||||
|
||||
typedef USVString CSSOMString;
|
||||
|
||||
@ -42,14 +43,11 @@ partial interface Document {
|
||||
[SameObject] readonly attribute StyleSheetList styleSheets;
|
||||
};
|
||||
|
||||
[Exposed=Window,
|
||||
NoInterfaceObject]
|
||||
interface LinkStyle {
|
||||
interface mixin LinkStyle {
|
||||
readonly attribute StyleSheet? sheet;
|
||||
};
|
||||
|
||||
ProcessingInstruction implements LinkStyle;
|
||||
|
||||
ProcessingInstruction includes LinkStyle;
|
||||
[Exposed=Window]
|
||||
interface CSSRuleList {
|
||||
getter CSSRule? item(unsigned long index);
|
||||
@ -123,21 +121,19 @@ interface CSSStyleDeclaration {
|
||||
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString cssFloat;
|
||||
};
|
||||
|
||||
[Exposed=Window,
|
||||
NoInterfaceObject]
|
||||
interface ElementCSSInlineStyle {
|
||||
interface mixin ElementCSSInlineStyle {
|
||||
[SameObject, PutForwards=cssText] readonly attribute CSSStyleDeclaration style;
|
||||
};
|
||||
|
||||
HTMLElement implements ElementCSSInlineStyle;
|
||||
HTMLElement includes ElementCSSInlineStyle;
|
||||
|
||||
SVGElement implements ElementCSSInlineStyle;
|
||||
SVGElement includes ElementCSSInlineStyle;
|
||||
|
||||
partial interface Window {
|
||||
[NewObject] CSSStyleDeclaration getComputedStyle(Element elt, optional CSSOMString? pseudoElt);
|
||||
};
|
||||
|
||||
[Exposed=Window]
|
||||
interface CSS {
|
||||
static CSSOMString escape(CSSOMString ident);
|
||||
namespace CSS {
|
||||
CSSOMString escape(CSSOMString ident);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user