| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <meta charset="UTF-8"> | 2 <meta charset="UTF-8"> |
| 3 <style> | 3 <style> |
| 4 .parent { |
| 5 -webkit-mask-box-image-width: 30px; |
| 6 } |
| 4 .target { | 7 .target { |
| 5 width: 100px; | 8 width: 100px; |
| 6 height: 100px; | 9 height: 100px; |
| 7 background-color: black; | 10 background-color: black; |
| 8 display: inline-block; | 11 display: inline-block; |
| 9 -webkit-mask-box-image-width: 5px; | |
| 10 -webkit-mask-box-image-source: linear-gradient(45deg, rgba(0, 0, 0, 0), rgba(0
, 0, 0, 1)); | 12 -webkit-mask-box-image-source: linear-gradient(45deg, rgba(0, 0, 0, 0), rgba(0
, 0, 0, 1)); |
| 13 -webkit-mask-box-image-width: 10px; |
| 11 } | 14 } |
| 12 .expected { | 15 .expected { |
| 13 background-color: green; | 16 background-color: green; |
| 14 margin-right: 2px; | 17 margin-right: 2px; |
| 15 } | 18 } |
| 16 </style> | 19 </style> |
| 17 <body> | 20 <body> |
| 18 <script src="resources/interpolation-test.js"></script> | 21 <script src="resources/interpolation-test.js"></script> |
| 19 <script> | 22 <script> |
| 20 assertInterpolation({ | 23 assertInterpolation({ |
| 21 property: '-webkit-mask-box-image-width', | 24 property: '-webkit-mask-box-image-width', |
| 25 from: '', |
| 26 to: '20px', |
| 27 }, [ |
| 28 {at: -0.3, is: '7px'}, |
| 29 {at: 0, is: '10px'}, |
| 30 {at: 0.3, is: '13px'}, |
| 31 {at: 0.6, is: '16px'}, |
| 32 {at: 1, is: '20px'}, |
| 33 {at: 1.5, is: '25px'}, |
| 34 {at: 5, is: '60px'}, |
| 35 {at: 10, is: '110px'}, |
| 36 ]); |
| 37 |
| 38 assertNoInterpolation({ |
| 39 property: '-webkit-mask-box-image-width', |
| 40 from: 'initial', |
| 41 to: '20px', |
| 42 }); |
| 43 |
| 44 assertInterpolation({ |
| 45 property: '-webkit-mask-box-image-width', |
| 46 from: 'inherit', |
| 47 to: '20px', |
| 48 }, [ |
| 49 {at: -0.3, is: '33px'}, |
| 50 {at: 0, is: '30px'}, |
| 51 {at: 0.3, is: '27px'}, |
| 52 {at: 0.6, is: '24px'}, |
| 53 {at: 1, is: '20px'}, |
| 54 {at: 1.5, is: '15px'}, |
| 55 {at: 5, is: '0px'}, |
| 56 {at: 10, is: '0px'}, |
| 57 ]); |
| 58 |
| 59 assertNoInterpolation({ |
| 60 property: '-webkit-mask-box-image-width', |
| 61 from: 'unset', |
| 62 to: '20px', |
| 63 }); |
| 64 |
| 65 assertInterpolation({ |
| 66 property: '-webkit-mask-box-image-width', |
| 22 from: '0px', | 67 from: '0px', |
| 23 to: '20px' | 68 to: '20px' |
| 24 }, [ | 69 }, [ |
| 25 {at: -0.3, is: '0px'}, // CSS -webkit-mask-box-image-width can't be negative. | 70 {at: -0.3, is: '0px'}, // CSS -webkit-mask-box-image-width can't be negative. |
| 26 {at: 0, is: '0px'}, | 71 {at: 0, is: '0px'}, |
| 27 {at: 0.3, is: '6px'}, | 72 {at: 0.3, is: '6px'}, |
| 28 {at: 0.6, is: '12px'}, | 73 {at: 0.6, is: '12px'}, |
| 29 {at: 1, is: '20px'}, | 74 {at: 1, is: '20px'}, |
| 30 {at: 1.5, is: '30px'}, | 75 {at: 1.5, is: '30px'}, |
| 31 {at: 5, is: '100px'}, | 76 {at: 5, is: '100px'}, |
| 32 {at: 10, is: '200px'} | 77 {at: 10, is: '200px'} |
| 33 ]); | 78 ]); |
| 34 assertInterpolation({ | 79 assertInterpolation({ |
| 35 property: '-webkit-mask-box-image-width', | 80 property: '-webkit-mask-box-image-width', |
| 36 from: '0', | 81 from: '0', |
| 37 to: '20' | 82 to: '20' |
| 38 }, [ | 83 }, [ |
| 39 {at: -0.3, is: '0'}, // CSS -webkit-mask-box-image-width can't be negative. | 84 {at: -0.3, is: '0'}, // CSS -webkit-mask-box-image-width can't be negative. |
| 40 {at: 0, is: '0'}, | 85 {at: 0, is: '0'}, |
| 41 {at: 0.3, is: '6'}, | 86 {at: 0.3, is: '6'}, |
| 42 {at: 0.6, is: '12'}, | 87 {at: 0.6, is: '12'}, |
| 43 {at: 1, is: '20'}, | 88 {at: 1, is: '20'}, |
| 44 {at: 1.5, is: '30'}, | 89 {at: 1.5, is: '30'}, |
| 45 {at: 5, is: '100'}, | 90 {at: 5, is: '100'}, |
| 46 {at: 10, is: '200'} | 91 {at: 10, is: '200'} |
| 47 ]); | 92 ]); |
| 48 </script> | 93 </script> |
| 49 </body> | 94 </body> |
| OLD | NEW |