diff --git a/components/layout/inline.rs b/components/layout/inline.rs index 934e4aa1fc8..a934b95bafe 100644 --- a/components/layout/inline.rs +++ b/components/layout/inline.rs @@ -1143,7 +1143,11 @@ impl InlineFlow { let font_style = style.clone_font(); let font_metrics = text::font_metrics_for_style(font_context, font_style); let line_height = text::line_height_from_style(style, &font_metrics); - let inline_metrics = InlineMetrics::from_font_metrics(&font_metrics, line_height); + let inline_metrics = if fragments.iter().any(Fragment::is_text_or_replaced) { + InlineMetrics::from_font_metrics(&font_metrics, line_height) + } else { + InlineMetrics::new(Au(0), Au(0), Au(0)) + }; let mut line_metrics = LineMetrics::new(Au(0), MIN_AU); let mut largest_block_size_for_top_fragments = Au(0); diff --git a/tests/wpt/metadata/css/CSS2/fonts/font-variant-applies-to-005.xht.ini b/tests/wpt/metadata/css/CSS2/fonts/font-variant-applies-to-005.xht.ini deleted file mode 100644 index 466614c4127..00000000000 --- a/tests/wpt/metadata/css/CSS2/fonts/font-variant-applies-to-005.xht.ini +++ /dev/null @@ -1,3 +0,0 @@ -[font-variant-applies-to-005.xht] - type: reftest - expected: FAIL diff --git a/tests/wpt/metadata/css/CSS2/lists/list-style-applies-to-012.xht.ini b/tests/wpt/metadata/css/CSS2/lists/list-style-applies-to-012.xht.ini deleted file mode 100644 index 0bc7d42a181..00000000000 --- a/tests/wpt/metadata/css/CSS2/lists/list-style-applies-to-012.xht.ini +++ /dev/null @@ -1,3 +0,0 @@ -[list-style-applies-to-012.xht] - type: reftest - expected: FAIL diff --git a/tests/wpt/metadata/css/CSS2/lists/list-style-type-applies-to-012.xht.ini b/tests/wpt/metadata/css/CSS2/lists/list-style-type-applies-to-012.xht.ini deleted file mode 100644 index 185c50e8f99..00000000000 --- a/tests/wpt/metadata/css/CSS2/lists/list-style-type-applies-to-012.xht.ini +++ /dev/null @@ -1,3 +0,0 @@ -[list-style-type-applies-to-012.xht] - type: reftest - expected: FAIL diff --git a/tests/wpt/metadata/css/css-flexbox/flexbox_inline.html.ini b/tests/wpt/metadata/css/css-flexbox/flexbox_inline.html.ini new file mode 100644 index 00000000000..ec520ac0f8c --- /dev/null +++ b/tests/wpt/metadata/css/css-flexbox/flexbox_inline.html.ini @@ -0,0 +1,2 @@ +[flexbox_inline.html] + expected: FAIL