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

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

Issue 1521433002: [MediaRouter UI] Compile MR WebUI js code with Closure. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 (function() { 1 (function() {
2 'use strict'; 2 'use strict';
3 3
4 Polymer({ 4 Polymer({
5 is: 'paper-dropdown-menu', 5 is: 'paper-dropdown-menu',
6 6
7 /** 7 /**
8 * Fired when the dropdown opens. 8 * Fired when the dropdown opens.
9 * 9 *
10 * @event paper-dropdown-open 10 * @event paper-dropdown-open
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 // NOTE(cdata): These numbers are somewhat magical because they are 239 // NOTE(cdata): These numbers are somewhat magical because they are
240 // derived from the metrics of elements internal to `paper-input`'s 240 // derived from the metrics of elements internal to `paper-input`'s
241 // template. The metrics will change depending on whether or not the 241 // template. The metrics will change depending on whether or not the
242 // input has a floating label. 242 // input has a floating label.
243 return noLabelFloat ? -4 : 8; 243 return noLabelFloat ? -4 : 8;
244 }, 244 },
245 245
246 /** 246 /**
247 * Returns false if the element is required and does not have a selectio n, 247 * Returns false if the element is required and does not have a selectio n,
248 * and true otherwise. 248 * and true otherwise.
249 * @param {Object} ignored
249 * @return {boolean} true if `required` is false, or if `required` is tr ue 250 * @return {boolean} true if `required` is false, or if `required` is tr ue
250 * and the element has a valid selection. 251 * and the element has a valid selection.
251 */ 252 */
252 _getValidity: function() { 253 _getValidity: function(ignored) {
imcheng 2015/12/10 21:37:21 This function overrides _getValidity from IronVali
Dan Beam 2015/12/10 23:41:36 don't change things that get overwritten every tim
imcheng 2015/12/11 01:14:59 Acknowledged. It looks like somebody already has a
253 return this.disabled || !this.required || (this.required && this.value ); 254 return this.disabled || !this.required || (this.required && !!this.val ue);
254 }, 255 },
255 256
256 _openedChanged: function() { 257 _openedChanged: function() {
257 var openState = this.opened ? 'true' : 'false'; 258 var openState = this.opened ? 'true' : 'false';
258 var e = this.contentElement; 259 var e = this.contentElement;
259 if (e) { 260 if (e) {
260 e.setAttribute('aria-expanded', openState); 261 e.setAttribute('aria-expanded', openState);
261 } 262 }
262 } 263 }
263 }); 264 });
264 })(); 265 })();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698