Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 4cde216fa6cd386f7e613900b12899c743e2500c
https://github.com/WebKit/WebKit/commit/4cde216fa6cd386f7e613900b12899c743e2500c
Author: Ahmad Saleem <[email protected]>
Date: 2026-10-06 (Tue, 06 Oct 2026)
Changed paths:
A
LayoutTests/imported/w3c/web-platform-tests/mathml/relations/css-styling/padding-border-margin/padding-border-mpadded-baseline-expected.txt
A
LayoutTests/imported/w3c/web-platform-tests/mathml/relations/css-styling/padding-border-margin/padding-border-mpadded-baseline.html
M Source/WebCore/rendering/mathml/RenderMathMLPadded.cpp
Log Message:
-----------
[MathML] Empty <mpadded> baseline ignores border-top and padding-top
https://bugs.webkit.org/show_bug.cgi?id=326377
rdar://189209081
Reviewed by Frédéric Wang Nélar.
This patch aligns WebKit with Gecko / Firefox and Blink / Chromium.
When <mpadded> has no in-flow children, RenderMathMLPadded::firstLineBaseline()
returned mpaddedHeight(0) without adding borderAndPaddingBefore(). An empty
<mpadded> with border-top or padding-top was therefore aligned too low in its
row. RenderMathMLSpace::firstLineBaseline() already adds this offset.
The non-empty case is already correct because the child's logicalTop()
includes the shift applied by adjustLayoutForBorderAndPadding().
* Source/WebCore/rendering/mathml/RenderMathMLPadded.cpp:
(WebCore::RenderMathMLPadded::firstLineBaseline const):
*
LayoutTests/imported/w3c/web-platform-tests/mathml/relations/css-styling/padding-border-margin/padding-border-mpadded-baseline-expected.txt:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/mathml/relations/css-styling/padding-border-margin/padding-border-mpadded-baseline.html:
Added.
Canonical link: https://commits.webkit.org/322826@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications