From ca0a0b7a932306835bdb039c44584652a04e1378 Mon Sep 17 00:00:00 2001 From: Samuel Bowman Date: Wed, 12 Oct 2022 00:27:20 -0400 Subject: [PATCH] LibWeb: Add missing else's in absolutely positioned height computation Rules 1, 2, and 3 use else if, so rules 4, 5, and 6 should too. --- Userland/Libraries/LibWeb/Layout/FormattingContext.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Userland/Libraries/LibWeb/Layout/FormattingContext.cpp b/Userland/Libraries/LibWeb/Layout/FormattingContext.cpp index 7d060a0886b..f7d51eb4fc0 100644 --- a/Userland/Libraries/LibWeb/Layout/FormattingContext.cpp +++ b/Userland/Libraries/LibWeb/Layout/FormattingContext.cpp @@ -858,19 +858,19 @@ void FormattingContext::compute_height_for_absolutely_positioned_non_replaced_el } // 4. If top is auto, height and bottom are not auto, - if (top.is_auto() && !height.is_auto() && !bottom.is_auto()) { + else if (top.is_auto() && !height.is_auto() && !bottom.is_auto()) { // then solve for top. solve_for_top(); } // 5. If height is auto, top and bottom are not auto, - if (height.is_auto() && !top.is_auto() && !bottom.is_auto()) { + else if (height.is_auto() && !top.is_auto() && !bottom.is_auto()) { // then solve for height. solve_for_height(); } // 6. If bottom is auto, top and height are not auto, - if (bottom.is_auto() && !top.is_auto() && !height.is_auto()) { + else if (bottom.is_auto() && !top.is_auto() && !height.is_auto()) { // then solve for bottom. solve_for_bottom(); }