| Index: third_party/WebKit/Source/devtools/front_end/sources/JavaScriptSourceFrame.js
|
| diff --git a/third_party/WebKit/Source/devtools/front_end/sources/JavaScriptSourceFrame.js b/third_party/WebKit/Source/devtools/front_end/sources/JavaScriptSourceFrame.js
|
| index 2dfa997d8851f14ef8cd5f8cff3a899c4a918679..713c566251f1ebffcdbd9dedf6ec5e387d6879a8 100644
|
| --- a/third_party/WebKit/Source/devtools/front_end/sources/JavaScriptSourceFrame.js
|
| +++ b/third_party/WebKit/Source/devtools/front_end/sources/JavaScriptSourceFrame.js
|
| @@ -597,6 +597,7 @@ Sources.JavaScriptSourceFrame = class extends SourceFrame.UISourceCodeFrame {
|
| var start = localScope.startLocation();
|
| var end = localScope.endLocation();
|
| var debuggerModel = callFrame.debuggerModel;
|
| + var executionLocation = callFrame.location();
|
| debuggerModel.getPossibleBreakpoints(start, end, true)
|
| .then(locations => this.textEditor.operation(renderLocations.bind(this, locations)));
|
|
|
| @@ -606,7 +607,7 @@ Sources.JavaScriptSourceFrame = class extends SourceFrame.UISourceCodeFrame {
|
| }
|
|
|
| /**
|
| - * @param {!Array<!SDK.DebuggerModel.Location>} locations
|
| + * @param {!Array<!SDK.DebuggerModel.BreakLocation>} locations
|
| * @this {Sources.JavaScriptSourceFrame}
|
| */
|
| function renderLocations(locations) {
|
| @@ -615,9 +616,26 @@ Sources.JavaScriptSourceFrame = class extends SourceFrame.UISourceCodeFrame {
|
| bookmarks.map(bookmark => bookmark.clear());
|
|
|
| for (var location of locations) {
|
| - var icon = UI.Icon.create('smallicon-green-arrow');
|
| + var icon;
|
| + var isCurrent = location.lineNumber === executionLocation.lineNumber &&
|
| + location.columnNumber === executionLocation.columnNumber;
|
| + if (!isCurrent || (location.type !== SDK.DebuggerModel.BreakLocationType.Call &&
|
| + location.type !== SDK.DebuggerModel.BreakLocationType.Return)) {
|
| + icon = UI.Icon.create('smallicon-green-arrow');
|
| + icon.addEventListener('click', location.continueToLocation.bind(location));
|
| + } else if (location.type === SDK.DebuggerModel.BreakLocationType.Call) {
|
| + icon = UI.Icon.create('smallicon-step-in');
|
| + icon.addEventListener('click', () => {
|
| + debuggerModel.scheduleStepIntoAsync();
|
| + debuggerModel.stepInto();
|
| + });
|
| + } else if (location.type === SDK.DebuggerModel.BreakLocationType.Return) {
|
| + icon = UI.Icon.create('smallicon-step-out');
|
| + icon.addEventListener('click', () => {
|
| + debuggerModel.stepOut();
|
| + });
|
| + }
|
| icon.classList.add('cm-continue-to-location');
|
| - icon.addEventListener('click', location.continueToLocation.bind(location));
|
| icon.addEventListener('mousemove', hidePopoverAndConsumeEvent.bind(this));
|
| this.textEditor.addBookmark(
|
| location.lineNumber, location.columnNumber, icon,
|
|
|