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

Side by Side Diff: third_party/polymer/v1_0/components/paper-input/paper-input-container.html

Issue 1187823002: Update Polymer components and re-run reproduce.sh (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 6 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 @license 2 @license
3 Copyright (c) 2015 The Polymer Project Authors. All rights reserved. 3 Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
4 This code may only be used under the BSD style license found at http://polymer.g ithub.io/LICENSE.txt 4 This code may only be used under the BSD style license found at http://polymer.g ithub.io/LICENSE.txt
5 The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt 5 The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
6 The complete set of contributors may be found at http://polymer.github.io/CONTRI BUTORS.txt 6 The complete set of contributors may be found at http://polymer.github.io/CONTRI BUTORS.txt
7 Code distributed by Google as part of the polymer project is also 7 Code distributed by Google as part of the polymer project is also
8 subject to an additional IP rights grant found at http://polymer.github.io/PATEN TS.txt 8 subject to an additional IP rights grant found at http://polymer.github.io/PATEN TS.txt
9 --> 9 -->
10 10
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 height: 2px; 102 height: 2px;
103 103
104 -webkit-transform-origin: center center; 104 -webkit-transform-origin: center center;
105 transform-origin: center center; 105 transform-origin: center center;
106 -webkit-transform: scale3d(0,1,1); 106 -webkit-transform: scale3d(0,1,1);
107 transform: scale3d(0,1,1); 107 transform: scale3d(0,1,1);
108 108
109 background: var(--paper-input-container-focus-color, --default-primary-col or); 109 background: var(--paper-input-container-focus-color, --default-primary-col or);
110 } 110 }
111 111
112 .is-highlighted .focused-line { 112 .underline.is-highlighted .focused-line {
113 -webkit-transform: none; 113 -webkit-transform: none;
114 transform: none; 114 transform: none;
115 -webkit-transition: -webkit-transform 0.25s; 115 -webkit-transition: -webkit-transform 0.25s;
116 transition: transform 0.25s; 116 transition: transform 0.25s;
117 117
118 @apply(--paper-transition-easing); 118 @apply(--paper-transition-easing);
119 } 119 }
120 120
121 .is-invalid .focused-line { 121 .underline.is-invalid .focused-line {
122 background: var(--paper-input-container-invalid-color, --google-red-500); 122 background: var(--paper-input-container-invalid-color, --google-red-500);
123 123
124 -webkit-transform: none; 124 -webkit-transform: none;
125 transform: none; 125 transform: none;
126 -webkit-transition: -webkit-transform 0.25s; 126 -webkit-transition: -webkit-transform 0.25s;
127 transition: transform 0.25s; 127 transition: transform 0.25s;
128 128
129 @apply(--paper-transition-easing); 129 @apply(--paper-transition-easing);
130 } 130 }
131 131
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 /** 298 /**
299 * True if the input has focus. 299 * True if the input has focus.
300 */ 300 */
301 focused: { 301 focused: {
302 readOnly: true, 302 readOnly: true,
303 type: Boolean, 303 type: Boolean,
304 value: false 304 value: false
305 }, 305 },
306 306
307 _addons: { 307 _addons: {
308 type: Array, 308 type: Array
309 value: function() { 309 // do not set a default value here intentionally - it will be initialize d lazily when a
310 return []; 310 // distributed child is attached, which may occur before configuration f or this element
311 } 311 // in polyfill.
312 }, 312 },
313 313
314 _inputHasContent: { 314 _inputHasContent: {
315 type: Boolean, 315 type: Boolean,
316 value: false 316 value: false
317 }, 317 },
318 318
319 _inputSelector: { 319 _inputSelector: {
320 type: String, 320 type: String,
321 value: 'input,textarea,.paper-input-input' 321 value: 'input,textarea,.paper-input-input'
322 }, 322 },
323 323
324 _boundOnFocus: { 324 _boundOnFocus: {
325 type: Function, 325 type: Function,
326 value: function() { 326 value: function() {
327 return this._onFocus.bind(this); 327 return this._onFocus.bind(this);
328 } 328 }
329 }, 329 },
330 330
331 _boundOnBlur: { 331 _boundOnBlur: {
332 type: Function, 332 type: Function,
333 value: function() { 333 value: function() {
334 return this._onBlur.bind(this); 334 return this._onBlur.bind(this);
335 } 335 }
336 }, 336 },
337 337
338 _boundOnInput: { 338 _boundOnInput: {
339 type: Function, 339 type: Function,
340 value: function() { 340 value: function() {
341 this._onInput.bind(this) 341 return this._onInput.bind(this);
342 } 342 }
343 }, 343 },
344 344
345 _boundValueChanged: { 345 _boundValueChanged: {
346 type: Function, 346 type: Function,
347 value: function() { 347 value: function() {
348 return this._onValueChanged.bind(this); 348 return this._onValueChanged.bind(this);
349 } 349 }
350 } 350 }
351 351
(...skipping 10 matching lines...) Expand all
362 362
363 get _propertyForValue() { 363 get _propertyForValue() {
364 return Polymer.CaseMap.dashToCamelCase(this.attrForValue); 364 return Polymer.CaseMap.dashToCamelCase(this.attrForValue);
365 }, 365 },
366 366
367 get _inputElement() { 367 get _inputElement() {
368 return Polymer.dom(this).querySelector(this._inputSelector); 368 return Polymer.dom(this).querySelector(this._inputSelector);
369 }, 369 },
370 370
371 ready: function() { 371 ready: function() {
372 if (!this._addons) {
373 this._addons = [];
374 }
372 this.addEventListener('focus', this._boundOnFocus, true); 375 this.addEventListener('focus', this._boundOnFocus, true);
373 this.addEventListener('blur', this._boundOnBlur, true); 376 this.addEventListener('blur', this._boundOnBlur, true);
374 if (this.attrForValue) { 377 if (this.attrForValue) {
375 this._inputElement.addEventListener(this._valueChangedEvent, this._bound ValueChanged); 378 this._inputElement.addEventListener(this._valueChangedEvent, this._bound ValueChanged);
376 } else { 379 } else {
377 this.addEventListener('input', this._onInput); 380 this.addEventListener('input', this._onInput);
378 } 381 }
379 }, 382 },
380 383
381 attached: function() { 384 attached: function() {
382 this._handleValue(this._inputElement); 385 this._handleValue(this._inputElement);
383 }, 386 },
384 387
385 _onAddonAttached: function(event) { 388 _onAddonAttached: function(event) {
386 this._addons.push(event.target); 389 if (!this._addons) {
387 this._handleValue(this._inputElement); 390 this._addons = [];
391 }
392 var target = event.target;
393 if (this._addons.indexOf(target) === -1) {
394 this._addons.push(target);
395 if (this.isAttached) {
396 this._handleValue(this._inputElement);
397 }
398 }
388 }, 399 },
389 400
390 _onFocus: function() { 401 _onFocus: function() {
391 this._setFocused(true); 402 this._setFocused(true);
392 }, 403 },
393 404
394 _onBlur: function() { 405 _onBlur: function() {
395 this._setFocused(false); 406 this._setFocused(false);
396 }, 407 },
397 408
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 } else if (focused) { 497 } else if (focused) {
487 cls += ' is-highlighted' 498 cls += ' is-highlighted'
488 } 499 }
489 return cls; 500 return cls;
490 } 501 }
491 502
492 }); 503 });
493 504
494 })(); 505 })();
495 </script> 506 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698