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

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

Issue 2342643002: DevTools: Don't refresh CodeMirror if it is hidden (Closed)
Patch Set: indexOf Created 4 years, 3 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/text_editor/CodeMirrorTextEditor.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 ea0a246d9679cf435ad80d6bbe8eae53a0def339..75f1b6ec0e69ed5c7cf9b29639acbf218bc3c427 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
@@ -174,7 +174,7 @@ WebInspector.SourcesTextEditor.prototype = {
this._gutters.push(type);
this.codeMirror().setOption("gutters", this._gutters.slice());
- this.codeMirror().refresh();
+ this.refresh();
},
/**
@@ -182,9 +182,12 @@ WebInspector.SourcesTextEditor.prototype = {
*/
uninstallGutter: function(type)
{
- this._gutters = this._gutters.filter(gutter => gutter !== type);
+ var index = this._gutters.indexOf(type);
+ if (index === -1)
+ return;
+ this._gutters.splice(index,1);
this.codeMirror().setOption("gutters", this._gutters.slice());
- this.codeMirror().refresh();
+ this.refresh();
},
/**
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/text_editor/CodeMirrorTextEditor.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698