diff options
author | ed@opera.com <ed@opera.com> | 2015-03-12 08:48:53 +0000 |
---|---|---|
committer | ed@opera.com <ed@opera.com> | 2015-03-12 08:48:53 +0000 |
commit | b660262d2e9514dee263a00106f8c3944fd8c06b (patch) | |
tree | a4fd142164223a4375dad53af8ec2560f22b4269 /third_party/WebKit/LayoutTests/animations/interpolation/svg-rx-interpolation.html | |
parent | e4e0d0ca18e6bc556e0a71d4ad3480762f94d341 (diff) | |
download | chromium_src-b660262d2e9514dee263a00106f8c3944fd8c06b.zip chromium_src-b660262d2e9514dee263a00106f8c3944fd8c06b.tar.gz chromium_src-b660262d2e9514dee263a00106f8c3944fd8c06b.tar.bz2 |
Handle more <length> properties in css/web animation.
This change adds the following properties to the LengthStyleInterpolation codepath:
'cx', 'cy', 'r', 'rx', 'ry' and 'stroke-dashoffset'
BUG=400725
Review URL: https://codereview.chromium.org/991533003
git-svn-id: svn://svn.chromium.org/blink/trunk@191762 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Diffstat (limited to 'third_party/WebKit/LayoutTests/animations/interpolation/svg-rx-interpolation.html')
-rw-r--r-- | third_party/WebKit/LayoutTests/animations/interpolation/svg-rx-interpolation.html | 94 |
1 files changed, 94 insertions, 0 deletions
diff --git a/third_party/WebKit/LayoutTests/animations/interpolation/svg-rx-interpolation.html b/third_party/WebKit/LayoutTests/animations/interpolation/svg-rx-interpolation.html new file mode 100644 index 0000000..1f86b091 --- /dev/null +++ b/third_party/WebKit/LayoutTests/animations/interpolation/svg-rx-interpolation.html @@ -0,0 +1,94 @@ +<!DOCTYPE html> +<meta charset="UTF-8"> +<style> +.target { + stroke: black; + fill: white; + rx: 5px; +} +.replica { + stroke: green; +} +</style> +<body> +<template id="target-template"> + <svg width="70" height="70"> + <rect x="10" y="10" width="50" height="50" rx="10" class="target"/> + </svg> +</template> +<script src="resources/interpolation-test.js"></script> +<script> +assertInterpolation({ + property: 'rx', + from: '0px', + to: '20px' +}, [ + {at: -0.3, is: '0px'}, // SVG rx can't be negative. + {at: 0, is: '0px'}, + {at: 0.3, is: '6px'}, + {at: 0.6, is: '12px'}, + {at: 1, is: '20px'}, + {at: 1.5, is: '30px'}, +]); +assertInterpolation({ + property: 'rx', + from: '0px', + to: '10em' +}, [ + {at: -0.3, is: '0em'}, // SVG rx can't be negative. + {at: 0, is: '0em'}, + {at: 0.3, is: '3em'}, + {at: 0.6, is: '6em'}, + {at: 1, is: '10em'}, + {at: 1.5, is: '15em'}, +]); +assertInterpolation({ + property: 'rx', + from: '30px', + to: '10em' +}, [ + {at: -0.3, is: '0px'}, + {at: 0, is: '30px'}, + {at: 0.3, is: '69px'}, + {at: 0.6, is: '108px'}, + {at: 1, is: '10em'}, + {at: 1.5, is: '225px'}, +]); +assertInterpolation({ + property: 'rx', + from: '10em', + to: '0px' +}, [ + {at: -0.3, is: '13em'}, + {at: 0, is: '10em'}, + {at: 0.3, is: '7em'}, + {at: 0.6, is: '4em'}, + {at: 1, is: '0em'}, + {at: 1.5, is: '0em'}, // SVG rx can't be negative. +]); +assertInterpolation({ + property: 'rx', + from: '10em', + to: '30px' +}, [ + {at: -0.3, is: '199px'}, + {at: 0, is: '10em'}, + {at: 0.3, is: '121px'}, + {at: 0.6, is: '82px'}, + {at: 1, is: '30px'}, + {at: 1.5, is: '0px'}, +]); +assertInterpolation({ + property: 'rx', + from: '0', + to: '20' +}, [ + {at: -0.3, is: '0'}, + {at: 0, is: '0'}, + {at: 0.3, is: '6'}, + {at: 0.6, is: '12'}, + {at: 1, is: '20'}, + {at: 1.5, is: '30'}, +]); +</script> +</body> |