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

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

Issue 2314503005: DevTools: remove UISourceCodeFrame from context when switching panels. (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/source_frame/SourcesTextEditor.js
diff --git a/third_party/WebKit/Source/devtools/front_end/source_frame/SourcesTextEditor.js b/third_party/WebKit/Source/devtools/front_end/source_frame/SourcesTextEditor.js
index 03a47b2d7ff124f1220972c8d4636ff74aabc4a6..f29655383718467ff58b71ac63ed7fb298f1f775 100644
--- a/third_party/WebKit/Source/devtools/front_end/source_frame/SourcesTextEditor.js
+++ b/third_party/WebKit/Source/devtools/front_end/source_frame/SourcesTextEditor.js
@@ -23,6 +23,7 @@ WebInspector.SourcesTextEditor = function(delegate)
this.codeMirror().on("gutterClick", this._gutterClick.bind(this));
this.codeMirror().on("scroll", this._scroll.bind(this));
this.codeMirror().on("focus", this._focus.bind(this));
+ this.codeMirror().on("blur", this._blur.bind(this));
this.codeMirror().on("beforeSelectionChange", this._beforeSelectionChangeForDelegate.bind(this));
this.element.addEventListener("contextmenu", this._contextMenu.bind(this), false);
@@ -427,6 +428,11 @@ WebInspector.SourcesTextEditor.prototype = {
this._delegate.editorFocused();
},
+ _blur: function()
+ {
+ this._delegate.editorBlurred();
+ },
+
/**
* @param {!CodeMirror} codeMirror
* @param {{ranges: !Array.<{head: !CodeMirror.Pos, anchor: !CodeMirror.Pos}>}} selection
@@ -622,6 +628,8 @@ WebInspector.SourcesTextEditorDelegate.prototype = {
editorFocused: function() { },
+ editorBlurred: function() { },
+
/**
* @param {!WebInspector.ContextMenu} contextMenu
* @param {number} lineNumber

Powered by Google App Engine
This is Rietveld 408576698