diff --git a/components/layout/list_item.rs b/components/layout/list_item.rs index 41c404f6ad9..7ea9ebd0fdc 100644 --- a/components/layout/list_item.rs +++ b/components/layout/list_item.rs @@ -153,7 +153,15 @@ impl Flow for ListItemFlow { } fn compute_overflow(&self) -> Rect { - self.block_flow.compute_overflow() + let mut overflow = self.block_flow.compute_overflow(); + let flow_size = self.block_flow.base.position.size.to_physical(self.block_flow.base.writing_mode); + let relative_containing_block_size = + &self.block_flow.base.early_absolute_position_info.relative_containing_block_size; + + for fragment in &self.marker_fragments { + overflow = overflow.union(&fragment.compute_overflow(&flow_size, &relative_containing_block_size)) + } + overflow } fn generated_containing_block_size(&self, flow: OpaqueFlow) -> LogicalSize { diff --git a/tests/wpt/mozilla/meta/MANIFEST.json b/tests/wpt/mozilla/meta/MANIFEST.json index 226bdc9b266..33f978b5e68 100644 --- a/tests/wpt/mozilla/meta/MANIFEST.json +++ b/tests/wpt/mozilla/meta/MANIFEST.json @@ -2087,6 +2087,18 @@ "url": "/_mozilla/css/list_style_fixed_inside_a.html" } ], + "css/list_item_overflow.html": [ + { + "path": "css/list_item_overflow.html", + "references": [ + [ + "/_mozilla/css/list_item_overflow_ref.html", + "==" + ] + ], + "url": "/_mozilla/css/list_item_overflow.html" + } + ], "css/list_style_image_sizing_a.html": [ { "path": "css/list_style_image_sizing_a.html", @@ -6696,6 +6708,18 @@ "url": "/_mozilla/css/list_style_fixed_inside_a.html" } ], + "css/list_item_overflow.html": [ + { + "path": "css/list_item_overflow.html", + "references": [ + [ + "/_mozilla/css/list_item_overflow_ref.html", + "==" + ] + ], + "url": "/_mozilla/css/list_item_overflow.html" + } + ], "css/list_style_image_sizing_a.html": [ { "path": "css/list_style_image_sizing_a.html", diff --git a/tests/wpt/mozilla/tests/css/list_item_overflow.html b/tests/wpt/mozilla/tests/css/list_item_overflow.html new file mode 100644 index 00000000000..b2ea4bef27e --- /dev/null +++ b/tests/wpt/mozilla/tests/css/list_item_overflow.html @@ -0,0 +1,12 @@ + + + + + + + + + + diff --git a/tests/wpt/mozilla/tests/css/list_item_overflow_ref.html b/tests/wpt/mozilla/tests/css/list_item_overflow_ref.html new file mode 100644 index 00000000000..fff62ea40fc --- /dev/null +++ b/tests/wpt/mozilla/tests/css/list_item_overflow_ref.html @@ -0,0 +1,9 @@ + + + + + + +