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

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

Issue 1766433002: Roll Polymer to 1.3.1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 9 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-autogrow-textarea/iron-autogrow-textarea-extracted.js
diff --git a/third_party/polymer/v1_0/components-chromium/iron-autogrow-textarea/iron-autogrow-textarea-extracted.js b/third_party/polymer/v1_0/components-chromium/iron-autogrow-textarea/iron-autogrow-textarea-extracted.js
index 6bec3180dad45fdaf13ee89cc311a0c9894cf1c2..464100f979a12bf4d1d1c2f2a84162db83a69d18 100644
--- a/third_party/polymer/v1_0/components-chromium/iron-autogrow-textarea/iron-autogrow-textarea-extracted.js
+++ b/third_party/polymer/v1_0/components-chromium/iron-autogrow-textarea/iron-autogrow-textarea-extracted.js
@@ -12,8 +12,8 @@ Polymer({
/**
* Use this property instead of `value` for two-way data binding.
- *
- * @type {string|number|undefined|null}
+ * This property will be deprecated in the future. Use `value` instead.
+ * @type {string|number}
*/
bindValue: {
observer: '_bindValueChanged',
@@ -71,22 +71,6 @@ Polymer({
},
/**
- * Bound to the textarea's `name` attribute.
- */
- name: {
- type: String
- },
-
- /**
- * The value for this input, same as `bindValue`
- */
- value: {
- notify: true,
- type: String,
- computed: '_computeValue(bindValue)'
- },
-
- /**
* Bound to the textarea's `placeholder` attribute.
*/
placeholder: {
@@ -120,6 +104,10 @@ Polymer({
'input': '_onInput'
},
+ observers: [
+ '_onValueChanged(value)'
+ ],
+
/**
* Returns the underlying textarea.
* @type HTMLTextAreaElement
@@ -196,6 +184,7 @@ Polymer({
textarea.value = !(this.bindValue || this.bindValue === 0) ? '' : this.bindValue;
}
+ this.value = this.bindValue;
this.$.mirror.innerHTML = this._valueForMirror();
// manually notify because we don't want to notify until after setting value
this.fire('bind-value-changed', {value: this.bindValue});
@@ -234,7 +223,7 @@ Polymer({
this.$.mirror.innerHTML = this._constrain(this.tokens);
},
- _computeValue: function() {
- return this.bindValue;
+ _onValueChanged: function() {
+ this.bindValue = this.value;
}
});

Powered by Google App Engine
This is Rietveld 408576698