Bug 1835529 [wpt PR 40276] - Update wpt metadata, a=testonly
[gecko.git] / dom / webidl / CSSRule.webidl
blob10b4585eb0a5050401c8b0f792b63e303d992621
1 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
4  * You can obtain one at http://mozilla.org/MPL/2.0/.
5  *
6  * The origin of this IDL file is
7  * https://drafts.csswg.org/cssom/#the-cssrule-interface
8  * https://drafts.csswg.org/css-animations/#interface-cssrule
9  * https://drafts.csswg.org/css-counter-styles-3/#extentions-to-cssrule-interface
10  * https://drafts.csswg.org/css-conditional-3/#extentions-to-cssrule-interface
11  * https://drafts.csswg.org/css-fonts-3/#om-fontfeaturevalues
12  */
14 // https://drafts.csswg.org/cssom/#the-cssrule-interface
15 [Exposed=Window]
16 interface CSSRule {
18   const unsigned short STYLE_RULE = 1;
19   const unsigned short CHARSET_RULE = 2; // historical
20   const unsigned short IMPORT_RULE = 3;
21   const unsigned short MEDIA_RULE = 4;
22   const unsigned short FONT_FACE_RULE = 5;
23   const unsigned short PAGE_RULE = 6;
24   // FIXME: We don't support MARGIN_RULE yet.
25   // XXXbz Should we expose the constant anyway?
26   // const unsigned short MARGIN_RULE = 9;
27   const unsigned short NAMESPACE_RULE = 10;
28   [BinaryName="typeForBindings"] readonly attribute unsigned short type;
29   attribute UTF8String cssText;
30   readonly attribute CSSRule? parentRule;
31   readonly attribute CSSStyleSheet? parentStyleSheet;
34 // https://drafts.csswg.org/css-animations/#interface-cssrule
35 partial interface CSSRule {
36     const unsigned short KEYFRAMES_RULE = 7;
37     const unsigned short KEYFRAME_RULE = 8;
40 // https://drafts.csswg.org/css-counter-styles-3/#extentions-to-cssrule-interface
41 partial interface CSSRule {
42     const unsigned short COUNTER_STYLE_RULE = 11;
45 // https://drafts.csswg.org/css-conditional-3/#extentions-to-cssrule-interface
46 partial interface CSSRule {
47     const unsigned short SUPPORTS_RULE = 12;
50 // Non-standard extension for @-moz-document rules.
51 partial interface CSSRule {
52     [ChromeOnly]
53     const unsigned short DOCUMENT_RULE = 13;
56 // https://drafts.csswg.org/css-fonts-3/#om-fontfeaturevalues
57 partial interface CSSRule {
58   const unsigned short FONT_FEATURE_VALUES_RULE = 14;