summaryrefslogtreecommitdiff
path: root/render
diff options
context:
space:
mode:
authorJames Bursa <james@netsurf-browser.org>2005-07-20 22:08:56 +0000
committerJames Bursa <james@netsurf-browser.org>2005-07-20 22:08:56 +0000
commite24bed7715a35038bcbe91b2b960a8d346147e7c (patch)
tree1be4a9f8782359529a1985e51058911da9f8001a /render
parent3f36449c91e7d0b26b2493d2788d3c3c83bba329 (diff)
downloadnetsurf-e24bed7715a35038bcbe91b2b960a8d346147e7c.tar.gz
netsurf-e24bed7715a35038bcbe91b2b960a8d346147e7c.tar.bz2
[project @ 2005-07-20 22:08:56 by bursa]
Fix min / max bug with negative margins (treat as 0 for now). svn path=/import/netsurf/; revision=1810
Diffstat (limited to 'render')
-rw-r--r--render/layout.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/render/layout.c b/render/layout.c
index 6f29710fe..efedac3e2 100644
--- a/render/layout.c
+++ b/render/layout.c
@@ -1353,13 +1353,15 @@ struct box *layout_minmax_line(struct box *first,
if (!b->inline_end)
calculate_mbp_width(b->style, RIGHT,
&fixed, &frac);
- max += fixed;
+ if (0 < fixed)
+ max += fixed;
/* \todo update min width, consider fractional extra */
} else if (b->type == BOX_INLINE_END) {
fixed = frac = 0;
calculate_mbp_width(b->inline_end->style, RIGHT,
&fixed, &frac);
- max += fixed;
+ if (0 < fixed)
+ max += fixed;
if (b->next && b->space) {
nsfont_width(b->style, " ", 1, &width);
max += width;