From b8b48b533bcfc10a5a316ec81487626a084cdfdd Mon Sep 17 00:00:00 2001 From: cacaodev Date: Thu, 12 Apr 2018 11:25:43 +0200 Subject: [PATCH] Previously, animating frame origin was not working on recent versions of Gecko (Firefox). The format for the matrix value of the transform property was matrix(a,b,c,d,tx,ty) and tx and ty had the "px" suffix. According to this page, tx and ty were accept (#2677) ed (in my understanding not required) to have this suffix before FireFox 16. All parameters are now numbers without suffix and this code will work for all FireFox versions supporting css animations. --- AppKit/CoreAnimation/CPViewAnimator.j | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AppKit/CoreAnimation/CPViewAnimator.j b/AppKit/CoreAnimation/CPViewAnimator.j index f448061ae..0e2db6c59 100644 --- a/AppKit/CoreAnimation/CPViewAnimator.j +++ b/AppKit/CoreAnimation/CPViewAnimator.j @@ -214,7 +214,7 @@ var transformSizeToHeight = function(start, current) var CSSStringFromCGAffineTransform = function(anAffineTransform) { - return "matrix(" + anAffineTransform.a + ", " + anAffineTransform.b + ", " + anAffineTransform.c + ", " + anAffineTransform.d + ", " + anAffineTransform.tx + (CPBrowserIsEngine(CPGeckoBrowserEngine) ? "px, " : ", ") + anAffineTransform.ty + (CPBrowserIsEngine(CPGeckoBrowserEngine) ? "px)" : ")"); + return [CPString stringWithFormat:@"matrix(%d,%d,%d,%d,%d,%d)", anAffineTransform.a, anAffineTransform.b, anAffineTransform.c, anAffineTransform.d, anAffineTransform.tx, anAffineTransform.ty]; }; var frameOriginToCSSTransformMatrix = function(start, current)