diff --git a/components/layout/block.rs b/components/layout/block.rs index 1f4eb92ea51..80c0fae2243 100644 --- a/components/layout/block.rs +++ b/components/layout/block.rs @@ -1682,6 +1682,13 @@ 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(FlowFlags::IS_ABSOLUTELY_POSITIONED) + { + return FormattingContextType::Other; + } if self.is_inline_flex_item() || self.is_block_flex_item() { return FormattingContextType::Other; } diff --git a/tests/wpt/mozilla/meta/MANIFEST.json b/tests/wpt/mozilla/meta/MANIFEST.json index e5fcf55da15..a7a9a02bf42 100644 --- a/tests/wpt/mozilla/meta/MANIFEST.json +++ b/tests/wpt/mozilla/meta/MANIFEST.json @@ -43,6 +43,18 @@ {} ] ], + "css/absolute_block_format_ctx.html": [ + [ + "css/absolute_block_format_ctx.html", + [ + [ + "/_mozilla/css/absolute_block_format_ctx_ref.html", + "==" + ] + ], + {} + ] + ], "css/absolute_clipping_of_own_contents.html": [ [ "css/absolute_clipping_of_own_contents.html", @@ -7692,6 +7704,9 @@ "css/abs_rel_explicit_height_ref.html": [ [] ], + "css/absolute_block_format_ctx_ref.html": [ + [] + ], "css/absolute_clipping_of_own_contents_ref.html": [ [] ], @@ -13461,6 +13476,14 @@ "4e9833c29529e58690f5f26e546e0d66a22ca369", "support" ], + "css/absolute_block_format_ctx.html": [ + "e7540c1cfe8eaab06e9c3b87214263d2c3abec34", + "reftest" + ], + "css/absolute_block_format_ctx_ref.html": [ + "42420061724718702f611abd2ff4c61774fc4b86", + "support" + ], "css/absolute_clipping_of_own_contents.html": [ "19919ff89c72d3425d188c49c27916a9eb885359", "reftest" diff --git a/tests/wpt/mozilla/tests/css/absolute_block_format_ctx.html b/tests/wpt/mozilla/tests/css/absolute_block_format_ctx.html new file mode 100644 index 00000000000..e7540c1cfe8 --- /dev/null +++ b/tests/wpt/mozilla/tests/css/absolute_block_format_ctx.html @@ -0,0 +1,25 @@ + + + + + + + +
+ + +
+ + + + diff --git a/tests/wpt/mozilla/tests/css/absolute_block_format_ctx_ref.html b/tests/wpt/mozilla/tests/css/absolute_block_format_ctx_ref.html new file mode 100644 index 00000000000..42420061724 --- /dev/null +++ b/tests/wpt/mozilla/tests/css/absolute_block_format_ctx_ref.html @@ -0,0 +1,16 @@ + + + + + + +
+
+ +