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

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

Issue 2168713004: DevTools: Fix Ctrl-Z for source color picker (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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/source_frame/CodeMirrorTextEditor.js
diff --git a/third_party/WebKit/Source/devtools/front_end/source_frame/CodeMirrorTextEditor.js b/third_party/WebKit/Source/devtools/front_end/source_frame/CodeMirrorTextEditor.js
index 229c825907e8ac6b02db30b0530c11b7a86b6f06..d5cd74c367426a2270c0ecb0e9b8b6484ab35b06 100644
--- a/third_party/WebKit/Source/devtools/front_end/source_frame/CodeMirrorTextEditor.js
+++ b/third_party/WebKit/Source/devtools/front_end/source_frame/CodeMirrorTextEditor.js
@@ -1340,12 +1340,13 @@ WebInspector.CodeMirrorTextEditor.prototype = {
/**
* @param {!WebInspector.TextRange} range
* @param {string} text
+ * @param {string=} origin
* @return {!WebInspector.TextRange}
*/
- editRange: function(range, text)
+ editRange: function(range, text, origin)
{
var pos = WebInspector.CodeMirrorUtils.toPos(range);
- this._codeMirror.replaceRange(text, pos.start, pos.end);
+ this._codeMirror.replaceRange(text, pos.start, pos.end, origin);
var newRange = WebInspector.CodeMirrorUtils.toRange(pos.start, this._codeMirror.posFromIndex(this._codeMirror.indexFromPos(pos.start) + text.length));
this._delegate.onTextChanged(range, newRange);
if (WebInspector.moduleSetting("textEditorAutoDetectIndent").get())

Powered by Google App Engine
This is Rietveld 408576698