diff options
Diffstat (limited to 'components/layout/table')
-rw-r--r-- | components/layout/table/layout.rs | 12 | ||||
-rw-r--r-- | components/layout/table/mod.rs | 1 |
2 files changed, 9 insertions, 4 deletions
diff --git a/components/layout/table/layout.rs b/components/layout/table/layout.rs index 57b48ae0bca..2261f7d165c 100644 --- a/components/layout/table/layout.rs +++ b/components/layout/table/layout.rs @@ -2142,23 +2142,27 @@ impl<'a> TableLayout<'a> { for column_group in self.table.column_groups.iter() { let column_group = column_group.borrow(); if !column_group.is_empty() { - fragments.push(Fragment::Positioning(PositioningFragment::new_empty( + let fragment = Fragment::Positioning(PositioningFragment::new_empty( column_group.base.base_fragment_info, dimensions .get_column_group_rect(&column_group) .as_physical(None), column_group.base.style.clone(), - ))); + )); + column_group.base.set_fragment(fragment.clone()); + fragments.push(fragment); } } for (column_index, column) in self.table.columns.iter().enumerate() { let column = column.borrow(); - fragments.push(Fragment::Positioning(PositioningFragment::new_empty( + let fragment = Fragment::Positioning(PositioningFragment::new_empty( column.base.base_fragment_info, dimensions.get_column_rect(column_index).as_physical(None), column.base.style.clone(), - ))); + )); + column.base.set_fragment(fragment.clone()); + fragments.push(fragment); } } diff --git a/components/layout/table/mod.rs b/components/layout/table/mod.rs index 120270fc7cf..fe7f90437b8 100644 --- a/components/layout/table/mod.rs +++ b/components/layout/table/mod.rs @@ -346,6 +346,7 @@ pub(crate) struct TableLayoutStyle<'a> { /// Table parts that are stored in the DOM. This is used in order to map from /// the DOM to the box tree and will eventually be important for incremental /// layout. +#[derive(MallocSizeOf)] pub(crate) enum TableLevelBox { Caption(ArcRefCell<TableCaption>), Cell(ArcRefCell<TableSlotCell>), |