From 937894d6547dd8cb3a7c4c81cba5149e38bcf8bd Mon Sep 17 00:00:00 2001 From: Daniel Silverstone Date: Fri, 22 May 2020 16:00:20 +0100 Subject: html: set up canvas box properly Signed-off-by: Daniel Silverstone --- content/handlers/html/box_special.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'content/handlers/html') diff --git a/content/handlers/html/box_special.c b/content/handlers/html/box_special.c index 23cfeec0b..2332316ce 100644 --- a/content/handlers/html/box_special.c +++ b/content/handlers/html/box_special.c @@ -824,6 +824,13 @@ box_canvas(dom_node *n, } *convert_children = false; + if (box->style && + ns_computed_display(box->style, box_is_root(n)) == CSS_DISPLAY_NONE) + return true; + + /* This is replaced content */ + box->flags |= IS_REPLACED | REPLACE_DIM; + return true; } -- cgit v1.2.3