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

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

Issue 2354733002: 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 b0850d71121775065760dcb71e959b81cfd3e140..ec102bcb3abd9087306b3860bf77c02a344b7ed0 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
@@ -621,6 +627,8 @@ WebInspector.SourcesTextEditorDelegate.prototype = {
editorFocused: function() { },
+ editorBlurred: function() { },
+
/**
* @param {!WebInspector.ContextMenu} contextMenu
* @param {number} lineNumber

Powered by Google App Engine
This is Rietveld 408576698