[webkit-changes] [WebKit/WebKit] be9c3f: [scroll-animations] WPT tests `scroll-timelines/se...
Antoine Quint
noreply at github.com
Fri Oct 18 04:27:54 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: be9c3ff059a105eba308b1127545802fea2f8280
https://github.com/WebKit/WebKit/commit/be9c3ff059a105eba308b1127545802fea2f8280
Author: Antoine Quint <graouts at webkit.org>
Date: 2024-10-18 (Fri, 18 Oct 2024)
Changed paths:
M LayoutTests/TestExpectations
M LayoutTests/imported/w3c/web-platform-tests/scroll-animations/scroll-timelines/setting-current-time-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/scroll-animations/scroll-timelines/setting-current-time.html
M LayoutTests/imported/w3c/web-platform-tests/scroll-animations/scroll-timelines/setting-start-time-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/scroll-animations/scroll-timelines/setting-start-time.html
M Source/WebCore/animation/CSSNumberishTime.cpp
M Source/WebCore/animation/WebAnimation.cpp
M Source/WebCore/animation/WebAnimation.h
Log Message:
-----------
[scroll-animations] WPT tests `scroll-timelines/setting-start-time.html` and `scroll-timelines/setting-current-time.html` under `scroll-animations` are crashes
https://bugs.webkit.org/show_bug.cgi?id=281731
rdar://138170672
Reviewed by Tim Nguyen.
We would incorrectly mark absolute time values provided through the bindings
for `Animation.currentTime` and `Animation.startTime` as valid because we failed
to validate them per spec accounting for the associated timeline type (progress-based
vs. monotonic). This meant we'd let some absolute time values slip by and later
compare them to percentage time values which would trigger some debug assertions
and a crash.
We now correctly report any `CSSNumberishTime` that was successfully created from
a `CSSNumberish` as valid through `CSSNumberishTime::isValid()` and check whether
the provided type matches the current timeline in `WebAnimation::isTimeValid()`.
We also update the tests in question to expect a JS `TypeError` rather than a DOM
`NotSupported` since that's what the Web Animations spec discusses in
https://drafts.csswg.org/web-animations-2/#validating-a-css-numberish-time.
* LayoutTests/TestExpectations:
* LayoutTests/imported/w3c/web-platform-tests/scroll-animations/scroll-timelines/setting-current-time-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/scroll-animations/scroll-timelines/setting-current-time.html:
* LayoutTests/imported/w3c/web-platform-tests/scroll-animations/scroll-timelines/setting-start-time-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/scroll-animations/scroll-timelines/setting-start-time.html:
* Source/WebCore/animation/CSSNumberishTime.cpp:
(WebCore::CSSNumberishTime::isValid const):
* Source/WebCore/animation/WebAnimation.cpp:
(WebCore::WebAnimation::isTimeValid const):
(WebCore::WebAnimation::setBindingsStartTime):
(WebCore::WebAnimation::setBindingsCurrentTime):
* Source/WebCore/animation/WebAnimation.h:
Canonical link: https://commits.webkit.org/285390@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list