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

Unified Diff: third_party/WebKit/Source/devtools/front_end/formatter_worker/JavaScriptFormatter.js

Issue 2493373002: DevTools: rename WebInspector into modules. (Closed)
Patch Set: for bots 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/formatter_worker/JavaScriptFormatter.js
diff --git a/third_party/WebKit/Source/devtools/front_end/formatter_worker/JavaScriptFormatter.js b/third_party/WebKit/Source/devtools/front_end/formatter_worker/JavaScriptFormatter.js
index 811a20398f3d678bf49129259525e3f2e39bbe3c..3c9e296f18326fccf79e04bc5bbc6ee8e90b49f8 100644
--- a/third_party/WebKit/Source/devtools/front_end/formatter_worker/JavaScriptFormatter.js
+++ b/third_party/WebKit/Source/devtools/front_end/formatter_worker/JavaScriptFormatter.js
@@ -31,9 +31,9 @@
/**
* @unrestricted
*/
-WebInspector.JavaScriptFormatter = class {
+FormatterWorker.JavaScriptFormatter = class {
/**
- * @param {!WebInspector.FormattedContentBuilder} builder
+ * @param {!FormatterWorker.FormattedContentBuilder} builder
*/
constructor(builder) {
this._builder = builder;
@@ -50,9 +50,9 @@ WebInspector.JavaScriptFormatter = class {
this._toOffset = toOffset;
this._content = text.substring(this._fromOffset, this._toOffset);
this._lastLineNumber = 0;
- this._tokenizer = new WebInspector.AcornTokenizer(this._content);
+ this._tokenizer = new FormatterWorker.AcornTokenizer(this._content);
var ast = acorn.parse(this._content, {ranges: false, ecmaVersion: 6});
- var walker = new WebInspector.ESTreeWalker(this._beforeVisit.bind(this), this._afterVisit.bind(this));
+ var walker = new FormatterWorker.ESTreeWalker(this._beforeVisit.bind(this), this._afterVisit.bind(this));
walker.walk(ast);
}
@@ -127,7 +127,7 @@ WebInspector.JavaScriptFormatter = class {
* @return {string}
*/
_formatToken(node, token) {
- var AT = WebInspector.AcornTokenizer;
+ var AT = FormatterWorker.AcornTokenizer;
if (AT.lineComment(token))
return 'tn';
if (AT.blockComment(token))

Powered by Google App Engine
This is Rietveld 408576698