Bug 1736893 [wpt PR 31332] - Set pending update when there are previous interpolation...
commit3798c253cdcfce79bec5d49651f2fda5cae00c22
authorAnders Hartvoll Ruud <andruud@chromium.org>
Thu, 28 Oct 2021 10:21:40 +0000 (28 10:21 +0000)
committermoz-wptsync-bot <wptsync@mozilla.com>
Fri, 29 Oct 2021 10:24:16 +0000 (29 10:24 +0000)
tree894f5ab8016f1d7ba5b8f5dd1ffa4de7302cec15
parent723ef2dc32665b5fe06f074130f6dd47f1166058
Bug 1736893 [wpt PR 31332] - Set pending update when there are previous interpolations for animations, a=testonly

Automatic update from web-platform-tests
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/c/chromium/src/+/3234546
Reviewed-by: Kevin Ellis <kevers@chromium.org>
Commit-Queue: Anders Hartvoll Ruud <andruud@chromium.org>
Cr-Commit-Position: refs/heads/main@{#933637}

--

wpt-commits: b5054acd0933c8d6b9959f6f7d14e0b77ed4ee54
wpt-pr: 31332
testing/web-platform/tests/css/css-transitions/transition-after-animation-001.html [new file with mode: 0644]