From c8e7fd93e6b0a7782692ac5f83aaf8e0e9d97fcd Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Sun, 1 Aug 2004 23:09:17 +0000 Subject: [project @ 2004-08-01 23:09:17 by jmb] Ignore height="", width="" svn path=/import/netsurf/; revision=1175 --- render/box.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'render/box.c') diff --git a/render/box.c b/render/box.c index e81363fec..2348bd351 100644 --- a/render/box.c +++ b/render/box.c @@ -675,8 +675,8 @@ struct css_style * box_get_style(struct content *c, if ((s = (char *) xmlGetProp(n, (const xmlChar *) "height"))) { float value = atof(s); - if (value < 0) { - /* ignore negative values */ + if (value < 0 || strlen(s) == 0) { + /* ignore negative values and height="" */ } else if (strrchr(s, '%')) { /*the specification doesn't make clear what * percentage heights mean, so ignore them */ @@ -722,8 +722,8 @@ struct css_style * box_get_style(struct content *c, if ((s = (char *) xmlGetProp(n, (const xmlChar *) "width"))) { float value = atof(s); - if (value < 0) { - /* ignore negative values */ + if (value < 0 || strlen(s) == 0) { + /* ignore negative values and width="" */ } else if (strrchr(s, '%')) { style->width.width = CSS_WIDTH_PERCENT; style->width.value.percent = value; -- cgit v1.2.3