aboutsummaryrefslogtreecommitdiffstats
path: root/components/script
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2017-05-16 09:45:36 -0500
committerGitHub <noreply@github.com>2017-05-16 09:45:36 -0500
commit7f6b28e241e58944f1e11826094776446965ca64 (patch)
tree70919073a8c064c0d7ada3abae6832fb8f846fc4 /components/script
parentd855c929ef32e8f7d4bc15ba726e8eb5f8ad8e05 (diff)
parente385b81fc3cae3c50f0d897e46f640d2811eb359 (diff)
downloadservo-7f6b28e241e58944f1e11826094776446965ca64.tar.gz
servo-7f6b28e241e58944f1e11826094776446965ca64.zip
Auto merge of #16872 - jryans:matching-context, r=emilio
Create a MatchingContext to group related matching args https://bugzilla.mozilla.org/show_bug.cgi?id=1364914 Upcoming changes for visited support and others as well need to pass more args through matching, so this creates a MatchingContext to group them together. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/16872) <!-- Reviewable:end -->
Diffstat (limited to 'components/script')
-rw-r--r--components/script/dom/element.rs4
-rw-r--r--components/script/layout_wrapper.rs6
2 files changed, 5 insertions, 5 deletions
diff --git a/components/script/dom/element.rs b/components/script/dom/element.rs
index aa32370127c..91ea1435302 100644
--- a/components/script/dom/element.rs
+++ b/components/script/dom/element.rs
@@ -85,7 +85,7 @@ use net_traits::request::CorsSettings;
use ref_filter_map::ref_filter_map;
use script_layout_interface::message::ReflowQueryType;
use script_thread::Runnable;
-use selectors::matching::{ElementSelectorFlags, StyleRelations, matches_selector_list};
+use selectors::matching::{ElementSelectorFlags, MatchingContext, matches_selector_list};
use selectors::matching::{HAS_EDGE_CHILD_SELECTOR, HAS_SLOW_SELECTOR, HAS_SLOW_SELECTOR_LATER_SIBLINGS};
use selectors::parser::{AttrSelector, NamespaceConstraint};
use servo_atoms::Atom;
@@ -2414,7 +2414,7 @@ impl<'a> ::selectors::Element for Root<Element> {
fn match_non_ts_pseudo_class<F>(&self,
pseudo_class: &NonTSPseudoClass,
- _: &mut StyleRelations,
+ _: &mut MatchingContext,
_: &mut F)
-> bool
where F: FnMut(&Self, ElementSelectorFlags),
diff --git a/components/script/layout_wrapper.rs b/components/script/layout_wrapper.rs
index 3d4b90eaeab..5cea48786e3 100644
--- a/components/script/layout_wrapper.rs
+++ b/components/script/layout_wrapper.rs
@@ -50,7 +50,7 @@ use script_layout_interface::{HTMLCanvasData, LayoutNodeType, SVGSVGData, Truste
use script_layout_interface::{OpaqueStyleAndLayoutData, PartialPersistentLayoutData};
use script_layout_interface::wrapper_traits::{DangerousThreadSafeLayoutNode, GetLayoutData, LayoutNode};
use script_layout_interface::wrapper_traits::{PseudoElementType, ThreadSafeLayoutElement, ThreadSafeLayoutNode};
-use selectors::matching::{ElementSelectorFlags, StyleRelations};
+use selectors::matching::{ElementSelectorFlags, MatchingContext};
use selectors::parser::{AttrSelector, NamespaceConstraint};
use servo_atoms::Atom;
use servo_url::ServoUrl;
@@ -654,7 +654,7 @@ impl<'le> ::selectors::Element for ServoLayoutElement<'le> {
fn match_non_ts_pseudo_class<F>(&self,
pseudo_class: &NonTSPseudoClass,
- _: &mut StyleRelations,
+ _: &mut MatchingContext,
_: &mut F)
-> bool
where F: FnMut(&Self, ElementSelectorFlags),
@@ -1152,7 +1152,7 @@ impl<'le> ::selectors::Element for ServoThreadSafeLayoutElement<'le> {
fn match_non_ts_pseudo_class<F>(&self,
_: &NonTSPseudoClass,
- _: &mut StyleRelations,
+ _: &mut MatchingContext,
_: &mut F)
-> bool
where F: FnMut(&Self, ElementSelectorFlags),