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:
Emilio Cobos Álvarez 2016-07-22 19:33:53 -07:00
parent 96ea1a335c
commit d81fe27b11
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
4 changed files with 21 additions and 35 deletions

View file

@ -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() {