mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 13:18:13 +00:00
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().
This commit is contained in:
parent
4333d0d639
commit
ca154723f7
6 changed files with 4 additions and 23 deletions
|
@ -106,7 +106,7 @@ void FlexFormattingContext::run(Box& run_box, LayoutMode)
|
|||
|
||||
void FlexFormattingContext::populate_specified_margins(FlexItem& item, CSS::FlexDirection flex_direction) const
|
||||
{
|
||||
auto width_of_containing_block = item.box.width_of_logical_containing_block();
|
||||
auto width_of_containing_block = item.box.containing_block()->width();
|
||||
// FIXME: This should also take reverse-ness into account
|
||||
if (flex_direction == CSS::FlexDirection::Row || flex_direction == CSS::FlexDirection::RowReverse) {
|
||||
item.margins.main_before = item.box.computed_values().margin().left.resolved_or_zero(item.box, width_of_containing_block).to_px(item.box);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue