layout: Translate floats when clearing non-floated blocks.

Improves CNN layout considerably.

Closes #3439.
This commit is contained in:
Patrick Walton 2014-09-22 14:07:37 -07:00
parent ac895a0e65
commit 34b3408a89
4 changed files with 28 additions and 1 deletions

View file

@ -906,7 +906,7 @@ impl BlockFlow {
clear::right => floats.clearance(ClearRight),
clear::both => floats.clearance(ClearBoth),
};
cur_b = cur_b + clearance;
translate_including_floats(&mut cur_b, clearance, &mut floats);
// At this point, `cur_b` is at the border edge of the child.
flow::mut_base(kid).position.start.b = cur_b;