aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout
diff options
context:
space:
mode:
Diffstat (limited to 'components/layout')
-rw-r--r--components/layout/block.rs2
1 files changed, 1 insertions, 1 deletions
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<Au>, descendant: OpaqueFlow)
-> LogicalSize<Au> {
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 {