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

Unified Diff: Source/devtools/front_end/SourcesPanel.js

Issue 203433002: DevTools: Reuse _showSourceLocation for execution line changes handling in sources panel (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebaselined and fixed highlighting after execution line changes Created 6 years, 9 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 | « Source/devtools/front_end/CodeMirrorTextEditor.js ('k') | Source/devtools/front_end/cm/cmdevtools.css » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/SourcesPanel.js
diff --git a/Source/devtools/front_end/SourcesPanel.js b/Source/devtools/front_end/SourcesPanel.js
index 5d2b02bf03a498c5dfeb8fb7d79657ea5cbb60fd..034592c733fc2db7ff5b74ed41f82204782c83c2 100644
--- a/Source/devtools/front_end/SourcesPanel.js
+++ b/Source/devtools/front_end/SourcesPanel.js
@@ -542,14 +542,15 @@ WebInspector.SourcesPanel.prototype = {
* @param {number=} columnNumber
* @param {boolean=} forceShowInPanel
* @param {boolean=} omitFocus
+ * @param {boolean=} omitHighlight
*/
- _showSourceLocation: function(uiSourceCode, lineNumber, columnNumber, forceShowInPanel, omitFocus)
+ _showSourceLocation: function(uiSourceCode, lineNumber, columnNumber, forceShowInPanel, omitFocus, omitHighlight)
{
this._showEditor(forceShowInPanel);
this._historyManager.updateCurrentState();
var sourceFrame = this._showFile(uiSourceCode);
if (typeof lineNumber === "number")
- sourceFrame.highlightPosition(lineNumber, columnNumber);
+ sourceFrame.revealPosition(lineNumber, columnNumber, !omitHighlight);
this._historyManager.pushNewState();
if (!omitFocus)
sourceFrame.focus();
@@ -714,14 +715,7 @@ WebInspector.SourcesPanel.prototype = {
if (this._skipExecutionLineRevealing)
return;
this._skipExecutionLineRevealing = true;
-
- var sourceFrame = this._showFile(uiSourceCode);
- sourceFrame.revealPosition(uiLocation.lineNumber);
- this._historyManager.pushNewState();
-
- if (sourceFrame.canEditSource())
- sourceFrame.setSelection(WebInspector.TextRange.createFromLocation(uiLocation.lineNumber, 0));
- sourceFrame.focus();
+ this._showSourceLocation(uiSourceCode, uiLocation.lineNumber, 0, undefined, undefined, true);
},
_callFrameSelected: function(event)
« no previous file with comments | « Source/devtools/front_end/CodeMirrorTextEditor.js ('k') | Source/devtools/front_end/cm/cmdevtools.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698