summaryrefslogtreecommitdiff
path: root/render/box.c
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2004-08-01 23:09:17 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2004-08-01 23:09:17 +0000
commitc8e7fd93e6b0a7782692ac5f83aaf8e0e9d97fcd (patch)
tree6820e9b36f92b5d978b31998abdf357735db3023 /render/box.c
parent6103e3f0cd0adae97da91fbd9c52ad2a3efb3092 (diff)
downloadnetsurf-c8e7fd93e6b0a7782692ac5f83aaf8e0e9d97fcd.tar.gz
netsurf-c8e7fd93e6b0a7782692ac5f83aaf8e0e9d97fcd.tar.bz2
[project @ 2004-08-01 23:09:17 by jmb]
Ignore height="", width="" svn path=/import/netsurf/; revision=1175
Diffstat (limited to 'render/box.c')
-rw-r--r--render/box.c8
1 files changed, 4 insertions, 4 deletions
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;