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

Unified Diff: third_party/polymer/v1_0/components-chromium/app-layout/app-scroll-effects/app-scroll-effects-behavior-extracted.js

Issue 2074813002: Roll Polymer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: chromium.patch Created 4 years, 6 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/app-layout/app-scroll-effects/app-scroll-effects-behavior-extracted.js
diff --git a/third_party/polymer/v1_0/components-chromium/app-layout/app-scroll-effects/app-scroll-effects-behavior-extracted.js b/third_party/polymer/v1_0/components-chromium/app-layout/app-scroll-effects/app-scroll-effects-behavior-extracted.js
index b9ea1dc3a19c1258f1a4e50f46cad79b6e8c3e13..23b2ecc1fa32e4f956b771f78af6c9ba355ec014 100644
--- a/third_party/polymer/v1_0/components-chromium/app-layout/app-scroll-effects/app-scroll-effects-behavior-extracted.js
+++ b/third_party/polymer/v1_0/components-chromium/app-layout/app-scroll-effects/app-scroll-effects-behavior-extracted.js
@@ -133,7 +133,7 @@
},
observers: [
- '_effectsChanged(effects, effectsConfig)'
+ '_effectsChanged(effects, effectsConfig, isAttached)'
],
/**
@@ -227,10 +227,10 @@
/**
* Called when `effects` or `effectsConfig` changes.
*/
- _effectsChanged: function(effects, effectsConfig) {
+ _effectsChanged: function(effects, effectsConfig, isAttached) {
this._tearDownEffects();
- if (effects === '') {
+ if (effects === '' || !isAttached) {
return;
}
effects.split(' ').forEach(function(effectName) {
@@ -329,6 +329,16 @@
this._updateScrollState(this._clampedScrollTop);
}
},
+
+ /**
+ * Override this method to return a reference to a node in the local DOM.
+ * The node is consumed by a scroll effect.
+ *
+ * @param {string} id The id for the node.
+ */
+ _getDOMRef: function(id) {
+ this._warn(this._logf('_getDOMRef', '`'+ id +'` is undefined'));
+ },
_getUndefinedMsg: function(effectName) {
return 'Scroll effect `' + effectName + '` is undefined. ' +

Powered by Google App Engine
This is Rietveld 408576698