Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 26 matching lines...) Expand all Loading... | |
| 37 delete this._initialText; | 37 delete this._initialText; |
| 38 if (this.hasFocus()) | 38 if (this.hasFocus()) |
| 39 this.focus(); | 39 this.focus(); |
| 40 this.element.tabIndex = -1; | 40 this.element.tabIndex = -1; |
| 41 | 41 |
| 42 this._editorSetForTest(); | 42 this._editorSetForTest(); |
| 43 } | 43 } |
| 44 } | 44 } |
| 45 | 45 |
| 46 /** | 46 /** |
| 47 * @override | |
| 48 */ | |
| 49 onLayout() { | |
| 50 this.invalidateSize(); | |
|
pfeldman
2016/12/13 20:06:39
What is the semantics of this code? When do you ge
luoe
2016/12/13 20:29:55
Semantics are as follows: user changes the height
| |
| 51 } | |
| 52 | |
| 53 /** | |
| 47 * @return {!Console.ConsoleHistoryManager} | 54 * @return {!Console.ConsoleHistoryManager} |
| 48 */ | 55 */ |
| 49 history() { | 56 history() { |
| 50 return this._history; | 57 return this._history; |
| 51 } | 58 } |
| 52 | 59 |
| 53 clearAutocomplete() { | 60 clearAutocomplete() { |
| 54 if (this._editor) | 61 if (this._editor) |
| 55 this._editor.clearAutocomplete(); | 62 this._editor.clearAutocomplete(); |
| 56 } | 63 } |
| (...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 357 return this._currentHistoryItem(); | 364 return this._currentHistoryItem(); |
| 358 } | 365 } |
| 359 | 366 |
| 360 /** | 367 /** |
| 361 * @return {string|undefined} | 368 * @return {string|undefined} |
| 362 */ | 369 */ |
| 363 _currentHistoryItem() { | 370 _currentHistoryItem() { |
| 364 return this._data[this._data.length - this._historyOffset]; | 371 return this._data[this._data.length - this._historyOffset]; |
| 365 } | 372 } |
| 366 }; | 373 }; |
| OLD | NEW |