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

Unified Diff: third_party/WebKit/Source/devtools/front_end/source_frame/SourcesTextEditor.js

Issue 2565113002: DevTools: update console viewport scroll when prompt is resized (Closed)
Patch Set: SourcesTE listen to same event Created 3 years, 9 months 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/source_frame/SourcesTextEditor.js
diff --git a/third_party/WebKit/Source/devtools/front_end/source_frame/SourcesTextEditor.js b/third_party/WebKit/Source/devtools/front_end/source_frame/SourcesTextEditor.js
index af8f11d6aa1d9a2fabaa259efeb4436dcabbf06e..3cfe7f961dc11d0187f07bf472c9a42b72231d76 100644
--- a/third_party/WebKit/Source/devtools/front_end/source_frame/SourcesTextEditor.js
+++ b/third_party/WebKit/Source/devtools/front_end/source_frame/SourcesTextEditor.js
@@ -20,7 +20,7 @@ SourceFrame.SourcesTextEditor = class extends TextEditor.CodeMirrorTextEditor {
this._delegate = delegate;
- this.codeMirror().on('changes', this._fireTextChanged.bind(this));
+ this.on(UI.TextEditor.ContentChangedEvent, this._fireTextChanged, this);
this.codeMirror().on('cursorActivity', this._cursorActivity.bind(this));
this.codeMirror().on('gutterClick', this._gutterClick.bind(this));
this.codeMirror().on('scroll', this._scroll.bind(this));
@@ -378,12 +378,12 @@ SourceFrame.SourcesTextEditor = class extends TextEditor.CodeMirrorTextEditor {
}
/**
- * @param {!CodeMirror} codeMirror
- * @param {!Array.<!CodeMirror.ChangeObject>} changes
+ * @param {!UI.TextEditor.ContentChangedEvent} event
*/
- _fireTextChanged(codeMirror, changes) {
- if (!changes.length || this._muteTextChangedEvent)
+ _fireTextChanged(event) {
+ if (this._muteTextChangedEvent)
return;
+ var changes = event.changes;
var edits = [];
var currentEdit;

Powered by Google App Engine
This is Rietveld 408576698