From 5e823ede7cdff33b23b473680b0bf515cd54618e Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Mon, 16 May 2011 10:29:34 +0000 Subject: Use height type enum. svn path=/trunk/netsurf/; revision=12413 --- render/layout.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/render/layout.c b/render/layout.c index 3271a955b..60ad8baa9 100644 --- a/render/layout.c +++ b/render/layout.c @@ -706,7 +706,7 @@ void layout_minmax_block(struct box *block, enum css_width_e wtype = CSS_WIDTH_AUTO; css_fixed width = 0; css_unit wunit = CSS_UNIT_PX; - enum css_width_e htype = CSS_HEIGHT_AUTO; + enum css_height_e htype = CSS_HEIGHT_AUTO; css_fixed height = 0; css_unit hunit = CSS_UNIT_PX; bool child_has_height = false; @@ -840,7 +840,8 @@ void layout_minmax_block(struct box *block, min = max = FIXTOINT(nscss_len2px(width, wunit, block->style)); } - if (height > 0 && hunit != CSS_UNIT_PCT) { + if (htype == CSS_HEIGHT_SET && hunit != CSS_UNIT_PCT && + height > INTTOFIX(0)) { block->flags |= MAKE_HEIGHT; block->flags |= HAS_HEIGHT; } -- cgit v1.2.3