From 159d4d772a1adf07931300bebb945a808784052e Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sun, 20 Mar 2022 13:27:47 +0100 Subject: [PATCH] LibWeb: Assign the used top/bottom border widths to inline-block boxes We were forgetting to update these values, which led to missing top and bottom borders for elements with display:inline-block. --- .../Libraries/LibWeb/Layout/InlineFormattingContext.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Userland/Libraries/LibWeb/Layout/InlineFormattingContext.cpp b/Userland/Libraries/LibWeb/Layout/InlineFormattingContext.cpp index e043859bae..4cf0baa192 100644 --- a/Userland/Libraries/LibWeb/Layout/InlineFormattingContext.cpp +++ b/Userland/Libraries/LibWeb/Layout/InlineFormattingContext.cpp @@ -100,12 +100,17 @@ void InlineFormattingContext::dimension_box_on_line(Box const& box, LayoutMode l box_state.margin_left = computed_values.margin().left.resolved(box, width_of_containing_block).to_px(box); box_state.border_left = computed_values.border_left().width; box_state.padding_left = computed_values.padding().left.resolved(box, width_of_containing_block).to_px(box); + box_state.margin_right = computed_values.margin().right.resolved(box, width_of_containing_block).to_px(box); box_state.border_right = computed_values.border_right().width; box_state.padding_right = computed_values.padding().right.resolved(box, width_of_containing_block).to_px(box); - box_state.padding_top = computed_values.padding().top.resolved(box, width_of_containing_block).to_px(box); - box_state.padding_bottom = computed_values.padding().bottom.resolved(box, width_of_containing_block).to_px(box); + box_state.margin_top = computed_values.margin().top.resolved(box, width_of_containing_block).to_px(box); + box_state.border_top = computed_values.border_top().width; + box_state.padding_top = computed_values.padding().top.resolved(box, width_of_containing_block).to_px(box); + + box_state.padding_bottom = computed_values.padding().bottom.resolved(box, width_of_containing_block).to_px(box); + box_state.border_bottom = computed_values.border_bottom().width; box_state.margin_bottom = computed_values.margin().bottom.resolved(box, width_of_containing_block).to_px(box); if (is(box)) {