script: Fix Servo relying on descendants being visited when there's a reframe.

This commit is contained in:
Emilio Cobos Álvarez 2017-11-10 01:29:41 +01:00
parent 6704122927
commit 5200ded17c
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
2 changed files with 22 additions and 3 deletions

View file

@ -573,8 +573,14 @@ impl Document {
self.encoding.set(encoding);
}
pub fn content_and_heritage_changed(&self, node: &Node, damage: NodeDamage) {
node.dirty(damage);
pub fn content_and_heritage_changed(&self, node: &Node) {
if node.is_in_doc() {
node.note_dirty_descendants();
}
// FIXME(emilio): This is very inefficient, ideally the flag above would
// be enough and incremental layout could figure out from there.
node.dirty(NodeDamage::OtherNodeDamage);
}
/// Reflows and disarms the timer if the reflow timer has expired.