mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Collapse Selector, SelectorInner, and ComplexSelector into a single Selector.
The refcounting is still internal. We'll fix that up next. MozReview-Commit-ID: CTxZNaR3Qgj
This commit is contained in:
parent
713c9a63f6
commit
5ddabef636
7 changed files with 71 additions and 147 deletions
|
@ -231,7 +231,7 @@ impl SelectorMap<Rule> {
|
|||
F: FnMut(&E, ElementSelectorFlags),
|
||||
{
|
||||
for rule in rules {
|
||||
if matches_selector(&rule.selector.inner,
|
||||
if matches_selector(&rule.selector,
|
||||
&rule.hashes,
|
||||
element,
|
||||
context,
|
||||
|
@ -403,7 +403,7 @@ fn find_from_right<F, R>(selector: &Selector<SelectorImpl>,
|
|||
-> Option<R>
|
||||
where F: FnMut(&Component<SelectorImpl>) -> Option<R>,
|
||||
{
|
||||
let mut iter = selector.inner.complex.iter();
|
||||
let mut iter = selector.iter();
|
||||
for ss in &mut iter {
|
||||
if let Some(r) = f(ss) {
|
||||
return Some(r)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue