Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 55c608d2b1b46d1ac0b40d093a8c6b5a69c16907
https://github.com/WebKit/WebKit/commit/55c608d2b1b46d1ac0b40d093a8c6b5a69c16907
Author: Sam Weinig <[email protected]>
Date: 2026-08-18 (Tue, 18 Aug 2026)
Changed paths:
A LayoutTests/fast/animation/css-animation-range-calc-crash-expected.txt
A LayoutTests/fast/animation/css-animation-range-calc-crash.html
M Source/WebCore/style/values/animations/StyleSingleAnimationRange.cpp
Log Message:
-----------
[scroll-animations] crash in `WebAnimation::bindingsRangeStart()`
https://bugs.webkit.org/show_bug.cgi?id=322002
Reviewed by Darin Adler.
Fixes crash that happens when a StyleSingleAnimationRange's offset is a
calc value and the Animation.rangeStart or Animation.rangeEnd getters are
called. The code was unconditionally accessing the result of tryPercentage()
which returns std::nullopt in the calc case. To fix this, we use the switchOn
form to ensure all alternatives are handled.
Test: fast/animation/css-animation-range-calc-crash.html
* LayoutTests/fast/animation/css-animation-range-calc-crash-expected.txt: Added.
* LayoutTests/fast/animation/css-animation-range-calc-crash.html: Added.
* Source/WebCore/style/values/animations/StyleSingleAnimationRange.cpp:
Canonical link: https://commits.webkit.org/319422@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications