Bug 184580 - [Web Animations] Fix animations/stop-animation-on-suspend.html
Summary: [Web Animations] Fix animations/stop-animation-on-suspend.html
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Animations (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Antoine Quint
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-04-13 00:07 PDT by Antoine Quint
Modified: 2020-02-10 09:11 PST (History)
6 users (show)

See Also:


Attachments
Patch (3.85 KB, patch)
2020-02-10 02:41 PST, Antoine Quint
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Antoine Quint 2018-04-13 00:07:23 PDT
The test at animations/stop-animation-on-suspend.html fails reliably on iOS with the new animation engine.
Comment 1 Radar WebKit Bug Importer 2018-04-13 00:07:40 PDT
<rdar://problem/39406014>
Comment 2 Antoine Quint 2018-04-13 09:08:23 PDT
This isn't specific to iOS actually, it also fails on Mac but it was already marked as a flaky Failure for that platform so the error was not reported.
Comment 3 Antoine Quint 2020-02-09 10:19:52 PST
This test has always been problematic, see https://bugs.webkit.org/show_bug.cgi?id=49182.
Comment 4 Antoine Quint 2020-02-10 02:38:36 PST
I believe the expectations of this test to be incorrect. The test animates a transform from 0 to 400px across 400ms with a linear timing function. The test suspends animations from 100ms to 300ms with timers, and polls animations at 200ms and 400ms. At 200ms, it expects a value of 100px, which is correct since the animation is suspended and so the value at 100ms (when it was suspended) is expected.

However, the test expected the value at 400ms to be 200px, which leads me to think this test assumes that animations, when resumed, account for the time suspended and subtracts it from the page time. This is incorrect: when animations resume, they resume at the current time, no matter how long they were suspended. So the expected value should be 400px.

I will file a patch with this change in expectation.
Comment 5 Antoine Quint 2020-02-10 02:41:33 PST
Created attachment 390238 [details]
Patch
Comment 6 WebKit Commit Bot 2020-02-10 09:11:18 PST
Comment on attachment 390238 [details]
Patch

Clearing flags on attachment: 390238

Committed r256177: <https://trac.webkit.org/changeset/256177>
Comment 7 WebKit Commit Bot 2020-02-10 09:11:19 PST
All reviewed patches have been landed.  Closing bug.