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

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

Issue 2372663004: DevTools: Replace multiline InplaceEditor with CodeMirrorTextEditor (Closed)
Patch Set: 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..dc4725cb3a18a400e7e86c5fcb80e220d61263db 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
@@ -124,6 +124,7 @@ WebInspector.CodeMirrorTextEditor = function(options)
"Cmd-U": "undoLastSelection",
fallthrough: "devtools-common"
};
+
if (options.bracketMatchingSetting)
options.bracketMatchingSetting.addChangeListener(this._enableBracketMatchingIfNeeded, this);
this._enableBracketMatchingIfNeeded();
@@ -151,9 +152,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 +977,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