Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 50984dcaa2fdad2d3f8277b63cc473ca18aeee5c
https://github.com/WebKit/WebKit/commit/50984dcaa2fdad2d3f8277b63cc473ca18aeee5c
Author: Ahmad Saleem <[email protected]>
Date: 2026-06-03 (Wed, 03 Jun 2026)
Changed paths:
M
LayoutTests/imported/w3c/web-platform-tests/svg/animations/animateMotion-from-to-rotate-auto-expected.txt
A
LayoutTests/imported/w3c/web-platform-tests/svg/animations/animateMotion-from-to-rotate-auto-horizontal-expected.txt
A
LayoutTests/imported/w3c/web-platform-tests/svg/animations/animateMotion-from-to-rotate-auto-horizontal.html
A
LayoutTests/imported/w3c/web-platform-tests/svg/animations/animateMotion-from-to-rotate-auto-no-motion-expected.txt
A
LayoutTests/imported/w3c/web-platform-tests/svg/animations/animateMotion-from-to-rotate-auto-no-motion.html
M Source/WebCore/svg/SVGAnimateMotionElement.cpp
M Source/WebCore/svg/SVGAnimateMotionElement.h
Log Message:
-----------
<animateMotion> non-path animations should apply the 'rotate' attribute
https://bugs.webkit.org/show_bug.cgi?id=257907
rdar://problem/110915794
Reviewed by Nikolas Zimmermann.
Partial Merge:
https://chromium.googlesource.com/chromium/src/+/7f43c0d43ff1b00697461a588118d69e8d86238a
<animateMotion> animations specified use the 'path' attribute (or an
<mpath> etc) are not special in any way with respect to the 'rotate'
attribute and its effects.
Refactor SVGAnimateMotionElement::calculateAnimatedValue() so that said
attribute is also applied in the non-path animation case as well.
In addition, this made `RotateMode` as enum class and used it throughout
code and removed `default` handling of RotateMode, since all cases are
handled properly.
* Source/WebCore/svg/SVGAnimateMotionElement.cpp:
(WebCore::SVGAnimateMotionElement::rotateMode const):
(WebCore::SVGAnimateMotionElement::calculateAnimatedValue):
* Source/WebCore/svg/SVGAnimateMotionElement.h:
*
LayoutTests/imported/w3c/web-platform-tests/svg/animations/animateMotion-from-to-rotate-auto-expected.txt:
Progression
Also added tests covering the degenerate <animateMotion> cases where the
from/to points share a coordinate (fromPoint.y == toPoint.y) or are
identical (zero delta), guarding against a NaN angle out of atan2.
*
LayoutTests/imported/w3c/web-platform-tests/svg/animations/animateMotion-from-to-rotate-auto-horizontal-expected.txt:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/svg/animations/animateMotion-from-to-rotate-auto-horizontal.html:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/svg/animations/animateMotion-from-to-rotate-auto-no-motion-expected.txt:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/svg/animations/animateMotion-from-to-rotate-auto-no-motion.html:
Added.
Canonical link: https://commits.webkit.org/314508@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications