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

Unified Diff: third_party/polymer/v1_0/components-chromium/iron-input/iron-input-extracted.js

Issue 1561893002: [Polymer] Roll polymer to latest version (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update grdp Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: third_party/polymer/v1_0/components-chromium/iron-input/iron-input-extracted.js
diff --git a/third_party/polymer/v1_0/components-chromium/iron-input/iron-input-extracted.js b/third_party/polymer/v1_0/components-chromium/iron-input/iron-input-extracted.js
index 802174224ce29a9f5b33797fcfcc169f8049a680..ba71342b72be1b195ce4c54576f4a154549418d3 100644
--- a/third_party/polymer/v1_0/components-chromium/iron-input/iron-input-extracted.js
+++ b/third_party/polymer/v1_0/components-chromium/iron-input/iron-input-extracted.js
@@ -54,15 +54,17 @@ is separate from validation, and `allowed-pattern` does not affect how the input
/**
* Set to true to prevent the user from entering invalid input. The new input characters are
- * matched with `allowedPattern` if it is set, otherwise it will use the `pattern` attribute if
- * set, or the `type` attribute (only supported for `type=number`).
+ * matched with `allowedPattern` if it is set, otherwise it will use the `type` attribute (only
+ * supported for `type=number`).
*/
preventInvalidInput: {
type: Boolean
},
/**
- * Regular expression to match valid input characters.
+ * Regular expression expressing a set of characters to enforce the validity of input characters.
+ * The recommended value should follow this format: `[a-ZA-Z0-9.+-!;:]` that list the characters
+ * allowed as input.
*/
allowedPattern: {
type: String,
@@ -90,8 +92,6 @@ is separate from validation, and `allowed-pattern` does not affect how the input
var pattern;
if (this.allowedPattern) {
pattern = new RegExp(this.allowedPattern);
- } else if (this.pattern) {
- pattern = new RegExp(this.pattern);
} else {
switch (this.type) {
case 'number':
@@ -111,7 +111,7 @@ is separate from validation, and `allowed-pattern` does not affect how the input
*/
_bindValueChanged: function() {
if (this.value !== this.bindValue) {
- this.value = !(this.bindValue || this.bindValue === 0) ? '' : this.bindValue;
+ this.value = !(this.bindValue || this.bindValue === 0 || this.bindValue === false) ? '' : this.bindValue;
}
// manually notify because we don't want to notify until after setting value
this.fire('bind-value-changed', {value: this.bindValue});
@@ -220,8 +220,8 @@ is separate from validation, and `allowed-pattern` does not affect how the input
if (this.hasValidator()) {
valid = Polymer.IronValidatableBehavior.validate.call(this, this.value);
} else {
- this.invalid = !this.validity.valid;
- valid = this.validity.valid;
+ valid = this.checkValidity();
+ this.invalid = !valid;
}
this.fire('iron-input-validate');
return valid;

Powered by Google App Engine
This is Rietveld 408576698