| 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 5db383122ce66352e0ea32f69318f477620bd3ca..acb4c94269234ca641356e1ec9b74465d387990a 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,6 @@ SourceFrame.SourcesTextEditor = class extends TextEditor.CodeMirrorTextEditor {
|
|
|
| this._delegate = delegate;
|
|
|
| - this.codeMirror().on('changes', this._fireTextChanged.bind(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));
|
| @@ -306,9 +305,6 @@ SourceFrame.SourcesTextEditor = class extends TextEditor.CodeMirrorTextEditor {
|
| */
|
| editRange(range, text, origin) {
|
| var newRange = super.editRange(range, text, origin);
|
| - this.dispatchEventToListeners(
|
| - SourceFrame.SourcesTextEditor.Events.TextChanged, {oldRange: range, newRange: newRange});
|
| -
|
| if (Common.moduleSetting('textEditorAutoDetectIndent').get())
|
| this._onUpdateEditorIndentation();
|
|
|
| @@ -377,31 +373,6 @@ SourceFrame.SourcesTextEditor = class extends TextEditor.CodeMirrorTextEditor {
|
| }
|
| }
|
|
|
| - /**
|
| - * @param {!CodeMirror} codeMirror
|
| - * @param {!Array.<!CodeMirror.ChangeObject>} changes
|
| - */
|
| - _fireTextChanged(codeMirror, changes) {
|
| - if (!changes.length || this._muteTextChangedEvent)
|
| - return;
|
| - var edits = [];
|
| - var currentEdit;
|
| -
|
| - for (var changeIndex = 0; changeIndex < changes.length; ++changeIndex) {
|
| - var changeObject = changes[changeIndex];
|
| - var edit = TextEditor.CodeMirrorUtils.changeObjectToEditOperation(changeObject);
|
| - if (currentEdit && edit.oldRange.equal(currentEdit.newRange)) {
|
| - currentEdit.newRange = edit.newRange;
|
| - } else {
|
| - currentEdit = edit;
|
| - edits.push(currentEdit);
|
| - }
|
| - }
|
| -
|
| - for (var i = 0; i < edits.length; ++i)
|
| - this.dispatchEventToListeners(SourceFrame.SourcesTextEditor.Events.TextChanged, edits[i]);
|
| - }
|
| -
|
| _cursorActivity() {
|
| if (!this._isSearchActive())
|
| this.codeMirror().operation(this._tokenHighlighter.highlightSelectedTokens.bind(this._tokenHighlighter));
|
| @@ -465,11 +436,9 @@ SourceFrame.SourcesTextEditor = class extends TextEditor.CodeMirrorTextEditor {
|
| * @param {string} text
|
| */
|
| setText(text) {
|
| - this._muteTextChangedEvent = true;
|
| this._setEditorIndentation(
|
| text.split('\n').slice(0, SourceFrame.SourcesTextEditor.LinesToScanForIndentationGuessing));
|
| super.setText(text);
|
| - delete this._muteTextChangedEvent;
|
| }
|
|
|
| _updateWhitespace() {
|
| @@ -582,7 +551,6 @@ SourceFrame.SourcesTextEditor.GutterClickEventData;
|
| /** @enum {symbol} */
|
| SourceFrame.SourcesTextEditor.Events = {
|
| GutterClick: Symbol('GutterClick'),
|
| - TextChanged: Symbol('TextChanged'),
|
| SelectionChanged: Symbol('SelectionChanged'),
|
| ScrollChanged: Symbol('ScrollChanged'),
|
| EditorFocused: Symbol('EditorFocused'),
|
|
|