summaryrefslogtreecommitdiff
path: root/render/box_normalise.c
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2015-01-24 16:03:14 +0000
committerMichael Drake <tlsa@netsurf-browser.org>2015-01-24 16:03:48 +0000
commit770255439d959477f7d1ba3756c63d502ed3408b (patch)
treed50e572e32b1b651ac8aa81b306b3ee8f1bf40db /render/box_normalise.c
parent5d51547ea7505d97efeac12ae8f136b97cc51405 (diff)
downloadnetsurf-770255439d959477f7d1ba3756c63d502ed3408b.tar.gz
netsurf-770255439d959477f7d1ba3756c63d502ed3408b.tar.bz2
Remove redundant implied table insertion.
Diffstat (limited to 'render/box_normalise.c')
-rw-r--r--render/box_normalise.c51
1 files changed, 2 insertions, 49 deletions
diff --git a/render/box_normalise.c b/render/box_normalise.c
index 861ad741e..8989bab57 100644
--- a/render/box_normalise.c
+++ b/render/box_normalise.c
@@ -150,55 +150,8 @@ bool box_normalise_block(struct box *block, html_content *c)
case BOX_TABLE_ROW_GROUP:
case BOX_TABLE_ROW:
case BOX_TABLE_CELL:
- /* insert implied table */
- assert(block->style != NULL);
-
- ctx.ctx = c->select_ctx;
- ctx.quirks = (c->quirks == DOM_DOCUMENT_QUIRKS_MODE_FULL);
- ctx.base_url = c->base_url;
- ctx.universal = c->universal;
-
- style = nscss_get_blank_style(&ctx, block->style);
- if (style == NULL)
- return false;
-
- table = box_create(NULL, style, true, block->href,
- block->target, NULL, NULL, c->bctx);
- if (table == NULL) {
- css_computed_style_destroy(style);
- return false;
- }
- table->type = BOX_TABLE;
-
- if (child->prev == NULL)
- block->children = table;
- else
- child->prev->next = table;
-
- table->prev = child->prev;
-
- while (child != NULL && (
- child->type == BOX_TABLE_ROW_GROUP ||
- child->type == BOX_TABLE_ROW ||
- child->type == BOX_TABLE_CELL)) {
- box_add_child(table, child);
-
- next_child = child->next;
- child->next = NULL;
- child = next_child;
- }
-
- table->last->next = NULL;
- table->next = next_child = child;
- if (table->next != NULL)
- table->next->prev = table;
- else
- block->last = table;
- table->parent = block;
-
- if (box_normalise_table(table, c) == false)
- return false;
- break;
+ /* DOM should not have these outside a table. */
+ assert(0);
default:
assert(0);
}