mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Bug 1336646 - Apply selector flags during traversal. r=emilio
This commit is contained in:
parent
37b8d5231d
commit
9e860df9df
17 changed files with 295 additions and 192 deletions
|
@ -5,7 +5,6 @@
|
|||
//! Traits that nodes must implement. Breaks the otherwise-cyclic dependency between layout and
|
||||
//! style.
|
||||
|
||||
use matching::ElementFlags;
|
||||
use parser::{AttrSelector, SelectorImpl};
|
||||
use std::ascii::AsciiExt;
|
||||
|
||||
|
@ -162,16 +161,4 @@ pub trait Element: MatchAttr + Sized {
|
|||
// in the future when we have associated types and/or a more convenient
|
||||
// JS GC story... --pcwalton
|
||||
fn each_class<F>(&self, callback: F) where F: FnMut(&<Self::Impl as SelectorImpl>::ClassName);
|
||||
|
||||
/// Add flags to the element. See the `ElementFlags` docs for details.
|
||||
///
|
||||
/// This may be called while the element *or one of its children* is being
|
||||
/// matched. Therefore the implementation must be thread-safe if children
|
||||
/// may be matched in parallel.
|
||||
fn insert_flags(&self, _flags: ElementFlags) {}
|
||||
|
||||
/// Clears the relevant ElementFlags. This is *not* called from
|
||||
/// rust-selectors, but provided as part of the Element interface since it
|
||||
/// makes sense.
|
||||
fn clear_flags(&self) {}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue