summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-12-14 12:49:35 +0100
committerAndreas Kling <kling@serenityos.org>2020-12-14 12:49:35 +0100
commitb861de0a13c3b29ea05a880cb49545b41e42e104 (patch)
treebe7f014c452ee3c93e8ac996897ab82c84a4b7d4
parent6809be436b5dadadf6ef46af4652691a0a9d313e (diff)
downloadserenity-b861de0a13c3b29ea05a880cb49545b41e42e104.zip
LibWeb: Use final box model metrics for absolute 'right' and 'bottom'
We've already converted these to floats, so no need to do it again.
-rw-r--r--Libraries/LibWeb/Layout/BlockFormattingContext.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Libraries/LibWeb/Layout/BlockFormattingContext.cpp b/Libraries/LibWeb/Layout/BlockFormattingContext.cpp
index 6a34e29306..f9d702299b 100644
--- a/Libraries/LibWeb/Layout/BlockFormattingContext.cpp
+++ b/Libraries/LibWeb/Layout/BlockFormattingContext.cpp
@@ -744,7 +744,7 @@ void BlockFormattingContext::layout_absolutely_positioned_child(Box& box)
used_offset.set_x(x_offset + box_model.margin.left);
} else if (!box.style().offset().right.is_auto()) {
float x_offset = 0
- - box.style().offset().right.to_px(box)
+ - box_model.offset.right
- box_model.border_box().right;
used_offset.set_x(containing_block.width() + x_offset - box.width() - box_model.margin.right);
} else {
@@ -758,7 +758,7 @@ void BlockFormattingContext::layout_absolutely_positioned_child(Box& box)
used_offset.set_y(y_offset + box_model.margin.top);
} else if (!box.style().offset().bottom.is_auto()) {
float y_offset = 0
- - box.style().offset().bottom.to_px(box)
+ - box_model.offset.bottom
- box_model.border_box().bottom;
used_offset.set_y(containing_block.height() + y_offset - box.height() - box_model.margin.bottom);
} else {