mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
style: Simplify :dir() implementation
This I noticed while working on the following patches. Shouldn't have any behavior change: the behavior does in fact match the element state flag semantics correctly if we do this. We did split the dir flags into two element bits a while ago. :not(:dir()) still behaves correctly of course, and we have tests for that. Differential Revision: https://phabricator.services.mozilla.com/D130734
This commit is contained in:
parent
327812e3eb
commit
5b68241958
4 changed files with 6 additions and 34 deletions
|
@ -494,11 +494,7 @@ impl<'a> SelectorVisitor for SelectorDependencyCollector<'a> {
|
|||
}
|
||||
},
|
||||
Component::NonTSPseudoClass(ref pc) => {
|
||||
self.compound_state.element_state |= match *pc {
|
||||
#[cfg(feature = "gecko")]
|
||||
NonTSPseudoClass::Dir(ref dir) => dir.element_state(),
|
||||
_ => pc.state_flag(),
|
||||
};
|
||||
self.compound_state.element_state |= pc.state_flag();
|
||||
*self.document_state |= pc.document_state_flag();
|
||||
|
||||
let attr_name = match *pc {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue