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

@ -23,9 +23,7 @@ use webrender_api::FontInstanceKey;
use super::inline_box::{InlineBoxContainerState, InlineBoxIdentifier, InlineBoxTreePathToken};
use super::{InlineFormattingContextLayout, LineBlockSizes};
use crate::cell::ArcRefCell;
use crate::fragment_tree::{
BaseFragmentInfo, BoxFragment, CollapsedBlockMargins, Fragment, TextFragment,
};
use crate::fragment_tree::{BaseFragmentInfo, BoxFragment, Fragment, TextFragment};
use crate::geom::{LogicalRect, LogicalVec2, PhysicalRect, ToLogical};
use crate::positioned::{
AbsolutelyPositionedBox, PositioningContext, PositioningContextLength, relative_adjustement,
@ -465,7 +463,6 @@ impl LineItemLayout<'_, '_> {
border.to_physical(ifc_writing_mode),
margin.to_physical(ifc_writing_mode),
None, /* clearance */
CollapsedBlockMargins::zero(),
);
let offset_from_parent_ifc = LogicalVec2 {