| Index: LayoutTests/animations/interpolation/svg-stop-color-interpolation.html
|
| diff --git a/LayoutTests/animations/interpolation/svg-stop-color-interpolation.html b/LayoutTests/animations/interpolation/svg-stop-color-interpolation.html
|
| index 555f6c3266ed45cb6e80ea098b73acd64b3831e8..611f0fec999530a57b41b3dc9f129e17ee2a8037 100644
|
| --- a/LayoutTests/animations/interpolation/svg-stop-color-interpolation.html
|
| +++ b/LayoutTests/animations/interpolation/svg-stop-color-interpolation.html
|
| @@ -1,34 +1,90 @@
|
| <!DOCTYPE html>
|
| <meta charset="UTF-8">
|
| <style>
|
| -svg {
|
| - width: 100px;
|
| - height: 100px;
|
| +.container {
|
| + display: inline-block;
|
| }
|
| -svg rect {
|
| - fill: url(#test);
|
| - stroke: black;
|
| - stroke-width: 10px;
|
| +.parent {
|
| + stop-color: blue;
|
| +}
|
| +.target {
|
| + stop-color: orange;
|
| }
|
| -svg:nth-child(2n) rect {
|
| - stroke: green;
|
| +rect {
|
| + fill: url(#test);
|
| }
|
| </style><body>
|
| <template id="target-template">
|
| - <svg>
|
| + <svg width="10" height="100">
|
| <defs>
|
| - <linearGradient id="test">
|
| - <stop offset="5%" stop-color="white"></stop>
|
| - <stop offset="95%" class="target"></stop>
|
| + <linearGradient gradientTransform="rotate(90)" id="test">
|
| + <stop offset="0%" stop-color="black"></stop>
|
| + <stop offset="50%" class="target"></stop>
|
| </linearGradient>
|
| </defs>
|
| - <rect width="100" height="100"></rect>
|
| + <rect width="10" height="100"></rect>
|
| </svg>
|
| </template>
|
| <script src="resources/interpolation-test.js"></script>
|
| <script>
|
| assertInterpolation({
|
| property: 'stop-color',
|
| + from: '',
|
| + to: 'green',
|
| +}, [
|
| + {at: -5, is: 'rgb(255, 255, 0)'},
|
| + {at: -0.4, is: 'rgb(255, 180, 0)'},
|
| + {at: 0, is: 'rgb(255, 165, 0)'},
|
| + {at: 0.2, is: 'rgb(204, 158, 0)'},
|
| + {at: 0.6, is: 'rgb(102, 143, 0)'},
|
| + {at: 1, is: 'rgb(0, 128, 0)'},
|
| + {at: 1.5, is: 'rgb(0, 110, 0)'},
|
| +]);
|
| +
|
| +assertInterpolation({
|
| + property: 'stop-color',
|
| + from: 'initial',
|
| + to: 'green',
|
| +}, [
|
| + {at: -5, is: 'rgb(0, 0, 0)'},
|
| + {at: -0.4, is: 'rgb(0, 0, 0)'},
|
| + {at: 0, is: 'rgb(0, 0, 0)'},
|
| + {at: 0.2, is: 'rgb(0, 26, 0)'},
|
| + {at: 0.6, is: 'rgb(0, 77, 0)'},
|
| + {at: 1, is: 'rgb(0, 128, 0)'},
|
| + {at: 1.5, is: 'rgb(0, 192, 0)'},
|
| +]);
|
| +
|
| +assertInterpolation({
|
| + property: 'stop-color',
|
| + from: 'inherit',
|
| + to: 'green',
|
| +}, [
|
| + {at: -5, is: 'rgb(0, 0, 255)'},
|
| + {at: -0.4, is: 'rgb(0, 0, 255)'},
|
| + {at: 0, is: 'rgb(0, 0, 255)'},
|
| + {at: 0.2, is: 'rgb(0, 26, 204)'},
|
| + {at: 0.6, is: 'rgb(0, 77, 102)'},
|
| + {at: 1, is: 'rgb(0, 128, 0)'},
|
| + {at: 1.5, is: 'rgb(0, 192, 0)'},
|
| +]);
|
| +
|
| +assertInterpolation({
|
| + property: 'stop-color',
|
| + from: 'unset',
|
| + to: 'green',
|
| +}, [
|
| + {at: -5, is: 'rgb(0, 0, 0)'},
|
| + {at: -0.4, is: 'rgb(0, 0, 0)'},
|
| + {at: 0, is: 'rgb(0, 0, 0)'},
|
| + {at: 0.2, is: 'rgb(0, 26, 0)'},
|
| + {at: 0.6, is: 'rgb(0, 77, 0)'},
|
| + {at: 1, is: 'rgb(0, 128, 0)'},
|
| + {at: 1.5, is: 'rgb(0, 192, 0)'},
|
| +]);
|
| +
|
| +assertInterpolation({
|
| + property: 'stop-color',
|
| from: 'orange',
|
| to: 'blue'
|
| }, [
|
|
|