summaryrefslogtreecommitdiff
path: root/render/html_object.c
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2018-01-21 12:32:10 +0000
committerMichael Drake <tlsa@netsurf-browser.org>2018-01-21 12:32:10 +0000
commit790d30b7888d5818a4e2521aabe2f31f04d59341 (patch)
treeab5e67d49875bac2b71b4d71d9eefc6223abd2f5 /render/html_object.c
parent110cc9fb3e098100a7ed91340a82e351a220bce1 (diff)
downloadnetsurf-790d30b7888d5818a4e2521aabe2f31f04d59341.tar.gz
netsurf-790d30b7888d5818a4e2521aabe2f31f04d59341.tar.bz2
HTML handler: Normalise box type on replacment.
We currently only do TABLE --> BLOCK normalisation.
Diffstat (limited to 'render/html_object.c')
-rw-r--r--render/html_object.c10
1 files changed, 10 insertions, 0 deletions
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)