mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
style: Stop special-casing a few attributes for style sharing, and use a visitor to track dependencies.
Also, simplify all the pre-snapshot attribute hacks in the script and style code. MozReview-Commit-ID: 6c9ipeb7Tnr Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
This commit is contained in:
parent
1748150497
commit
0ea58d1ffa
9 changed files with 161 additions and 312 deletions
|
@ -6,7 +6,8 @@
|
|||
|
||||
#![deny(missing_docs)]
|
||||
|
||||
use parser::{AttrSelector, ComplexSelector, SelectorImpl, SimpleSelector};
|
||||
use parser::{AttrSelector, Combinator, ComplexSelector, SelectorImpl, SimpleSelector};
|
||||
use std::sync::Arc;
|
||||
|
||||
/// A trait to visit selector properties.
|
||||
///
|
||||
|
@ -24,7 +25,13 @@ pub trait SelectorVisitor {
|
|||
}
|
||||
|
||||
/// Visits a complex selector.
|
||||
fn visit_complex_selector(&mut self, _: &ComplexSelector<Self::Impl>) -> bool {
|
||||
///
|
||||
/// Gets the combinator to the right of the selector, or `None` if the
|
||||
/// selector is the leftmost one.
|
||||
fn visit_complex_selector(&mut self,
|
||||
_: &Arc<ComplexSelector<Self::Impl>>,
|
||||
_combinator_to_right: Option<Combinator>)
|
||||
-> bool {
|
||||
true
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue