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

Unified Diff: third_party/WebKit/Source/devtools/front_end/text_editor/CodeMirrorTextEditor.js

Issue 2565113002: DevTools: update console viewport scroll when prompt is resized (Closed)
Patch Set: DevTools: console should update viewport when codemirror resizes 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/text_editor/CodeMirrorTextEditor.js
diff --git a/third_party/WebKit/Source/devtools/front_end/text_editor/CodeMirrorTextEditor.js b/third_party/WebKit/Source/devtools/front_end/text_editor/CodeMirrorTextEditor.js
index ee0ec96ec454fb6b1855e98e97729403b6b427f0..224dbebd3b151a72ce62e457fa0cb8a9e033b7bc 100644
--- a/third_party/WebKit/Source/devtools/front_end/text_editor/CodeMirrorTextEditor.js
+++ b/third_party/WebKit/Source/devtools/front_end/text_editor/CodeMirrorTextEditor.js
@@ -1022,8 +1022,10 @@ TextEditor.CodeMirrorTextEditor = class extends UI.VBox {
return;
// We do not show "scroll beyond end of file" span for one line documents, so we need to check if "document has one line" changed.
var hasOneLine = this._codeMirror.lineCount() === 1;
- if (hasOneLine !== this._hasOneLine)
+ if (hasOneLine !== this._hasOneLine) {
this._resizeEditor();
+ this.widget().invalidateSize();
einbinder 2016/12/13 19:35:30 this.widget() actually returns this. this.invalida
+ }
this._hasOneLine = hasOneLine;
this._decorations.valuesArray().forEach(decoration => this._codeMirror.removeLineWidget(decoration.widget));

Powered by Google App Engine
This is Rietveld 408576698