summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Bursa <james@netsurf-browser.org>2005-08-06 23:34:30 +0000
committerJames Bursa <james@netsurf-browser.org>2005-08-06 23:34:30 +0000
commit1808739e3361c89f7d9a2995b5a1478c5fdf1b3e (patch)
treeed0e76c294406dd7489c139ad2fc995d81b26531
parent362a6000b4cac49ea7bbbdb678d7cdd7c93de62c (diff)
downloadnetsurf-1808739e3361c89f7d9a2995b5a1478c5fdf1b3e.tar.gz
netsurf-1808739e3361c89f7d9a2995b5a1478c5fdf1b3e.tar.bz2
[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
-rw-r--r--render/layout.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/render/layout.c b/render/layout.c
index 3f8d87320..2e5cec984 100644
--- a/render/layout.c
+++ b/render/layout.c
@@ -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). */
if (box->type == BOX_INLINE_CONTAINER) {
box->width = box->parent->width;
@@ -269,7 +271,8 @@ bool layout_block_context(struct box *block, struct content *content)
}
continue;
- }
+ } else if (box->type == BOX_BLOCK)
+ cy += box->padding[TOP];
if (box->type == BOX_BLOCK && box->height == AUTO)
box->height = 0;
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;
struct box * left;
struct box * right;
+ LOG(("c %p, width %i, cx %i, y %i, cont %p", c, width, cx, y, cont));
do {
y = yy;
x0 = cx;