[Webkit-unassigned] [Bug 236397] [web-animations] [svg] transform animation on SVG element jumps as it ends

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Feb 10 12:20:42 PST 2022


https://bugs.webkit.org/show_bug.cgi?id=236397

--- Comment #6 from Antoine Quint <graouts at webkit.org> ---
This simple diff fixes the bug:

diff --git a/Source/WebCore/animation/CSSPropertyAnimation.cpp b/Source/WebCore/animation/CSSPropertyAnimation.cpp
index 217e768c131d..f7338e6ccc40 100644
--- a/Source/WebCore/animation/CSSPropertyAnimation.cpp
+++ b/Source/WebCore/animation/CSSPropertyAnimation.cpp
@@ -171,6 +171,9 @@ static inline TransformOperations blendFunc(const TransformOperations& from, con
         return resultOperations;
     }

+    if (from == to)
+        return from;
+
     if (context.client->transformFunctionListsMatch())
         return to.blendByMatchingOperations(from, context);
     return to.blendByUsingMatrixInterpolation(from, context, is<RenderBox>(context.client->renderer()) ? downcast<RenderBox>(*context.client->renderer()).borderBoxRect().size() : LayoutSize());

But I'm not sure if this is the best fix. On the one hand, this is probably a good thing to do in general, but it also feels like this might be hiding an issue further down in the blending code where we would also yield an incorrect result with non-equal matrices.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20220210/a62b1e4c/attachment-0001.htm>


More information about the webkit-unassigned mailing list