| 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 d543b80e0d435be860b99c21cc80f35b11951e82..30a295d61c5acaaa91bf0ccdb9862345dbf93429 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
|
| @@ -28,14 +28,7 @@
|
| * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| */
|
|
|
| -/**
|
| - * @constructor
|
| - * @extends {WebInspector.InplaceEditor}
|
| - */
|
| -WebInspector.CodeMirrorUtils = function()
|
| -{
|
| - WebInspector.InplaceEditor.call(this);
|
| -}
|
| +WebInspector.CodeMirrorUtils = {};
|
|
|
| /**
|
| * @param {!WebInspector.TextRange} range
|
| @@ -104,75 +97,6 @@ WebInspector.CodeMirrorUtils.pullLines = function(codeMirror, linesCount)
|
| }
|
| }
|
|
|
| -WebInspector.CodeMirrorUtils.prototype = {
|
| - /**
|
| - * @override
|
| - * @return {string}
|
| - */
|
| - editorContent: function(editingContext) {
|
| - return editingContext.codeMirror.getValue();
|
| - },
|
| -
|
| - /**
|
| - * @param {!Event} e
|
| - */
|
| - _consumeCopy: function(e)
|
| - {
|
| - e.consume();
|
| - },
|
| -
|
| - setUpEditor: function(editingContext)
|
| - {
|
| - var element = editingContext.element;
|
| - var config = editingContext.config;
|
| - editingContext.cssLoadView = new WebInspector.CodeMirrorCSSLoadView();
|
| - editingContext.cssLoadView.show(element);
|
| - WebInspector.setCurrentFocusElement(element);
|
| - element.addEventListener("copy", this._consumeCopy, false);
|
| - var codeMirror = new window.CodeMirror(element, {
|
| - mode: config.mode,
|
| - lineWrapping: config.lineWrapping,
|
| - lineWiseCopyCut: false,
|
| - smartIndent: config.smartIndent,
|
| - autofocus: true,
|
| - theme: config.theme,
|
| - value: config.initialValue
|
| - });
|
| - codeMirror.getWrapperElement().classList.add("source-code");
|
| - codeMirror.on("cursorActivity", function(cm) {
|
| - cm.display.cursorDiv.scrollIntoViewIfNeeded(false);
|
| - });
|
| - editingContext.codeMirror = codeMirror;
|
| - },
|
| -
|
| - closeEditor: function(editingContext)
|
| - {
|
| - editingContext.element.removeEventListener("copy", this._consumeCopy, false);
|
| - editingContext.cssLoadView.detach();
|
| - },
|
| -
|
| - cancelEditing: function(editingContext)
|
| - {
|
| - editingContext.codeMirror.setValue(editingContext.oldText);
|
| - },
|
| -
|
| - augmentEditingHandle: function(editingContext, handle)
|
| - {
|
| - function setWidth(editingContext, width)
|
| - {
|
| - var padding = 30;
|
| - var codeMirror = editingContext.codeMirror;
|
| - codeMirror.getWrapperElement().style.width = (width - codeMirror.getWrapperElement().offsetLeft - padding) + "px";
|
| - codeMirror.refresh();
|
| - }
|
| -
|
| - handle.codeMirror = editingContext.codeMirror;
|
| - handle.setWidth = setWidth.bind(null, editingContext);
|
| - },
|
| -
|
| - __proto__: WebInspector.InplaceEditor.prototype
|
| -}
|
| -
|
| /**
|
| * @constructor
|
| * @implements {WebInspector.TokenizerFactory}
|
|
|