New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix vertical alignment at the root of an IFC #31636
Conversation
🔨 Triggering try run (#8257712869) for Linux WPT |
🤖 Opened new upstream WPT pull request (web-platform-tests/wpt#45074) with upstreamable changes. |
|
b5ff06c
to
96978e5
Compare
📝 Transplanted new upstreamable changes to existing upstream WPT pull request (web-platform-tests/wpt#45074). |
🔨 Triggering try run (#8261596814) for Linux WPT |
Test results for linux-wpt-layout-2013 from try job (#8261596814): Flaky unexpected result (12)
Stable unexpected results that are known to be intermittent (13)
|
Test results for linux-wpt-layout-2020 from try job (#8261596814): Flaky unexpected result (14)
Stable unexpected results that are known to be intermittent (12)
Stable unexpected results (1)
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fix!
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.
96978e5
to
c596333
Compare
📝 Transplanted new upstreamable changes to existing upstream WPT pull request (web-platform-tests/wpt#45074). |
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.
./mach build -d
does not report any errors./mach test-tidy
does not report any errors