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

Unified Diff: third_party/WebKit/Source/devtools/front_end/sources/ScriptFormatter.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/sources/ScriptFormatter.js
diff --git a/third_party/WebKit/Source/devtools/front_end/sources/ScriptFormatter.js b/third_party/WebKit/Source/devtools/front_end/sources/ScriptFormatter.js
index 11a8eed042073f6a0466aea5098952d4e13ccb0d..95c542f3b5b4e31c79bbd6283b4ea83f526ad249 100644
--- a/third_party/WebKit/Source/devtools/front_end/sources/ScriptFormatter.js
+++ b/third_party/WebKit/Source/devtools/front_end/sources/ScriptFormatter.js
@@ -36,7 +36,7 @@ Sources.Formatter = function() {};
* @param {!Common.ResourceType} contentType
* @param {string} mimeType
* @param {string} content
- * @param {function(string, !Sources.FormatterSourceMapping)} callback
+ * @param {function(string, !Workspace.UISourceCode.SourceMapping)} callback
*/
Sources.Formatter.format = function(contentType, mimeType, content, callback) {
if (contentType.isDocumentOrScriptOrStyleSheet())
@@ -78,7 +78,7 @@ Sources.ScriptFormatter = class {
/**
* @param {string} mimeType
* @param {string} content
- * @param {function(string, !Sources.FormatterSourceMapping)} callback
+ * @param {function(string, !Workspace.UISourceCode.SourceMapping)} callback
*/
constructor(mimeType, content, callback) {
content = content.replace(/\r\n?|[\n\u2028\u2029]/g, '\n').replace(/^\uFEFF/, '');
@@ -103,7 +103,7 @@ Sources.ScriptFormatter = class {
formattedContent = event.data.content;
mapping = event.data['mapping'];
}
- var sourceMapping = new Sources.FormatterSourceMappingImpl(
+ var sourceMapping = new Workspace.UISourceCode.SourceMappingImpl(
this._originalContent.computeLineEndings(), formattedContent.computeLineEndings(), mapping);
this._callback(formattedContent, sourceMapping);
}
@@ -117,7 +117,7 @@ Sources.ScriptIdentityFormatter = class {
/**
* @param {string} mimeType
* @param {string} content
- * @param {function(string, !Sources.FormatterSourceMapping)} callback
+ * @param {function(string, !Workspace.UISourceCode.SourceMapping)} callback
*/
constructor(mimeType, content, callback) {
callback(content, new Sources.IdentityFormatterSourceMapping());
@@ -130,28 +130,7 @@ Sources.ScriptIdentityFormatter = class {
Sources.FormatterMappingPayload;
/**
- * @interface
- */
-Sources.FormatterSourceMapping = function() {};
-
-Sources.FormatterSourceMapping.prototype = {
- /**
- * @param {number} lineNumber
- * @param {number=} columnNumber
- * @return {!Array.<number>}
- */
- originalToFormatted: function(lineNumber, columnNumber) {},
-
- /**
- * @param {number} lineNumber
- * @param {number=} columnNumber
- * @return {!Array.<number>}
- */
- formattedToOriginal: function(lineNumber, columnNumber) {}
-};
-
-/**
- * @implements {Sources.FormatterSourceMapping}
+ * @implements {Workspace.UISourceCode.SourceMapping}
* @unrestricted
*/
Sources.IdentityFormatterSourceMapping = class {
@@ -177,10 +156,10 @@ Sources.IdentityFormatterSourceMapping = class {
};
/**
- * @implements {Sources.FormatterSourceMapping}
+ * @implements {Workspace.UISourceCode.SourceMapping}
* @unrestricted
*/
-Sources.FormatterSourceMappingImpl = class {
+Workspace.UISourceCode.SourceMappingImpl = class {
/**
* @param {!Array.<number>} originalLineEndings
* @param {!Array.<number>} formattedLineEndings

Powered by Google App Engine
This is Rietveld 408576698