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 1094 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1105 target.registerDOMDispatcher(new WebInspector.DOMDispatcher(this)); | 1105 target.registerDOMDispatcher(new WebInspector.DOMDispatcher(this)); |
1106 | 1106 |
1107 this._inspectModeEnabled = false; | 1107 this._inspectModeEnabled = false; |
1108 | 1108 |
1109 this._defaultHighlighter = new WebInspector.DefaultDOMNodeHighlighter(this._
agent); | 1109 this._defaultHighlighter = new WebInspector.DefaultDOMNodeHighlighter(this._
agent); |
1110 this._highlighter = this._defaultHighlighter; | 1110 this._highlighter = this._defaultHighlighter; |
1111 | 1111 |
1112 this._agent.enable(); | 1112 this._agent.enable(); |
1113 } | 1113 } |
1114 | 1114 |
1115 /** @enum {string} */ | 1115 /** @enum {symbol} */ |
1116 WebInspector.DOMModel.Events = { | 1116 WebInspector.DOMModel.Events = { |
1117 AttrModified: "AttrModified", | 1117 AttrModified: Symbol("AttrModified"), |
1118 AttrRemoved: "AttrRemoved", | 1118 AttrRemoved: Symbol("AttrRemoved"), |
1119 CharacterDataModified: "CharacterDataModified", | 1119 CharacterDataModified: Symbol("CharacterDataModified"), |
1120 DOMMutated: "DOMMutated", | 1120 DOMMutated: Symbol("DOMMutated"), |
1121 NodeInserted: "NodeInserted", | 1121 NodeInserted: Symbol("NodeInserted"), |
1122 NodeInspected: "NodeInspected", | 1122 NodeInspected: Symbol("NodeInspected"), |
1123 NodeHighlightedInOverlay: "NodeHighlightedInOverlay", | 1123 NodeHighlightedInOverlay: Symbol("NodeHighlightedInOverlay"), |
1124 NodeRemoved: "NodeRemoved", | 1124 NodeRemoved: Symbol("NodeRemoved"), |
1125 DocumentUpdated: "DocumentUpdated", | 1125 DocumentUpdated: Symbol("DocumentUpdated"), |
1126 ChildNodeCountUpdated: "ChildNodeCountUpdated", | 1126 ChildNodeCountUpdated: Symbol("ChildNodeCountUpdated"), |
1127 UndoRedoRequested: "UndoRedoRequested", | 1127 UndoRedoRequested: Symbol("UndoRedoRequested"), |
1128 UndoRedoCompleted: "UndoRedoCompleted", | 1128 UndoRedoCompleted: Symbol("UndoRedoCompleted"), |
1129 DistributedNodesChanged: "DistributedNodesChanged", | 1129 DistributedNodesChanged: Symbol("DistributedNodesChanged"), |
1130 ModelSuspended: "ModelSuspended", | 1130 ModelSuspended: Symbol("ModelSuspended"), |
1131 InspectModeWillBeToggled: "InspectModeWillBeToggled", | 1131 InspectModeWillBeToggled: Symbol("InspectModeWillBeToggled"), |
1132 MarkersChanged: "MarkersChanged" | 1132 MarkersChanged: Symbol("MarkersChanged") |
1133 } | 1133 } |
1134 | 1134 |
1135 /** | 1135 /** |
1136 * @param {!WebInspector.RemoteObject} object | 1136 * @param {!WebInspector.RemoteObject} object |
1137 */ | 1137 */ |
1138 WebInspector.DOMModel.highlightObjectAsDOMNode = function(object) | 1138 WebInspector.DOMModel.highlightObjectAsDOMNode = function(object) |
1139 { | 1139 { |
1140 var domModel = WebInspector.DOMModel.fromTarget(object.target()); | 1140 var domModel = WebInspector.DOMModel.fromTarget(object.target()); |
1141 if (domModel) | 1141 if (domModel) |
1142 domModel.highlightDOMNode(undefined, undefined, undefined, object.object
Id); | 1142 domModel.highlightDOMNode(undefined, undefined, undefined, object.object
Id); |
(...skipping 1137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2280 } | 2280 } |
2281 | 2281 |
2282 /** | 2282 /** |
2283 * @param {!WebInspector.Target} target | 2283 * @param {!WebInspector.Target} target |
2284 * @return {?WebInspector.DOMModel} | 2284 * @return {?WebInspector.DOMModel} |
2285 */ | 2285 */ |
2286 WebInspector.DOMModel.fromTarget = function(target) | 2286 WebInspector.DOMModel.fromTarget = function(target) |
2287 { | 2287 { |
2288 return /** @type {?WebInspector.DOMModel} */ (target.model(WebInspector.DOMM
odel)); | 2288 return /** @type {?WebInspector.DOMModel} */ (target.model(WebInspector.DOMM
odel)); |
2289 } | 2289 } |
OLD | NEW |