From 3fc6b5239b09da4203f7069ceb3dba1d9ca5035b Mon Sep 17 00:00:00 2001 From: Eric Willigers Date: Thu, 12 Jun 2014 18:07:10 +1000 Subject: [PATCH] SVG transforms now complete when fill=none The transforms previously remained in effect, as if the page author had requested fill=forwards https://github.com/web-animations/web-animations-js/issues/605 --- test/testcases.js | 1 + .../auto-test-svg-transform-checks.js | 23 +++++++++++ test/testcases/auto-test-svg-transform.html | 39 +++++++++++++++++++ web-animations.js | 1 + 4 files changed, 64 insertions(+) create mode 100644 test/testcases/auto-test-svg-transform-checks.js create mode 100644 test/testcases/auto-test-svg-transform.html diff --git a/test/testcases.js b/test/testcases.js index b49e0999..84a4c65d 100644 --- a/test/testcases.js +++ b/test/testcases.js @@ -42,6 +42,7 @@ var tests = [ 'auto-test-svg-anim.html', 'auto-test-svg-circle.html', 'auto-test-svg-color.html', + 'auto-test-svg-transform.html', 'auto-test-text-shadow.html', 'auto-test-timing-functions.html', 'auto-test-to-animation.html', diff --git a/test/testcases/auto-test-svg-transform-checks.js b/test/testcases/auto-test-svg-transform-checks.js new file mode 100644 index 00000000..adf31118 --- /dev/null +++ b/test/testcases/auto-test-svg-transform-checks.js @@ -0,0 +1,23 @@ +timing_test(function() { + at(0 * 1000, function() { + assert_styles(".anim",{'transform':'scale(1)'}); + }); + at(0.2 * 1000, function() { + assert_styles(".anim",{'transform':'scale(2)'}); + }); + at(0.4 * 1000, function() { + assert_styles(".anim",{'transform':'scale(3)'}); + }); + at(0.6000000000000001 * 1000, function() { + assert_styles(".anim",{'transform':'scale(4)'}); + }); + at(0.8 * 1000, function() { + assert_styles(".anim",{'transform':'scale(5)'}); + }); + at(1 * 1000, function() { + assert_styles(".anim",{'transform':'null'}); + }); + at(1.2 * 1000, function() { + assert_styles(".anim",{'transform':'null'}); + }); +}, "Auto generated tests"); diff --git a/test/testcases/auto-test-svg-transform.html b/test/testcases/auto-test-svg-transform.html new file mode 100644 index 00000000..f4729a5a --- /dev/null +++ b/test/testcases/auto-test-svg-transform.html @@ -0,0 +1,39 @@ + + + + + + + + + + + diff --git a/web-animations.js b/web-animations.js index 29b8eb39..5460e66a 100644 --- a/web-animations.js +++ b/web-animations.js @@ -4653,6 +4653,7 @@ var svgProperties = { 'r': 1, 'stopColor': 1, 'stroke': 1, + 'transform': 1, 'width': 1, 'x': 1, 'y': 1