From 74f108ee4dc5b915dfc8de0f88485245831ea7a9 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Sat, 12 Mar 2011 17:46:11 +0000 Subject: Saturated maths in css fixed point svn path=/trunk/netsurf/; revision=11975 --- css/select.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'css/select.c') diff --git a/css/select.c b/css/select.c index 116818816..e9fb101d3 100644 --- a/css/select.c +++ b/css/select.c @@ -328,9 +328,9 @@ css_error nscss_compute_font_size(void *pw, const css_hint *parent, /* Grab parent size, defaulting to medium if none */ if (parent == NULL) { - parent_size.value = FDIVI( - FMULI(factors[CSS_FONT_SIZE_MEDIUM - 1], - option_font_size), 10); + parent_size.value = FDIV(FMUL(factors[CSS_FONT_SIZE_MEDIUM - 1], + INTTOFIX(option_font_size)), + INTTOFIX(10)); parent_size.unit = CSS_UNIT_PT; } else { assert(parent->status == CSS_FONT_SIZE_DIMENSION); @@ -345,9 +345,9 @@ css_error nscss_compute_font_size(void *pw, const css_hint *parent, if (size->status < CSS_FONT_SIZE_LARGER) { /* Keyword -- simple */ - size->data.length.value = FDIVI( - FMULI(factors[size->status - 1], - option_font_size), 10); + size->data.length.value = FDIV(FMUL(factors[size->status - 1], + INTTOFIX(option_font_size)), + F_10); size->data.length.unit = CSS_UNIT_PT; } else if (size->status == CSS_FONT_SIZE_LARGER) { /** \todo Step within table, if appropriate */ -- cgit v1.2.3