Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: db88908da038d49d7e85d37692fced0d47363227
https://github.com/WebKit/WebKit/commit/db88908da038d49d7e85d37692fced0d47363227
Author: Ahmad Saleem <[email protected]>
Date: 2025-11-17 (Mon, 17 Nov 2025)
Changed paths:
M Source/WebCore/rendering/mathml/RenderMathMLRoot.cpp
Log Message:
-----------
[MathML] Render empty <msqrt> radicals correctly instead of skipping paint
due to firstChild()
https://bugs.webkit.org/show_bug.cgi?id=302563
rdar://164776629
Reviewed by Frédéric Wang.
Previously, RenderMathMLRoot::paint() returned early if firstChild() was null.
This prevented empty <msqrt> elements from painting, which is invalid per
MathML Core. Now we remove the firstChild() check and rely solely on isValid()
to guard painting. Empty <msqrt> elements now correctly render the radical
glyph with zero-length base. This preserves remaining checks and early returns
and keep them unchanged. As per MathML Core, <mroot> is valid if and only if
it has exactly two in-flow children (which isValid()) handles while <msqrt>
are always valid.
This is tested by Web Platform Test (empty-msqrt.html) but unfortuantely
due to still some rendering differences, we cannot unskip it. Although,
rather than being empty, it now renders. It fails with 0.02% difference.
WPT Test: mathml/presentation-markup/radicals/empty-msqrt.html
* Source/WebCore/rendering/mathml/RenderMathMLRoot.cpp:
(WebCore::RenderMathMLRoot::paint):
Canonical link: https://commits.webkit.org/303134@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications