diff --git a/components/layout/block.rs b/components/layout/block.rs index 5504f0fc4121..7707b833475c 100644 --- a/components/layout/block.rs +++ b/components/layout/block.rs @@ -1429,6 +1429,9 @@ impl BlockFlow { /// Determines the type of formatting context this is. See the definition of /// `FormattingContextType`. pub fn formatting_context_type(&self) -> FormattingContextType { + if self.base.flags.contains(IS_ABSOLUTELY_POSITIONED) { + return FormattingContextType::Other + } let style = self.fragment.style(); if style.get_box().float != float::T::none { return FormattingContextType::Other