Commit a2238824 authored by vsevik@chromium.org's avatar vsevik@chromium.org

DevTools: Remove step into selection experiment

R=lushnikov, pfeldman

Review URL: https://codereview.chromium.org/201293007

git-svn-id: svn://svn.chromium.org/blink/trunk@169442 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 5a58d690
......@@ -199,25 +199,6 @@ WebInspector.DebuggerModel.prototype = {
this._agent.continueToLocation(rawLocation);
},
/**
* @param {!WebInspector.DebuggerModel.Location} rawLocation
*/
stepIntoSelection: function(rawLocation)
{
/**
* @param {!WebInspector.DebuggerModel.Location} requestedLocation
* @param {?string} error
* @this {WebInspector.DebuggerModel}
*/
function callback(requestedLocation, error)
{
if (error)
return;
this._pendingStepIntoLocation = requestedLocation;
};
this._agent.continueToLocation(rawLocation, true, callback.bind(this, rawLocation));
},
stepInto: function()
{
/**
......@@ -480,19 +461,6 @@ WebInspector.DebuggerModel.prototype = {
*/
_pausedScript: function(callFrames, reason, auxData, breakpointIds, asyncStackTrace)
{
if (this._pendingStepIntoLocation) {
var requestedLocation = this._pendingStepIntoLocation;
delete this._pendingStepIntoLocation;
if (callFrames.length > 0) {
var topLocation = callFrames[0].location;
if (topLocation.lineNumber == requestedLocation.lineNumber && topLocation.columnNumber == requestedLocation.columnNumber && topLocation.scriptId == requestedLocation.scriptId) {
this.stepInto();
return;
}
}
}
this._setDebuggerPausedDetails(new WebInspector.DebuggerPausedDetails(this, callFrames, reason, auxData, breakpointIds, asyncStackTrace));
},
......@@ -975,30 +943,6 @@ WebInspector.DebuggerModel.CallFrame.prototype = {
this._debuggerAgent.restartFrame(this._payload.callFrameId, protocolCallback.bind(this));
},
/**
* @param {function(!Array.<!DebuggerAgent.Location>)} callback
*/
getStepIntoLocations: function(callback)
{
if (this._stepInLocations) {
callback(this._stepInLocations.slice(0));
return;
}
/**
* @param {?string} error
* @param {!Array.<!DebuggerAgent.Location>=} stepInPositions
* @this {WebInspector.DebuggerModel.CallFrame}
*/
function getStepInPositionsCallback(error, stepInPositions)
{
if (error)
return;
this._stepInLocations = stepInPositions;
callback(this._stepInLocations.slice(0));
}
this._debuggerAgent.getStepInPositions(this.id, getStepInPositionsCallback.bind(this));
},
/**
* @param {function(!WebInspector.UILocation):(boolean|undefined)} updateDelegate
* @return {!WebInspector.LiveLocation}
......
......@@ -280,7 +280,6 @@ WebInspector.ExperimentsSettings = function(experimentsEnabled)
this.canvasInspection = this._createExperiment("canvasInspection ", "Canvas inspection");
this.frameworksDebuggingSupport = this._createExperiment("frameworksDebuggingSupport", "Enable frameworks debugging support");
this.layersPanel = this._createExperiment("layersPanel", "Show Layers panel");
this.stepIntoSelection = this._createExperiment("stepIntoSelection", "Show step-in candidates while debugging.");
this.doNotOpenDrawerOnEsc = this._createExperiment("doNotOpenDrawerWithEsc", "Do not open drawer on Esc");
this.showEditorInDrawer = this._createExperiment("showEditorInDrawer", "Show editor in drawer");
this.gpuTimeline = this._createExperiment("gpuTimeline", "Show GPU data on timeline");
......
......@@ -251,7 +251,6 @@ WebInspector.ShortcutsScreen.registerShortcuts = function()
section.addAlternateKeys(WebInspector.ShortcutsScreen.SourcesPanelShortcuts.PauseContinue, WebInspector.UIString("Pause/Continue"));
section.addAlternateKeys(WebInspector.ShortcutsScreen.SourcesPanelShortcuts.StepOver, WebInspector.UIString("Step over"));
section.addAlternateKeys(WebInspector.ShortcutsScreen.SourcesPanelShortcuts.StepInto, WebInspector.UIString("Step into"));
section.addAlternateKeys(WebInspector.ShortcutsScreen.SourcesPanelShortcuts.StepIntoSelection, WebInspector.UIString("Step into selection"));
section.addAlternateKeys(WebInspector.ShortcutsScreen.SourcesPanelShortcuts.StepOut, WebInspector.UIString("Step out"));
var nextAndPrevFrameKeys = WebInspector.ShortcutsScreen.SourcesPanelShortcuts.NextCallFrame.concat(WebInspector.ShortcutsScreen.SourcesPanelShortcuts.PrevCallFrame);
......@@ -390,11 +389,6 @@ WebInspector.ShortcutsScreen.SourcesPanelShortcuts = {
WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.Keys.Semicolon, WebInspector.KeyboardShortcut.Modifiers.CtrlOrMeta)
],
StepIntoSelection: [
WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.Keys.F11, WebInspector.KeyboardShortcut.Modifiers.CtrlOrMeta),
WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.Keys.F11, WebInspector.KeyboardShortcut.Modifiers.Shift | WebInspector.KeyboardShortcut.Modifiers.CtrlOrMeta)
],
StepOut: [
WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.Keys.F11, WebInspector.KeyboardShortcut.Modifiers.Shift),
WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.Keys.Semicolon, WebInspector.KeyboardShortcut.Modifiers.Shift | WebInspector.KeyboardShortcut.Modifiers.CtrlOrMeta)
......
......@@ -207,9 +207,6 @@ WebInspector.SourcesPanel = function(workspaceForTest)
this._workspace.addEventListener(WebInspector.Workspace.Events.ProjectWillReset, this._projectWillReset.bind(this), this);
WebInspector.debuggerModel.addEventListener(WebInspector.DebuggerModel.Events.GlobalObjectCleared, this._debuggerReset, this);
this._boundOnKeyUp = this._onKeyUp.bind(this);
this._boundOnKeyDown = this._onKeyDown.bind(this);
function handleBeforeUnload(event)
{
if (event.returnValue)
......@@ -292,16 +289,10 @@ WebInspector.SourcesPanel.prototype = {
this._drawerEditor()._panelWasShown();
this.sourcesView.show(this.editorView.mainElement());
WebInspector.Panel.prototype.wasShown.call(this);
this.element.addEventListener("keydown", this._boundOnKeyDown, false);
this.element.addEventListener("keyup", this._boundOnKeyUp, false);
},
willHide: function()
{
this.element.removeEventListener("keydown", this._boundOnKeyDown, false);
this.element.removeEventListener("keyup", this._boundOnKeyUp, false);
WebInspector.Panel.prototype.willHide.call(this);
this._drawerEditor()._panelWillHide();
this.sourcesView.show(this._drawerEditorView.element);
......@@ -716,9 +707,8 @@ WebInspector.SourcesPanel.prototype = {
_setExecutionLine: function(uiLocation)
{
var callFrame = WebInspector.debuggerModel.selectedCallFrame()
var sourceFrame = this._getOrCreateSourceFrame(uiLocation.uiSourceCode);
sourceFrame.setExecutionLine(uiLocation.lineNumber, callFrame);
sourceFrame.setExecutionLine(uiLocation.lineNumber);
this._executionSourceFrame = sourceFrame;
},
......@@ -943,34 +933,6 @@ WebInspector.SourcesPanel.prototype = {
return true;
},
/**
* @param {?Event=} event
* @return {boolean}
*/
_stepIntoSelectionClicked: function(event)
{
if (!this._paused)
return true;
if (this._executionSourceFrame) {
var stepIntoMarkup = this._executionSourceFrame.stepIntoMarkup();
if (stepIntoMarkup)
stepIntoMarkup.iterateSelection(event.shiftKey);
}
return true;
},
doStepIntoSelection: function(rawLocation)
{
if (!this._paused)
return;
delete this._skipExecutionLineRevealing;
this._paused = false;
this._clearInterface();
WebInspector.debuggerModel.stepIntoSelection(rawLocation);
},
/**
* @return {boolean}
*/
......@@ -1071,9 +1033,6 @@ WebInspector.SourcesPanel.prototype = {
this._stepIntoButton = this._createButtonAndRegisterShortcuts("scripts-step-into", title, handler, WebInspector.ShortcutsScreen.SourcesPanelShortcuts.StepInto);
debugToolbar.appendChild(this._stepIntoButton.element);
// Step into selection (keyboard shortcut only).
this.registerShortcuts(WebInspector.ShortcutsScreen.SourcesPanelShortcuts.StepIntoSelection, this._stepIntoSelectionClicked.bind(this))
// Step out.
title = WebInspector.UIString("Step out of current function (%s).");
handler = this._stepOutClicked.bind(this);
......@@ -1248,35 +1207,6 @@ WebInspector.SourcesPanel.prototype = {
sourceFrame.replaceAllWith(query, text);
},
_onKeyDown: function(event)
{
if (event.keyCode !== WebInspector.KeyboardShortcut.Keys.CtrlOrMeta.code)
return;
if (!this._paused || !this._executionSourceFrame)
return;
var stepIntoMarkup = this._executionSourceFrame.stepIntoMarkup();
if (stepIntoMarkup)
stepIntoMarkup.startIteratingSelection();
},
_onKeyUp: function(event)
{
if (event.keyCode !== WebInspector.KeyboardShortcut.Keys.CtrlOrMeta.code)
return;
if (!this._paused || !this._executionSourceFrame)
return;
var stepIntoMarkup = this._executionSourceFrame.stepIntoMarkup();
if (!stepIntoMarkup)
return;
var currentPosition = stepIntoMarkup.getSelectedItemIndex();
if (typeof currentPosition === "undefined") {
stepIntoMarkup.stopIteratingSelection();
} else {
var rawLocation = stepIntoMarkup.getRawPosition(currentPosition);
this.doStepIntoSelection(rawLocation);
}
},
addToWatch: function(expression)
{
this.sidebarPanes.watchExpressions.addExpression(expression);
......
......@@ -2297,17 +2297,6 @@ body.inactive .sidebar-tree-item.selected {
background-color: rgb(255, 255, 194);
}
.source-frame-stepin-mark {
cursor: pointer;
text-decoration: underline;
}
.source-frame-stepin-mark-highlighted {
font-weight: 800;
cursor: pointer;
text-decoration: underline;
}
.workers-list {
list-style: none;
margin: 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment