Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(398)

Unified Diff: third_party/polymer/v1_0/components-chromium/iron-icon/iron-icon-extracted.js

Issue 1766433002: Roll Polymer to 1.3.1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/polymer/v1_0/components-chromium/iron-icon/iron-icon-extracted.js
diff --git a/third_party/polymer/v1_0/components-chromium/iron-icon/iron-icon-extracted.js b/third_party/polymer/v1_0/components-chromium/iron-icon/iron-icon-extracted.js
index cbf6f2ae6655455f5934aa18c7e6759832d728c4..1f61c6537945a23c23c1f48f93db61bbc397c590 100644
--- a/third_party/polymer/v1_0/components-chromium/iron-icon/iron-icon-extracted.js
+++ b/third_party/polymer/v1_0/components-chromium/iron-icon/iron-icon-extracted.js
@@ -36,7 +36,8 @@ Polymer({
* @type {!Polymer.IronMeta}
*/
_meta: {
- value: Polymer.Base.create('iron-meta', {type: 'iconset'})
+ value: Polymer.Base.create('iron-meta', {type: 'iconset'}),
+ observer: '_updateIcon'
}
},
@@ -61,7 +62,14 @@ Polymer({
/** @suppress {visibility} */
_updateIcon: function() {
if (this._usesIconset()) {
- if (this._iconsetName) {
+ if (this._img && this._img.parentNode) {
+ Polymer.dom(this.root).removeChild(this._img);
+ }
+ if (this._iconName === "") {
+ if (this._iconset) {
+ this._iconset.removeIcon(this);
+ }
+ } else if (this._iconsetName && this._meta) {
this._iconset = /** @type {?Polymer.Iconset} */ (
this._meta.byKey(this._iconsetName));
if (this._iconset) {
@@ -72,6 +80,9 @@ Polymer({
}
}
} else {
+ if (this._iconset) {
+ this._iconset.removeIcon(this);
+ }
if (!this._img) {
this._img = document.createElement('img');
this._img.style.width = '100%';

Powered by Google App Engine
This is Rietveld 408576698