Move border computation into unpruned traversal. Get rid of extraneous explicit initial reflow. Fixes #935.

This commit is contained in:
Josh Matthews 2013-09-13 16:30:55 -07:00
parent 4f58545fd6
commit 7b239bd246
4 changed files with 28 additions and 18 deletions

View file

@ -281,6 +281,7 @@ impl LayoutTask {
// FIXME: We want to do
// for flow in layout_root.traverse_preorder_prune(|f| f.restyle_damage().lacks(Reflow))
// but FloatContext values can't be reused, so we need to recompute them every time.
// NOTE: this currently computes borders, so any pruning should separate that operation out.
debug!("assigning widths");
do layout_root.each_preorder |flow| {
flow.assign_widths(&mut layout_ctx);