From e13bb8daa87c01c0f5a478a96b7fa822955770cd Mon Sep 17 00:00:00 2001 From: James Bursa Date: Sun, 20 Jul 2003 13:58:12 +0000 Subject: [project @ 2003-07-20 13:58:12 by bursa] Line-height fixes. svn path=/import/netsurf/; revision=240 --- render/layout.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'render') diff --git a/render/layout.c b/render/layout.c index 6ebc589f2..5153b8261 100644 --- a/render/layout.c +++ b/render/layout.c @@ -304,12 +304,15 @@ signed long line_height(struct css_style * style) { assert(style != 0); assert(style->line_height.size == CSS_LINE_HEIGHT_LENGTH || - style->line_height.size == CSS_LINE_HEIGHT_ABSOLUTE); + style->line_height.size == CSS_LINE_HEIGHT_ABSOLUTE || + style->line_height.size == CSS_LINE_HEIGHT_PERCENT); if (style->line_height.size == CSS_LINE_HEIGHT_LENGTH) return len(&style->line_height.value.length, style); - else + else if (style->line_height.size == CSS_LINE_HEIGHT_ABSOLUTE) return style->line_height.value.absolute * len(&style->font_size.value.length, 0); + else + return style->line_height.value.percent * len(&style->font_size.value.length, 0) / 100.0; } -- cgit v1.2.3