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

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

Issue 2565113002: DevTools: update console viewport scroll when prompt is resized (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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/devtools/front_end/console/ConsolePrompt.js
diff --git a/third_party/WebKit/Source/devtools/front_end/console/ConsolePrompt.js b/third_party/WebKit/Source/devtools/front_end/console/ConsolePrompt.js
index 6b8f50f9c2939558001c6a6dcd02c3e1324c325b..3b9d269b1c48e29d93bd203210831a29ada79e5f 100644
--- a/third_party/WebKit/Source/devtools/front_end/console/ConsolePrompt.js
+++ b/third_party/WebKit/Source/devtools/front_end/console/ConsolePrompt.js
@@ -32,6 +32,9 @@ Console.ConsolePrompt = class extends UI.Widget {
});
this._editor.widget().element.addEventListener('keydown', this._editorKeyDown.bind(this), true);
this._editor.widget().show(this.element);
+ var consoleView = Console.ConsoleView.instance();
einbinder 2016/12/12 20:35:20 Instead of finding a consoleView instance, can we
luoe 2016/12/13 03:34:44 Done, except it will call onLayout in ConsoleView.
+ var onEditorResized = consoleView.scheduleViewportRefresh.bind(consoleView);
+ this._editor.widget().addEventListener(UI.TextEditor.Events.EditorResized, onEditorResized);
this.setText(this._initialText);
delete this._initialText;

Powered by Google App Engine
This is Rietveld 408576698