Auto merge of #19164 - emilio:more-traversal-cleanup, r=nox

style: More traversal cleanup.

This is cleanup that allows me to fix https://bugzilla.mozilla.org/show_bug.cgi?id=1415013 in a more straight-forward way.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/19164)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2017-11-15 06:51:27 -06:00 committed by GitHub
commit d117694ecc
6 changed files with 67 additions and 179 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.