diff options
Diffstat (limited to 'components/style')
-rw-r--r-- | components/style/context.rs | 2 | ||||
-rw-r--r-- | components/style/gecko/wrapper.rs | 6 | ||||
-rw-r--r-- | components/style/invalidation/element/element_wrapper.rs | 6 | ||||
-rw-r--r-- | components/style/sharing/checks.rs | 2 | ||||
-rw-r--r-- | components/style/sharing/mod.rs | 2 | ||||
-rw-r--r-- | components/style/stylist.rs | 3 |
6 files changed, 15 insertions, 6 deletions
diff --git a/components/style/context.rs b/components/style/context.rs index ff2551c0b54..dadd80d343b 100644 --- a/components/style/context.rs +++ b/components/style/context.rs @@ -23,7 +23,7 @@ use properties::ComputedValues; use rule_cache::RuleCache; use rule_tree::StrongRuleNode; use selector_parser::{EAGER_PSEUDO_COUNT, SnapshotMap}; -use selectors::context::NthIndexCache; +use selectors::NthIndexCache; use selectors::matching::ElementSelectorFlags; use servo_arc::Arc; #[cfg(feature = "servo")] use servo_atoms::Atom; diff --git a/components/style/gecko/wrapper.rs b/components/style/gecko/wrapper.rs index 641aafbb31a..655b6759ca0 100644 --- a/components/style/gecko/wrapper.rs +++ b/components/style/gecko/wrapper.rs @@ -76,7 +76,7 @@ use properties::animated_properties::TransitionProperty; use properties::style_structs::Font; use rule_tree::CascadeLevel as ServoCascadeLevel; use selector_parser::{AttrValue, ElementExt, PseudoClassStringArg}; -use selectors::Element; +use selectors::{Element, OpaqueElement}; use selectors::attr::{AttrSelectorOperation, AttrSelectorOperator, CaseSensitivity, NamespaceConstraint}; use selectors::matching::{ElementSelectorFlags, LocalMatchingContext, MatchingContext}; use selectors::matching::{RelevantLinkStatus, VisitedHandlingMode}; @@ -1682,6 +1682,10 @@ impl<'le> PresentationalHintsSynthesizer for GeckoElement<'le> { impl<'le> ::selectors::Element for GeckoElement<'le> { type Impl = SelectorImpl; + fn opaque(&self) -> OpaqueElement { + OpaqueElement::new(self.0) + } + fn parent_element(&self) -> Option<Self> { // FIXME(emilio): This will need to jump across if the parent node is a // shadow root to get the shadow host. diff --git a/components/style/invalidation/element/element_wrapper.rs b/components/style/invalidation/element/element_wrapper.rs index 2bb2c3857dc..705da44840c 100644 --- a/components/style/invalidation/element/element_wrapper.rs +++ b/components/style/invalidation/element/element_wrapper.rs @@ -9,7 +9,7 @@ use {Atom, CaseSensitivityExt, LocalName, Namespace}; use dom::TElement; use element_state::ElementState; use selector_parser::{NonTSPseudoClass, PseudoElement, SelectorImpl, Snapshot, SnapshotMap, AttrValue}; -use selectors::Element; +use selectors::{Element, OpaqueElement}; use selectors::attr::{AttrSelectorOperation, CaseSensitivity, NamespaceConstraint}; use selectors::matching::{ElementSelectorFlags, LocalMatchingContext, MatchingContext}; use selectors::matching::RelevantLinkStatus; @@ -258,6 +258,10 @@ impl<'a, E> Element for ElementWrapper<'a, E> self.element.is_link() } + fn opaque(&self) -> OpaqueElement { + self.element.opaque() + } + fn parent_element(&self) -> Option<Self> { self.element.parent_element() .map(|e| ElementWrapper::new(e, self.snapshot_map)) diff --git a/components/style/sharing/checks.rs b/components/style/sharing/checks.rs index 2120bbc6f8c..20020b9497b 100644 --- a/components/style/sharing/checks.rs +++ b/components/style/sharing/checks.rs @@ -10,7 +10,7 @@ use Atom; use bloom::StyleBloom; use context::{SelectorFlagsMap, SharedStyleContext}; use dom::TElement; -use selectors::context::NthIndexCache; +use selectors::NthIndexCache; use sharing::{StyleSharingCandidate, StyleSharingTarget}; /// Determines whether a target and a candidate have compatible parents for sharing. diff --git a/components/style/sharing/mod.rs b/components/style/sharing/mod.rs index 8e2c9763b1d..e99da60f4b9 100644 --- a/components/style/sharing/mod.rs +++ b/components/style/sharing/mod.rs @@ -75,7 +75,7 @@ use matching::MatchMethods; use owning_ref::OwningHandle; use properties::ComputedValues; use rule_tree::StrongRuleNode; -use selectors::context::NthIndexCache; +use selectors::NthIndexCache; use selectors::matching::{ElementSelectorFlags, VisitedHandlingMode}; use servo_arc::{Arc, NonZeroPtrMut}; use smallbitvec::SmallBitVec; diff --git a/components/style/stylist.rs b/components/style/stylist.rs index b398ff851bc..5962117fbad 100644 --- a/components/style/stylist.rs +++ b/components/style/stylist.rs @@ -28,9 +28,10 @@ use properties::IS_LINK; use rule_tree::{CascadeLevel, RuleTree, StrongRuleNode, StyleSource}; use selector_map::{PrecomputedHashMap, SelectorMap, SelectorMapEntry}; use selector_parser::{SelectorImpl, PerPseudoElementMap, PseudoElement}; +use selectors::NthIndexCache; use selectors::attr::NamespaceConstraint; use selectors::bloom::{BloomFilter, NonCountingBloomFilter}; -use selectors::matching::{ElementSelectorFlags, matches_selector, MatchingContext, MatchingMode, NthIndexCache}; +use selectors::matching::{ElementSelectorFlags, matches_selector, MatchingContext, MatchingMode}; use selectors::matching::VisitedHandlingMode; use selectors::parser::{AncestorHashes, Combinator, Component, Selector}; use selectors::parser::{SelectorIter, SelectorMethods}; |