diff --git a/Userland/Libraries/LibWeb/Layout/BlockFormattingContext.cpp b/Userland/Libraries/LibWeb/Layout/BlockFormattingContext.cpp index 360c857497..a2af813cde 100644 --- a/Userland/Libraries/LibWeb/Layout/BlockFormattingContext.cpp +++ b/Userland/Libraries/LibWeb/Layout/BlockFormattingContext.cpp @@ -171,8 +171,8 @@ void BlockFormattingContext::compute_width(Box const& box, AvailableSpace const& auto try_compute_width = [&](auto const& a_width) { CSS::Length width = a_width; - margin_left = computed_values.margin().left().resolved(box, width_of_containing_block_as_length_for_resolve).resolved(box); - margin_right = computed_values.margin().right().resolved(box, width_of_containing_block_as_length_for_resolve).resolved(box); + margin_left = computed_values.margin().left().resolved(box, width_of_containing_block_as_length_for_resolve); + margin_right = computed_values.margin().right().resolved(box, width_of_containing_block_as_length_for_resolve); CSSPixels total_px = computed_values.border_left().width + computed_values.border_right().width; for (auto& value : { margin_left, CSS::Length::make_px(padding_left), width, CSS::Length::make_px(padding_right), margin_right }) { total_px += value.to_px(box); @@ -279,8 +279,8 @@ void BlockFormattingContext::compute_width_for_floating_box(Box const& box, Avai if (!available_space.width.is_definite()) width_of_containing_block_as_length_for_resolve = CSS::Length::make_px(0); - auto margin_left = computed_values.margin().left().resolved(box, width_of_containing_block_as_length_for_resolve).resolved(box); - auto margin_right = computed_values.margin().right().resolved(box, width_of_containing_block_as_length_for_resolve).resolved(box); + auto margin_left = computed_values.margin().left().resolved(box, width_of_containing_block_as_length_for_resolve); + auto margin_right = computed_values.margin().right().resolved(box, width_of_containing_block_as_length_for_resolve); auto const padding_left = computed_values.padding().left().to_px(box, width_of_containing_block); auto const padding_right = computed_values.padding().right().to_px(box, width_of_containing_block); @@ -362,8 +362,8 @@ CSSPixels BlockFormattingContext::compute_width_for_table_wrapper(Box const& box auto zero_value = CSS::Length::make_px(0); - auto margin_left = computed_values.margin().left().resolved(box, width_of_containing_block_as_length_for_resolve).resolved(box); - auto margin_right = computed_values.margin().right().resolved(box, width_of_containing_block_as_length_for_resolve).resolved(box); + auto margin_left = computed_values.margin().left().resolved(box, width_of_containing_block_as_length_for_resolve); + auto margin_right = computed_values.margin().right().resolved(box, width_of_containing_block_as_length_for_resolve); // If 'margin-left', or 'margin-right' are computed as 'auto', their used value is '0'. if (margin_left.is_auto()) diff --git a/Userland/Libraries/LibWeb/Layout/FormattingContext.cpp b/Userland/Libraries/LibWeb/Layout/FormattingContext.cpp index f4c3ba8a94..48221e14fe 100644 --- a/Userland/Libraries/LibWeb/Layout/FormattingContext.cpp +++ b/Userland/Libraries/LibWeb/Layout/FormattingContext.cpp @@ -429,8 +429,8 @@ CSSPixels FormattingContext::compute_width_for_replaced_element(LayoutState cons auto width_of_containing_block = available_space.width.to_px(); auto width_of_containing_block_as_length = CSS::Length::make_px(width_of_containing_block); - auto margin_left = box.computed_values().margin().left().resolved(box, width_of_containing_block_as_length).resolved(box); - auto margin_right = box.computed_values().margin().right().resolved(box, width_of_containing_block_as_length).resolved(box); + auto margin_left = box.computed_values().margin().left().resolved(box, width_of_containing_block_as_length); + auto margin_right = box.computed_values().margin().right().resolved(box, width_of_containing_block_as_length); // A computed value of 'auto' for 'margin-left' or 'margin-right' becomes a used value of '0'. if (margin_left.is_auto()) @@ -531,8 +531,8 @@ void FormattingContext::compute_width_for_absolutely_positioned_non_replaced_ele auto computed_right = computed_values.inset().right(); auto try_compute_width = [&](auto const& a_width) { - margin_left = computed_values.margin().left().resolved(box, width_of_containing_block_as_length).resolved(box); - margin_right = computed_values.margin().right().resolved(box, width_of_containing_block_as_length).resolved(box); + margin_left = computed_values.margin().left().resolved(box, width_of_containing_block_as_length); + margin_right = computed_values.margin().right().resolved(box, width_of_containing_block_as_length); auto left = computed_values.inset().left().to_px(box, width_of_containing_block); auto right = computed_values.inset().right().to_px(box, width_of_containing_block);