| OLD | NEW |
| 1 function listGetComputedStyle(target) { | 1 function listGetComputedStyle(target) { |
| 2 // These properties have platform dependent values so we ignore them for con
venience. | 2 // These properties have platform dependent values so we ignore them for con
venience. |
| 3 var excludedProperties = new Set([ | 3 var excludedProperties = new Set([ |
| 4 '-webkit-tap-highlight-color', | 4 '-webkit-tap-highlight-color', |
| 5 'font-family', | 5 'font-family', |
| 6 'line-height' |
| 6 ]); | 7 ]); |
| 7 var properties = [ | 8 var properties = [ |
| 8 // These properties don't show up when iterating a computed style object
so we add them explicitly. | 9 // These properties don't show up when iterating a computed style object
so we add them explicitly. |
| 9 "-webkit-mask-position-x", | 10 "-webkit-mask-position-x", |
| 10 "-webkit-mask-position-y", | 11 "-webkit-mask-position-y", |
| 11 "background-position-x", | 12 "background-position-x", |
| 12 "background-position-y", | 13 "background-position-y", |
| 13 "border-spacing", | 14 "border-spacing", |
| 14 "overflow", | 15 "overflow", |
| 15 ]; | 16 ]; |
| 16 var style = getComputedStyle(target); | 17 var style = getComputedStyle(target); |
| 17 for (var i = 0; i < style.length; i++) { | 18 for (var i = 0; i < style.length; i++) { |
| 18 var property = style.item(i); | 19 var property = style.item(i); |
| 19 if (!excludedProperties.has(property)) | 20 if (!excludedProperties.has(property)) |
| 20 properties.push(property); | 21 properties.push(property); |
| 21 } | 22 } |
| 22 for (var property of properties.sort()) | 23 for (var property of properties.sort()) |
| 23 debug(property + ': ' + style[property]); | 24 debug(property + ': ' + style[property]); |
| 24 } | 25 } |
| OLD | NEW |