Don't use float maths for AUTO image sizing with one given dimension.

svn path=/trunk/netsurf/; revision=11677
This commit is contained in:
Michael Drake 2011-02-14 14:48:56 +00:00
parent 5b4228f5aa
commit fc7efc6e4a

View File

@ -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;