mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 03:57:43 +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:
parent
f43590f534
commit
7230b7aad7
1 changed files with 1 additions and 1 deletions
|
@ -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())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue