mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Fix wrong calculation of inline element's block size
This commit is contained in:
parent
4e7c689a81
commit
a14f6cb7e7
18 changed files with 61 additions and 44 deletions
|
@ -2008,10 +2008,8 @@ impl Fragment {
|
||||||
let font_derived_metrics =
|
let font_derived_metrics =
|
||||||
InlineMetrics::from_font_metrics(&info.run.font_metrics, line_height);
|
InlineMetrics::from_font_metrics(&info.run.font_metrics, line_height);
|
||||||
InlineMetrics {
|
InlineMetrics {
|
||||||
block_size_above_baseline: font_derived_metrics.block_size_above_baseline +
|
block_size_above_baseline: font_derived_metrics.block_size_above_baseline,
|
||||||
self.border_padding.block_start,
|
depth_below_baseline: font_derived_metrics.depth_below_baseline,
|
||||||
depth_below_baseline: font_derived_metrics.depth_below_baseline +
|
|
||||||
self.border_padding.block_end,
|
|
||||||
ascent: font_derived_metrics.ascent + self.border_padding.block_start,
|
ascent: font_derived_metrics.ascent + self.border_padding.block_start,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
[border-padding-bleed-001.htm]
|
|
||||||
type: reftest
|
|
||||||
expected: FAIL
|
|
|
@ -1,3 +0,0 @@
|
||||||
[border-padding-bleed-002.htm]
|
|
||||||
type: reftest
|
|
||||||
expected: FAIL
|
|
|
@ -1,3 +0,0 @@
|
||||||
[border-padding-bleed-003.htm]
|
|
||||||
type: reftest
|
|
||||||
expected: FAIL
|
|
|
@ -1,3 +0,0 @@
|
||||||
[border-width-applies-to-008.htm]
|
|
||||||
type: reftest
|
|
||||||
expected: FAIL
|
|
|
@ -1,3 +0,0 @@
|
||||||
[c5506-ipadn-t-000.htm]
|
|
||||||
type: reftest
|
|
||||||
expected: FAIL
|
|
|
@ -1,3 +0,0 @@
|
||||||
[c5506-ipadn-t-002.htm]
|
|
||||||
type: reftest
|
|
||||||
expected: FAIL
|
|
|
@ -1,3 +0,0 @@
|
||||||
[c5508-ipadn-b-000.htm]
|
|
||||||
type: reftest
|
|
||||||
expected: FAIL
|
|
|
@ -1,3 +1,4 @@
|
||||||
[c5510-ipadn-000.htm]
|
[c5510-ipadn-000.htm]
|
||||||
type: reftest
|
type: reftest
|
||||||
expected: FAIL
|
expected:
|
||||||
|
if os != "mac": FAIL
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
[inline-formatting-context-022.htm]
|
|
||||||
type: reftest
|
|
||||||
expected: FAIL
|
|
|
@ -1,3 +0,0 @@
|
||||||
[inline-formatting-context-023.htm]
|
|
||||||
type: reftest
|
|
||||||
expected: FAIL
|
|
|
@ -1,3 +0,0 @@
|
||||||
[inline-non-replaced-height-002.htm]
|
|
||||||
type: reftest
|
|
||||||
expected: FAIL
|
|
|
@ -1,3 +0,0 @@
|
||||||
[inline-non-replaced-height-003.htm]
|
|
||||||
type: reftest
|
|
||||||
expected: FAIL
|
|
|
@ -1,3 +0,0 @@
|
||||||
[margin-bottom-applies-to-008.htm]
|
|
||||||
type: reftest
|
|
||||||
expected: FAIL
|
|
|
@ -1,3 +0,0 @@
|
||||||
[margin-top-applies-to-008.htm]
|
|
||||||
type: reftest
|
|
||||||
expected: FAIL
|
|
|
@ -2616,6 +2616,18 @@
|
||||||
"url": "/_mozilla/css/inline_element_border_a.html"
|
"url": "/_mozilla/css/inline_element_border_a.html"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"css/inline_element_padding_margin.html": [
|
||||||
|
{
|
||||||
|
"path": "css/inline_element_padding_margin.html",
|
||||||
|
"references": [
|
||||||
|
[
|
||||||
|
"/_mozilla/css/inline_element_padding_margin_ref.html",
|
||||||
|
"=="
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"url": "/_mozilla/css/inline_element_padding_margin.html"
|
||||||
|
}
|
||||||
|
],
|
||||||
"css/inline_font_size_zero_a.html": [
|
"css/inline_font_size_zero_a.html": [
|
||||||
{
|
{
|
||||||
"path": "css/inline_font_size_zero_a.html",
|
"path": "css/inline_font_size_zero_a.html",
|
||||||
|
@ -11872,6 +11884,18 @@
|
||||||
"url": "/_mozilla/css/inline_element_border_a.html"
|
"url": "/_mozilla/css/inline_element_border_a.html"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"css/inline_element_padding_margin.html": [
|
||||||
|
{
|
||||||
|
"path": "css/inline_element_padding_margin.html",
|
||||||
|
"references": [
|
||||||
|
[
|
||||||
|
"/_mozilla/css/inline_element_padding_margin_ref.html",
|
||||||
|
"=="
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"url": "/_mozilla/css/inline_element_padding_margin.html"
|
||||||
|
}
|
||||||
|
],
|
||||||
"css/inline_font_size_zero_a.html": [
|
"css/inline_font_size_zero_a.html": [
|
||||||
{
|
{
|
||||||
"path": "css/inline_font_size_zero_a.html",
|
"path": "css/inline_font_size_zero_a.html",
|
||||||
|
|
|
@ -0,0 +1,21 @@
|
||||||
|
<!doctype html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>Border, padding and margin properties' top and bottom values of inline elements shouldn't affect element's height</title>
|
||||||
|
<link rel="match" href="inline_element_padding_margin_ref.html">
|
||||||
|
<style>
|
||||||
|
a {
|
||||||
|
border-top: 20px solid transparent;
|
||||||
|
border-bottom: 20px solid transparent;
|
||||||
|
padding: 20px 0;
|
||||||
|
margin: 20px 0;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<a href="#">foo</a>
|
||||||
|
<br>
|
||||||
|
bar
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,12 @@
|
||||||
|
<!doctype html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>Border, padding and margin properties' top and bottom values of inline elements shouldn't affect element's height</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<a href="#">foo</a>
|
||||||
|
<br>
|
||||||
|
bar
|
||||||
|
</body>
|
||||||
|
</html>
|
Loading…
Add table
Add a link
Reference in a new issue