summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2008-01-29 01:14:20 +0000
committerMichael Drake <tlsa@netsurf-browser.org>2008-01-29 01:14:20 +0000
commit3edfd4feb76f18da7430f1c7d9f76004cc5e2729 (patch)
tree97307bde978ea536cf03c4d2388333453a3f111d
parent30b76c4dfa8c76bcf36ed0b1d14a0ea65366c8fa (diff)
downloadnetsurf-3edfd4feb76f18da7430f1c7d9f76004cc5e2729.tar.gz
netsurf-3edfd4feb76f18da7430f1c7d9f76004cc5e2729.tar.bz2
Reinstate things lost in the last checkins.
svn path=/trunk/netsurf/; revision=3799
-rw-r--r--render/layout.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/render/layout.c b/render/layout.c
index a56e2c4fb..6a00dcf1a 100644
--- a/render/layout.c
+++ b/render/layout.c
@@ -1179,9 +1179,9 @@ bool layout_line(struct box *first, int *width, int *y,
length, b->style);
break;
case CSS_WIDTH_PERCENT:
- b->width = min_gadget_size ? min_gadget_size :
- css_len2px(&b->style->width.value.
- length, b->style);
+ b->width = *width *
+ b->style->width.value.percent /
+ 100;
break;
case CSS_WIDTH_AUTO:
default:
@@ -1690,6 +1690,8 @@ struct box *layout_minmax_line(struct box *first,
width = min_gadget_size ? min_gadget_size :
css_len2px(&b->style->width.value.
length, b->style);
+ if (width < 0)
+ width: 0;
break;
case CSS_WIDTH_PERCENT:
/*b->width = width *