diff options
author | Andreas Kling <kling@serenityos.org> | 2022-03-03 12:55:02 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-03-03 12:57:53 +0100 |
commit | ef33a40b99d32cbcf6672427ff8c5de2ede545a6 (patch) | |
tree | c88e87fd168ec484e63a1333fb8fe89cb7aaab7f | |
parent | 7dae8957043226128cc393b9cd0a106f97d33df4 (diff) | |
download | serenity-ef33a40b99d32cbcf6672427ff8c5de2ede545a6.zip |
LibWeb: Remove bogus line box width adjustment
This basically reverts 95715f0c8f066b2bb43b9dbb4dec993bb627fd9f, as it
was totally wrong for text-align:center and text-align:right.
-rw-r--r-- | Userland/Libraries/LibWeb/Layout/LineBuilder.cpp | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/Userland/Libraries/LibWeb/Layout/LineBuilder.cpp b/Userland/Libraries/LibWeb/Layout/LineBuilder.cpp index 6995ff0214..2a4d80bb75 100644 --- a/Userland/Libraries/LibWeb/Layout/LineBuilder.cpp +++ b/Userland/Libraries/LibWeb/Layout/LineBuilder.cpp @@ -158,11 +158,6 @@ void LineBuilder::update_last_line() return line_box_baseline; }(); - // Now we're going to align our fragments on the inline axis. - // We need to remember how much the last fragment on the line was moved by this process, - // since that is used to compute the final width of the entire line box. - float last_fragment_x_adjustment = 0; - for (size_t i = 0; i < line_box.fragments().size(); ++i) { auto& fragment = line_box.fragments()[i]; @@ -195,7 +190,6 @@ void LineBuilder::update_last_line() } } - last_fragment_x_adjustment = new_fragment_x - fragment.offset().x(); fragment.set_offset({ new_fragment_x, new_fragment_y }); bottom = max(bottom, new_fragment_y + fragment.height() + fragment.border_box_bottom()); @@ -214,9 +208,6 @@ void LineBuilder::update_last_line() } } - if (!line_box.fragments().is_empty()) - line_box.m_width += last_fragment_x_adjustment; - line_box.m_bottom = bottom; line_box.m_baseline = line_box_baseline; } |