mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
style: Look at the snapshots when invalidating due to stylesheet changes.
Otherwise removal of stylesheets may get out of sync with other DOM changes, and we may fail to invalidate the style of the affected elements. Bug: 1432850 Reviewed-by: bz MozReview-Commit-ID: DrMTgLzQcnk
This commit is contained in:
parent
c2dfece49f
commit
657d8b8e31
8 changed files with 95 additions and 37 deletions
|
@ -25,7 +25,7 @@ use properties::{AnimationRules, PropertyDeclarationBlock};
|
|||
use rule_cache::{RuleCache, RuleCacheConditions};
|
||||
use rule_tree::{CascadeLevel, RuleTree, StrongRuleNode, StyleSource};
|
||||
use selector_map::{PrecomputedHashMap, SelectorMap, SelectorMapEntry};
|
||||
use selector_parser::{SelectorImpl, PerPseudoElementMap, PseudoElement};
|
||||
use selector_parser::{SelectorImpl, SnapshotMap, PerPseudoElementMap, PseudoElement};
|
||||
use selectors::NthIndexCache;
|
||||
use selectors::attr::{CaseSensitivity, NamespaceConstraint};
|
||||
use selectors::bloom::{BloomFilter, NonCountingBloomFilter};
|
||||
|
@ -504,6 +504,7 @@ impl Stylist {
|
|||
&mut self,
|
||||
guards: &StylesheetGuards,
|
||||
document_element: Option<E>,
|
||||
snapshots: Option<&SnapshotMap>,
|
||||
) -> bool
|
||||
where
|
||||
E: TElement,
|
||||
|
@ -548,7 +549,7 @@ impl Stylist {
|
|||
}
|
||||
}
|
||||
|
||||
let flusher = self.stylesheets.flush(document_element);
|
||||
let flusher = self.stylesheets.flush(document_element, snapshots);
|
||||
|
||||
let had_invalidations = flusher.had_invalidations();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue