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

Unified Diff: Source/devtools/front_end/sources/JavaScriptSourceFrame.js

Issue 667163002: DevTools: Do not toggle line styles unless necessary in script editor. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 2 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/sources/JavaScriptSourceFrame.js
diff --git a/Source/devtools/front_end/sources/JavaScriptSourceFrame.js b/Source/devtools/front_end/sources/JavaScriptSourceFrame.js
index e9e3ef0aa2730e1b34738be8dff91c9c14a5881c..97357153f74ab0e1c64a250bf108770d57972cc7 100644
--- a/Source/devtools/front_end/sources/JavaScriptSourceFrame.js
+++ b/Source/devtools/front_end/sources/JavaScriptSourceFrame.js
@@ -774,8 +774,13 @@ WebInspector.JavaScriptSourceFrame.prototype = {
_updateLinesWithoutMappingHighlight: function()
{
var linesCount = this.textEditor.linesCount;
- for (var i = 0; i < linesCount; ++i)
- this.textEditor.toggleLineClass(i, "cm-line-without-source-mapping", !WebInspector.debuggerWorkspaceBinding.uiLineHasMapping(this._uiSourceCode, i));
+ for (var i = 0; i < linesCount; ++i) {
+ var lineHasMapping = WebInspector.debuggerWorkspaceBinding.uiLineHasMapping(this._uiSourceCode, i);
+ if (!lineHasMapping)
+ this._hasLineWithoutMapping = true;
+ if (!lineHasMapping || this._hasLineWithoutMapping)
lushnikov 2014/10/22 11:23:43 if (this._hasLineWithoutMapping)
+ this.textEditor.toggleLineClass(i, "cm-line-without-source-mapping", !lineHasMapping);
+ }
},
/**
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698