diff options
author | Michael Drake <michael.drake@codethink.co.uk> | 2017-04-26 16:39:11 +0100 |
---|---|---|
committer | Michael Drake <michael.drake@codethink.co.uk> | 2017-04-26 16:39:11 +0100 |
commit | 7bbf2a9ca0cd418f64b001b87f77c779433119fe (patch) | |
tree | bf27bdd96ddf69d7fb5d38a47251b47e6ddc758f /render | |
parent | ebcc27c330654d4408bd3aec34795f849c07e02f (diff) | |
download | netsurf-7bbf2a9ca0cd418f64b001b87f77c779433119fe.tar.gz netsurf-7bbf2a9ca0cd418f64b001b87f77c779433119fe.tar.bz2 |
HTML layout: Extend :after pseudo element handling to cover display:table.
This is used in a common clearfix variant.
http://nicolasgallagher.com/micro-clearfix-hack/
Diffstat (limited to 'render')
-rw-r--r-- | render/box_construct.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/render/box_construct.c b/render/box_construct.c index f2d041385..d0ffd9d83 100644 --- a/render/box_construct.c +++ b/render/box_construct.c @@ -594,6 +594,7 @@ static void box_construct_generate(dom_node *n, html_content *content, struct box *box, const css_computed_style *style) { struct box *gen = NULL; + enum css_display_e computed_display; const css_computed_content_item *c_item; /* Nothing to generate if the parent box is not a block */ @@ -611,8 +612,10 @@ static void box_construct_generate(dom_node *n, html_content *content, } /* create box for this element */ - if (css_computed_display(style, box_is_root(n)) == CSS_DISPLAY_BLOCK) { - /* currently only support block level elements */ + computed_display = css_computed_display(style, box_is_root(n)); + if (computed_display == CSS_DISPLAY_BLOCK || + computed_display == CSS_DISPLAY_TABLE) { + /* currently only support block level boxes */ /** \todo Not wise to drop const from the computed style */ gen = box_create(NULL, (css_computed_style *) style, |