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

Unified Diff: polymer_1.2.3/bower_components/paper-item/paper-item-behavior.html

Issue 1581713003: [third_party] add polymer 1.2.3 (Closed) Base URL: https://chromium.googlesource.com/infra/third_party/npm_modules.git@master
Patch Set: 1.2.3 Created 4 years, 11 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: polymer_1.2.3/bower_components/paper-item/paper-item-behavior.html
diff --git a/polymer_1.0.4/bower_components/paper-behaviors/paper-button-behavior.html b/polymer_1.2.3/bower_components/paper-item/paper-item-behavior.html
similarity index 56%
copy from polymer_1.0.4/bower_components/paper-behaviors/paper-button-behavior.html
copy to polymer_1.2.3/bower_components/paper-item/paper-item-behavior.html
index bbe508f3341c97ca4961d388b8a73c3443a46b60..f97b262b73753ef04af0998a886a1bf9fd6169cb 100644
--- a/polymer_1.0.4/bower_components/paper-behaviors/paper-button-behavior.html
+++ b/polymer_1.2.3/bower_components/paper-item/paper-item-behavior.html
@@ -10,47 +10,27 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
<link rel="import" href="../polymer/polymer.html">
<link rel="import" href="../iron-behaviors/iron-button-state.html">
+<link rel="import" href="../iron-behaviors/iron-control-state.html">
-<script>
-
- /** @polymerBehavior */
- Polymer.PaperButtonBehaviorImpl = {
-
- properties: {
-
- _elevation: {
- type: Number
- }
-
- },
-
- observers: [
- '_calculateElevation(focused, disabled, active, pressed, receivedFocusFromKeyboard)'
- ],
+<!--
+`PaperItemBehavior` is a convenience behavior shared by <paper-item> and
+<paper-icon-item> that manages the shared control states and attributes of
+the items.
+-->
+<script>
+ /** @polymerBehavior Polymer.PaperItemBehavior */
+ Polymer.PaperItemBehaviorImpl = {
hostAttributes: {
- role: 'button',
+ role: 'option',
tabindex: '0'
- },
-
- _calculateElevation: function() {
- var e = 1;
- if (this.disabled) {
- e = 0;
- } else if (this.active || this.pressed) {
- e = 4;
- } else if (this.receivedFocusFromKeyboard) {
- e = 3;
- }
- this._elevation = e;
}
};
/** @polymerBehavior */
- Polymer.PaperButtonBehavior = [
+ Polymer.PaperItemBehavior = [
Polymer.IronButtonState,
Polymer.IronControlState,
- Polymer.PaperButtonBehaviorImpl
+ Polymer.PaperItemBehaviorImpl
];
-
</script>

Powered by Google App Engine
This is Rietveld 408576698