diff options
author | Michael Drake <michael.drake@codethink.co.uk> | 2018-06-29 15:03:47 +0100 |
---|---|---|
committer | Michael Drake <michael.drake@codethink.co.uk> | 2018-06-29 15:03:47 +0100 |
commit | 62e3ee6c7ec751674c6ff1d4b5235cb1ab482e55 (patch) | |
tree | 93665e34f15c1166417782f92786a1b709b44a72 /content | |
parent | 049695fa070c23580291949053b6d1faf8ffd749 (diff) | |
download | netsurf-62e3ee6c7ec751674c6ff1d4b5235cb1ab482e55.tar.gz netsurf-62e3ee6c7ec751674c6ff1d4b5235cb1ab482e55.tar.bz2 |
Layout: Use box helper for first child checks.glenwalker/bug_0002428
Diffstat (limited to 'content')
-rw-r--r-- | content/handlers/html/layout.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/content/handlers/html/layout.c b/content/handlers/html/layout.c index e9112faf1..ee1212861 100644 --- a/content/handlers/html/layout.c +++ b/content/handlers/html/layout.c @@ -1578,7 +1578,7 @@ layout_next_margin_block(const nscss_len_ctx *len_ctx, css_computed_overflow_y(box->style) != CSS_OVERFLOW_VISIBLE) || (box->type == BOX_INLINE_CONTAINER && - box != box->parent->children)) { + !box_is_first_child(box))) { /* Collapse to this box; return it */ return box; } @@ -4141,7 +4141,7 @@ layout_block_context(struct box *block, if (((box->type == BOX_BLOCK && (box->flags & HAS_HEIGHT)) || box->type == BOX_TABLE || (box->type == BOX_INLINE_CONTAINER && - box != box->parent->children) || + !box_is_first_child(box)) || margin_collapse == box) && in_margin == true) { /* Margin goes above this box. */ |