Closed Bug 1736893 Opened 3 years ago Closed 3 years ago

[wpt-sync] Sync PR 31332 - Set pending update when there are previous interpolations for animations

Categories

(Core :: CSS Transitions and Animations, task, P4)

task

Tracking

()

RESOLVED FIXED
95 Branch
Tracking Status
firefox95 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 31332 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/31332
Details from upstream follow.

Anders Hartvoll Ruud <andruud@chromium.org> wrote:

Set pending update when there are previous interpolations for animations

In order to prevent transitions from starting when there's interference
from animations [1], we persist the previous animation interpolations
on CSSAnimations, and check that set when considering starting a
transition [2]. I assume checking the current interpolations is
not enough, for the case where an animation stops applying the same
frame a transition would be triggered.

This approach is questionable to begin with, but this CL will not
attempt to address that. This CL is about making sure that there is
no behavior change when enabling the CSSDelayedAnimationUpdates flag
(except within container query containers).

With CSSDelayedAnimationUpdates disabled, we will call CSSAnimations::
MaybeApplyPendingUpdate regardless of whether or not the update
we're applying is empty [3]. This will cause the previous-animation-
interpolations set to be cleared [4].

With CSSDelayedAnimationUpdates enabled, MaybeApplyPendingUpdate
will only be called if the update is non-empty, so the aforementioned
set is not cleared like it should be.

We do not want to always set a pending update, since there's some
overhead associated with this. However, we can address the issue by
setting a pending update whenever the previous-animation-
interpolations may need to be cleared.

[1] crrev.com/9e413848fb479438e79ad6a45ddc8704da07e7db
[2] CSSAnimations::CanCalculateTransitionUpdateForProperty
[3] Element::StyleForLayoutObject
[4] The start of CSSAnimations::MaybeApplyPendingUpdate

Bug: 1261155
Change-Id: I49db2c012fad7456276f077e98336dfc86935a6b

Reviewed-on: https://chromium-review.googlesource.com/3234546
WPT-Export-Revision: 63282308e06dffbbdaf3c3a1051e4b4066c53d25

Component: web-platform-tests → CSS Transitions and Animations
Product: Testing → Core

CI Results

Ran 11 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 1 tests and 1 subtests

Status Summary

Firefox

OK : 1
PASS: 1

Chrome

OK : 1
PASS: 1

Safari

OK : 1
PASS: 1

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/4812a78425a9
[wpt PR 31332] - Set pending update when there are previous interpolations for animations, a=testonly
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 95 Branch
You need to log in before you can comment on or make changes to this bug.