aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/layout_wrapper.rs
diff options
context:
space:
mode:
authorEmilio Cobos Álvarez <emilio@crisal.io>2017-03-21 12:58:28 +0100
committerEmilio Cobos Álvarez <emilio@crisal.io>2017-03-22 11:21:24 +0100
commita9b133bcbb20ee2de5232082926c1cd148165efe (patch)
treefc1fc2ae8d7c6c87af5d35cc151c01fb0b7bcf15 /components/script/layout_wrapper.rs
parentf90f7d6824a65eb0b6a266f5e8281f313c1ae1c0 (diff)
downloadservo-a9b133bcbb20ee2de5232082926c1cd148165efe.tar.gz
servo-a9b133bcbb20ee2de5232082926c1cd148165efe.zip
Bug 1345950: stylo: Fix slow selector flags. r=bholley
MozReview-Commit-ID: QwuSxulNG0 Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
Diffstat (limited to 'components/script/layout_wrapper.rs')
-rw-r--r--components/script/layout_wrapper.rs22
1 files changed, 14 insertions, 8 deletions
diff --git a/components/script/layout_wrapper.rs b/components/script/layout_wrapper.rs
index bd21212f23c..aa93b38fd45 100644
--- a/components/script/layout_wrapper.rs
+++ b/components/script/layout_wrapper.rs
@@ -615,10 +615,13 @@ impl<'le> ::selectors::Element for ServoLayoutElement<'le> {
self.element.namespace()
}
- fn match_non_ts_pseudo_class(&self,
- pseudo_class: &NonTSPseudoClass,
- _: &mut StyleRelations,
- _: &mut ElementSelectorFlags) -> bool {
+ fn match_non_ts_pseudo_class<F>(&self,
+ pseudo_class: &NonTSPseudoClass,
+ _: &mut StyleRelations,
+ _: &mut F)
+ -> bool
+ where F: FnMut(&Self, ElementSelectorFlags),
+ {
match *pseudo_class {
// https://github.com/servo/servo/issues/8718
NonTSPseudoClass::Link |
@@ -1114,10 +1117,13 @@ impl<'le> ::selectors::Element for ServoThreadSafeLayoutElement<'le> {
self.element.get_namespace()
}
- fn match_non_ts_pseudo_class(&self,
- _: &NonTSPseudoClass,
- _: &mut StyleRelations,
- _: &mut ElementSelectorFlags) -> bool {
+ fn match_non_ts_pseudo_class<F>(&self,
+ _: &NonTSPseudoClass,
+ _: &mut StyleRelations,
+ _: &mut F)
+ -> bool
+ where F: FnMut(&Self, ElementSelectorFlags),
+ {
// NB: This could maybe be implemented
warn!("ServoThreadSafeLayoutElement::match_non_ts_pseudo_class called");
false