mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-23 04:26:50 +03:00
Layout: Apply min/max width to replaced elements when width is given.
This commit is contained in:
parent
5ee910ffee
commit
4b6967fee4
@ -220,6 +220,11 @@ layout_get_object_dimensions(struct box *box,
|
||||
int intrinsic_width = content_get_width(box->object);
|
||||
int intrinsic_height = content_get_height(box->object);
|
||||
|
||||
if (min_width > 0 && min_width > *width)
|
||||
*width = min_width;
|
||||
if (max_width >= 0 && max_width < *width)
|
||||
*width = max_width;
|
||||
|
||||
if (intrinsic_width != 0)
|
||||
*height = (*width * intrinsic_height) /
|
||||
intrinsic_width;
|
||||
|
Loading…
Reference in New Issue
Block a user