summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Drake <michael.drake@codethink.co.uk>2018-06-29 13:58:32 (GMT)
committer Michael Drake <michael.drake@codethink.co.uk>2018-06-29 13:58:32 (GMT)
commit948207472ac1d405e6e6552eb51c6ed1a67ee32e (patch)
tree8af751db0589a1707b7ca03d38a228507634e628
parent97007d095e25af302abeb32662353f84f720863c (diff)
downloadnetsurf-948207472ac1d405e6e6552eb51c6ed1a67ee32e.tar.gz
netsurf-948207472ac1d405e6e6552eb51c6ed1a67ee32e.tar.bz2
Layout: Tidy condition so it can be read.
-rw-r--r--content/handlers/html/layout.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/content/handlers/html/layout.c b/content/handlers/html/layout.c
index 2d2c424..e9112fa 100644
--- a/content/handlers/html/layout.c
+++ b/content/handlers/html/layout.c
@@ -4138,13 +4138,12 @@ layout_block_context(struct box *block,
}
/* Vertical margin */
- if (((box->type == BOX_BLOCK &&
- (box->flags & HAS_HEIGHT)) ||
- box->type == BOX_TABLE ||
- (box->type == BOX_INLINE_CONTAINER &&
- box != box->parent->children) ||
- margin_collapse == box) &&
- in_margin == true) {
+ if (((box->type == BOX_BLOCK && (box->flags & HAS_HEIGHT)) ||
+ box->type == BOX_TABLE ||
+ (box->type == BOX_INLINE_CONTAINER &&
+ box != box->parent->children) ||
+ margin_collapse == box) &&
+ in_margin == true) {
/* Margin goes above this box. */
cy += max_pos_margin - max_neg_margin;
box->y += max_pos_margin - max_neg_margin;