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

Unified Diff: Source/devtools/front_end/sources/JavaScriptSourceFrame.js

Issue 1178063005: DevTools: editor should not loose scroll position when displaying inline values (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/sources/JavaScriptSourceFrame.js
diff --git a/Source/devtools/front_end/sources/JavaScriptSourceFrame.js b/Source/devtools/front_end/sources/JavaScriptSourceFrame.js
index a64f2d74ac34abb47061f240c254f5923f10053f..12d4c4514133c71a3c7cac06ef9382ee120ff059 100644
--- a/Source/devtools/front_end/sources/JavaScriptSourceFrame.js
+++ b/Source/devtools/front_end/sources/JavaScriptSourceFrame.js
@@ -225,14 +225,21 @@ WebInspector.JavaScriptSourceFrame.prototype = {
WebInspector.ConsoleModel.evaluateCommandInConsole(currentExecutionContext, expression);
},
- // View events
+ /**
+ * @override
+ */
wasShown: function()
{
WebInspector.UISourceCodeFrame.prototype.wasShown.call(this);
- if (this._executionLocation && this.loaded)
- this._generateValuesInSource();
+ if (this._executionLocation && this.loaded) {
+ // We need CodeMirrorTextEditor to be initialized prior to this call. @see crbug.com/499889
+ setImmediate(this._generateValuesInSource.bind(this));
+ }
},
+ /**
+ * @override
+ */
willHide: function()
{
WebInspector.UISourceCodeFrame.prototype.willHide.call(this);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698