| Index: LayoutTests/animations/interpolation/scale-interpolation.html
|
| diff --git a/LayoutTests/animations/interpolation/scale-interpolation.html b/LayoutTests/animations/interpolation/scale-interpolation.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..5ab63c55f12cab38454c7a51de390f88d20347fd
|
| --- /dev/null
|
| +++ b/LayoutTests/animations/interpolation/scale-interpolation.html
|
| @@ -0,0 +1,139 @@
|
| +<!DOCTYPE html>
|
| +<meta charset="UTF-8">
|
| +<style>
|
| +.parent {
|
| + scale: 0.5 1 2
|
| +}
|
| +.target {
|
| + width: 100px;
|
| + height: 100px;
|
| + background-color: black;
|
| +}
|
| +.expected {
|
| + background-color: green;
|
| +}
|
| +</style>
|
| +<template id="target-template">
|
| +<div class="parent">
|
| + <div class="target"></div>
|
| +</div>
|
| +</template>
|
| +<script src="resources/interpolation-test.js"></script>
|
| +<script>
|
| +assertInterpolation({
|
| + property: 'scale',
|
| + from: '-10',
|
| + to: '10',
|
| +}, [
|
| + {at: -1, is: '-30'},
|
| + {at: 0, is: '-10'},
|
| + {at: 0.25, is: '-5'},
|
| + {at: 0.75, is: '5'},
|
| + {at: 1, is: '10'},
|
| + {at: 2, is: '30'},
|
| +]);
|
| +
|
| +assertInterpolation({
|
| + property: 'scale',
|
| + from: '-10 5',
|
| + to: '10 -5',
|
| +}, [
|
| + {at: -1, is: '-30 15'},
|
| + {at: 0, is: '-10 5'},
|
| + {at: 0.25, is: '-5 2.5'},
|
| + {at: 0.75, is: '5 -2.5'},
|
| + {at: 1, is: '10 -5'},
|
| + {at: 2, is: '30 -15'},
|
| +]);
|
| +
|
| +assertInterpolation({
|
| + property: 'scale',
|
| + from: '-10 5 1',
|
| + to: '10 -5 0',
|
| +}, [
|
| + {at: -1, is: '-30 15 2'},
|
| + {at: 0, is: '-10 5 1'},
|
| + {at: 0.25, is: '-5 2.5 0.75'},
|
| + {at: 0.75, is: '5 -2.5 0.25'},
|
| + {at: 1, is: '10 -5 0'},
|
| + {at: 2, is: '30 -15 -1'},
|
| +]);
|
| +
|
| +assertInterpolation({
|
| + property: 'scale',
|
| + from: 'inherit',
|
| + to: '2 0.5 1',
|
| +}, [
|
| + {at: -1, is: '-1 1.5 3'},
|
| + {at: 0, is: '0.5 1 2'},
|
| + {at: 0.25, is: '0.875 0.875 1.75'},
|
| + {at: 0.75, is: '1.625 0.625 1.25'},
|
| + {at: 1, is: '2 0.5 1'},
|
| + {at: 2, is: '3.5 0 0'},
|
| +]);
|
| +
|
| +assertInterpolation({
|
| + property: 'scale',
|
| + from: '2 0.5 1',
|
| + to: 'inherit',
|
| +}, [
|
| + {at: -1, is: '3.5 0 0'},
|
| + {at: 0, is: '2 0.5 1'},
|
| + {at: 0.25, is: '1.625 0.625 1.25'},
|
| + {at: 0.75, is: '0.875 0.875 1.75'},
|
| + {at: 1, is: '0.5 1 2'},
|
| + {at: 2, is: '-1 1.5 3'},
|
| +]);
|
| +
|
| +assertInterpolation({
|
| + property: 'scale',
|
| + from: 'initial',
|
| + to: '2 0.5 1',
|
| +}, [
|
| + {at: -1, is: '0 1.5'},
|
| + {at: 0, is: '1'},
|
| + {at: 0.25, is: '1.25 0.875'},
|
| + {at: 0.75, is: '1.75 0.625'},
|
| + {at: 1, is: '2 0.5'},
|
| + {at: 2, is: '3 0'},
|
| +]);
|
| +
|
| +assertInterpolation({
|
| + property: 'scale',
|
| + from: '2 0.5 1',
|
| + to: 'initial',
|
| +}, [
|
| + {at: -1, is: '3 0'},
|
| + {at: 0, is: '2 0.5 1'},
|
| + {at: 0.25, is: '1.75 0.6251'},
|
| + {at: 0.75, is: '1.25 0.875'},
|
| + {at: 1, is: '1 1 1'},
|
| + {at: 2, is: '0 1.5'},
|
| +]);
|
| +
|
| +assertInterpolation({
|
| + property: 'scale',
|
| + from: 'initial',
|
| + to: 'inherit',
|
| +}, [
|
| + {at: -1, is: '1.5 1 0'},
|
| + {at: 0, is: '1'},
|
| + {at: 0.25, is: '0.875 1 1.25'},
|
| + {at: 0.75, is: '0.625 1 1.75'},
|
| + {at: 1, is: '0.5 1 2'},
|
| + {at: 2, is: '0 1 3'},
|
| +]);
|
| +
|
| +assertInterpolation({
|
| + property: 'scale',
|
| + from: 'inherit',
|
| + to: 'initial',
|
| +}, [
|
| + {at: -1, is: '0 1 3'},
|
| + {at: 0, is: '0.5 1 2'},
|
| + {at: 0.25, is: '0.625 1 1.75'},
|
| + {at: 0.75, is: '0.875 1 1.25'},
|
| + {at: 1, is: '1 1 1'},
|
| + {at: 2, is: '1.5 1 0'},
|
| +]);
|
| +</script>
|
|
|