| 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
|
|
|