diff options
Diffstat (limited to 'components/layout_2020/flow/root.rs')
-rw-r--r-- | components/layout_2020/flow/root.rs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/components/layout_2020/flow/root.rs b/components/layout_2020/flow/root.rs index 885e9be2024..b1c62416ecc 100644 --- a/components/layout_2020/flow/root.rs +++ b/components/layout_2020/flow/root.rs @@ -30,6 +30,7 @@ use crate::geom::{LogicalVec2, PhysicalPoint, PhysicalRect, PhysicalSize}; use crate::positioned::{AbsolutelyPositionedBox, PositioningContext}; use crate::replaced::ReplacedContent; use crate::style_ext::{ComputedValuesExt, Display, DisplayGeneratingBox, DisplayInside}; +use crate::taffy::{TaffyItemBox, TaffyItemBoxInner}; use crate::DefiniteContainingBlock; #[derive(Serialize)] @@ -127,6 +128,7 @@ impl BoxTree { AbsolutelyPositionedBlockLevelBox(ArcRefCell<BlockLevelBox>), AbsolutelyPositionedInlineLevelBox(ArcRefCell<InlineItem>, usize), AbsolutelyPositionedFlexLevelBox(ArcRefCell<FlexLevelBox>), + AbsolutelyPositionedTaffyLevelBox(ArcRefCell<TaffyItemBox>), } fn update_point<'dom, Node>( @@ -203,6 +205,17 @@ impl BoxTree { }, _ => return None, }, + LayoutBox::TaffyItemBox(taffy_level_box) => match &taffy_level_box + .borrow() + .taffy_level_box + { + TaffyItemBoxInner::OutOfFlowAbsolutelyPositionedBox(_) + if box_style.position.is_absolutely_positioned() => + { + UpdatePoint::AbsolutelyPositionedTaffyLevelBox(taffy_level_box.clone()) + }, + _ => return None, + }, }; Some((primary_style.clone(), display_inside, update_point)) } @@ -238,6 +251,12 @@ impl BoxTree { out_of_flow_absolutely_positioned_box, ); }, + UpdatePoint::AbsolutelyPositionedTaffyLevelBox(taffy_level_box) => { + taffy_level_box.borrow_mut().taffy_level_box = + TaffyItemBoxInner::OutOfFlowAbsolutelyPositionedBox( + out_of_flow_absolutely_positioned_box, + ); + }, } return true; } |