| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <meta charset="UTF-8"> | 2 <meta charset="UTF-8"> |
| 3 <style> | 3 <style> |
| 4 .container { | 4 .container { |
| 5 display: inline-block; | 5 display: inline-block; |
| 6 } | 6 } |
| 7 .parent { | 7 .parent { |
| 8 stop-opacity: 0.8; | 8 stop-opacity: 0.8; |
| 9 } | 9 } |
| 10 .target { | 10 .target { |
| 11 stop-opacity: 0.6; | 11 stop-opacity: 0.6; |
| 12 } | 12 } |
| 13 </style> | 13 </style> |
| 14 <body> | 14 <body> |
| 15 <template id="target-template"> | 15 <template id="target-template"> |
| 16 <svg width="10" height="100"> | 16 <svg width="10" height="100"> |
| 17 <defs> | 17 <defs> |
| 18 <linearGradient id="gradient" x1="0" x2="0" y1="0" y2="1"> | 18 <linearGradient id="gradient" x1="0" x2="0" y1="0" y2="1"> |
| 19 <stop offset="0" stop-color="black"/> | 19 <stop offset="0" stop-color="black"/> |
| 20 <stop offset="1" stop-color="blue" class="target"/> | 20 <stop offset="1" stop-color="blue" class="target"/> |
| 21 </linearGradient> | 21 </linearGradient> |
| 22 </defs> | 22 </defs> |
| 23 <rect x="0" y="0" width="10" height="100" fill="url(#gradient)"></rect> | 23 <rect x="0" y="0" width="10" height="100" fill="url(#gradient)"></rect> |
| 24 </svg> | 24 </svg> |
| 25 </template> | 25 </template> |
| 26 <script src="resources/interpolation-test.js"></script> | 26 <script src="resources/interpolation-test.js"></script> |
| 27 <script> | 27 <script> |
| 28 assertInterpolation({ | 28 assertInterpolation({ |
| 29 property: 'stop-opacity', | 29 property: 'stop-opacity', |
| 30 from: '', | 30 from: neutralKeyframe, |
| 31 to: '0.4', | 31 to: '0.4', |
| 32 }, [ | 32 }, [ |
| 33 {at: -0.4, is: '0.68'}, | 33 {at: -0.4, is: '0.68'}, |
| 34 {at: 0, is: '0.6'}, | 34 {at: 0, is: '0.6'}, |
| 35 {at: 0.2, is: '0.56'}, | 35 {at: 0.2, is: '0.56'}, |
| 36 {at: 0.6, is: '0.48'}, | 36 {at: 0.6, is: '0.48'}, |
| 37 {at: 1, is: '0.4'}, | 37 {at: 1, is: '0.4'}, |
| 38 {at: 1.5, is: '0.3'}, | 38 {at: 1.5, is: '0.3'}, |
| 39 ]); | 39 ]); |
| 40 | 40 |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 }, [ | 84 }, [ |
| 85 {at: -0.4, is: '0'}, | 85 {at: -0.4, is: '0'}, |
| 86 {at: 0, is: '0'}, | 86 {at: 0, is: '0'}, |
| 87 {at: 0.2, is: '0.2'}, | 87 {at: 0.2, is: '0.2'}, |
| 88 {at: 0.6, is: '0.6'}, | 88 {at: 0.6, is: '0.6'}, |
| 89 {at: 1, is: '1'}, | 89 {at: 1, is: '1'}, |
| 90 {at: 1.5, is: '1'} | 90 {at: 1.5, is: '1'} |
| 91 ]); | 91 ]); |
| 92 </script> | 92 </script> |
| 93 </body> | 93 </body> |
| OLD | NEW |