summaryrefslogtreecommitdiff
path: root/render
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2008-01-29 01:01:02 +0000
committerMichael Drake <tlsa@netsurf-browser.org>2008-01-29 01:01:02 +0000
commit30b76c4dfa8c76bcf36ed0b1d14a0ea65366c8fa (patch)
tree35d2032d17040d7ac594399806c5163bec7ddd58 /render
parent38dcd3f172c9bd74dd6726ba921ddd8a929be386 (diff)
downloadnetsurf-30b76c4dfa8c76bcf36ed0b1d14a0ea65366c8fa.tar.gz
netsurf-30b76c4dfa8c76bcf36ed0b1d14a0ea65366c8fa.tar.bz2
No need to recalculate a value we already have.
svn path=/trunk/netsurf/; revision=3798
Diffstat (limited to 'render')
-rw-r--r--render/layout.c15
1 files 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;