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

Side by Side Diff: third_party/polymer/v1_0/components-chromium/paper-icon-button/paper-icon-button-extracted.js

Issue 1401633002: Update Polymer from 1.1.4 -> 1.1.5 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: dzhioev@ review Created 5 years, 2 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 Polymer({
2 is: 'paper-icon-button',
1 3
2 Polymer({ 4 hostAttributes: {
3 is: 'paper-icon-button', 5 role: 'button',
4 6 tabindex: '0'
5 hostAttributes: {
6 role: 'button',
7 tabindex: '0'
8 },
9
10 behaviors: [
11 Polymer.PaperInkyFocusBehavior
12 ],
13
14 properties: {
15 /**
16 * The URL of an image for the icon. If the src property is specified,
17 * the icon property should not be.
18 */
19 src: {
20 type: String
21 }, 7 },
22 8
23 /** 9 behaviors: [
24 * Specifies the icon name or index in the set of icons available in 10 Polymer.PaperInkyFocusBehavior
25 * the icon's icon set. If the icon property is specified, 11 ],
26 * the src property should not be. 12
27 */ 13 properties: {
28 icon: { 14 /**
29 type: String 15 * The URL of an image for the icon. If the src property is specified,
16 * the icon property should not be.
17 */
18 src: {
19 type: String
20 },
21
22 /**
23 * Specifies the icon name or index in the set of icons available in
24 * the icon's icon set. If the icon property is specified,
25 * the src property should not be.
26 */
27 icon: {
28 type: String
29 },
30
31 /**
32 * Specifies the alternate text for the button, for accessibility.
33 */
34 alt: {
35 type: String,
36 observer: "_altChanged"
37 }
30 }, 38 },
31 39
32 /** 40 _altChanged: function(newValue, oldValue) {
33 * Specifies the alternate text for the button, for accessibility. 41 var label = this.getAttribute('aria-label');
34 */ 42
35 alt: { 43 // Don't stomp over a user-set aria-label.
36 type: String, 44 if (!label || oldValue == label) {
37 observer: "_altChanged" 45 this.setAttribute('aria-label', newValue);
46 }
38 } 47 }
39 }, 48 });
40
41 _altChanged: function(newValue, oldValue) {
42 var label = this.getAttribute('aria-label');
43
44 // Don't stomp over a user-set aria-label.
45 if (!label || oldValue == label) {
46 this.setAttribute('aria-label', newValue);
47 }
48 }
49 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698