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 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); |
| } |