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

Unified Diff: polymer_1.2.3/bower_components/iron-behaviors/iron-control-state.html

Issue 1581713003: [third_party] add polymer 1.2.3 (Closed) Base URL: https://chromium.googlesource.com/infra/third_party/npm_modules.git@master
Patch Set: 1.2.3 Created 4 years, 11 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: polymer_1.2.3/bower_components/iron-behaviors/iron-control-state.html
diff --git a/polymer_1.0.4/bower_components/iron-behaviors/iron-control-state.html b/polymer_1.2.3/bower_components/iron-behaviors/iron-control-state.html
similarity index 82%
copy from polymer_1.0.4/bower_components/iron-behaviors/iron-control-state.html
copy to polymer_1.2.3/bower_components/iron-behaviors/iron-control-state.html
index 33e42ea1091e58d85ec58f8fb6608467796faf52..83f7b566f8f579a7aa5c1e19039a53057e2c82e4 100644
--- a/polymer_1.0.4/bower_components/iron-behaviors/iron-control-state.html
+++ b/polymer_1.2.3/bower_components/iron-behaviors/iron-control-state.html
@@ -60,22 +60,20 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
],
ready: function() {
- // TODO(sjmiles): ensure read-only property is valued so the compound
- // observer will fire
- if (this.focused === undefined) {
- this._setFocused(false);
- }
this.addEventListener('focus', this._boundFocusBlurHandler, true);
this.addEventListener('blur', this._boundFocusBlurHandler, true);
},
_focusBlurHandler: function(event) {
- var target = event.path ? event.path[0] : event.target;
- if (target === this) {
- var focused = event.type === 'focus';
- this._setFocused(focused);
- } else if (!this.shadowRoot) {
- event.stopPropagation();
+ // NOTE(cdata): if we are in ShadowDOM land, `event.target` will
+ // eventually become `this` due to retargeting; if we are not in
+ // ShadowDOM land, `event.target` will eventually become `this` due
+ // to the second conditional which fires a synthetic event (that is also
+ // handled). In either case, we can disregard `event.path`.
+
+ if (event.target === this) {
+ this._setFocused(event.type === 'focus');
+ } else if (!this.shadowRoot && !this.isLightDescendant(event.target)) {
this.fire(event.type, {sourceEvent: event}, {
node: this,
bubbles: event.bubbles,

Powered by Google App Engine
This is Rietveld 408576698