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

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

Issue 1221923003: Update bower.json for Polymer elements and add PRESUBMIT.py (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 5 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 1
2 2
3 (function() { 3 (function() {
4 4
5 'use strict'; 5 'use strict';
6 6
7 function classNames(obj) { 7 function classNames(obj) {
8 var classNames = []; 8 var classNames = [];
9 for (var key in obj) { 9 for (var key in obj) {
10 if (obj.hasOwnProperty(key) && obj[key]) { 10 if (obj.hasOwnProperty(key) && obj[key]) {
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 } 107 }
108 } 108 }
109 } 109 }
110 if (labelledBy.length > 0) { 110 if (labelledBy.length > 0) {
111 this.setAttribute('aria-labelledby', labelledBy.join(' ')); 111 this.setAttribute('aria-labelledby', labelledBy.join(' '));
112 } 112 }
113 }, 113 },
114 114
115 _computeBarClassName: function(barJustify) { 115 _computeBarClassName: function(barJustify) {
116 var classObj = { 116 var classObj = {
117 center: true, 117 'center': true,
118 horizontal: true, 118 'horizontal': true,
119 layout: true, 119 'layout': true,
120 'toolbar-tools': true 120 'toolbar-tools': true
121 }; 121 };
122 122
123 // If a blank string or any falsy value is given, no other class name is 123 // If a blank string or any falsy value is given, no other class name is
124 // added. 124 // added.
125 if (barJustify) { 125 if (barJustify) {
126 var justifyClassName = (barJustify === 'justified') ? 126 var justifyClassName = (barJustify === 'justified') ?
127 barJustify : 127 barJustify :
128 barJustify + '-justified'; 128 barJustify + '-justified';
129 129
130 classObj[justifyClassName] = true; 130 classObj[justifyClassName] = true;
131 } 131 }
132 132
133 return classNames(classObj); 133 return classNames(classObj);
134 } 134 }
135 135
136 }); 136 });
137 137
138 }()); 138 }());
139 139
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698