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

Unified Diff: third_party/WebKit/Source/devtools/front_end/text_editor/CodeMirrorTextEditor.js

Issue 2372663004: DevTools: Replace multiline InplaceEditor with CodeMirrorTextEditor (Closed)
Patch Set: Remove new css class Created 4 years, 3 months 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/CodeMirrorTextEditor.js
diff --git a/third_party/WebKit/Source/devtools/front_end/text_editor/CodeMirrorTextEditor.js b/third_party/WebKit/Source/devtools/front_end/text_editor/CodeMirrorTextEditor.js
index f7b0fe19c9014197f1408bb54e77b9979a17fa22..55ef984bdfe4cf1b2ade859c0afd231b4615f1af 100644
--- a/third_party/WebKit/Source/devtools/front_end/text_editor/CodeMirrorTextEditor.js
+++ b/third_party/WebKit/Source/devtools/front_end/text_editor/CodeMirrorTextEditor.js
@@ -52,7 +52,8 @@ WebInspector.CodeMirrorTextEditor = function(options)
electricChars: true,
styleActiveLine: true,
indentUnit: 4,
- lineWrapping: options.lineWrapping
+ lineWrapping: options.lineWrapping,
+ lineWiseCopyCut: false,
});
this._codeMirrorElement = this.element.lastElementChild;
@@ -124,6 +125,7 @@ WebInspector.CodeMirrorTextEditor = function(options)
"Cmd-U": "undoLastSelection",
fallthrough: "devtools-common"
};
+
if (options.bracketMatchingSetting)
options.bracketMatchingSetting.addChangeListener(this._enableBracketMatchingIfNeeded, this);
this._enableBracketMatchingIfNeeded();
@@ -151,9 +153,9 @@ WebInspector.CodeMirrorTextEditor = function(options)
this._codeMirror.on("beforeSelectionChange", this._beforeSelectionChange.bind(this));
this._codeMirror.on("keyHandled", this._onKeyHandled.bind(this));
- this.element.style.overflow = "hidden";
this._codeMirrorElement.classList.add("source-code");
this._codeMirrorElement.classList.add("fill");
+ this.element.style.overflow = "hidden";
/** @type {!Multimap<number, !WebInspector.CodeMirrorTextEditor.Decoration>} */
this._decorations = new Multimap();
@@ -976,6 +978,8 @@ WebInspector.CodeMirrorTextEditor.prototype = {
*/
_updatePaddingBottom: function(width, height)
{
+ if (!this._options.padBottom)
+ return;
var scrollInfo = this._codeMirror.getScrollInfo();
var newPaddingBottom;
var linesElement = this._codeMirrorElement.querySelector(".CodeMirror-lines");

Powered by Google App Engine
This is Rietveld 408576698