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

Unified Diff: third_party/polymer/v1_0/components-chromium/paper-ripple/paper-ripple-extracted.js

Issue 1187823002: Update Polymer components and re-run reproduce.sh (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 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/paper-ripple/paper-ripple-extracted.js
diff --git a/third_party/polymer/v1_0/components-chromium/paper-ripple/paper-ripple-extracted.js b/third_party/polymer/v1_0/components-chromium/paper-ripple/paper-ripple-extracted.js
index 0e7e2655244bf8f55ee28b656674708d50d97dd8..a760fa244d46173bab46d639507be31dd293fea9 100644
--- a/third_party/polymer/v1_0/components-chromium/paper-ripple/paper-ripple-extracted.js
+++ b/third_party/polymer/v1_0/components-chromium/paper-ripple/paper-ripple-extracted.js
@@ -243,6 +243,7 @@
this.wave.style.transform = 'scale3d(' + scale + ',' + scale + ',1)';
},
+ /** @param {Event=} event */
downAction: function(event) {
var xCenter = this.containerMetrics.width / 2;
var yCenter = this.containerMetrics.height / 2;
@@ -287,6 +288,7 @@
this.waveContainer.style.height = this.containerMetrics.size + 'px';
},
+ /** @param {Event=} event */
upAction: function(event) {
if (!this.isMouseDown) {
return;
@@ -410,11 +412,9 @@
var ownerRoot = Polymer.dom(this).getOwnerRoot();
var target;
- if (ownerRoot) {
+ if (this.parentNode.nodeType == 11) { // DOCUMENT_FRAGMENT_NODE
target = ownerRoot.host;
- }
-
- if (!target) {
+ } else {
target = this.parentNode;
}
@@ -428,8 +428,8 @@
},
attached: function() {
- this._listen(this.target, 'up', this.upAction.bind(this));
- this._listen(this.target, 'down', this.downAction.bind(this));
+ this.listen(this.target, 'up', 'upAction');
+ this.listen(this.target, 'down', 'downAction');
if (!this.target.hasAttribute('noink')) {
this.keyEventTarget = this.target;
@@ -455,6 +455,7 @@
}, 1);
},
+ /** @param {Event=} event */
downAction: function(event) {
if (this.holdDown && this.ripples.length > 0) {
return;
@@ -469,6 +470,7 @@
}
},
+ /** @param {Event=} event */
upAction: function(event) {
if (this.holdDown) {
return;

Powered by Google App Engine
This is Rietveld 408576698