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

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

Issue 1401633002: Update Polymer from 1.1.4 -> 1.1.5 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: dzhioev@ review Created 5 years, 2 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-selector/iron-selectable-extracted.js
diff --git a/third_party/polymer/v1_0/components-chromium/iron-selector/iron-selectable-extracted.js b/third_party/polymer/v1_0/components-chromium/iron-selector/iron-selectable-extracted.js
index 4acfecc6a2589083f9b479e7454948726e276494..4afe64875b87715d02710abab1f4254729488389 100644
--- a/third_party/polymer/v1_0/components-chromium/iron-selector/iron-selectable-extracted.js
+++ b/third_party/polymer/v1_0/components-chromium/iron-selector/iron-selectable-extracted.js
@@ -1,6 +1,4 @@
-
-
- /** @polymerBehavior */
+/** @polymerBehavior */
Polymer.IronSelectableBehavior = {
/**
@@ -99,7 +97,7 @@
* @type {object}
* @default {template: 1}
*/
- excludedLocalNames: {
+ _excludedLocalNames: {
type: Object,
value: function() {
return {
@@ -116,6 +114,9 @@
created: function() {
this._bindFilterItem = this._filterItem.bind(this);
this._selection = new Polymer.IronSelection(this._applySelection.bind(this));
+ // TODO(cdata): When polymer/polymer#2535 lands, we do not need to do this
+ // book keeping anymore:
+ this.__listeningForActivate = false;
},
attached: function() {
@@ -124,6 +125,7 @@
if (!this.selectedItem && this.selected) {
this._updateSelected(this.attrForSelected,this.selected)
}
+ this._addListener(this.activateEvent);
},
detached: function() {
@@ -190,11 +192,17 @@
},
_addListener: function(eventName) {
+ if (!this.isAttached || this.__listeningForActivate) {
+ return;
+ }
+
+ this.__listeningForActivate = true;
this.listen(this, eventName, '_activateHandler');
},
_removeListener: function(eventName) {
this.unlisten(this, eventName, '_activateHandler');
+ this.__listeningForActivate = false;
},
_activateEventChanged: function(eventName, old) {
@@ -211,7 +219,7 @@
},
_filterItem: function(node) {
- return !this.excludedLocalNames[node.localName];
+ return !this._excludedLocalNames[node.localName];
},
_valueToItem: function(value) {
@@ -311,5 +319,4 @@
}
}
- };
-
+ };

Powered by Google App Engine
This is Rietveld 408576698