diff options
author | Oriol Brufau <obrufau@igalia.com> | 2023-06-07 01:12:56 +0200 |
---|---|---|
committer | Oriol Brufau <obrufau@igalia.com> | 2023-06-09 11:18:06 +0200 |
commit | f39ab4ffc1b5354a12efdeac7722bd5372673c5c (patch) | |
tree | 729de552782922429004da7b6b16cf76d2dbdf74 | |
parent | 01c6eb3556e86402992e0512a714ac7094b2beb6 (diff) | |
download | servo-f39ab4ffc1b5354a12efdeac7722bd5372673c5c.tar.gz servo-f39ab4ffc1b5354a12efdeac7722bd5372673c5c.zip |
Further changes required by Servo
-rw-r--r-- | components/style/stylesheets/rule_parser.rs | 3 | ||||
-rw-r--r-- | components/style/stylist.rs | 9 |
2 files changed, 7 insertions, 5 deletions
diff --git a/components/style/stylesheets/rule_parser.rs b/components/style/stylesheets/rule_parser.rs index 868137b52cd..9c0095bc32d 100644 --- a/components/style/stylesheets/rule_parser.rs +++ b/components/style/stylesheets/rule_parser.rs @@ -468,7 +468,8 @@ impl<'a, 'b, 'i> AtRuleParser<'i> for NestedRuleParser<'a, 'b> { let name = KeyframesName::parse(self.context, input)?; AtRulePrelude::Keyframes(name, prefix) }, - "page" if cfg!(feature = "gecko") => { + #[cfg(feature = "gecko")] + "page" => { AtRulePrelude::Page(if static_prefs::pref!("layout.css.named-pages.enabled") { input.try_parse(|i| PageSelectors::parse(self.context, i)).unwrap_or_default() } else { diff --git a/components/style/stylist.rs b/components/style/stylist.rs index dffc2e849ce..a1ad4aab659 100644 --- a/components/style/stylist.rs +++ b/components/style/stylist.rs @@ -33,19 +33,19 @@ use crate::stylesheets::layer_rule::{LayerId, LayerName, LayerOrder}; use crate::stylesheets::viewport_rule::{self, MaybeNew, ViewportRule}; #[cfg(feature = "gecko")] use crate::stylesheets::{ - CounterStyleRule, FontFaceRule, FontFeatureValuesRule, PageRule, ScrollTimelineRule, + CounterStyleRule, FontFaceRule, FontFeatureValuesRule, ScrollTimelineRule, }; use crate::stylesheets::{ - CssRule, EffectiveRulesIterator, Origin, OriginSet, PerOrigin, PerOriginIter, + CssRule, EffectiveRulesIterator, Origin, OriginSet, PageRule, PerOrigin, PerOriginIter, }; use crate::stylesheets::{StyleRule, StylesheetContents, StylesheetInDocument}; use crate::thread_state::{self, ThreadState}; use crate::AllocErr; use crate::{Atom, LocalName, Namespace, ShrinkIfNeeded, WeakAtom}; use fxhash::FxHashMap; -use malloc_size_of::MallocSizeOf; +use malloc_size_of::{MallocSizeOf, MallocShallowSizeOf, MallocSizeOfOps}; #[cfg(feature = "gecko")] -use malloc_size_of::{MallocShallowSizeOf, MallocSizeOfOps, MallocUnconditionalShallowSizeOf}; +use malloc_size_of::MallocUnconditionalShallowSizeOf; use selectors::attr::{CaseSensitivity, NamespaceConstraint}; use selectors::bloom::BloomFilter; use selectors::matching::VisitedHandlingMode; @@ -1644,6 +1644,7 @@ pub struct PageRuleMap { pub named: PrecomputedHashMap<Atom, SmallVec<[PageRuleData; 1]>>, } +#[cfg(feature = "gecko")] impl PageRuleMap { #[inline] fn clear(&mut self) { |