From 30b76c4dfa8c76bcf36ed0b1d14a0ea65366c8fa Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Tue, 29 Jan 2008 01:01:02 +0000 Subject: [PATCH] No need to recalculate a value we already have. svn path=/trunk/netsurf/; revision=3798 --- render/layout.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/render/layout.c b/render/layout.c index 247bdf705..a56e2c4fb 100644 --- a/render/layout.c +++ b/render/layout.c @@ -1174,14 +1174,12 @@ bool layout_line(struct box *first, int *width, int *y, /* calculate box width */ switch (b->style->width.width) { case CSS_WIDTH_LENGTH: - b->width = min_gadget_size ? css_screen_dpi * - option_font_min_size / 720.0 : + b->width = min_gadget_size ? min_gadget_size : css_len2px(&b->style->width.value. length, b->style); break; case CSS_WIDTH_PERCENT: - b->width = min_gadget_size ? css_screen_dpi * - option_font_min_size / 720.0 : + b->width = min_gadget_size ? min_gadget_size : css_len2px(&b->style->width.value. length, b->style); break; @@ -1194,8 +1192,7 @@ bool layout_line(struct box *first, int *width, int *y, /* height */ switch (b->style->height.height) { case CSS_HEIGHT_LENGTH: - b->height = min_gadget_size ? css_screen_dpi * - option_font_min_size / 720.0 : + b->height = min_gadget_size ? min_gadget_size : css_len2px(&b->style->height.length, b->style); break; @@ -1690,8 +1687,7 @@ struct box *layout_minmax_line(struct box *first, /* calculate box width */ switch (b->style->width.width) { case CSS_WIDTH_LENGTH: - width = min_gadget_size ? css_screen_dpi * - option_font_min_size / 720.0 : + width = min_gadget_size ? min_gadget_size : css_len2px(&b->style->width.value. length, b->style); break; @@ -1709,8 +1705,7 @@ struct box *layout_minmax_line(struct box *first, /* height */ switch (b->style->height.height) { case CSS_HEIGHT_LENGTH: - height = min_gadget_size ? css_screen_dpi * - option_font_min_size / 720.0 : + height = min_gadget_size ? min_gadget_size : css_len2px(&b->style->height.length, b->style); break;