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

Unified Diff: third_party/WebKit/Source/devtools/front_end/text_editor/CodeMirrorUtils.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/text_editor/CodeMirrorUtils.js
diff --git a/third_party/WebKit/Source/devtools/front_end/text_editor/CodeMirrorUtils.js b/third_party/WebKit/Source/devtools/front_end/text_editor/CodeMirrorUtils.js
index 273205e737537e9a3611e07239fe9af1b7321ea6..7879da122fb79fbdc2d505f5a26e5f07616a9627 100644
--- a/third_party/WebKit/Source/devtools/front_end/text_editor/CodeMirrorUtils.js
+++ b/third_party/WebKit/Source/devtools/front_end/text_editor/CodeMirrorUtils.js
@@ -31,13 +31,13 @@
/**
* @unrestricted
*/
-WebInspector.CodeMirrorUtils = class extends WebInspector.InplaceEditor {
+TextEditor.CodeMirrorUtils = class extends UI.InplaceEditor {
constructor() {
super();
}
/**
- * @param {!WebInspector.TextRange} range
+ * @param {!Common.TextRange} range
* @return {!{start: !CodeMirror.Pos, end: !CodeMirror.Pos}}
*/
static toPos(range) {
@@ -50,18 +50,18 @@ WebInspector.CodeMirrorUtils = class extends WebInspector.InplaceEditor {
/**
* @param {!CodeMirror.Pos} start
* @param {!CodeMirror.Pos} end
- * @return {!WebInspector.TextRange}
+ * @return {!Common.TextRange}
*/
static toRange(start, end) {
- return new WebInspector.TextRange(start.line, start.ch, end.line, end.ch);
+ return new Common.TextRange(start.line, start.ch, end.line, end.ch);
}
/**
* @param {!CodeMirror.ChangeObject} changeObject
- * @return {{oldRange: !WebInspector.TextRange, newRange: !WebInspector.TextRange}}
+ * @return {{oldRange: !Common.TextRange, newRange: !Common.TextRange}}
*/
static changeObjectToEditOperation(changeObject) {
- var oldRange = WebInspector.CodeMirrorUtils.toRange(changeObject.from, changeObject.to);
+ var oldRange = TextEditor.CodeMirrorUtils.toRange(changeObject.from, changeObject.to);
var newRange = oldRange.clone();
var linesAdded = changeObject.text.length;
if (linesAdded === 0) {
@@ -99,7 +99,7 @@ WebInspector.CodeMirrorUtils = class extends WebInspector.InplaceEditor {
* @param {!Element} element
*/
static appendThemeStyle(element) {
- if (WebInspector.themeSupport.hasTheme())
+ if (UI.themeSupport.hasTheme())
return;
var backgroundColor = InspectorFrontendHost.getSelectionBackgroundColor();
var backgroundColorRule =
@@ -136,7 +136,7 @@ WebInspector.CodeMirrorUtils = class extends WebInspector.InplaceEditor {
setUpEditor(editingContext) {
var element = editingContext.element;
var config = editingContext.config;
- editingContext.cssLoadView = new WebInspector.CodeMirrorCSSLoadView();
+ editingContext.cssLoadView = new TextEditor.CodeMirrorCSSLoadView();
editingContext.cssLoadView.show(element);
element.focus();
element.addEventListener('copy', this._consumeCopy, false);
@@ -189,10 +189,10 @@ WebInspector.CodeMirrorUtils = class extends WebInspector.InplaceEditor {
/**
- * @implements {WebInspector.TokenizerFactory}
+ * @implements {Common.TokenizerFactory}
* @unrestricted
*/
-WebInspector.CodeMirrorUtils.TokenizerFactory = class {
+TextEditor.CodeMirrorUtils.TokenizerFactory = class {
/**
* @override
* @param {string} mimeType
@@ -217,7 +217,7 @@ WebInspector.CodeMirrorUtils.TokenizerFactory = class {
/**
* @unrestricted
*/
-WebInspector.CodeMirrorCSSLoadView = class extends WebInspector.VBox {
+TextEditor.CodeMirrorCSSLoadView = class extends UI.VBox {
/**
* This bogus view is needed to load/unload CodeMirror-related CSS on demand.
*/
@@ -226,6 +226,6 @@ WebInspector.CodeMirrorCSSLoadView = class extends WebInspector.VBox {
this.element.classList.add('hidden');
this.registerRequiredCSS('cm/codemirror.css');
this.registerRequiredCSS('text_editor/cmdevtools.css');
- WebInspector.CodeMirrorUtils.appendThemeStyle(this.element);
+ TextEditor.CodeMirrorUtils.appendThemeStyle(this.element);
}
};

Powered by Google App Engine
This is Rietveld 408576698