mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
style: Fix dynamic changes of attributes when combined with :not.
This commit is contained in:
parent
8298ee75c7
commit
568fa4cc0d
7 changed files with 116 additions and 33 deletions
|
@ -184,6 +184,9 @@ impl<Impl: SelectorImpl> SelectorMethods for SimpleSelector<Impl> {
|
|||
where V: SelectorVisitor<Impl = Impl>,
|
||||
{
|
||||
use self::SimpleSelector::*;
|
||||
if !visitor.visit_simple_selector(self) {
|
||||
return false;
|
||||
}
|
||||
|
||||
match *self {
|
||||
Negation(ref negated) => {
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
#![deny(missing_docs)]
|
||||
|
||||
use parser::{AttrSelector, Combinator, ComplexSelector, SelectorImpl};
|
||||
use parser::{AttrSelector, Combinator, ComplexSelector, SelectorImpl, SimpleSelector};
|
||||
use std::sync::Arc;
|
||||
|
||||
/// A trait to visit selector properties.
|
||||
|
@ -24,6 +24,11 @@ pub trait SelectorVisitor {
|
|||
true
|
||||
}
|
||||
|
||||
/// Visit a simple selector.
|
||||
fn visit_simple_selector(&mut self, _: &SimpleSelector<Self::Impl>) -> bool {
|
||||
true
|
||||
}
|
||||
|
||||
/// Visits a complex selector.
|
||||
///
|
||||
/// Gets the combinator to the right of the selector, or `None` if the
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue