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

Unified Diff: third_party/WebKit/Source/devtools/front_end/sources/InplaceFormatterEditorAction.js

Issue 2865573003: DevTools: support live coverage (Closed)
Patch Set: fixed accidentally creating too many promises for one resource Created 3 years, 7 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
Index: third_party/WebKit/Source/devtools/front_end/sources/InplaceFormatterEditorAction.js
diff --git a/third_party/WebKit/Source/devtools/front_end/sources/InplaceFormatterEditorAction.js b/third_party/WebKit/Source/devtools/front_end/sources/InplaceFormatterEditorAction.js
index 0ac3c147d99326e63fcbdec4550a25b4a768787d..5b8ca74de02503280cfb7d8eee4dc3c6de7c38b5 100644
--- a/third_party/WebKit/Source/devtools/front_end/sources/InplaceFormatterEditorAction.js
+++ b/third_party/WebKit/Source/devtools/front_end/sources/InplaceFormatterEditorAction.js
@@ -101,31 +101,8 @@ Sources.InplaceFormatterEditorAction = class {
start = formatterMapping.originalToFormatted(selection.startLine, selection.startColumn);
}
uiSourceCode.setWorkingCopy(formattedContent);
- this._formatDecorations(uiSourceCode, formatterMapping);
this._sourcesView.showSourceLocation(uiSourceCode, start[0], start[1]);
}
}
-
- /**
- * @param {!Workspace.UISourceCode} uiSourceCode
- * @param {!Sources.FormatterSourceMapping} sourceMapping
- */
- _formatDecorations(uiSourceCode, sourceMapping) {
- var decorations = uiSourceCode.allDecorations();
- if (!decorations.length)
- return;
-
- uiSourceCode.removeAllDecorations();
-
- for (var decoration of decorations) {
- var range = decoration.range();
- var startLocation = sourceMapping.originalToFormatted(range.startLine, range.startColumn);
- var endLocation = sourceMapping.originalToFormatted(range.endLine, range.endColumn);
-
- uiSourceCode.addDecoration(
- new TextUtils.TextRange(startLocation[0], startLocation[1], endLocation[0], endLocation[1]),
- /** @type {string} */ (decoration.type()), decoration.data());
- }
- }
};

Powered by Google App Engine
This is Rietveld 408576698