diff options
author | Martin Robinson <mrobinson@igalia.com> | 2025-04-12 16:13:23 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-04-12 14:13:23 +0000 |
commit | 56e7c21fe796f5e2e4b6715b1dc97aa557f44824 (patch) | |
tree | 1a3ff2cabeaede2f251c66929f65d1198d766040 /components/layout_2020/dom.rs | |
parent | a4a308e4342b3717a20c599b98d10ab27fe75065 (diff) | |
download | servo-56e7c21fe796f5e2e4b6715b1dc97aa557f44824.tar.gz servo-56e7c21fe796f5e2e4b6715b1dc97aa557f44824.zip |
layout: Store table parts in DOM layout data (#36447)
When laying out tables, store the boxes of non-anonymous table parts in
their respective DOM objects. This is going to be important for
incremental layout, but also for mapping from the DOM to the box tree
(and eventually the fragment tree).
For now, anonymous table parts are still lost to time and space, but
in a followup change we hope to store them somewhere.
Testing: This has no visible change to web rendering, so is covered by
existing
WPT.
Co-authored-by: Oriol Brufau <obrufau@igalia.com>
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Oriol Brufau <obrufau@igalia.com>
Diffstat (limited to 'components/layout_2020/dom.rs')
-rw-r--r-- | components/layout_2020/dom.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/components/layout_2020/dom.rs b/components/layout_2020/dom.rs index 8ea718c4bec..c87c54d52ef 100644 --- a/components/layout_2020/dom.rs +++ b/components/layout_2020/dom.rs @@ -26,6 +26,7 @@ use crate::flow::BlockLevelBox; use crate::flow::inline::InlineItem; use crate::geom::PhysicalSize; use crate::replaced::{CanvasInfo, CanvasSource}; +use crate::table::TableLevelBox; use crate::taffy::TaffyItemBox; /// The data that is stored in each DOM node that is used by layout. @@ -43,6 +44,7 @@ pub(super) enum LayoutBox { BlockLevel(ArcRefCell<BlockLevelBox>), InlineLevel(ArcRefCell<InlineItem>), FlexLevel(ArcRefCell<FlexLevelBox>), + TableLevelBox(TableLevelBox), TaffyItemBox(ArcRefCell<TaffyItemBox>), } @@ -62,6 +64,7 @@ impl LayoutBox { LayoutBox::TaffyItemBox(taffy_item_box) => { taffy_item_box.borrow_mut().invalidate_cached_fragment() }, + LayoutBox::TableLevelBox(table_box) => table_box.invalidate_cached_fragment(), } } } |