haikuwebkit/LayoutTests/webanimations/accelerated-animation-with-...

3 lines
47 B
HTML
Raw Permalink Normal View History

REGRESSION (r260360): easing curves are broken on JS-originated animations https://bugs.webkit.org/show_bug.cgi?id=213495 <rdar://problem/64649747> Reviewed by Darin Adler. Source/WebCore: Prior to Web Animations, there was no way for an animation to set an animation-wide timing function while also setting a per-keyframe timing function. As such GraphicsLayerCA would sometimes decide to set the timing function on keyframes or on the entire CAAnimation. However, we can no longer do this with Web Animations where an animation can set an animation-wide timing function and also keyframe-specific timing functions. In this patch we create CAKeyframeAnimation objects for any animation that has at least two keyframes if Web Animations are enabled, whereas the legacy code path requires at least three keyframes. We allow PlatformCAAnimation::setTimingFunction() to be called in the Web Animations code path only under GraphicsLayerCA::setupAnimation() while leaving the only call sites in place only for the legacy code path. Finally, we modify GraphicsLayerCA::timingFunctionForAnimationValue() to only ever return a keyframe- specific timing function or fall back to a default linear timing function in the Web Animations code path, leaving the function to behave the same way as it used to in the legacy code path. Test: webanimations/accelerated-animation-with-easing.html * platform/animation/TimingFunction.h: * platform/graphics/ca/GraphicsLayerCA.cpp: (WebCore::isKeyframe): (WebCore::GraphicsLayerCA::createAnimationFromKeyframes): (WebCore::GraphicsLayerCA::appendToUncommittedAnimations): (WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes): LayoutTests: Add a new test that checks that various ways of setting the easing timing function on a JS-originated animation always yield the same visible animation behavior. * webanimations/accelerated-animation-with-easing-expected.html: Added. * webanimations/accelerated-animation-with-easing.html: Added. Canonical link: https://commits.webkit.org/226392@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@263506 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-06-25 13:42:02 +00:00
<body style="background-color: green">
</body>