mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-04 20:02:21 +03:00
[project @ 2005-08-06 23:34:30 by bursa]
Fix vertical positioning of floats when an empty block with top padding is present. svn path=/import/netsurf/; revision=1842
This commit is contained in:
parent
362a6000b4
commit
1808739e33
@ -220,6 +220,8 @@ bool layout_block_context(struct box *block, struct content *content)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LOG(("box %p, cx %i, cy %i", box, cx, cy));
|
||||||
|
|
||||||
/* Layout (except tables). */
|
/* Layout (except tables). */
|
||||||
if (box->type == BOX_INLINE_CONTAINER) {
|
if (box->type == BOX_INLINE_CONTAINER) {
|
||||||
box->width = box->parent->width;
|
box->width = box->parent->width;
|
||||||
@ -269,7 +271,8 @@ bool layout_block_context(struct box *block, struct content *content)
|
|||||||
}
|
}
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
}
|
} else if (box->type == BOX_BLOCK)
|
||||||
|
cy += box->padding[TOP];
|
||||||
if (box->type == BOX_BLOCK && box->height == AUTO)
|
if (box->type == BOX_BLOCK && box->height == AUTO)
|
||||||
box->height = 0;
|
box->height = 0;
|
||||||
cy += box->height + box->padding[BOTTOM] + box->border[BOTTOM];
|
cy += box->height + box->padding[BOTTOM] + box->border[BOTTOM];
|
||||||
@ -1687,6 +1690,7 @@ void place_float_below(struct box *c, int width, int cx, int y,
|
|||||||
int x0, x1, yy = y;
|
int x0, x1, yy = y;
|
||||||
struct box * left;
|
struct box * left;
|
||||||
struct box * right;
|
struct box * right;
|
||||||
|
LOG(("c %p, width %i, cx %i, y %i, cont %p", c, width, cx, y, cont));
|
||||||
do {
|
do {
|
||||||
y = yy;
|
y = yy;
|
||||||
x0 = cx;
|
x0 = cx;
|
||||||
|
Loading…
Reference in New Issue
Block a user