From cab5913aeee8a96ef32a331c1843e06349c23405 Mon Sep 17 00:00:00 2001 From: Richard Wilson Date: Wed, 10 Oct 2007 20:34:02 +0000 Subject: Don't remove table rows with no children (fix 1753365) svn path=/trunk/netsurf/; revision=3630 --- render/box_normalise.c | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) (limited to 'render/box_normalise.c') diff --git a/render/box_normalise.c b/render/box_normalise.c index 57156c84d..ce00bad15 100644 --- a/render/box_normalise.c +++ b/render/box_normalise.c @@ -565,18 +565,26 @@ bool box_normalise_table_row(struct box *row, col_info->current_column = 0; col_info->extra = false; - if (row->children == 0) { - LOG(("row->children == 0, removing")); - if (row->prev == 0) - row->parent->children = row->next; - else - row->prev->next = row->next; - if (row->next != 0) - row->next->prev = row->prev; - box_free(row); - } else { + /* Removing empty rows causes ill effects for HTML such as: + * + * 12 + * + * as it breaks the colspan value. Additionally, both MSIE and FF + * render in the same manner as NetSurf does with the empty row + * culling commented out. + */ +// if (row->children == 0) { +// LOG(("row->children == 0, removing")); +// if (row->prev == 0) +// row->parent->children = row->next; +// else +// row->prev->next = row->next; +// if (row->next != 0) +// row->next->prev = row->prev; +// box_free(row); +// } else { col_info->num_rows++; - } +// } LOG(("row %p done", row)); -- cgit v1.2.3