| OLD | NEW |
| 1 <!-- | 1 <!-- |
| 2 @license | 2 @license |
| 3 Copyright (c) 2015 The Polymer Project Authors. All rights reserved. | 3 Copyright (c) 2015 The Polymer Project Authors. All rights reserved. |
| 4 This code may only be used under the BSD style license found at http://polymer.g
ithub.io/LICENSE.txt | 4 This code may only be used under the BSD style license found at http://polymer.g
ithub.io/LICENSE.txt |
| 5 The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt | 5 The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt |
| 6 The complete set of contributors may be found at http://polymer.github.io/CONTRI
BUTORS.txt | 6 The complete set of contributors may be found at http://polymer.github.io/CONTRI
BUTORS.txt |
| 7 Code distributed by Google as part of the polymer project is also | 7 Code distributed by Google as part of the polymer project is also |
| 8 subject to an additional IP rights grant found at http://polymer.github.io/PATEN
TS.txt | 8 subject to an additional IP rights grant found at http://polymer.github.io/PATEN
TS.txt |
| 9 --> | 9 --> |
| 10 | 10 |
| (...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg'), | 220 svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg'), |
| 221 viewBox = content.getAttribute('viewBox') || '0 0 ' + size + ' ' + s
ize, | 221 viewBox = content.getAttribute('viewBox') || '0 0 ' + size + ' ' + s
ize, |
| 222 cssText = 'pointer-events: none; display: block; width: 100%; height
: 100%;'; | 222 cssText = 'pointer-events: none; display: block; width: 100%; height
: 100%;'; |
| 223 | 223 |
| 224 if (mirrorAllowed && content.hasAttribute('mirror-in-rtl')) { | 224 if (mirrorAllowed && content.hasAttribute('mirror-in-rtl')) { |
| 225 cssText += '-webkit-transform:scale(-1,1);transform:scale(-1,1);'; | 225 cssText += '-webkit-transform:scale(-1,1);transform:scale(-1,1);'; |
| 226 } | 226 } |
| 227 | 227 |
| 228 svg.setAttribute('viewBox', viewBox); | 228 svg.setAttribute('viewBox', viewBox); |
| 229 svg.setAttribute('preserveAspectRatio', 'xMidYMid meet'); | 229 svg.setAttribute('preserveAspectRatio', 'xMidYMid meet'); |
| 230 svg.setAttribute('focusable', 'false'); |
| 230 // TODO(dfreedm): `pointer-events: none` works around https://crbug.com/
370136 | 231 // TODO(dfreedm): `pointer-events: none` works around https://crbug.com/
370136 |
| 231 // TODO(sjmiles): inline style may not be ideal, but avoids requiring a
shadow-root | 232 // TODO(sjmiles): inline style may not be ideal, but avoids requiring a
shadow-root |
| 232 svg.style.cssText = cssText; | 233 svg.style.cssText = cssText; |
| 233 svg.appendChild(content).removeAttribute('id'); | 234 svg.appendChild(content).removeAttribute('id'); |
| 234 return svg; | 235 return svg; |
| 235 } | 236 } |
| 236 return null; | 237 return null; |
| 237 } | 238 } |
| 238 | 239 |
| 239 }); | 240 }); |
| 240 | 241 |
| 241 </script> | 242 </script> |
| OLD | NEW |