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

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

Issue 2729783002: DevTools: Diff subsystem (Closed)
Patch Set: constant 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/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..55c00c5d519d2ce6c041e9eebcb29a506c182b19 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
@@ -39,7 +39,8 @@ SourceFrame.UISourceCodeFrame = class extends SourceFrame.SourceFrame {
this.setEditable(this._canEditSource());
if (Runtime.experiments.isEnabled('sourceDiff'))
- this._diff = new SourceFrame.SourceCodeDiff(uiSourceCode.requestOriginalContent(), this.textEditor);
+ this._diff = new SourceFrame.SourceCodeDiff(uiSourceCode, this.textEditor);
+
/** @type {?UI.AutocompleteConfig} */
this._autocompleteConfig = {isWordChar: Common.TextUtils.isWordChar};
@@ -166,8 +167,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 +188,6 @@ SourceFrame.UISourceCodeFrame = class extends SourceFrame.SourceFrame {
* @param {!Common.TextRange} newRange
*/
onTextChanged(oldRange, newRange) {
- if (this._diff)
- this._diff.updateDiffMarkersWhenPossible();
super.onTextChanged(oldRange, newRange);
this._errorPopoverHelper.hidePopover();
if (this._isSettingContent)
@@ -320,6 +317,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();

Powered by Google App Engine
This is Rietveld 408576698