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

Unified Diff: third_party/polymer/components-chromium/paper-input/paper-autogrow-textarea-extracted.js

Issue 1215543002: Remove Polymer 0.5. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix unit test 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 side-by-side diff with in-line comments
Download patch
Index: third_party/polymer/components-chromium/paper-input/paper-autogrow-textarea-extracted.js
diff --git a/third_party/polymer/components-chromium/paper-input/paper-autogrow-textarea-extracted.js b/third_party/polymer/components-chromium/paper-input/paper-autogrow-textarea-extracted.js
deleted file mode 100644
index aa43fe983a84626df42f2ad0e4ad998e2954e7bb..0000000000000000000000000000000000000000
--- a/third_party/polymer/components-chromium/paper-input/paper-autogrow-textarea-extracted.js
+++ /dev/null
@@ -1,84 +0,0 @@
-
-
- Polymer('paper-autogrow-textarea',{
-
- publish: {
-
- /**
- * The textarea that should auto grow.
- *
- * @attribute target
- * @type HTMLTextAreaElement
- * @default null
- */
- target: null,
-
- /**
- * The initial number of rows.
- *
- * @attribute rows
- * @type number
- * @default 1
- */
- rows: 1,
-
- /**
- * The maximum number of rows this element can grow to until it
- * scrolls. 0 means no maximum.
- *
- * @attribute maxRows
- * @type number
- * @default 0
- */
- maxRows: 0
- },
-
- tokens: null,
-
- observe: {
- rows: 'updateCached',
- maxRows: 'updateCached'
- },
-
- constrain: function(tokens) {
- var _tokens;
- tokens = tokens || [''];
- // Enforce the min and max heights for a multiline input to avoid measurement
- if (this.maxRows > 0 && tokens.length > this.maxRows) {
- _tokens = tokens.slice(0, this.maxRows);
- } else {
- _tokens = tokens.slice(0);
- }
- while (this.rows > 0 && _tokens.length < this.rows) {
- _tokens.push('');
- }
- return _tokens.join('<br>') + '&nbsp;';
- },
-
- valueForMirror: function(input) {
- this.tokens = (input && input.value) ? input.value.replace(/&/gm, '&amp;').replace(/"/gm, '&quot;').replace(/'/gm, '&#39;').replace(/</gm, '&lt;').replace(/>/gm, '&gt;').split('\n') : [''];
- return this.constrain(this.tokens);
- },
-
- /**
- * Sizes this element to fit the input value. This function is automatically called
- * when the user types in new input, but you must call this function if the value
- * is updated imperatively.
- *
- * @method update
- * @param Element The input
- */
- update: function(input) {
- this.$.mirror.innerHTML = this.valueForMirror(input);
- },
-
- updateCached: function() {
- this.$.mirror.innerHTML = this.constrain(this.tokens);
- },
-
- inputAction: function(e) {
- this.update(e.target);
- }
-
- });
-

Powered by Google App Engine
This is Rietveld 408576698