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

Unified Diff: Source/devtools/blink/chromeServerProfile/Default/Cache/f_000060

Issue 242263007: Add <label> to items in Event Listener Breakpoint of Chrome Dev Tools Base URL: https://chromium.googlesource.com/chromium/blink@master
Patch Set: Created 6 years, 8 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/blink/chromeServerProfile/Default/Cache/f_000060
diff --git a/Source/devtools/front_end/DOMModel.js b/Source/devtools/blink/chromeServerProfile/Default/Cache/f_000060
similarity index 96%
copy from Source/devtools/front_end/DOMModel.js
copy to Source/devtools/blink/chromeServerProfile/Default/Cache/f_000060
index 6bc097e3b856028c2b9061987d414b3e4994deee..cc31a23eb3508d66c1d9a0d3df5c4cdfce25fe9c 100644
--- a/Source/devtools/front_end/DOMModel.js
+++ b/Source/devtools/blink/chromeServerProfile/Default/Cache/f_000060
@@ -853,14 +853,6 @@ WebInspector.DOMNode.prototype = {
}
},
- /**
- * @param {function(?DOMAgent.BoxModel)} callback
- */
- boxModel: function(callback)
- {
- this._agent.getBoxModel(this._domModel._wrapClientCallback(callback));
- },
-
__proto__: WebInspector.TargetAware.prototype
}
@@ -899,7 +891,7 @@ WebInspector.DOMModel = function(target) {
this._document = null;
/** @type {!Object.<number, boolean>} */
this._attributeLoadNodeIds = {};
- target.registerDOMDispatcher(new WebInspector.DOMDispatcher(this));
+ InspectorBackend.registerDOMDispatcher(new WebInspector.DOMDispatcher(this));
this._defaultHighlighter = new WebInspector.DefaultDOMNodeHighlighter(this._agent);
this._highlighter = this._defaultHighlighter;
@@ -967,19 +959,11 @@ WebInspector.DOMModel.prototype = {
/**
* @param {!RuntimeAgent.RemoteObjectId} objectId
- * @param {function(?WebInspector.DOMNode)=} callback
+ * @param {function(?DOMAgent.NodeId)=} callback
*/
pushNodeToFrontend: function(objectId, callback)
{
- /**
- * @param {?DOMAgent.NodeId} nodeId
- * @this {!WebInspector.DOMModel}
- */
- function mycallback(nodeId)
- {
- callback(nodeId ? this.nodeForId(nodeId) : null);
- }
- this._dispatchWhenDocumentAvailable(this._agent.requestNode.bind(this._agent, objectId), mycallback.bind(this));
+ this._dispatchWhenDocumentAvailable(this._agent.requestNode.bind(this._agent, objectId), callback);
},
/**
@@ -1302,11 +1286,19 @@ WebInspector.DOMModel.prototype = {
},
/**
+ * @param {number} nodeId
+ */
+ inspectElement: function(nodeId)
+ {
+ WebInspector.Revealer.reveal(this.nodeForId(nodeId));
+ },
+
+ /**
* @param {!DOMAgent.NodeId} nodeId
*/
_inspectNodeRequested: function(nodeId)
{
- WebInspector.Revealer.reveal(this.nodeForId(nodeId))
+ this.inspectElement(nodeId);
},
/**
@@ -1400,7 +1392,7 @@ WebInspector.DOMModel.prototype = {
clearTimeout(this._hideDOMNodeHighlightTimeout);
delete this._hideDOMNodeHighlightTimeout;
}
- this._highlighter.highlightDOMNode(this.nodeForId(nodeId || 0), this._buildHighlightConfig(mode), objectId);
+ this._highlighter.highlightDOMNode(nodeId || 0, this._buildHighlightConfig(mode), objectId);
},
hideDOMNodeHighlight: function()
@@ -1576,30 +1568,6 @@ WebInspector.DOMModel.prototype = {
this._highlighter = highlighter || this._defaultHighlighter;
},
- /**
- * @param {number} x
- * @param {number} y
- * @param {function(?WebInspector.DOMNode)} callback
- */
- nodeForLocation: function(x, y, callback)
- {
- this._agent.getNodeForLocation(x, y, mycallback.bind(this));
-
- /**
- * @param {?Protocol.Error} error
- * @param {number} nodeId
- * @this {WebInspector.DOMModel}
- */
- function mycallback(error, nodeId)
- {
- if (error) {
- callback(null);
- return;
- }
- callback(this.nodeForId(nodeId));
- }
- },
-
__proto__: WebInspector.TargetAwareObject.prototype
}
@@ -1793,11 +1761,11 @@ WebInspector.DOMNodeHighlighter = function() {
WebInspector.DOMNodeHighlighter.prototype = {
/**
- * @param {?WebInspector.DOMNode} node
+ * @param {!DOMAgent.NodeId} nodeId
* @param {!DOMAgent.HighlightConfig} config
* @param {!RuntimeAgent.RemoteObjectId=} objectId
*/
- highlightDOMNode: function(node, config, objectId) {},
+ highlightDOMNode: function(nodeId, config, objectId) {},
/**
* @param {boolean} enabled
@@ -1820,14 +1788,14 @@ WebInspector.DefaultDOMNodeHighlighter = function(agent)
WebInspector.DefaultDOMNodeHighlighter.prototype = {
/**
- * @param {?WebInspector.DOMNode} node
+ * @param {!DOMAgent.NodeId} nodeId
* @param {!DOMAgent.HighlightConfig} config
* @param {!RuntimeAgent.RemoteObjectId=} objectId
*/
- highlightDOMNode: function(node, config, objectId)
+ highlightDOMNode: function(nodeId, config, objectId)
{
- if (objectId || node)
- this._agent.highlightNode(config, objectId ? undefined : node.id, objectId);
+ if (objectId || nodeId)
+ this._agent.highlightNode(config, objectId ? undefined : nodeId, objectId);
else
this._agent.hideHighlight();
},

Powered by Google App Engine
This is Rietveld 408576698