Fixed #4170 - Incremental reflow wasn't being aggressive enough when nodes get reparented.

When inserting a node that was already dirtied, the dirtying logic
would short circuit: "This node is already dirty? Great! Then its
parents must be HAS_DIRTY_DESCENDANTS, too! Let's skip that step."

This isn't appropriate when nodes move around the tree. In that case,
the node may be marked HAS_CHANGED, but ancestors may not yet have
the HAS_DIRTY_DESCENDANTS flag set.

This patch adds a `content_and_heritage_changed` hook in the document,
to deal with these cases appropriately.
This commit is contained in:
Clark Gaebel 2014-12-03 11:17:38 -08:00
parent 873ca6cadd
commit d3e4d29368
3 changed files with 31 additions and 5 deletions

View file

@ -223,7 +223,8 @@ impl<'ln> LayoutNode<'ln> {
}
fn debug_str(self) -> String {
format!("{}: dirty={}", self.type_id(), self.is_dirty())
format!("{}: changed={} dirty={} dirty_descendants={}",
self.type_id(), self.has_changed(), self.is_dirty(), self.has_dirty_descendants())
}
pub fn flow_debug_id(self) -> uint {