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

Unified Diff: third_party/WebKit/Source/devtools/front_end/sdk/DOMModel.js

Issue 1403853002: Devtools: DOM inspection follows inspect cursor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments Created 5 years, 2 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: third_party/WebKit/Source/devtools/front_end/sdk/DOMModel.js
diff --git a/third_party/WebKit/Source/devtools/front_end/sdk/DOMModel.js b/third_party/WebKit/Source/devtools/front_end/sdk/DOMModel.js
index 26eefa97de045feb679caf865ab8767a2a124f05..37b1f2269346894dfe6a25d6a8a3a0882c75f12a 100644
--- a/third_party/WebKit/Source/devtools/front_end/sdk/DOMModel.js
+++ b/third_party/WebKit/Source/devtools/front_end/sdk/DOMModel.js
@@ -1101,6 +1101,7 @@ WebInspector.DOMModel.Events = {
DOMMutated: "DOMMutated",
NodeInserted: "NodeInserted",
NodeInspected: "NodeInspected",
+ NodeHighlightedInOverlay: "NodeHighlightedInOverlay",
NodeRemoved: "NodeRemoved",
DocumentUpdated: "DocumentUpdated",
ChildNodeCountUpdated: "ChildNodeCountUpdated",
@@ -1944,6 +1945,18 @@ WebInspector.DOMModel.prototype = {
}
},
+ /**
+ * @param {!DOMAgent.NodeId} nodeId
+ */
+ nodeHighlightRequested: function(nodeId)
+ {
+ var node = this.nodeForId(nodeId);
+ if (!node)
+ return;
+
+ this.dispatchEventToListeners(WebInspector.DOMModel.Events.NodeHighlightedInOverlay, node);
+ },
+
__proto__: WebInspector.SDKModel.prototype
}
@@ -2104,6 +2117,15 @@ WebInspector.DOMDispatcher.prototype = {
distributedNodesUpdated: function(insertionPointId, distributedNodes)
{
this._domModel._distributedNodesUpdated(insertionPointId, distributedNodes);
+ },
+
+ /**
+ * @override
+ * @param {!DOMAgent.NodeId} nodeId
+ */
+ nodeHighlightRequested: function(nodeId)
+ {
+ this._domModel.nodeHighlightRequested(nodeId);
}
}

Powered by Google App Engine
This is Rietveld 408576698