| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <meta charset="UTF-8"> | 2 <meta charset="UTF-8"> |
| 3 <style> | 3 <style> |
| 4 .container { |
| 5 margin-bottom: -4px; |
| 6 } |
| 7 .parent { |
| 8 rx: 30px; |
| 9 } |
| 4 .target { | 10 .target { |
| 5 stroke: black; | 11 fill: black; |
| 6 fill: white; | 12 rx: 10px; |
| 7 rx: 5px; | |
| 8 } | 13 } |
| 9 .expected { | 14 .expected { |
| 10 stroke: green; | 15 fill: green; |
| 11 } | 16 } |
| 12 </style> | 17 </style> |
| 13 <body> | 18 <body> |
| 14 <template id="target-template"> | 19 <template id="target-template"> |
| 15 <svg width="70" height="70"> | 20 <svg width="400" height="20"> |
| 16 <rect x="10" y="10" width="50" height="50" rx="10" class="target"/> | 21 <rect x="0" y="0" width="400" height="20" ry="10" class="target"/> |
| 17 </svg> | 22 </svg> |
| 18 </template> | 23 </template> |
| 19 <script src="resources/interpolation-test.js"></script> | 24 <script src="resources/interpolation-test.js"></script> |
| 20 <script> | 25 <script> |
| 21 assertInterpolation({ | 26 assertInterpolation({ |
| 22 property: 'rx', | 27 property: 'rx', |
| 28 from: '', |
| 29 to: '20px', |
| 30 }, [ |
| 31 {at: -0.3, is: '7px'}, |
| 32 {at: 0, is: '10px'}, |
| 33 {at: 0.3, is: '13px'}, |
| 34 {at: 0.6, is: '16px'}, |
| 35 {at: 1, is: '20px'}, |
| 36 {at: 1.5, is: '25px'}, |
| 37 ]); |
| 38 |
| 39 assertInterpolation({ |
| 40 property: 'rx', |
| 41 from: 'initial', |
| 42 to: '20px', |
| 43 }, [ |
| 44 {at: -0.3, is: '0px'}, |
| 45 {at: 0, is: '0px'}, |
| 46 {at: 0.3, is: '6px'}, |
| 47 {at: 0.6, is: '12px'}, |
| 48 {at: 1, is: '20px'}, |
| 49 {at: 1.5, is: '30px'}, |
| 50 ]); |
| 51 |
| 52 assertInterpolation({ |
| 53 property: 'rx', |
| 54 from: 'inherit', |
| 55 to: '20px', |
| 56 }, [ |
| 57 {at: -0.3, is: '33px'}, |
| 58 {at: 0, is: '30px'}, |
| 59 {at: 0.3, is: '27px'}, |
| 60 {at: 0.6, is: '24px'}, |
| 61 {at: 1, is: '20px'}, |
| 62 {at: 1.5, is: '15px'}, |
| 63 ]); |
| 64 |
| 65 assertInterpolation({ |
| 66 property: 'rx', |
| 67 from: 'unset', |
| 68 to: '20px', |
| 69 }, [ |
| 70 {at: -0.3, is: '0px'}, |
| 71 {at: 0, is: '0px'}, |
| 72 {at: 0.3, is: '6px'}, |
| 73 {at: 0.6, is: '12px'}, |
| 74 {at: 1, is: '20px'}, |
| 75 {at: 1.5, is: '30px'}, |
| 76 ]); |
| 77 |
| 78 assertInterpolation({ |
| 79 property: 'rx', |
| 23 from: '0px', | 80 from: '0px', |
| 24 to: '20px' | 81 to: '20px' |
| 25 }, [ | 82 }, [ |
| 26 {at: -0.3, is: '0px'}, // SVG rx can't be negative. | 83 {at: -0.3, is: '0px'}, // SVG rx can't be negative. |
| 27 {at: 0, is: '0px'}, | 84 {at: 0, is: '0px'}, |
| 28 {at: 0.3, is: '6px'}, | 85 {at: 0.3, is: '6px'}, |
| 29 {at: 0.6, is: '12px'}, | 86 {at: 0.6, is: '12px'}, |
| 30 {at: 1, is: '20px'}, | 87 {at: 1, is: '20px'}, |
| 31 {at: 1.5, is: '30px'}, | 88 {at: 1.5, is: '30px'}, |
| 32 ]); | 89 ]); |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 }, [ | 142 }, [ |
| 86 {at: -0.3, is: '0'}, | 143 {at: -0.3, is: '0'}, |
| 87 {at: 0, is: '0'}, | 144 {at: 0, is: '0'}, |
| 88 {at: 0.3, is: '6'}, | 145 {at: 0.3, is: '6'}, |
| 89 {at: 0.6, is: '12'}, | 146 {at: 0.6, is: '12'}, |
| 90 {at: 1, is: '20'}, | 147 {at: 1, is: '20'}, |
| 91 {at: 1.5, is: '30'}, | 148 {at: 1.5, is: '30'}, |
| 92 ]); | 149 ]); |
| 93 </script> | 150 </script> |
| 94 </body> | 151 </body> |
| OLD | NEW |