1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 00:57:45 +00:00

LibWeb: Actually assign solved value for left in abspos width case 1

This commit is contained in:
Andreas Kling 2022-11-09 12:03:49 +01:00
parent 098216fad7
commit 5e996b461c

View file

@ -595,7 +595,7 @@ void FormattingContext::compute_width_for_absolutely_positioned_non_replaced_ele
// then the width is shrink-to-fit. Then solve for 'left'
if (left.is_auto() && width.is_auto() && !right.is_auto()) {
auto result = calculate_shrink_to_fit_widths(box);
solve_for_left();
left = solve_for_left();
auto available_width = solve_for_width();
width = CSS::Length(min(max(result.preferred_minimum_width, available_width.to_px(box)), result.preferred_width), CSS::Length::Type::Px);
}