diff --git a/components/layout/flow.rs b/components/layout/flow.rs index 2476e2431da..36b8da6cc48 100644 --- a/components/layout/flow.rs +++ b/components/layout/flow.rs @@ -1405,7 +1405,8 @@ impl<'a> ImmutableFlowUtils for &'a Flow { return kid.as_inline().baseline_offset_of_last_line() } if kid.is_block_like() && - kid.as_block().formatting_context_type() == FormattingContextType::None { + kid.as_block().formatting_context_type() == FormattingContextType::None && + !base(kid).flags.contains(IS_ABSOLUTELY_POSITIONED) { if let Some(baseline_offset) = kid.baseline_offset_of_last_line_box_in_flow() { return Some(base(kid).position.start.b + baseline_offset) } diff --git a/tests/wpt/mozilla/meta/MANIFEST.json b/tests/wpt/mozilla/meta/MANIFEST.json index debeee40193..9f56db24baa 100644 --- a/tests/wpt/mozilla/meta/MANIFEST.json +++ b/tests/wpt/mozilla/meta/MANIFEST.json @@ -2484,6 +2484,18 @@ "url": "/_mozilla/css/inline_block_border_intrinsic_size_a.html" } ], + "css/inline_block_height_with_out_of_flow_child_a.html": [ + { + "path": "css/inline_block_height_with_out_of_flow_child_a.html", + "references": [ + [ + "/_mozilla/css/inline_block_height_with_out_of_flow_child_ref.html", + "==" + ] + ], + "url": "/_mozilla/css/inline_block_height_with_out_of_flow_child_a.html" + } + ], "css/inline_block_img_a.html": [ { "path": "css/inline_block_img_a.html", @@ -11908,6 +11920,18 @@ "url": "/_mozilla/css/inline_block_border_intrinsic_size_a.html" } ], + "css/inline_block_height_with_out_of_flow_child_a.html": [ + { + "path": "css/inline_block_height_with_out_of_flow_child_a.html", + "references": [ + [ + "/_mozilla/css/inline_block_height_with_out_of_flow_child_ref.html", + "==" + ] + ], + "url": "/_mozilla/css/inline_block_height_with_out_of_flow_child_a.html" + } + ], "css/inline_block_img_a.html": [ { "path": "css/inline_block_img_a.html", diff --git a/tests/wpt/mozilla/tests/css/inline_block_height_with_out_of_flow_child_a.html b/tests/wpt/mozilla/tests/css/inline_block_height_with_out_of_flow_child_a.html new file mode 100644 index 00000000000..5aab3a8d04d --- /dev/null +++ b/tests/wpt/mozilla/tests/css/inline_block_height_with_out_of_flow_child_a.html @@ -0,0 +1,35 @@ + + +
+ + + + + + + + diff --git a/tests/wpt/mozilla/tests/css/inline_block_height_with_out_of_flow_child_ref.html b/tests/wpt/mozilla/tests/css/inline_block_height_with_out_of_flow_child_ref.html new file mode 100644 index 00000000000..64603f8c979 --- /dev/null +++ b/tests/wpt/mozilla/tests/css/inline_block_height_with_out_of_flow_child_ref.html @@ -0,0 +1,34 @@ + + + + + + + + + + +