mirror of
https://github.com/RGBCube/serenity
synced 2025-07-24 15:37:43 +00:00
LibWeb: Fix layout of replaced with width:auto + no intrinsic ratio
We can't compute width based on the intrinsic ratio if we have no intrinsic ratio! The comment was correct, the code was not.
This commit is contained in:
parent
cd5570670c
commit
f470657d57
1 changed files with 1 additions and 1 deletions
|
@ -77,7 +77,7 @@ float LayoutReplaced::calculate_width() const
|
||||||
// 'height' has some other computed value, and the element does have an intrinsic ratio; then the used value of 'width' is:
|
// 'height' has some other computed value, and the element does have an intrinsic ratio; then the used value of 'width' is:
|
||||||
//
|
//
|
||||||
// (used height) * (intrinsic ratio)
|
// (used height) * (intrinsic ratio)
|
||||||
else if ((specified_height.is_auto() && specified_width.is_auto() && !has_intrinsic_width() && has_intrinsic_height() && has_intrinsic_ratio()) || computed_width.is_auto()) {
|
else if ((specified_height.is_auto() && specified_width.is_auto() && !has_intrinsic_width() && has_intrinsic_height() && has_intrinsic_ratio()) || (computed_width.is_auto() && has_intrinsic_ratio())) {
|
||||||
used_width = calculate_height() * intrinsic_ratio();
|
used_width = calculate_height() * intrinsic_ratio();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue