From e34cf4fba03e5eb005a2ac36e61b7606b0aca1af Mon Sep 17 00:00:00 2001 From: Matt Brubeck Date: Mon, 15 May 2017 14:19:19 -0700 Subject: Fix containing block size for absolute root element Fixes #16248. --- components/layout/block.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'components/layout') diff --git a/components/layout/block.rs b/components/layout/block.rs index 5e30c6f08ee..4da24dfebd0 100644 --- a/components/layout/block.rs +++ b/components/layout/block.rs @@ -657,7 +657,7 @@ impl BlockFlow { pub fn containing_block_size(&self, viewport_size: &Size2D, descendant: OpaqueFlow) -> LogicalSize { debug_assert!(self.base.flags.contains(IS_ABSOLUTELY_POSITIONED)); - if self.is_fixed() { + if self.is_fixed() || self.is_root() { // Initial containing block is the CB for the root LogicalSize::from_physical(self.base.writing_mode, *viewport_size) } else { -- cgit v1.2.3