Bug 290993
| Summary: | [web-animations] start time of animations created during a page rendering update should match that update's timeline time | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Antoine Quint <graouts> |
| Component: | Animations | Assignee: | Antoine Quint <graouts> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | graouts, rackler, webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| See Also: |
https://bugs.webkit.org/show_bug.cgi?id=291974 https://bugs.webkit.org/show_bug.cgi?id=292032 https://github.com/web-platform-tests/wpt/pull/53971 https://bugs.webkit.org/show_bug.cgi?id=299823 |
||
| Bug Depends on: | 290772, 290995 | ||
| Bug Blocks: | |||
Antoine Quint
Safari differs from Chrome and Firefox when setting the start time of animations created during a page rendering update.
In Safari, we mark any animation that is pending as ready when we run the "update animations and send events" step, which means that any animation pending at this point will share the same start time and will also have a current time of 0 when the ready promise is resolved.
In Chrome and Firefox, animations created during a page rendering update will have their start time set to the timeline time of that same update, even though their ready promise may be resolved at a later time, for instance during the next page rendering update. This means that the current time of animations will likely not be 0 when the ready promise is resolved.
This is particularly visible for CSS-originated animations which may be created during a page rendering update as styles are recalculated and layout is updated a few steps after animations are updated. As such, Safari typically is one rendering frame behind Chrome and Firefox when dealing with CSS Transitions and CSS Animations.
This behavior is not actually a spec violation since the start time and time where the ready promise is resolved is left as implementation-dependent.
However, this is proving to be a web compatibility issue since we found that captions may flicker on YouTube for instance, and this is due to the behavior described above. In fact, for CSS Transitions, we introduced some ad-hoc current time computation code in 226359@main and 226577@main to deal with some compatibility issues.
We should adopt the same behavior as Chrome and Firefox here.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Antoine Quint
rdar://138844796
Antoine Quint
Pull request: https://github.com/WebKit/WebKit/pull/43626
EWS
Committed 294049@main (483c60c629b8): <https://commits.webkit.org/294049@main>
Reviewed commits have been landed. Closing PR #43626 and removing active labels.
Antoine Quint
*** Bug 287833 has been marked as a duplicate of this bug. ***
Ahmad Saleem
Submitted web-platform-tests pull request: https://github.com/web-platform-tests/wpt/pull/53971