summaryrefslogtreecommitdiff
path: root/content
diff options
context:
space:
mode:
Diffstat (limited to 'content')
-rw-r--r--content/handlers/html/layout.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/content/handlers/html/layout.c b/content/handlers/html/layout.c
index f4a1a206f..611c77819 100644
--- a/content/handlers/html/layout.c
+++ b/content/handlers/html/layout.c
@@ -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;