Fix vertical alignment at the root of an IFC (#31636)

At the root of an inline formatting context, we used its vertical-align
in order to compute the strut. That was wrong, since vertical-align
on a block container shouldn't affect the contents, it should only
affect the alignment of the block container (if it's inline-level)
within the parent IFC.

This was only working well if the block container was block-level, since
effective_vertical_align_for_inline_layout returned `baseline` for
block-level boxes.

Instead of the outer display type, this patch changes the logic to check
whether we are at the root of the IFC.
This commit is contained in:
Oriol Brufau 2024-03-13 11:39:01 +01:00 committed by GitHub
parent 63527f56ca
commit 0860deba05
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 223 additions and 58 deletions

View file

@ -63058,6 +63058,19 @@
{}
]
],
"vertical-align-122.xht": [
"1d7c180f197b9262dd98aa162595b3eb914f60d1",
[
null,
[
[
"/css/CSS2/linebox/vertical-align-122-ref.xht",
"=="
]
],
{}
]
],
"vertical-align-applies-to-001.xht": [
"fca1480f7367209223f370ff01acbc45ef7b3778",
[
@ -371510,6 +371523,10 @@
"c0db9e0e8bbc2bbec91ffaa564e326b4744dd2fd",
[]
],
"vertical-align-122-ref.xht": [
"86b4856266285a3a9b66b5c426384d2699cbaceb",
[]
],
"vertical-align-applies-to-001-ref.xht": [
"8ed51e0c21a0613e67c49e3e36e488e176027165",
[]

View file

@ -1,2 +0,0 @@
[inline-formatting-context-011.xht]
expected: FAIL