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

Unified Diff: Source/devtools/front_end/DOMAgent.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
Index: Source/devtools/front_end/DOMAgent.js
diff --git a/Source/devtools/front_end/DOMAgent.js b/Source/devtools/front_end/DOMAgent.js
index 9e4a4fbc0e798309a8597db0cd4333aad2acf490..eccc4146c02eb2505cd7476c8a75881928b1e25b 100644
--- a/Source/devtools/front_end/DOMAgent.js
+++ b/Source/devtools/front_end/DOMAgent.js
@@ -777,7 +777,6 @@ WebInspector.DOMAgent.Events = {
ChildNodeCountUpdated: "ChildNodeCountUpdated",
UndoRedoRequested: "UndoRedoRequested",
UndoRedoCompleted: "UndoRedoCompleted",
- InspectNodeRequested: "InspectNodeRequested"
}
WebInspector.DOMAgent.prototype = {
@@ -1161,9 +1160,7 @@ WebInspector.DOMAgent.prototype = {
*/
inspectElement: function(nodeId)
{
- var node = this._idToDOMNode[nodeId];
- if (node)
- this.dispatchEventToListeners(WebInspector.DOMAgent.Events.InspectNodeRequested, nodeId);
+ WebInspector.Revealer.reveal(this.nodeForId(nodeId));
},
/**
@@ -1171,7 +1168,7 @@ WebInspector.DOMAgent.prototype = {
*/
_inspectNodeRequested: function(nodeId)
{
- this.dispatchEventToListeners(WebInspector.DOMAgent.Events.InspectNodeRequested, nodeId);
+ this.inspectElement(nodeId);
},
/**
« no previous file with comments | « LayoutTests/inspector/sources/debugger/debugger-command-line-api.html ('k') | Source/devtools/front_end/ElementsPanel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698