mirror of
https://github.com/netsurf-browser/netsurf
synced 2025-01-11 13:29:21 +03:00
Fix clear:both; when there's nothing to clear.
svn path=/trunk/netsurf/; revision=6352
This commit is contained in:
parent
57124b7f92
commit
b2182b8c50
@ -1891,7 +1891,9 @@ bool layout_line(struct box *first, int *width, int *y,
|
||||
(d->style->clear == CSS_CLEAR_LEFT &&
|
||||
left == 0) ||
|
||||
(d->style->clear == CSS_CLEAR_RIGHT &&
|
||||
right == 0)) &&
|
||||
right == 0) ||
|
||||
(d->style->clear == CSS_CLEAR_BOTH &&
|
||||
left == 0 && right == 0)) &&
|
||||
(!place_below ||
|
||||
(left == 0 && right == 0 && x == 0)) &&
|
||||
cy >= cont->clear_level) {
|
||||
@ -1928,13 +1930,11 @@ bool layout_line(struct box *first, int *width, int *y,
|
||||
CSS_CLEAR_NONE) {
|
||||
/* to be cleared below existing
|
||||
* floats */
|
||||
if (b->type == BOX_FLOAT_LEFT) {
|
||||
if (b->type == BOX_FLOAT_LEFT)
|
||||
b->x = cx;
|
||||
left = b;
|
||||
} else {
|
||||
else
|
||||
b->x = cx + *width - b->width;
|
||||
right = b;
|
||||
}
|
||||
|
||||
fy = layout_clear(cont->float_children,
|
||||
d->style->clear);
|
||||
if (fy > cont->clear_level)
|
||||
@ -1942,6 +1942,10 @@ bool layout_line(struct box *first, int *width, int *y,
|
||||
if (b->y < fy)
|
||||
b->y = fy;
|
||||
}
|
||||
if (b->type == BOX_FLOAT_LEFT)
|
||||
left = b;
|
||||
else
|
||||
right = b;
|
||||
}
|
||||
if (cont->float_children == b) {
|
||||
LOG(("float %p already placed", b));
|
||||
|
Loading…
Reference in New Issue
Block a user