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

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

Issue 1862213002: Roll third_party/polymer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove obsolete appearance_browsertest.js, result of a previous bad merge. Created 4 years, 8 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({ 1 Polymer({
2 is: 'paper-input-container', 2 is: 'paper-input-container',
3 3
4 properties: { 4 properties: {
5 /** 5 /**
6 * Set to true to disable the floating label. The label disappears when th e input value is 6 * Set to true to disable the floating label. The label disappears when th e input value is
7 * not null. 7 * not null.
8 */ 8 */
9 noLabelFloat: { 9 noLabelFloat: {
10 type: Boolean, 10 type: Boolean,
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 get _inputElementValue() { 121 get _inputElementValue() {
122 return this._inputElement[this._propertyForValue] || this._inputElement.va lue; 122 return this._inputElement[this._propertyForValue] || this._inputElement.va lue;
123 }, 123 },
124 124
125 ready: function() { 125 ready: function() {
126 if (!this._addons) { 126 if (!this._addons) {
127 this._addons = []; 127 this._addons = [];
128 } 128 }
129 this.addEventListener('focus', this._boundOnFocus, true); 129 this.addEventListener('focus', this._boundOnFocus, true);
130 this.addEventListener('blur', this._boundOnBlur, true); 130 this.addEventListener('blur', this._boundOnBlur, true);
131 },
132
133 attached: function() {
131 if (this.attrForValue) { 134 if (this.attrForValue) {
132 this._inputElement.addEventListener(this._valueChangedEvent, this._bound ValueChanged); 135 this._inputElement.addEventListener(this._valueChangedEvent, this._bound ValueChanged);
133 } else { 136 } else {
134 this.addEventListener('input', this._onInput); 137 this.addEventListener('input', this._onInput);
135 } 138 }
136 },
137 139
138 attached: function() {
139 // Only validate when attached if the input already has a value. 140 // Only validate when attached if the input already has a value.
140 if (this._inputElementValue != '') { 141 if (this._inputElementValue != '') {
141 this._handleValueAndAutoValidate(this._inputElement); 142 this._handleValueAndAutoValidate(this._inputElement);
142 } else { 143 } else {
143 this._handleValue(this._inputElement); 144 this._handleValue(this._inputElement);
144 } 145 }
145 }, 146 },
146 147
147 _onAddonAttached: function(event) { 148 _onAddonAttached: function(event) {
148 if (!this._addons) { 149 if (!this._addons) {
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 _computeAddOnContentClass: function(focused, invalid) { 270 _computeAddOnContentClass: function(focused, invalid) {
270 var cls = 'add-on-content'; 271 var cls = 'add-on-content';
271 if (invalid) { 272 if (invalid) {
272 cls += ' is-invalid'; 273 cls += ' is-invalid';
273 } else if (focused) { 274 } else if (focused) {
274 cls += ' is-highlighted' 275 cls += ' is-highlighted'
275 } 276 }
276 return cls; 277 return cls;
277 } 278 }
278 }); 279 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698