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

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: 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..1254046e2c9f09bfd386143035661fba0b366db8 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().dispatchEventToListeners(UI.TextEditor.Events.EditorResized);
einbinder 2016/12/12 20:35:20 invalidateSize again here?
luoe 2016/12/13 03:34:44 Done.
+ }
this._hasOneLine = hasOneLine;
this._decorations.valuesArray().forEach(decoration => this._codeMirror.removeLineWidget(decoration.widget));

Powered by Google App Engine
This is Rietveld 408576698