layout: Box block_margins_collapsed_with_children member of BoxFragment (#36474)

This reduces the size of `BoxFragment` by around 20 bytes.

Testing: This just changes the layout of a data structure, so is
covered by existing WPT tests.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Oriol Brufau <obrufau@igalia.com>
This commit is contained in:
Martin Robinson 2025-04-12 10:52:30 +02:00 committed by GitHub
parent 3c4ec17180
commit a4a308e434
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 29 additions and 42 deletions

View file

@ -1785,7 +1785,6 @@ impl<'a> TableLayout<'a> {
self.pbm.border.to_physical(table_writing_mode),
PhysicalSides::zero(),
None, /* clearance */
CollapsedBlockMargins::zero(),
)
.with_specific_layout_info(self.specific_layout_info_for_grid());
}
@ -1911,7 +1910,6 @@ impl<'a> TableLayout<'a> {
self.pbm.border.to_physical(table_writing_mode),
PhysicalSides::zero(),
None, /* clearance */
CollapsedBlockMargins::zero(),
)
.with_baselines(baselines)
.with_specific_layout_info(self.specific_layout_info_for_grid())
@ -2338,7 +2336,6 @@ impl<'a> RowFragmentLayout<'a> {
PhysicalSides::zero(), /* border */
PhysicalSides::zero(), /* margin */
None, /* clearance */
CollapsedBlockMargins::zero(),
);
row_fragment.set_does_not_paint_background();
@ -2404,7 +2401,6 @@ impl RowGroupFragmentLayout {
PhysicalSides::zero(), /* border */
PhysicalSides::zero(), /* margin */
None, /* clearance */
CollapsedBlockMargins::zero(),
);
row_group_fragment.set_does_not_paint_background();
@ -2887,7 +2883,6 @@ impl TableSlotCell {
layout.border.to_physical(table_style.writing_mode),
PhysicalSides::zero(), /* margin */
None, /* clearance */
CollapsedBlockMargins::zero(),
)
.with_baselines(layout.layout.baselines)
.with_specific_layout_info(specific_layout_info)