Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 424d7be45d8f9e6e9330b74cc0e174e57cde840a
https://github.com/WebKit/WebKit/commit/424d7be45d8f9e6e9330b74cc0e174e57cde840a
Author: Ahmad Saleem <[email protected]>
Date: 2025-11-24 (Mon, 24 Nov 2025)
Changed paths:
M LayoutTests/TestExpectations
M
LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/fractions/frac-linethickness-002-expected.txt
A
LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/mpadded/mpadded-001-expected.txt
A
LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/mpadded/mpadded-002-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/mpadded/mpadded-003-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/scripts/underover-parameters-3-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/spaces/space-1-expected.txt
A LayoutTests/mathml/non-core/frac-numalign-denomalign-002-expected.txt
A LayoutTests/mathml/non-core/frac-numalign-denomalign-002.html
A LayoutTests/mathml/non-core/frac-numalign-denomalign-003-expected.txt
A LayoutTests/mathml/non-core/frac-numalign-denomalign-003.html
R
LayoutTests/platform/glib/imported/w3c/web-platform-tests/mathml/presentation-markup/mpadded/mpadded-001-expected.txt
R
LayoutTests/platform/glib/imported/w3c/web-platform-tests/mathml/presentation-markup/mpadded/mpadded-002-expected.txt
R
LayoutTests/platform/glib/imported/w3c/web-platform-tests/mathml/presentation-markup/spaces/space-1-expected.txt
R
LayoutTests/platform/ios/imported/w3c/web-platform-tests/mathml/presentation-markup/mpadded/mpadded-001-expected.txt
R
LayoutTests/platform/ios/imported/w3c/web-platform-tests/mathml/presentation-markup/mpadded/mpadded-002-expected.txt
R
LayoutTests/platform/ios/imported/w3c/web-platform-tests/mathml/presentation-markup/spaces/space-1-expected.txt
R
LayoutTests/platform/mac/imported/w3c/web-platform-tests/mathml/presentation-markup/mpadded/mpadded-001-expected.txt
R
LayoutTests/platform/mac/imported/w3c/web-platform-tests/mathml/presentation-markup/mpadded/mpadded-002-expected.txt
R
LayoutTests/platform/mac/imported/w3c/web-platform-tests/mathml/presentation-markup/spaces/space-1-expected.txt
M Source/WebCore/mathml/MathMLFractionElement.cpp
M Source/WebCore/mathml/MathMLPaddedElement.cpp
M Source/WebCore/mathml/MathMLSpaceElement.cpp
M Source/WebCore/mathml/MathMLUnderOverElement.cpp
Log Message:
-----------
[MathML] Ensure padded, fraction, underover and space elements update layout
on attribute changes
https://bugs.webkit.org/show_bug.cgi?id=302575
rdar://164797996
Reviewed by Frédéric Wang.
MathML <mpadded>, <mfrac>, <munderover>, <mover> and <mspace> failed to
update width, height, depth, lspace, and voffset etc. when attributes
changed. The renderer continued to use stale cached metrics, causing
incorrect layout and unexpected spacing in incremental updates and dynamic
DOM modifications.
This patch resets the corresponding optional values and triggers
setNeedsLayoutAndPreferredWidthsUpdate() whenever affected attributes
change. This restores consistent layout recalculation across all
MathMLPaddedElement, MathMLFractionElement, MathMLSpaceElement and
MathMLUnderOverElement mutations.
Tests: mathml/non-core/frac-numalign-denomalign-002.html
mathml/non-core/frac-numalign-denomalign-003.html
* Source/WebCore/mathml/MathMLFractionElement.cpp:
(WebCore::MathMLFractionElement::attributeChanged):
* Source/WebCore/mathml/MathMLPaddedElement.cpp:
(WebCore::MathMLPaddedElement::attributeChanged):
* Source/WebCore/mathml/MathMLSpaceElement.cpp:
(WebCore::MathMLSpaceElement::attributeChanged):
* Source/WebCore/mathml/MathMLUnderOverElement.cpp:
(WebCore::MathMLUnderOverElement::attributeChanged): Use `switch` here
* LayoutTests/TestExpectations:
*
LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/fractions/frac-linethickness-002-expected.txt:
*
LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/mpadded/mpadded-001-expected.txt:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/mpadded/mpadded-002-expected.txt:
Renamed from
LayoutTests/platform/ios/imported/w3c/web-platform-tests/mathml/presentation-markup/mpadded/mpadded-002-expected.txt.
*
LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/mpadded/mpadded-003-expected.txt:
*
LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/scripts/underover-parameters-3-expected.txt:
*
LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/spaces/space-1-expected.txt:
*
LayoutTests/platform/glib/imported/w3c/web-platform-tests/mathml/presentation-markup/mpadded/mpadded-001-expected.txt:
Removed.
*
LayoutTests/platform/glib/imported/w3c/web-platform-tests/mathml/presentation-markup/mpadded/mpadded-002-expected.txt:
Removed.
*
LayoutTests/platform/glib/imported/w3c/web-platform-tests/mathml/presentation-markup/spaces/space-1-expected.txt:
Removed.
*
LayoutTests/platform/ios/imported/w3c/web-platform-tests/mathml/presentation-markup/mpadded/mpadded-001-expected.txt:
Removed.
*
LayoutTests/platform/ios/imported/w3c/web-platform-tests/mathml/presentation-markup/spaces/space-1-expected.txt:
Removed.
*
LayoutTests/platform/mac/imported/w3c/web-platform-tests/mathml/presentation-markup/mpadded/mpadded-001-expected.txt:
Removed.
*
LayoutTests/platform/mac/imported/w3c/web-platform-tests/mathml/presentation-markup/mpadded/mpadded-002-expected.txt:
Removed.
*
LayoutTests/platform/mac/imported/w3c/web-platform-tests/mathml/presentation-markup/spaces/space-1-expected.txt:
Removed.
Canonical link: https://commits.webkit.org/303508@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications