From 83a83757ab87828e3b5b3e5523979fe6e4daf0fe Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Sat, 29 Mar 2008 19:51:00 +0000 Subject: Only record that the HTML alignment was set by a table element if it is actually set. svn path=/trunk/netsurf/; revision=4058 --- render/box_construct.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'render/box_construct.c') diff --git a/render/box_construct.c b/render/box_construct.c index 08d5999af..b05dcc019 100644 --- a/render/box_construct.c +++ b/render/box_construct.c @@ -1243,13 +1243,14 @@ struct css_style * box_get_style(struct content *c, else if (strcasecmp(s, "left") == 0) markup_track->align = ALIGN_LEFT; xmlFree(s); + /* Need to remember if we're in a table, so that any + * alignment rules set on the table's elements won't + * get overridden by the default alignment of a cell + * with no align attribute. At this point, we're in a + * table if the element isn't a div */ + if (strcmp((const char *) n->name, "div") != 0) + markup_track->table = true; } - /* Need to remember if we're in a table, so that any alignment - * rules set on the table's elements won't get overridden by the - * default alignment of a cell with no align attribute. - * At this point, we're in a table if the element isn't a div */ - if (strcmp((const char *) n->name, "div") != 0) - markup_track->table = true; } /* Table cells without an align value have a default implied * alignment. */ -- cgit v1.2.3