aboutsummaryrefslogtreecommitdiffstats
path: root/components/style/selector_matching.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/style/selector_matching.rs')
-rw-r--r--components/style/selector_matching.rs10
1 files changed, 4 insertions, 6 deletions
diff --git a/components/style/selector_matching.rs b/components/style/selector_matching.rs
index 014ef24e307..8f56827b34e 100644
--- a/components/style/selector_matching.rs
+++ b/components/style/selector_matching.rs
@@ -8,7 +8,7 @@ use selectors::bloom::BloomFilter;
use selectors::matching::{SelectorMap, Rule};
use selectors::matching::DeclarationBlock as GenericDeclarationBlock;
use selectors::parser::PseudoElement;
-use selectors::tree::TNode;
+use selectors::Element;
use std::process;
use smallvec::VecLike;
use util::resource_files::read_resource_file;
@@ -190,19 +190,17 @@ impl Stylist {
/// The returned boolean indicates whether the style is *shareable*; that is, whether the
/// matched selectors are simple enough to allow the matching logic to be reduced to the logic
/// in `css::matching::PrivateMatchMethods::candidate_element_allows_for_style_sharing`.
- pub fn push_applicable_declarations<N,V>(
+ pub fn push_applicable_declarations<E,V>(
&self,
- element: &N,
+ element: &E,
parent_bf: &Option<Box<BloomFilter>>,
style_attribute: Option<&PropertyDeclarationBlock>,
pseudo_element: Option<PseudoElement>,
applicable_declarations: &mut V)
-> bool
- where N: TNode,
- N::Element: TElementAttributes,
+ where E: Element + TElementAttributes,
V: VecLike<DeclarationBlock> {
assert!(!self.is_dirty);
- assert!(element.is_element());
assert!(style_attribute.is_none() || pseudo_element.is_none(),
"Style attributes do not apply to pseudo-elements");