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

Unified Diff: third_party/WebKit/Source/devtools/front_end/components_lazy/CoverageProfile.js

Issue 2492343002: Devtools: Pretty print fix for CSS coverage decorations. (Closed)
Patch Set: Pretty print fix for CSS coverage decorations. Created 4 years, 1 month 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/components_lazy/CoverageProfile.js
diff --git a/third_party/WebKit/Source/devtools/front_end/components_lazy/CoverageProfile.js b/third_party/WebKit/Source/devtools/front_end/components_lazy/CoverageProfile.js
index ca61e6107a0a9f536a7dcf3b8e319c561d6ab787..a2d43ab62e49389519064b14afd121302b6e157e 100644
--- a/third_party/WebKit/Source/devtools/front_end/components_lazy/CoverageProfile.js
+++ b/third_party/WebKit/Source/devtools/front_end/components_lazy/CoverageProfile.js
@@ -30,8 +30,10 @@ WebInspector.CoverageProfile = class {
if (!uiSourceCode)
return;
+ if (range.startColumn)
lushnikov 2016/11/11 23:28:01 why is this?
+ range.startColumn--;
for (var line = range.startLine; line <= range.endLine; ++line)
- uiSourceCode.addLineDecoration(line, WebInspector.CoverageProfile.LineDecorator.type, range.startColumn);
+ uiSourceCode.addLineDecoration(line, WebInspector.CoverageProfile.LineDecorator.type, range);
}
reset() {
@@ -54,12 +56,12 @@ WebInspector.CoverageProfile.LineDecorator = class {
var decorations = uiSourceCode.lineDecorations(WebInspector.CoverageProfile.LineDecorator.type);
textEditor.uninstallGutter(gutterType);
- if (!decorations)
+ if (!decorations || !decorations.size)
return;
textEditor.installGutter(gutterType, false);
- for (var decoration of decorations.values()) {
+ for (var decoration of decorations) {
var element = createElementWithClass('div', 'text-editor-line-marker-coverage');
textEditor.setGutterDecoration(decoration.line(), gutterType, element);
}

Powered by Google App Engine
This is Rietveld 408576698