mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
style: Avoid propagating the restyle flag all through the dom when a node gets dirty.
This puts us in pair with stylo.
This commit is contained in:
parent
96ea1a335c
commit
d81fe27b11
4 changed files with 21 additions and 35 deletions
|
@ -479,19 +479,7 @@ impl Node {
|
|||
return
|
||||
}
|
||||
|
||||
// 2. Dirty descendants.
|
||||
fn dirty_subtree(node: &Node) {
|
||||
// Stop if this subtree is already dirty.
|
||||
if node.is_dirty() { return }
|
||||
|
||||
node.set_flag(IS_DIRTY | HAS_DIRTY_DESCENDANTS, true);
|
||||
|
||||
for kid in node.children() {
|
||||
dirty_subtree(kid.r());
|
||||
}
|
||||
}
|
||||
|
||||
dirty_subtree(self);
|
||||
self.set_flag(IS_DIRTY, true);
|
||||
|
||||
// 4. Dirty ancestors.
|
||||
for ancestor in self.ancestors() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue