summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2011-01-09 00:09:57 +0000
committerMichael Drake <tlsa@netsurf-browser.org>2011-01-09 00:09:57 +0000
commitfe291f87d98be6e9bc2e3b7e4f3e48c637b7c03a (patch)
treeabdd5e6e47c8a16a8244b1ed3a67ee59cfcf4401
parent3368407d9eb0fa10db910e2f7f054983fe56c31c (diff)
downloadnetsurf-fe291f87d98be6e9bc2e3b7e4f3e48c637b7c03a.tar.gz
netsurf-fe291f87d98be6e9bc2e3b7e4f3e48c637b7c03a.tar.bz2
Ensure top margin is affects static position in particular case.
svn path=/trunk/netsurf/; revision=11262
-rw-r--r--render/layout.c8
1 files changed, 7 insertions, 1 deletions
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));