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

Side by Side Diff: third_party/polymer/v1_0/components-chromium/paper-behaviors/paper-inky-focus-behavior-extracted.js

Issue 2158913007: Roll Polymer from 1.5.0 -> 1.6.0 to pick up native CSS custom props (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge Created 4 years, 4 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 unified diff | Download patch
OLDNEW
1 /** 1 /**
2 * `Polymer.PaperInkyFocusBehavior` implements a ripple when the element has k eyboard focus. 2 * `Polymer.PaperInkyFocusBehavior` implements a ripple when the element has k eyboard focus.
3 * 3 *
4 * @polymerBehavior Polymer.PaperInkyFocusBehavior 4 * @polymerBehavior Polymer.PaperInkyFocusBehavior
5 */ 5 */
6 Polymer.PaperInkyFocusBehaviorImpl = { 6 Polymer.PaperInkyFocusBehaviorImpl = {
7
8 observers: [ 7 observers: [
9 '_focusedChanged(receivedFocusFromKeyboard)' 8 '_focusedChanged(receivedFocusFromKeyboard)'
10 ], 9 ],
11 10
12 _focusedChanged: function(receivedFocusFromKeyboard) { 11 _focusedChanged: function(receivedFocusFromKeyboard) {
13 if (receivedFocusFromKeyboard) { 12 if (receivedFocusFromKeyboard) {
14 this.ensureRipple(); 13 this.ensureRipple();
15 } 14 }
16 if (this.hasRipple()) { 15 if (this.hasRipple()) {
17 this._ripple.holdDown = receivedFocusFromKeyboard; 16 this._ripple.holdDown = receivedFocusFromKeyboard;
18 } 17 }
19 }, 18 },
20 19
21 _createRipple: function() { 20 _createRipple: function() {
22 var ripple = Polymer.PaperRippleBehavior._createRipple(); 21 var ripple = Polymer.PaperRippleBehavior._createRipple();
23 ripple.id = 'ink'; 22 ripple.id = 'ink';
24 ripple.setAttribute('center', ''); 23 ripple.setAttribute('center', '');
25 ripple.classList.add('circle'); 24 ripple.classList.add('circle');
26 return ripple; 25 return ripple;
27 } 26 }
28
29 }; 27 };
30 28
31 /** @polymerBehavior Polymer.PaperInkyFocusBehavior */ 29 /** @polymerBehavior Polymer.PaperInkyFocusBehavior */
32 Polymer.PaperInkyFocusBehavior = [ 30 Polymer.PaperInkyFocusBehavior = [
33 Polymer.IronButtonState, 31 Polymer.IronButtonState,
34 Polymer.IronControlState, 32 Polymer.IronControlState,
35 Polymer.PaperRippleBehavior, 33 Polymer.PaperRippleBehavior,
36 Polymer.PaperInkyFocusBehaviorImpl 34 Polymer.PaperInkyFocusBehaviorImpl
37 ]; 35 ];
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698