mirror of
https://github.com/servo/servo.git
synced 2025-09-29 16:19:14 +01:00
layout: Make lines non-phantom if they have inline padding/border/margin (#39058)
According to https://drafts.csswg.org/css-inline/#invisible-line-boxes, if a line box contains non-zero inline-axis margins, padding or borders, then it can't be phantom. Therefore, this patch makes adds a `has_inline_pbm` flag to the line. Note that we can't use the `has_content` flag, because that would add a soft wrap opportunity between the padding/border/margin and the first content of the line. The patch also renames `InlineFormattingContext::had_inflow_content` to `has_line_boxes`, which is what we care about for collapsing margins through. Testing: Adding new tests Fixes: #39057 Signed-off-by: Oriol Brufau <obrufau@igalia.com>
This commit is contained in:
parent
4451ce0ef1
commit
18b3e5fe21
8 changed files with 416 additions and 15 deletions
80
tests/wpt/meta/MANIFEST.json
vendored
80
tests/wpt/meta/MANIFEST.json
vendored
|
@ -210635,6 +210635,86 @@
|
|||
]
|
||||
]
|
||||
},
|
||||
"model": {
|
||||
"phantom-line-boxes-001.html": [
|
||||
"da0e9095b7a37e6b4a897269e753175c68039a34",
|
||||
[
|
||||
null,
|
||||
[
|
||||
[
|
||||
"/css/reference/ref-filled-green-200px-square.html",
|
||||
"=="
|
||||
]
|
||||
],
|
||||
{}
|
||||
]
|
||||
],
|
||||
"phantom-line-boxes-002.html": [
|
||||
"c180a9bf3b5c4cda3e281d84bb36b6d8b2bae91c",
|
||||
[
|
||||
null,
|
||||
[
|
||||
[
|
||||
"/css/reference/ref-filled-green-200px-square.html",
|
||||
"=="
|
||||
]
|
||||
],
|
||||
{}
|
||||
]
|
||||
],
|
||||
"phantom-line-boxes-003.html": [
|
||||
"633aa9dfba8d81d515c807c66074b77c73dbfee4",
|
||||
[
|
||||
null,
|
||||
[
|
||||
[
|
||||
"/css/reference/ref-filled-green-200px-square.html",
|
||||
"=="
|
||||
]
|
||||
],
|
||||
{}
|
||||
]
|
||||
],
|
||||
"phantom-line-boxes-004.html": [
|
||||
"0b4f7737ee21b4490e951ce1677772b9d1ae2d71",
|
||||
[
|
||||
null,
|
||||
[
|
||||
[
|
||||
"/css/reference/ref-filled-green-200px-square.html",
|
||||
"=="
|
||||
]
|
||||
],
|
||||
{}
|
||||
]
|
||||
],
|
||||
"phantom-line-boxes-005.html": [
|
||||
"dd2620294412fab68af218f30e470a3003255dd4",
|
||||
[
|
||||
null,
|
||||
[
|
||||
[
|
||||
"/css/reference/ref-filled-green-200px-square.html",
|
||||
"=="
|
||||
]
|
||||
],
|
||||
{}
|
||||
]
|
||||
],
|
||||
"phantom-line-boxes-006.html": [
|
||||
"7b5a43cbf811680087429abe5b0236d1221f28d4",
|
||||
[
|
||||
null,
|
||||
[
|
||||
[
|
||||
"/css/reference/ref-filled-green-200px-square.html",
|
||||
"=="
|
||||
]
|
||||
],
|
||||
{}
|
||||
]
|
||||
]
|
||||
},
|
||||
"text-box-trim": {
|
||||
"border-padding-001.html": [
|
||||
"9c25c42a1def684b364e98dc9d6233cd5c700519",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue