Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!DOCTYPE html> | |
| 2 <meta charset="UTF-8"> | |
| 3 <style> | |
| 4 .target { | |
| 5 width: 100px; | |
| 6 height: 100px; | |
| 7 stroke: black; | |
| 8 stroke-width: 20px; | |
| 9 } | |
| 10 .replica { | |
| 11 stroke: green; | |
| 12 } | |
| 13 </style> | |
| 14 <body> | |
| 15 <template id="target-template"> | |
| 16 <svg> | |
| 17 <defs> | |
| 18 <linearGradient id="gradient"> | |
| 19 <stop offset="0" stop-color="green"/> | |
| 20 <stop offset="1" stop-color="gold"/> | |
| 21 </linearGradient> | |
| 22 </defs> | |
| 23 <rect x="0" y="0" width="100" height="100"> | |
| 24 </template> | |
| 25 <script src="resources/interpolation-test.js"></script> | |
| 26 <script> | |
| 27 assertInterpolation({ | |
| 28 property: 'fill', | |
| 29 from: 'orange', | |
| 30 to: 'blue' | |
| 31 }, [ | |
| 32 {at: -0.4, is: '#ffe700'}, | |
|
Steve Block
2013/10/03 02:37:53
Can you add a test at a more negative fraction, su
dstockwell
2013/10/03 05:01:07
Done.
| |
| 33 {at: 0, is: 'orange'}, | |
| 34 {at: 0.2, is: '#cc8433'}, | |
| 35 {at: 0.6, is: '#664299'}, | |
| 36 {at: 1, is: 'blue'}, | |
| 37 {at: 1.5, is: 'blue'} | |
| 38 ]); | |
| 39 assertInterpolation({ | |
| 40 property: 'fill', | |
| 41 from: 'orange', | |
| 42 to: 'url(#gradient)' | |
| 43 }, [ | |
| 44 {at: 0.2, is: 'orange'}, | |
| 45 {at: 0.6, is: 'url(#gradient)'} | |
|
Steve Block
2013/10/03 02:37:53
Can you test at 0 and 1 too to make clear this is
dstockwell
2013/10/03 05:01:07
Done.
| |
| 46 ]); | |
| 47 </script> | |
| 48 </body> | |
| OLD | NEW |