aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/document.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/document.rs')
-rw-r--r--components/script/dom/document.rs10
1 files changed, 8 insertions, 2 deletions
diff --git a/components/script/dom/document.rs b/components/script/dom/document.rs
index c9130ad5e44..66ef28c8e93 100644
--- a/components/script/dom/document.rs
+++ b/components/script/dom/document.rs
@@ -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.