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

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

Issue 177653004: DevTools: Get rid of redundant default selection during inspectElement (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase on master Created 6 years, 10 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/ScreencastView.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/inspector.js
diff --git a/Source/devtools/front_end/inspector.js b/Source/devtools/front_end/inspector.js
index 2baf581ab659c3ff310e8b8cd1484181e9e8927a..4263a3c2c8bbfd569bad991faa8616ef4198036e 100644
--- a/Source/devtools/front_end/inspector.js
+++ b/Source/devtools/front_end/inspector.js
@@ -343,7 +343,6 @@ WebInspector._doLoadedDoneWithCapabilities = function()
this.debuggerModel.addEventListener(WebInspector.DebuggerModel.Events.DebuggerPaused, this._debuggerPaused, this);
this.networkLog = new WebInspector.NetworkLog();
this.domAgent = new WebInspector.DOMAgent();
- this.domAgent.addEventListener(WebInspector.DOMAgent.Events.InspectNodeRequested, this._inspectNodeRequested, this);
this.workerManager = new WebInspector.WorkerManager(Capabilities.canInspectWorkers);
this.runtimeModel = new WebInspector.RuntimeModel(this.resourceTreeModel);
@@ -810,14 +809,20 @@ WebInspector.inspect = function(payload, hints)
{
var object = WebInspector.RemoteObject.fromPayload(payload);
if (object.subtype === "node") {
+
+ object.pushNodeToFrontend(callback);
+ var elementsPanel = /** @type {!WebInspector.ElementsPanel} */ WebInspector.panel("elements");
+ elementsPanel.omitDefaultSelection();
+ WebInspector.inspectorView.setCurrentPanel(elementsPanel);
+
function callback(nodeId)
{
- WebInspector._updateFocusedNode(nodeId);
+ elementsPanel.stopOmittingDefaultSelection();
+ WebInspector.Revealer.reveal(WebInspector.domAgent.nodeForId(nodeId));
InspectorFrontendHost.inspectElementCompleted();
object.release();
}
- object.pushNodeToFrontend(callback);
- WebInspector.showPanel("elements");
+
return;
}
@@ -875,7 +880,13 @@ WebInspector._updateFocusedNode = function(nodeId)
InspectorFrontendHost.bringToFront();
WebInspector.inspectElementModeController.disable();
}
- WebInspector.showPanel("elements").revealAndSelectNode(nodeId);
+ WebInspector.panel("elements").revealAndSelectNode(nodeId);
+}
+
+WebInspector.evaluateInConsole = function(expression, showResultOnly)
+{
+ this.showConsole();
+ this.consoleView.evaluateUsingTextPrompt(expression, showResultOnly);
}
WebInspector.addMainEventListeners = function(doc)
« no previous file with comments | « Source/devtools/front_end/ScreencastView.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698