Chromium Code Reviews| Index: third_party/WebKit/Source/devtools/front_end/source_frame/UISourceCodeFrame.js |
| diff --git a/third_party/WebKit/Source/devtools/front_end/source_frame/UISourceCodeFrame.js b/third_party/WebKit/Source/devtools/front_end/source_frame/UISourceCodeFrame.js |
| index c9f57c925e5bd3f8db65e0bfeb759582121ae54e..441fede5fbb94d2ee51c803cf9249dc7224607d7 100644 |
| --- a/third_party/WebKit/Source/devtools/front_end/source_frame/UISourceCodeFrame.js |
| +++ b/third_party/WebKit/Source/devtools/front_end/source_frame/UISourceCodeFrame.js |
| @@ -38,8 +38,10 @@ SourceFrame.UISourceCodeFrame = class extends SourceFrame.SourceFrame { |
| this._uiSourceCode = uiSourceCode; |
| this.setEditable(this._canEditSource()); |
| - if (Runtime.experiments.isEnabled('sourceDiff')) |
| - this._diff = new SourceFrame.SourceCodeDiff(uiSourceCode.requestOriginalContent(), this.textEditor); |
| + if (Runtime.experiments.isEnabled('sourceDiff')) { |
| + this._diff = |
| + new SourceFrame.SourceCodeDiff(WorkspaceDiff.UISourceCodeDiff.forUISourceCode(uiSourceCode), this.textEditor); |
| + } |
| /** @type {?UI.AutocompleteConfig} */ |
| this._autocompleteConfig = {isWordChar: Common.TextUtils.isWordChar}; |
| @@ -166,8 +168,6 @@ SourceFrame.UISourceCodeFrame = class extends SourceFrame.SourceFrame { |
| * @override |
| */ |
| onTextEditorContentSet() { |
| - if (this._diff) |
| - this._diff.updateDiffMarkersImmediately(); |
| super.onTextEditorContentSet(); |
| for (var message of this._allMessages()) |
| this._addMessageToSource(message); |
| @@ -189,8 +189,6 @@ SourceFrame.UISourceCodeFrame = class extends SourceFrame.SourceFrame { |
| * @param {!Common.TextRange} newRange |
| */ |
| onTextChanged(oldRange, newRange) { |
| - if (this._diff) |
| - this._diff.updateDiffMarkersWhenPossible(); |
|
lushnikov
2017/03/04 04:00:28
why did these go?
einbinder
2017/03/07 06:03:31
There is a DiffChanged event
|
| super.onTextChanged(oldRange, newRange); |
| this._errorPopoverHelper.hidePopover(); |
| if (this._isSettingContent) |
| @@ -320,6 +318,8 @@ SourceFrame.UISourceCodeFrame = class extends SourceFrame.SourceFrame { |
| } |
| dispose() { |
| + if (this._diff) |
| + this._diff.dispose(); |
| this.textEditor.dispose(); |
| Common.moduleSetting('textEditorAutocompletion').removeChangeListener(this._updateAutocomplete, this); |
| this.detach(); |