| Index: third_party/polymer/v0_8/components-chromium/paper-behaviors/paper-button-behavior-extracted.js
|
| diff --git a/third_party/polymer/v0_8/components-chromium/paper-behaviors/paper-button-behavior-extracted.js b/third_party/polymer/v0_8/components-chromium/paper-behaviors/paper-button-behavior-extracted.js
|
| index 9c0fade69a2b8f186aaca687f98f09113897cccc..5b2319a6579d7cb9fa09f5659b09f6308310a971 100644
|
| --- a/third_party/polymer/v0_8/components-chromium/paper-behaviors/paper-button-behavior-extracted.js
|
| +++ b/third_party/polymer/v0_8/components-chromium/paper-behaviors/paper-button-behavior-extracted.js
|
| @@ -1,6 +1,7 @@
|
|
|
|
|
| - Polymer.PaperButtonElevation = {
|
| + /** @polymerBehavior */
|
| + Polymer.PaperButtonBehaviorImpl = {
|
|
|
| properties: {
|
|
|
| @@ -10,23 +11,31 @@
|
|
|
| },
|
|
|
| + observers: [
|
| + '_calculateElevation(focused, disabled, active, pressed, receivedFocusFromKeyboard)'
|
| + ],
|
| +
|
| + hostAttributes: {
|
| + role: 'button',
|
| + tabindex: '0'
|
| + },
|
| +
|
| _calculateElevation: function() {
|
| var e = 1;
|
| - if (this.disabled || !this.raised) {
|
| + if (this.disabled) {
|
| e = 0;
|
| } else if (this.active || this.pressed) {
|
| - e = 2;
|
| - } else if (this.focused) {
|
| + e = 4;
|
| + } else if (this.receivedFocusFromKeyboard) {
|
| e = 3;
|
| }
|
| this._elevation = e;
|
| }
|
| -
|
| };
|
|
|
| Polymer.PaperButtonBehavior = [
|
| - Polymer.IronControlState,
|
| Polymer.IronButtonState,
|
| - Polymer.PaperButtonElevation
|
| + Polymer.IronControlState,
|
| + Polymer.PaperButtonBehaviorImpl
|
| ];
|
|
|
|
|