OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009, 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2009, 2010 Google Inc. All rights reserved. |
3 * Copyright (C) 2009 Joseph Pecoraro | 3 * Copyright (C) 2009 Joseph Pecoraro |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
7 * met: | 7 * met: |
8 * | 8 * |
9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 759 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
770 WebInspector.DOMAgent.Events = { | 770 WebInspector.DOMAgent.Events = { |
771 AttrModified: "AttrModified", | 771 AttrModified: "AttrModified", |
772 AttrRemoved: "AttrRemoved", | 772 AttrRemoved: "AttrRemoved", |
773 CharacterDataModified: "CharacterDataModified", | 773 CharacterDataModified: "CharacterDataModified", |
774 NodeInserted: "NodeInserted", | 774 NodeInserted: "NodeInserted", |
775 NodeRemoved: "NodeRemoved", | 775 NodeRemoved: "NodeRemoved", |
776 DocumentUpdated: "DocumentUpdated", | 776 DocumentUpdated: "DocumentUpdated", |
777 ChildNodeCountUpdated: "ChildNodeCountUpdated", | 777 ChildNodeCountUpdated: "ChildNodeCountUpdated", |
778 UndoRedoRequested: "UndoRedoRequested", | 778 UndoRedoRequested: "UndoRedoRequested", |
779 UndoRedoCompleted: "UndoRedoCompleted", | 779 UndoRedoCompleted: "UndoRedoCompleted", |
780 InspectNodeRequested: "InspectNodeRequested" | |
781 } | 780 } |
782 | 781 |
783 WebInspector.DOMAgent.prototype = { | 782 WebInspector.DOMAgent.prototype = { |
784 /** | 783 /** |
785 * @param {function(!WebInspector.DOMDocument)=} callback | 784 * @param {function(!WebInspector.DOMDocument)=} callback |
786 */ | 785 */ |
787 requestDocument: function(callback) | 786 requestDocument: function(callback) |
788 { | 787 { |
789 if (this._document) { | 788 if (this._document) { |
790 if (callback) | 789 if (callback) |
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1154 this._unbind(pseudoElements[id]); | 1153 this._unbind(pseudoElements[id]); |
1155 if (node._templateContent) | 1154 if (node._templateContent) |
1156 this._unbind(node._templateContent); | 1155 this._unbind(node._templateContent); |
1157 }, | 1156 }, |
1158 | 1157 |
1159 /** | 1158 /** |
1160 * @param {number} nodeId | 1159 * @param {number} nodeId |
1161 */ | 1160 */ |
1162 inspectElement: function(nodeId) | 1161 inspectElement: function(nodeId) |
1163 { | 1162 { |
1164 var node = this._idToDOMNode[nodeId]; | 1163 WebInspector.Revealer.reveal(this.nodeForId(nodeId)); |
1165 if (node) | |
1166 this.dispatchEventToListeners(WebInspector.DOMAgent.Events.InspectNo
deRequested, nodeId); | |
1167 }, | 1164 }, |
1168 | 1165 |
1169 /** | 1166 /** |
1170 * @param {!DOMAgent.NodeId} nodeId | 1167 * @param {!DOMAgent.NodeId} nodeId |
1171 */ | 1168 */ |
1172 _inspectNodeRequested: function(nodeId) | 1169 _inspectNodeRequested: function(nodeId) |
1173 { | 1170 { |
1174 this.dispatchEventToListeners(WebInspector.DOMAgent.Events.InspectNodeRe
quested, nodeId); | 1171 this.inspectElement(nodeId); |
1175 }, | 1172 }, |
1176 | 1173 |
1177 /** | 1174 /** |
1178 * @param {string} query | 1175 * @param {string} query |
1179 * @param {function(number)} searchCallback | 1176 * @param {function(number)} searchCallback |
1180 */ | 1177 */ |
1181 performSearch: function(query, searchCallback) | 1178 performSearch: function(query, searchCallback) |
1182 { | 1179 { |
1183 this.cancelSearch(); | 1180 this.cancelSearch(); |
1184 | 1181 |
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1631 setInspectModeEnabled: function(enabled, inspectShadowDOM, config, callback) | 1628 setInspectModeEnabled: function(enabled, inspectShadowDOM, config, callback) |
1632 { | 1629 { |
1633 DOMAgent.setInspectModeEnabled(enabled, inspectShadowDOM, config, callba
ck); | 1630 DOMAgent.setInspectModeEnabled(enabled, inspectShadowDOM, config, callba
ck); |
1634 } | 1631 } |
1635 } | 1632 } |
1636 | 1633 |
1637 /** | 1634 /** |
1638 * @type {!WebInspector.DOMAgent} | 1635 * @type {!WebInspector.DOMAgent} |
1639 */ | 1636 */ |
1640 WebInspector.domAgent; | 1637 WebInspector.domAgent; |
OLD | NEW |