mirror of
https://github.com/servo/servo.git
synced 2025-07-22 14:53:49 +01:00
Further changes required by Servo
This commit is contained in:
parent
b31ea25848
commit
27cb7cd4f2
2 changed files with 11 additions and 3 deletions
|
@ -98,8 +98,9 @@ impl CSSRule {
|
|||
DomRoot::upcast(CSSSupportsRule::new(window, parent_stylesheet, s))
|
||||
},
|
||||
StyleCssRule::Page(_) => unreachable!(),
|
||||
StyleCssRule::Document(_) => unimplemented!(), // TODO
|
||||
StyleCssRule::Viewport(_) => unimplemented!(), // TODO
|
||||
StyleCssRule::Container(_) => unimplemented!(), // TODO
|
||||
StyleCssRule::Document(_) => unimplemented!(), // TODO
|
||||
StyleCssRule::Viewport(_) => unimplemented!(), // TODO
|
||||
StyleCssRule::LayerBlock(_) => unimplemented!(), // TODO
|
||||
StyleCssRule::LayerStatement(_) => unimplemented!(), // TODO
|
||||
StyleCssRule::ScrollTimeline(_) => unimplemented!(), // TODO
|
||||
|
|
|
@ -414,6 +414,13 @@ impl<'a, 'b> NestedRuleParser<'a, 'b> {
|
|||
}
|
||||
}
|
||||
|
||||
fn container_queries_enabled() -> bool {
|
||||
#[cfg(feature = "gecko")]
|
||||
return static_prefs::pref!("layout.css.container-queries.enabled");
|
||||
#[cfg(feature = "servo")]
|
||||
return false;
|
||||
}
|
||||
|
||||
impl<'a, 'b, 'i> AtRuleParser<'i> for NestedRuleParser<'a, 'b> {
|
||||
type Prelude = AtRulePrelude;
|
||||
type AtRule = CssRule;
|
||||
|
@ -437,7 +444,7 @@ impl<'a, 'b, 'i> AtRuleParser<'i> for NestedRuleParser<'a, 'b> {
|
|||
"font-face" => {
|
||||
AtRulePrelude::FontFace
|
||||
},
|
||||
"container" if static_prefs::pref!("layout.css.container-queries.enabled") => {
|
||||
"container" if container_queries_enabled() => {
|
||||
// FIXME: This is a bit ambiguous:
|
||||
// https://github.com/w3c/csswg-drafts/issues/7203
|
||||
let name = input.try_parse(|input| {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue