Fix for children of a containing block not being placed with respect to the containing block's top padding, if the containing block's first child is absolute positioned.

svn path=/trunk/netsurf/; revision=5424
This commit is contained in:
Michael Drake 2008-09-23 19:38:16 +00:00
parent 3f5d902edd
commit 804a11af5b
1 changed files with 2 additions and 2 deletions

View File

@ -264,7 +264,7 @@ bool layout_block_context(struct box *block, struct content *content)
box = margin_box = block->children;
/* set current coordinates to top-left of the block */
cx = 0;
cy = block->padding[TOP];
y = cy = block->padding[TOP];
if (box)
box->y = block->padding[TOP];
@ -1618,7 +1618,7 @@ bool layout_line(struct box *first, int *width, int *y,
/* + not cleared or,
* cleared and there are no floats to clear
* + fits next to this line or,
* this line is empty with no floats and
* this line is empty with no floats
* + current y, cy, is below the clear level
*
* Float affects current line */