mirror of
https://github.com/servo/servo.git
synced 2025-08-02 20:20:14 +01:00
style: Introduce InspectorUtils.supports().
Which allows to run CSS.supports in chrome/user-agent context. We should probably add a couple more tweaks for stuff like quirks or what not (the `ParsingMode` enum), but that seem lower priority. I only added the one-value version of CSS.supports because it should be enough and supporting the two value version required a bit of awkward code due to when we parse the CSS property name right now. Differential Revision: https://phabricator.services.mozilla.com/D92585
This commit is contained in:
parent
2b55918be6
commit
436632f378
2 changed files with 2 additions and 22 deletions
|
@ -82,27 +82,6 @@ impl<'a> ParserContext<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
/// Create a parser context for on-the-fly parsing in CSSOM
|
||||
#[inline]
|
||||
pub fn new_for_cssom(
|
||||
url_data: &'a UrlExtraData,
|
||||
rule_type: Option<CssRuleType>,
|
||||
parsing_mode: ParsingMode,
|
||||
quirks_mode: QuirksMode,
|
||||
error_reporter: Option<&'a dyn ParseErrorReporter>,
|
||||
use_counters: Option<&'a UseCounters>,
|
||||
) -> Self {
|
||||
Self::new(
|
||||
Origin::Author,
|
||||
url_data,
|
||||
rule_type,
|
||||
parsing_mode,
|
||||
quirks_mode,
|
||||
error_reporter,
|
||||
use_counters,
|
||||
)
|
||||
}
|
||||
|
||||
/// Create a parser context based on a previous context, but with a modified
|
||||
/// rule type.
|
||||
#[inline]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue