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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/console/ConsolePrompt.js

Issue 2576243002: DevTools: keep the stick to bottom behavior and update scroll bar position while iterating console … (Closed)
Patch Set: Created 4 years 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 /** 4 /**
5 * @unrestricted 5 * @unrestricted
6 */ 6 */
7 Console.ConsolePrompt = class extends UI.Widget { 7 Console.ConsolePrompt = class extends UI.Widget {
8 constructor() { 8 constructor() {
9 super(); 9 super();
10 this._addCompletionsFromHistory = true; 10 this._addCompletionsFromHistory = true;
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 130
131 if (newText === undefined) 131 if (newText === undefined)
132 return; 132 return;
133 keyboardEvent.consume(true); 133 keyboardEvent.consume(true);
134 this.setText(newText); 134 this.setText(newText);
135 135
136 if (isPrevious) 136 if (isPrevious)
137 this._editor.setSelection(Common.TextRange.createFromLocation(0, Infinity) ); 137 this._editor.setSelection(Common.TextRange.createFromLocation(0, Infinity) );
138 else 138 else
139 this.moveCaretToEndOfPrompt(); 139 this.moveCaretToEndOfPrompt();
140 this.setMinimumSize(0, this._editor.widget().element.offsetHeight);
140 } 141 }
141 142
142 /** 143 /**
143 * @param {!KeyboardEvent} event 144 * @param {!KeyboardEvent} event
144 */ 145 */
145 _enterKeyPressed(event) { 146 _enterKeyPressed(event) {
146 if (event.altKey || event.ctrlKey || event.shiftKey) 147 if (event.altKey || event.ctrlKey || event.shiftKey)
147 return; 148 return;
148 149
149 event.consume(true); 150 event.consume(true);
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 return this._currentHistoryItem(); 358 return this._currentHistoryItem();
358 } 359 }
359 360
360 /** 361 /**
361 * @return {string|undefined} 362 * @return {string|undefined}
362 */ 363 */
363 _currentHistoryItem() { 364 _currentHistoryItem() {
364 return this._data[this._data.length - this._historyOffset]; 365 return this._data[this._data.length - this._historyOffset];
365 } 366 }
366 }; 367 };
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698