From a774e9473df785f77e86e69a7d450324a2aa03a3 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Wed, 20 Jan 2016 22:37:22 +0000 Subject: Make use of cached place float below value earlier. --- render/layout.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'render') diff --git a/render/layout.c b/render/layout.c index f069cd665..b7d9e2034 100644 --- a/render/layout.c +++ b/render/layout.c @@ -2775,7 +2775,8 @@ bool layout_line(struct box *first, int *width, int *y, left == 0 && right == 0)) && (!place_below || (left == 0 && right == 0 && x == 0)) && - cy >= cont->clear_level) { + cy >= cont->clear_level && + cy >= cont->cached_place_below_level) { /* + not cleared or, * cleared and there are no floats to clear * + fits without needing to be placed below or, @@ -2800,6 +2801,9 @@ bool layout_line(struct box *first, int *width, int *y, /* place below into next available space */ int fcy = (cy > cont->clear_level) ? cy : cont->clear_level; + fcy = (fcy > cont->cached_place_below_level) ? + fcy : + cont->cached_place_below_level; fy = (fy > fcy) ? fy : fcy; fy = (fy == cy) ? fy + height : fy; -- cgit v1.2.3