summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2022-02-21 20:16:44 +0100
committerAndreas Kling <kling@serenityos.org>2022-02-21 20:42:34 +0100
commitf21a0bf4372242937c7944a1775fae77adadd2d9 (patch)
tree92f86a56582ce9603fdd4b131e55a12bd9bd0202 /Userland/Libraries/LibWeb
parenta5ce5564a9abcf9b95ee84bc544716b193efbf1e (diff)
downloadserenity-f21a0bf4372242937c7944a1775fae77adadd2d9.zip
LibWeb: Don't shift right-floated boxes too much to the left
We were subtracting the content width of right-floated boxes from their X position for no reason. Removing this makes floats snuggle up to each other on the right side. :^)
Diffstat (limited to 'Userland/Libraries/LibWeb')
-rw-r--r--Userland/Libraries/LibWeb/Layout/BlockFormattingContext.cpp1
1 files changed, 0 insertions, 1 deletions
diff --git a/Userland/Libraries/LibWeb/Layout/BlockFormattingContext.cpp b/Userland/Libraries/LibWeb/Layout/BlockFormattingContext.cpp
index 31a500d5ec..012238efaa 100644
--- a/Userland/Libraries/LibWeb/Layout/BlockFormattingContext.cpp
+++ b/Userland/Libraries/LibWeb/Layout/BlockFormattingContext.cpp
@@ -612,7 +612,6 @@ void BlockFormattingContext::layout_floating_child(Box const& box, BlockContaine
fits_on_line = (wanted_x + box_state.content_width + box_state.padding_right + box_state.border_right + box_state.margin_right) <= containing_block_content_width;
} else {
auto previous_left_border_edge = previous_box_state.offset.x()
- - previous_box_state.content_width
- previous_box_state.padding_left
- previous_box_state.border_left
- margin_collapsed_with_previous;