diff options
author | Richard Wilson <rjw@netsurf-browser.org> | 2007-10-10 20:34:02 +0000 |
---|---|---|
committer | Richard Wilson <rjw@netsurf-browser.org> | 2007-10-10 20:34:02 +0000 |
commit | cab5913aeee8a96ef32a331c1843e06349c23405 (patch) | |
tree | fcad7dae2dacaf6897080374244615895d036ecd /render | |
parent | 14c30d64a6fff1fcb38a28c0226d5bc683c99342 (diff) | |
download | netsurf-cab5913aeee8a96ef32a331c1843e06349c23405.tar.gz netsurf-cab5913aeee8a96ef32a331c1843e06349c23405.tar.bz2 |
Don't remove table rows with no children (fix 1753365)
svn path=/trunk/netsurf/; revision=3630
Diffstat (limited to 'render')
-rw-r--r-- | render/box_normalise.c | 30 |
1 files changed, 19 insertions, 11 deletions
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: + * + * <tr><td colspan="2">1</td></tr><tr></tr><tr><td>2</td></tr> + * + * 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)); |