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

Unified Diff: third_party/polymer/v0_8/components/paper-behaviors/paper-button-behavior.html

Issue 1162563004: Upgrade to 1.0 and switch clients to dom-repeat where needed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix a layout import and remove the gzipped webanimation in reproduce.sh Created 5 years, 7 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/v0_8/components/paper-behaviors/paper-button-behavior.html
diff --git a/third_party/polymer/v0_8/components/paper-behaviors/paper-button-behavior.html b/third_party/polymer/v0_8/components/paper-behaviors/paper-button-behavior.html
index a7664cb3b8d129af83127ab6055f206d37678ed7..7f8aa974c31602cc413dd19943a698b981a9ca4f 100644
--- a/third_party/polymer/v0_8/components/paper-behaviors/paper-button-behavior.html
+++ b/third_party/polymer/v0_8/components/paper-behaviors/paper-button-behavior.html
@@ -13,7 +13,8 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
<script>
- Polymer.PaperButtonElevation = {
+ /** @polymerBehavior */
+ Polymer.PaperButtonBehaviorImpl = {
properties: {
@@ -23,24 +24,32 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
},
+ 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
];
</script>

Powered by Google App Engine
This is Rietveld 408576698