diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2011-02-14 14:48:56 +0000 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2011-02-14 14:48:56 +0000 |
commit | fc7efc6e4a972c67adb8a1ada287ee3f064d6f1f (patch) | |
tree | 419c58959a021bf0de678cecf2dd15c8a77e4b69 /render | |
parent | 5b4228f5aab532ce072deef432818165a214bf4d (diff) | |
download | netsurf-fc7efc6e4a972c67adb8a1ada287ee3f064d6f1f.tar.gz netsurf-fc7efc6e4a972c67adb8a1ada287ee3f064d6f1f.tar.bz2 |
Don't use float maths for AUTO image sizing with one given dimension.
svn path=/trunk/netsurf/; revision=11677
Diffstat (limited to 'render')
-rw-r--r-- | render/layout.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/render/layout.c b/render/layout.c index 3daf35d04..9f2dc88e0 100644 --- a/render/layout.c +++ b/render/layout.c @@ -853,7 +853,7 @@ void layout_get_object_dimensions(struct box *box, int *width, int *height, int intrinsic_height = content_get_height(box->object); if (intrinsic_height != 0) - *width = intrinsic_width * ((float)(*height)) / + *width = (*height * intrinsic_width) / intrinsic_height; else *width = intrinsic_width; @@ -863,7 +863,7 @@ void layout_get_object_dimensions(struct box *box, int *width, int *height, int intrinsic_height = content_get_height(box->object); if (intrinsic_width != 0) - *height = intrinsic_height * ((float)(*width)) / + *height = (*width * intrinsic_height) / intrinsic_width; else *height = intrinsic_height; |