Chromium Code Reviews| 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 e397119eae4b77ff588efc95f3269686d0bff4b9..618661506945cd52f83f8d4ab8a312970eccb695 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 |
| @@ -20,7 +20,7 @@ Components.CoverageProfile = class { |
| /** |
| * @param {string} url |
| - * @param {!Protocol.CSS.SourceRange} range |
| + * @param {!Common.TextRange} range |
| */ |
| appendUnusedRule(url, range) { |
| if (!url) |
| @@ -30,8 +30,9 @@ Components.CoverageProfile = class { |
| if (!uiSourceCode) |
| return; |
|
valih
2016/11/15 18:56:24
range.startColumn is the first position after the
|
| - for (var line = range.startLine; line <= range.endLine; ++line) |
| - uiSourceCode.addLineDecoration(line, Components.CoverageProfile.LineDecorator.type, range.startColumn); |
| + if (range.startColumn) |
| + range.startColumn--; |
| + uiSourceCode.addDecoration(range, Components.CoverageProfile.LineDecorator.type, 0); |
| } |
| reset() { |
| @@ -59,9 +60,11 @@ Components.CoverageProfile.LineDecorator = class { |
| textEditor.installGutter(gutterType, false); |
| - for (var decoration of decorations.values()) { |
| - var element = createElementWithClass('div', 'text-editor-line-marker-coverage'); |
| - textEditor.setGutterDecoration(decoration.line(), gutterType, element); |
| + for (var decoration of decorations.keys()) { |
| + for (var line = decoration.startLine; line <= decoration.endLine; ++line) { |
| + var element = createElementWithClass('div', 'text-editor-line-marker-coverage'); |
| + textEditor.setGutterDecoration(line, gutterType, element); |
| + } |
| } |
| } |
| }; |