summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/Layout/BlockFormattingContext.cpp
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-10-27 18:00:51 +0200
committerAndreas Kling <kling@serenityos.org>2021-10-27 18:00:51 +0200
commitca154723f789e13a2a36880753b950d5891b7f12 (patch)
tree248d91a712e7390ec1d14b771e7522256b24b3fa /Userland/Libraries/LibWeb/Layout/BlockFormattingContext.cpp
parent4333d0d639edd14c94aaebaf141603593d045450 (diff)
downloadserenity-ca154723f789e13a2a36880753b950d5891b7f12.zip
LibWeb: Remove Layout::Box::width_of_logical_containing_block()
This was a hack to percentages within tables relative to the nearest table-row ancestor instead of the nearest table container. That didn't actually make sense, so this patch simply removes the hack in favor of containing_block()->width().
Diffstat (limited to 'Userland/Libraries/LibWeb/Layout/BlockFormattingContext.cpp')
-rw-r--r--Userland/Libraries/LibWeb/Layout/BlockFormattingContext.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/Userland/Libraries/LibWeb/Layout/BlockFormattingContext.cpp b/Userland/Libraries/LibWeb/Layout/BlockFormattingContext.cpp
index 039700a7ed..d07ab706bb 100644
--- a/Userland/Libraries/LibWeb/Layout/BlockFormattingContext.cpp
+++ b/Userland/Libraries/LibWeb/Layout/BlockFormattingContext.cpp
@@ -120,7 +120,7 @@ void BlockFormattingContext::compute_width(Box& box)
}
auto& computed_values = box.computed_values();
- float width_of_containing_block = box.width_of_logical_containing_block();
+ float width_of_containing_block = box.containing_block()->width();
auto zero_value = CSS::Length::make_px(0);
@@ -242,7 +242,7 @@ void BlockFormattingContext::compute_width_for_floating_box(Box& box)
{
// 10.3.5 Floating, non-replaced elements
auto& computed_values = box.computed_values();
- float width_of_containing_block = box.width_of_logical_containing_block();
+ float width_of_containing_block = box.containing_block()->width();
auto zero_value = CSS::Length::make_px(0);
auto margin_left = computed_values.margin().left.resolved_or_zero(box, width_of_containing_block);
@@ -389,7 +389,7 @@ void BlockFormattingContext::compute_position(Box& box)
auto& box_model = box.box_model();
auto& computed_values = box.computed_values();
- float width_of_containing_block = box.width_of_logical_containing_block();
+ float width_of_containing_block = box.containing_block()->width();
auto specified_left = computed_values.offset().left.resolved_or_zero(box, width_of_containing_block);
auto specified_right = computed_values.offset().right.resolved_or_zero(box, width_of_containing_block);