RESOLVED FIXED 207044
[Web Animations] [WK1] REGRESSION: opacity doesn't animate
https://bugs.webkit.org/show_bug.cgi?id=207044
Summary [Web Animations] [WK1] REGRESSION: opacity doesn't animate
Antoine Quint
Reported 2020-01-31 07:19:08 PST
We fail to animate opacity in WK1 because we make the assumption that just because an animation targets only accelerated properties it will be accelerated and won't need to be updated as it runs in WebAnimation::timeToNextTick(). This is incorrect, an animation may fail to start or may fail to get a composited layer, the latter being the case on WK1 because usesCompositing() is false in RenderLayerCompositor::requiresCompositingForAnimation().
Attachments
Patch (4.37 KB, patch)
2020-01-31 08:38 PST, Antoine Quint
simon.fraser: review+
Radar WebKit Bug Importer
Comment 1 2020-01-31 07:19:19 PST
Antoine Quint
Comment 2 2020-01-31 08:38:15 PST
Simon Fraser (smfr)
Comment 3 2020-01-31 09:20:02 PST
Comment on attachment 389353 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=389353&action=review > Source/WebCore/animation/WebAnimation.cpp:1448 > + if (!isCompletelyAccelerated() || !isRunningAccelerated()) This would be clearers as hasAnyNonAcceleratedProperties or something, I think. > LayoutTests/webanimations/opacity-animation.html:15 > + setTimeout(() => testRunner.notifyDone(), 100); 100ms is a really long test. Would setting the current time and pausing test the same way? Why didn't requestAnimationFrame work?
Antoine Quint
Comment 4 2020-01-31 09:54:23 PST
(In reply to Simon Fraser (smfr) from comment #3) > Comment on attachment 389353 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=389353&action=review > > > Source/WebCore/animation/WebAnimation.cpp:1448 > > + if (!isCompletelyAccelerated() || !isRunningAccelerated()) > > This would be clearers as hasAnyNonAcceleratedProperties or something, I > think. I'll switch the code around to have a condition that starts with `if (isCompletelyAccelerated() && isRunningAccelerated())` instead. This covers the case of animations that don't need to be updated while running. > > LayoutTests/webanimations/opacity-animation.html:15 > > + setTimeout(() => testRunner.notifyDone(), 100); > > 100ms is a really long test. Would setting the current time and pausing test > the same way? Alas, no, because at that point it would no longer be running an accelerated animation, which is precisely what we're trying to test. > Why didn't requestAnimationFrame work? Alas, I'm not sure. I'll try to improve this in bug 207054.
Antoine Quint
Comment 5 2020-01-31 09:58:29 PST
Note You need to log in before you can comment on or make changes to this bug.