Create a MatchingContext to group related matching args

MozReview-Commit-ID: 7XZTn7HDXrm
This commit is contained in:
J. Ryan Stinnett 2017-05-15 10:13:22 -05:00
parent 0388e11db2
commit e385b81fc3
9 changed files with 91 additions and 83 deletions

View file

@ -15,7 +15,7 @@ use fnv::FnvHashMap;
use restyle_hints::ElementSnapshot;
use selector_parser::{ElementExt, PseudoElementCascadeType, SelectorParser};
use selectors::{Element, MatchAttrGeneric};
use selectors::matching::StyleRelations;
use selectors::matching::MatchingContext;
use selectors::parser::{AttrSelector, SelectorMethods};
use selectors::visitor::SelectorVisitor;
use std::borrow::Cow;
@ -580,7 +580,7 @@ impl MatchAttrGeneric for ServoElementSnapshot {
impl<E: Element<Impl=SelectorImpl> + Debug> ElementExt for E {
fn is_link(&self) -> bool {
self.match_non_ts_pseudo_class(&NonTSPseudoClass::AnyLink,
&mut StyleRelations::empty(),
&mut MatchingContext::default(),
&mut |_, _| {})
}