| Index: third_party/polymer/v1_0/components-chromium/iron-iconset-svg/iron-iconset-svg-extracted.js
|
| diff --git a/third_party/polymer/v1_0/components-chromium/iron-iconset-svg/iron-iconset-svg-extracted.js b/third_party/polymer/v1_0/components-chromium/iron-iconset-svg/iron-iconset-svg-extracted.js
|
| index 236096963a97af6e41670fd89a1ad5c08d3a956f..4bca3cc73e1940781c51334e3b21ef05eb7748d9 100644
|
| --- a/third_party/polymer/v1_0/components-chromium/iron-iconset-svg/iron-iconset-svg-extracted.js
|
| +++ b/third_party/polymer/v1_0/components-chromium/iron-iconset-svg/iron-iconset-svg-extracted.js
|
| @@ -1,5 +1,4 @@
|
| -
|
| - /**
|
| +/**
|
| * The `iron-iconset-svg` element allows users to define their own icon sets
|
| * that contain svg icons. The svg icon elements should be children of the
|
| * `iron-iconset-svg` element. Multiple icons should be given distinct id's.
|
| @@ -166,16 +165,18 @@
|
| */
|
| _prepareSvgClone: function(sourceSvg, size) {
|
| if (sourceSvg) {
|
| - var svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg');
|
| - svg.setAttribute('viewBox', ['0', '0', size, size].join(' '));
|
| + var content = sourceSvg.cloneNode(true),
|
| + svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg'),
|
| + viewBox = content.getAttribute('viewBox') || '0 0 ' + size + ' ' + size;
|
| + svg.setAttribute('viewBox', viewBox);
|
| svg.setAttribute('preserveAspectRatio', 'xMidYMid meet');
|
| // TODO(dfreedm): `pointer-events: none` works around https://crbug.com/370136
|
| // TODO(sjmiles): inline style may not be ideal, but avoids requiring a shadow-root
|
| svg.style.cssText = 'pointer-events: none; display: block; width: 100%; height: 100%;';
|
| - svg.appendChild(sourceSvg.cloneNode(true)).removeAttribute('id');
|
| + svg.appendChild(content).removeAttribute('id');
|
| return svg;
|
| }
|
| return null;
|
| }
|
|
|
| - });
|
| + });
|
|
|