| 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 display: inline-block; |
| 6 } |
| 4 svg { | 7 svg { |
| 5 width: 50px; | 8 width: 50px; |
| 6 height: 100px; | 9 height: 100px; |
| 7 } | 10 } |
| 11 .parent { |
| 12 stroke-miterlimit: 1.3; |
| 13 } |
| 8 .target { | 14 .target { |
| 9 fill: white; | 15 fill: white; |
| 10 stroke: black; | 16 stroke: black; |
| 11 stroke-width: 20px; | 17 stroke-width: 20px; |
| 12 stroke-linejoin: miter; | 18 stroke-linejoin: miter; |
| 19 stroke-miterlimit: 1.5; |
| 13 } | 20 } |
| 14 .expected { | 21 .expected { |
| 15 stroke: green; | 22 stroke: green; |
| 16 } | 23 } |
| 17 </style> | 24 </style> |
| 18 <body> | 25 <body> |
| 19 <template id="target-template"> | 26 <template id="target-template"> |
| 20 <svg><path d="M0,100 l25,-50 l25,50" /> | 27 <svg><path d="M0,100 l25,-50 l25,50" /></svg> |
| 21 </template> | 28 </template> |
| 22 <script src="resources/interpolation-test.js"></script> | 29 <script src="resources/interpolation-test.js"></script> |
| 23 <script> | 30 <script> |
| 24 assertInterpolation({ | 31 assertInterpolation({ |
| 25 property: 'stroke-miterlimit', | 32 property: 'stroke-miterlimit', |
| 33 from: '', |
| 34 to: '2', |
| 35 }, [ |
| 36 {at: -0.4, is: '1.3'}, |
| 37 {at: 0, is: '1.5'}, |
| 38 {at: 0.2, is: '1.6'}, |
| 39 {at: 0.6, is: '1.8'}, |
| 40 {at: 1, is: '2'}, |
| 41 {at: 1.5, is: '2.25'}, |
| 42 ]); |
| 43 |
| 44 assertInterpolation({ |
| 45 property: 'stroke-miterlimit', |
| 46 from: 'initial', |
| 47 to: '2', |
| 48 }, [ |
| 49 {at: -0.4, is: '4.8'}, |
| 50 {at: 0, is: '4'}, |
| 51 {at: 0.2, is: '3.6'}, |
| 52 {at: 0.6, is: '2.8'}, |
| 53 {at: 1, is: '2'}, |
| 54 {at: 1.5, is: '1'}, |
| 55 ]); |
| 56 |
| 57 assertInterpolation({ |
| 58 property: 'stroke-miterlimit', |
| 59 from: 'inherit', |
| 60 to: '2', |
| 61 }, [ |
| 62 {at: -0.4, is: '1.02'}, |
| 63 {at: 0, is: '1.3'}, |
| 64 {at: 0.2, is: '1.44'}, |
| 65 {at: 0.6, is: '1.72'}, |
| 66 {at: 1, is: '2'}, |
| 67 {at: 1.5, is: '2.35'}, |
| 68 ]); |
| 69 |
| 70 assertInterpolation({ |
| 71 property: 'stroke-miterlimit', |
| 72 from: 'unset', |
| 73 to: '2', |
| 74 }, [ |
| 75 {at: -0.4, is: '1.02'}, |
| 76 {at: 0, is: '1.3'}, |
| 77 {at: 0.2, is: '1.44'}, |
| 78 {at: 0.6, is: '1.72'}, |
| 79 {at: 1, is: '2'}, |
| 80 {at: 1.5, is: '2.35'}, |
| 81 ]); |
| 82 |
| 83 assertInterpolation({ |
| 84 property: 'stroke-miterlimit', |
| 26 from: '1', | 85 from: '1', |
| 27 to: '3', | 86 to: '3', |
| 28 }, [ | 87 }, [ |
| 29 {at: -0.4, is: '1'}, | 88 {at: -0.4, is: '1'}, |
| 30 {at: 0, is: '1'}, | 89 {at: 0, is: '1'}, |
| 31 {at: 0.2, is: '1.4'}, | 90 {at: 0.2, is: '1.4'}, |
| 32 {at: 0.6, is: '2.2'}, | 91 {at: 0.6, is: '2.2'}, |
| 33 {at: 1, is: '3'}, | 92 {at: 1, is: '3'}, |
| 34 {at: 1.5, is: '4'} | 93 {at: 1.5, is: '4'} |
| 35 ]); | 94 ]); |
| 36 </script> | 95 </script> |
| 37 </body> | 96 </body> |
| OLD | NEW |