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

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: return to first approach 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();
dgozman 2016/12/14 17:28:43 This looks bad - ConsolePrompt should not reach in
+ 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