From fe291f87d98be6e9bc2e3b7e4f3e48c637b7c03a Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Sun, 9 Jan 2011 00:09:57 +0000 Subject: Ensure top margin is affects static position in particular case. svn path=/trunk/netsurf/; revision=11262 --- render/layout.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'render/layout.c') diff --git a/render/layout.c b/render/layout.c index 3c610d752..73fa18cca 100644 --- a/render/layout.c +++ b/render/layout.c @@ -480,7 +480,13 @@ bool layout_block_context(struct box *block, int viewport_height, /* Skip children, because they are done in the new * block context */ goto advance_to_next_box; - } + } else if (box->type == BOX_BLOCK) { + /* This block doesn't establish a new block formatting + * context */ + cy += max_pos_margin - max_neg_margin; + box->y += max_pos_margin - max_neg_margin; + max_pos_margin = max_neg_margin = 0; + } LOG(("box %p, cx %i, cy %i", box, cx, cy)); -- cgit v1.2.3