Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 4ea9ddbe7da3fc0941bf8bf72c7a185f4961b721
https://github.com/WebKit/WebKit/commit/4ea9ddbe7da3fc0941bf8bf72c7a185f4961b721
Author: Ahmad Saleem <[email protected]>
Date: 2026-05-22 (Fri, 22 May 2026)
Changed paths:
M
LayoutTests/imported/w3c/web-platform-tests/css/motion/animation/offset-path-coord-box-interpolation-expected.txt
M Source/WebCore/rendering/PathOperation.cpp
Log Message:
-----------
[CSS Motion] offset-path: respect <coord-box> when blending shape() /
basic-shape paths
https://bugs.webkit.org/show_bug.cgi?id=315343
rdar://177685457
Reviewed by Tim Nguyen.
This patch aligns WebKit with Gecko / Firefox and Blink / Chromium.
Two defects in ShapePathOperation prevented offset-path animations from
honoring the <coord-box> component:
1. canBlend() did not compare reference boxes, so a transition from
`shape(...) border-box` to `shape(...) content-box` interpolated
continuously through the shape values instead of switching
discretely at 50% as required for non-interpolable components.
2. blend() constructed the result without a reference box, so even
animations between identical coord-boxes (e.g. view-box -> view-box)
produced an interpolated value with no coord-box, which serialized
incorrectly.
RayPathOperation already handles both cases correctly; this patch makes
ShapePathOperation symmetric with it: canBlend() now requires equal
reference boxes, and blend() threads m_referenceBox into the resulting
ShapePathOperation.
*
LayoutTests/imported/w3c/web-platform-tests/css/motion/animation/offset-path-coord-box-interpolation-expected.txt:
Progressions
* Source/WebCore/rendering/PathOperation.cpp:
(WebCore::ShapePathOperation::canBlend const):
(WebCore::ShapePathOperation::blend const):
Canonical link: https://commits.webkit.org/313737@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications