summaryrefslogtreecommitdiff
path: root/render
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2016-01-20 22:37:22 +0000
committerMichael Drake <tlsa@netsurf-browser.org>2016-01-20 22:37:22 +0000
commita774e9473df785f77e86e69a7d450324a2aa03a3 (patch)
tree82820f148afaf6f00fd17ef08b36f1d14451296b /render
parent0bbc03c5776fdcf6006bb0447341f82967d2b5d1 (diff)
downloadnetsurf-a774e9473df785f77e86e69a7d450324a2aa03a3.tar.gz
netsurf-a774e9473df785f77e86e69a7d450324a2aa03a3.tar.bz2
Make use of cached place float below value earlier.
Diffstat (limited to 'render')
-rw-r--r--render/layout.c6
1 files changed, 5 insertions, 1 deletions
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;