Fix OOP <webview> resize and autosize.
[chromium-blink-merge.git] / third_party / polymer / v1_0 / components-chromium / paper-behaviors / paper-button-behavior-extracted.js
blob91386dee7893d859ffe0c24f4e9fdff1964fa1a4
1 /** @polymerBehavior */
2   Polymer.PaperButtonBehaviorImpl = {
4     properties: {
6       _elevation: {
7         type: Number
8       }
10     },
12     observers: [
13       '_calculateElevation(focused, disabled, active, pressed, receivedFocusFromKeyboard)'
14     ],
16     hostAttributes: {
17       role: 'button',
18       tabindex: '0'
19     },
21     _calculateElevation: function() {
22       var e = 1;
23       if (this.disabled) {
24         e = 0;
25       } else if (this.active || this.pressed) {
26         e = 4;
27       } else if (this.receivedFocusFromKeyboard) {
28         e = 3;
29       }
30       this._elevation = e;
31     }
32   };
34   /** @polymerBehavior */
35   Polymer.PaperButtonBehavior = [
36     Polymer.IronButtonState,
37     Polymer.IronControlState,
38     Polymer.PaperButtonBehaviorImpl
39   ];