mirror of
https://github.com/servo/servo.git
synced 2025-08-14 01:45:33 +01:00
script: Convert CSS
from a IDL interface with static methods to a namespace (#38579)
This change updates our implementation to match the spec. Per https://drafts.csswg.org/cssom/#issue-24739c22 this is observable. Testing: Covered by existing web platform tests. --------- Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
This commit is contained in:
parent
7ff8724eaf
commit
a60b53eded
2 changed files with 24 additions and 21 deletions
|
@ -3,22 +3,34 @@
|
||||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||||
/*
|
/*
|
||||||
* The origin of this IDL file is
|
* The origin of this IDL file is
|
||||||
* http://dev.w3.org/csswg/cssom/#the-css-interface
|
* https://drafts.csswg.org/cssom/#namespacedef-css
|
||||||
*/
|
*/
|
||||||
|
|
||||||
[Abstract, Exposed=Window]
|
// https://drafts.csswg.org/cssom/#the-css.escape()-method
|
||||||
interface CSS {
|
[Exposed=Window]
|
||||||
[Throws]
|
namespace CSS {
|
||||||
static DOMString escape(DOMString ident);
|
[Throws] CSSOMString escape(CSSOMString ident);
|
||||||
};
|
};
|
||||||
|
|
||||||
// https://drafts.csswg.org/css-conditional-3/#the-css-interface
|
// https://drafts.csswg.org/css-conditional-3/#dom-css-supports
|
||||||
partial interface CSS {
|
partial namespace CSS {
|
||||||
static boolean supports(DOMString property, DOMString value);
|
boolean supports(CSSOMString property, CSSOMString value);
|
||||||
static boolean supports(DOMString conditionText);
|
boolean supports(CSSOMString conditionText);
|
||||||
};
|
};
|
||||||
|
|
||||||
// https://drafts.css-houdini.org/css-paint-api-1/#paint-worklet
|
// https://drafts.css-houdini.org/css-paint-api/#dom-css-paintworklet
|
||||||
partial interface CSS {
|
partial namespace CSS {
|
||||||
[SameObject, Pref="dom_worklet_enabled"] static readonly attribute Worklet paintWorklet;
|
[SameObject, Pref="dom_worklet_enabled"] readonly attribute Worklet paintWorklet;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// https://drafts.css-houdini.org/css-properties-values-api/#the-registerproperty-function
|
||||||
|
// dictionary PropertyDefinition {
|
||||||
|
// required DOMString name;
|
||||||
|
// DOMString syntax = "*";
|
||||||
|
// required boolean inherits;
|
||||||
|
// DOMString initialValue;
|
||||||
|
// };
|
||||||
|
|
||||||
|
// partial namespace CSS {
|
||||||
|
// undefined registerProperty(PropertyDefinition definition);
|
||||||
|
// };
|
||||||
|
|
9
tests/wpt/meta/css/cssom/idlharness.html.ini
vendored
9
tests/wpt/meta/css/cssom/idlharness.html.ini
vendored
|
@ -374,15 +374,6 @@
|
||||||
[CSS namespace: [[Prototype\]\] is Object.prototype]
|
[CSS namespace: [[Prototype\]\] is Object.prototype]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[CSS namespace: typeof is "object"]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[CSS namespace: has no name property]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[CSS namespace: has no length property]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[MathMLElement interface: attribute style]
|
[MathMLElement interface: attribute style]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue