mirror of
https://github.com/servo/servo.git
synced 2025-08-13 01:15:34 +01:00
Auto merge of #14789 - Manishearth:supports, r=SimonSapin
Support @supports fixes #14786 cc @heycam @upsuper r? @SimonSapin <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14789) <!-- Reviewable:end -->
This commit is contained in:
commit
50bba770d6
98 changed files with 638 additions and 218 deletions
|
@ -11,3 +11,9 @@ interface CSS {
|
|||
[Throws]
|
||||
static DOMString escape(DOMString ident);
|
||||
};
|
||||
|
||||
// https://drafts.csswg.org/css-conditional-3/#the-css-interface
|
||||
partial interface CSS {
|
||||
static boolean supports(DOMString property, DOMString value);
|
||||
static boolean supports(DOMString conditionText);
|
||||
};
|
||||
|
|
9
components/script/dom/webidls/CSSConditionRule.webidl
Normal file
9
components/script/dom/webidls/CSSConditionRule.webidl
Normal file
|
@ -0,0 +1,9 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
// https://drafts.csswg.org/css-conditional/#cssconditionrule
|
||||
[Abstract, Exposed=Window]
|
||||
interface CSSConditionRule : CSSGroupingRule {
|
||||
attribute DOMString conditionText;
|
||||
};
|
|
@ -3,7 +3,8 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
// https://drafts.csswg.org/cssom/#the-cssmediarule-interface
|
||||
// https://drafts.csswg.org/css-conditional/#cssmediarule
|
||||
[Exposed=Window]
|
||||
interface CSSMediaRule : CSSGroupingRule {
|
||||
interface CSSMediaRule : CSSConditionRule {
|
||||
[SameObject, PutForwards=mediaText] readonly attribute MediaList media;
|
||||
};
|
||||
|
|
|
@ -31,3 +31,7 @@ partial interface CSSRule {
|
|||
const unsigned short VIEWPORT_RULE = 15;
|
||||
};
|
||||
|
||||
// https://drafts.csswg.org/css-conditional-3/#extentions-to-cssrule-interface
|
||||
partial interface CSSRule {
|
||||
const unsigned short SUPPORTS_RULE = 12;
|
||||
};
|
||||
|
|
8
components/script/dom/webidls/CSSSupportsRule.webidl
Normal file
8
components/script/dom/webidls/CSSSupportsRule.webidl
Normal file
|
@ -0,0 +1,8 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
// https://drafts.csswg.org/css-conditional/#csssupportsrule
|
||||
[Exposed=Window]
|
||||
interface CSSSupportsRule : CSSConditionRule {
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue