mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
style: Record DocumentState dependencies.
This commit is contained in:
parent
c22dba0b87
commit
d58c967efa
4 changed files with 39 additions and 3 deletions
|
@ -10,7 +10,7 @@ use {Atom, Prefix, Namespace, LocalName, CaseSensitivityExt};
|
|||
use attr::{AttrIdentifier, AttrValue};
|
||||
use cssparser::{Parser as CssParser, ToCss, serialize_identifier, CowRcStr, SourceLocation};
|
||||
use dom::{OpaqueNode, TElement, TNode};
|
||||
use element_state::ElementState;
|
||||
use element_state::{DocumentState, ElementState};
|
||||
use fnv::FnvHashMap;
|
||||
use invalidation::element::element_wrapper::ElementSnapshot;
|
||||
use properties::ComputedValues;
|
||||
|
@ -353,6 +353,11 @@ impl NonTSPseudoClass {
|
|||
}
|
||||
}
|
||||
|
||||
/// Get the document state flag associated with a pseudo-class, if any.
|
||||
pub fn document_state_flag(&self) -> DocumentState {
|
||||
DocumentState::empty()
|
||||
}
|
||||
|
||||
/// Returns true if the given pseudoclass should trigger style sharing cache revalidation.
|
||||
pub fn needs_cache_revalidation(&self) -> bool {
|
||||
self.state_flag().is_empty()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue