mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 08:36:15 +00:00
LibWeb: Replaced elements had backwards application of intrinsic ratio
If we know the width, but not the height, we have to *divide* with the intrinsic ratio to get the height (not multiply.) :^) This makes things like <img width=300 src=image.png> work right.
This commit is contained in:
@@ -108,7 +108,7 @@ float LayoutReplaced::calculate_height() const
|
||||
if (specified_width.is_auto() && specified_height.is_auto() && has_intrinsic_height())
|
||||
used_height = intrinsic_height();
|
||||
else if (specified_height.is_auto() && has_intrinsic_ratio())
|
||||
used_height = calculate_width() * intrinsic_ratio();
|
||||
used_height = calculate_width() / intrinsic_ratio();
|
||||
else if (specified_height.is_auto() && has_intrinsic_height())
|
||||
used_height = intrinsic_height();
|
||||
else if (specified_height.is_auto())
|
||||
|
||||
Reference in New Issue
Block a user