mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-24 04:56:50 +03:00
Don't use float maths for AUTO image sizing with one given dimension.
svn path=/trunk/netsurf/; revision=11677
This commit is contained in:
parent
5b4228f5aa
commit
fc7efc6e4a
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user