[webkit-changes] [WebKit/WebKit] d1bb2b: [view-transitions] https://simple-set-demos.glitch...

Antoine Quint noreply at github.com
Mon May 6 18:14:21 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: d1bb2bd1b7a474e08ef8fb7c17d209e96c781a6f
      https://github.com/WebKit/WebKit/commit/d1bb2bd1b7a474e08ef8fb7c17d209e96c781a6f
  Author: Antoine Quint <graouts at webkit.org>
  Date:   2024-05-06 (Mon, 06 May 2024)

  Changed paths:
    A LayoutTests/webanimations/accelerated-animation-removed-permanently-when-forward-filling-expected.txt
    A LayoutTests/webanimations/accelerated-animation-removed-permanently-when-forward-filling.html
    M Source/WebCore/animation/KeyframeEffect.cpp

  Log Message:
  -----------
  [view-transitions] https://simple-set-demos.glitch.me/dust-no-raf/ flickers more as animation is re-ran
https://bugs.webkit.org/show_bug.cgi?id=273649
rdar://127458540

Reviewed by Dean Jackson.

If an effect targeting an accelerated CSS property enters a phase [0] other than "active", for instance
when it's forward-filling, `KeyframeEffect::updateAcceleratedActions()` will enqueue a `Stop` accelerated
action for that animation and thus remove its matching accelerated animation on the next frame.

However, if an element is targeted by multiple animations for the same accelerated CSS property,
`KeyframeEffect::applyPendingAcceleratedActionsOrUpdateTimingProperties()` will process an
`UpdateProperties` accelerated action for all effects in the stack to ensure that they are indeed
running.

In the case of this demo, there are three forward-filling animations applied to the same element. A
bottom-most one targeting `transform`, then two animations targeting `opacity`. The first two animations
end early but the third animation runs longer and it is when that animation is the sole "active" animation
that we enter a state where the two mechanisms described above will intermittently remove the forward-filling
`opacity` animation and then re-start it in the next frame. This yields the visible flickering effect.

We now check that an animation is in the "active" phase before restarting it to ensure it is in the right
state when processing a keyframe effect stack.

[0] https://drafts.csswg.org/web-animations-1/#animation-effect-phases-and-states

* LayoutTests/webanimations/accelerated-animation-removed-permanently-when-forward-filling-expected.txt: Added.
* LayoutTests/webanimations/accelerated-animation-removed-permanently-when-forward-filling.html: Added.
* Source/WebCore/animation/KeyframeEffect.cpp:
(WebCore::KeyframeEffect::applyPendingAcceleratedActionsOrUpdateTimingProperties):

Canonical link: https://commits.webkit.org/278434@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