summaryrefslogtreecommitdiff
path: root/Libraries
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-06-25 12:56:20 +0200
committerAndreas Kling <kling@serenityos.org>2020-06-25 15:53:23 +0200
commitee1c241be953d46bb814ce1869f0b2596e654773 (patch)
treeb2b09a7a33b76594fc79cdf890a3b43f3b7e44e2 /Libraries
parent232e41a238f1eb3c96aac20d30d98eb9e012c680 (diff)
downloadserenity-ee1c241be953d46bb814ce1869f0b2596e654773.zip
LibWeb: Update the border metrics of absolutely positioned boxes
We were neglecting to populate the border parts of BoxModelMetrics for absolutely positioned block descendants.
Diffstat (limited to 'Libraries')
-rw-r--r--Libraries/LibWeb/Layout/LayoutBlock.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/Libraries/LibWeb/Layout/LayoutBlock.cpp b/Libraries/LibWeb/Layout/LayoutBlock.cpp
index 560cb47fe1..f9959d8016 100644
--- a/Libraries/LibWeb/Layout/LayoutBlock.cpp
+++ b/Libraries/LibWeb/Layout/LayoutBlock.cpp
@@ -78,6 +78,11 @@ void LayoutBlock::layout_absolutely_positioned_descendant(LayoutBox& box)
box_model.margin.right = box.style().margin().right.resolved_or_auto(box, width());
box_model.margin.bottom = box.style().margin().bottom.resolved_or_auto(box, height());
+ box_model.border.left = Length::make_px(box.style().border_left().width);
+ box_model.border.right = Length::make_px(box.style().border_right().width);
+ box_model.border.top = Length::make_px(box.style().border_top().width);
+ box_model.border.bottom = Length::make_px(box.style().border_bottom().width);
+
box_model.offset.left = box.style().offset().left.resolved_or_auto(box, width());
box_model.offset.top = box.style().offset().top.resolved_or_auto(box, height());
box_model.offset.right = box.style().offset().right.resolved_or_auto(box, width());