Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: b7505aa75e5844a6188cdb7cd1d9b85cbf0913e0
https://github.com/WebKit/WebKit/commit/b7505aa75e5844a6188cdb7cd1d9b85cbf0913e0
Author: Alan Baradlay <[email protected]>
Date: 2026-08-05 (Wed, 05 Aug 2026)
Changed paths:
A
LayoutTests/imported/w3c/web-platform-tests/css/css-align/baseline-rules/first-baseline-block-in-inline-001-expected.txt
A
LayoutTests/imported/w3c/web-platform-tests/css/css-align/baseline-rules/first-baseline-block-in-inline-001.html
M Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.cpp
Log Message:
-----------
[block-in-inline] Baseline alignment ignores the offset of a block level box
nested in an inline box
https://bugs.webkit.org/show_bug.cgi?id=321083
Reviewed by Antti Koivisto.
LineLayout::firstLineBaseline() returns a block-in-inline's own baseline, but
callers expect a baseline measured from the container's border box.
RenderBlock's equivalents add the child's logicalTop() for exactly this reason:
if (auto baseline = child->firstLineBaseline())
return LayoutUnit { (child->logicalTop() + baseline.value()).toInt() };
So anything above the block level box - the container's padding-before, or a
preceding line - is dropped
from the exported baseline.
* Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.cpp:
(WebCore::LayoutIntegration::LineLayout::firstLineBaseline const):
*
LayoutTests/imported/w3c/web-platform-tests/css/css-align/baseline-rules/first-baseline-block-in-inline-001.html:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-align/baseline-rules/first-baseline-block-in-inline-001-expected.txt:
Added.
Canonical link: https://commits.webkit.org/318656@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications