From 790d30b7888d5818a4e2521aabe2f31f04d59341 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Sun, 21 Jan 2018 12:32:10 +0000 Subject: HTML handler: Normalise box type on replacment. We currently only do TABLE --> BLOCK normalisation. --- render/html_object.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'render') diff --git a/render/html_object.c b/render/html_object.c index fb9e7b090..74e4bf0f3 100644 --- a/render/html_object.c +++ b/render/html_object.c @@ -97,6 +97,16 @@ html_object_done(struct box *box, box->object = object; + /* Normalise the box type, now it has been replaced. */ + switch (box->type) { + case BOX_TABLE: + box->type = BOX_BLOCK; + break; + default: + /* TODO: Any other box types need mapping? */ + break; + } + if (!(box->flags & REPLACE_DIM)) { /* invalidate parent min, max widths */ for (b = box; b; b = b->parent) -- cgit v1.2.3