mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Do not leave space below baseline when it is not needed (i.e.there is no text)
This commit is contained in:
parent
671b69c0b7
commit
a241bed53c
5 changed files with 7 additions and 10 deletions
|
@ -1143,7 +1143,11 @@ impl InlineFlow {
|
||||||
let font_style = style.clone_font();
|
let font_style = style.clone_font();
|
||||||
let font_metrics = text::font_metrics_for_style(font_context, font_style);
|
let font_metrics = text::font_metrics_for_style(font_context, font_style);
|
||||||
let line_height = text::line_height_from_style(style, &font_metrics);
|
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 line_metrics = LineMetrics::new(Au(0), MIN_AU);
|
||||||
let mut largest_block_size_for_top_fragments = Au(0);
|
let mut largest_block_size_for_top_fragments = Au(0);
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
[font-variant-applies-to-005.xht]
|
|
||||||
type: reftest
|
|
||||||
expected: FAIL
|
|
|
@ -1,3 +0,0 @@
|
||||||
[list-style-applies-to-012.xht]
|
|
||||||
type: reftest
|
|
||||||
expected: FAIL
|
|
|
@ -1,3 +0,0 @@
|
||||||
[list-style-type-applies-to-012.xht]
|
|
||||||
type: reftest
|
|
||||||
expected: FAIL
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
[flexbox_inline.html]
|
||||||
|
expected: FAIL
|
Loading…
Add table
Add a link
Reference in a new issue