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 1083 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1094 this._agent.enable(); | 1094 this._agent.enable(); |
1095 } | 1095 } |
1096 | 1096 |
1097 WebInspector.DOMModel.Events = { | 1097 WebInspector.DOMModel.Events = { |
1098 AttrModified: "AttrModified", | 1098 AttrModified: "AttrModified", |
1099 AttrRemoved: "AttrRemoved", | 1099 AttrRemoved: "AttrRemoved", |
1100 CharacterDataModified: "CharacterDataModified", | 1100 CharacterDataModified: "CharacterDataModified", |
1101 DOMMutated: "DOMMutated", | 1101 DOMMutated: "DOMMutated", |
1102 NodeInserted: "NodeInserted", | 1102 NodeInserted: "NodeInserted", |
1103 NodeInspected: "NodeInspected", | 1103 NodeInspected: "NodeInspected", |
1104 NodeHighlightedInOverlay: "NodeHighlightedInOverlay", | |
1104 NodeRemoved: "NodeRemoved", | 1105 NodeRemoved: "NodeRemoved", |
1105 DocumentUpdated: "DocumentUpdated", | 1106 DocumentUpdated: "DocumentUpdated", |
1106 ChildNodeCountUpdated: "ChildNodeCountUpdated", | 1107 ChildNodeCountUpdated: "ChildNodeCountUpdated", |
1107 UndoRedoRequested: "UndoRedoRequested", | 1108 UndoRedoRequested: "UndoRedoRequested", |
1108 UndoRedoCompleted: "UndoRedoCompleted", | 1109 UndoRedoCompleted: "UndoRedoCompleted", |
1109 DistributedNodesChanged: "DistributedNodesChanged", | 1110 DistributedNodesChanged: "DistributedNodesChanged", |
1110 ModelSuspended: "ModelSuspended", | 1111 ModelSuspended: "ModelSuspended", |
1111 InspectModeWillBeToggled: "InspectModeWillBeToggled", | 1112 InspectModeWillBeToggled: "InspectModeWillBeToggled", |
1112 MarkersChanged: "MarkersChanged" | 1113 MarkersChanged: "MarkersChanged" |
1113 } | 1114 } |
(...skipping 823 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1937 | 1938 |
1938 _suspendStateChanged: function() | 1939 _suspendStateChanged: function() |
1939 { | 1940 { |
1940 if (WebInspector.targetManager.allTargetsSuspended()) { | 1941 if (WebInspector.targetManager.allTargetsSuspended()) { |
1941 this._agent.disable(this._setDocument.bind(this, null)); | 1942 this._agent.disable(this._setDocument.bind(this, null)); |
1942 } else { | 1943 } else { |
1943 this._agent.enable(); | 1944 this._agent.enable(); |
1944 } | 1945 } |
1945 }, | 1946 }, |
1946 | 1947 |
1948 /** | |
1949 * @param {!DOMAgent.BackendNodeId} backendNodeId | |
dgozman
2015/10/13 01:42:54
s/backendNodeId/nodeId/ in this method
sergeyv
2015/10/13 21:24:18
Done.
| |
1950 */ | |
1951 _nodeHighlightedInOverlay: function(backendNodeId) | |
1952 { | |
1953 var node = this.nodeForId(backendNodeId); | |
1954 if (!node) | |
1955 return; | |
1956 | |
1957 this.dispatchEventToListeners(WebInspector.DOMModel.Events.NodeHighlight edInOverlay, node); | |
dgozman
2015/10/13 01:42:54
Let's also issue this event from ScreencastView to
sergeyv
2015/10/13 21:24:18
Done.
| |
1958 }, | |
1959 | |
1947 __proto__: WebInspector.SDKModel.prototype | 1960 __proto__: WebInspector.SDKModel.prototype |
1948 } | 1961 } |
1949 | 1962 |
1950 /** | 1963 /** |
1951 * @constructor | 1964 * @constructor |
1952 * @implements {DOMAgent.Dispatcher} | 1965 * @implements {DOMAgent.Dispatcher} |
1953 * @param {!WebInspector.DOMModel} domModel | 1966 * @param {!WebInspector.DOMModel} domModel |
1954 */ | 1967 */ |
1955 WebInspector.DOMDispatcher = function(domModel) | 1968 WebInspector.DOMDispatcher = function(domModel) |
1956 { | 1969 { |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2097 }, | 2110 }, |
2098 | 2111 |
2099 /** | 2112 /** |
2100 * @override | 2113 * @override |
2101 * @param {!DOMAgent.NodeId} insertionPointId | 2114 * @param {!DOMAgent.NodeId} insertionPointId |
2102 * @param {!Array.<!DOMAgent.BackendNode>} distributedNodes | 2115 * @param {!Array.<!DOMAgent.BackendNode>} distributedNodes |
2103 */ | 2116 */ |
2104 distributedNodesUpdated: function(insertionPointId, distributedNodes) | 2117 distributedNodesUpdated: function(insertionPointId, distributedNodes) |
2105 { | 2118 { |
2106 this._domModel._distributedNodesUpdated(insertionPointId, distributedNod es); | 2119 this._domModel._distributedNodesUpdated(insertionPointId, distributedNod es); |
2120 }, | |
2121 | |
2122 /** | |
2123 * @override | |
2124 * @param {!DOMAgent.NodeId} nodeId | |
2125 */ | |
2126 nodeHighlightedInOverlay: function(nodeId) | |
2127 { | |
2128 this._domModel._nodeHighlightedInOverlay(nodeId); | |
2107 } | 2129 } |
2108 } | 2130 } |
2109 | 2131 |
2110 /** | 2132 /** |
2111 * @interface | 2133 * @interface |
2112 */ | 2134 */ |
2113 WebInspector.DOMNodeHighlighter = function() { | 2135 WebInspector.DOMNodeHighlighter = function() { |
2114 } | 2136 } |
2115 | 2137 |
2116 WebInspector.DOMNodeHighlighter.prototype = { | 2138 WebInspector.DOMNodeHighlighter.prototype = { |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2183 } | 2205 } |
2184 | 2206 |
2185 /** | 2207 /** |
2186 * @param {!WebInspector.Target} target | 2208 * @param {!WebInspector.Target} target |
2187 * @return {?WebInspector.DOMModel} | 2209 * @return {?WebInspector.DOMModel} |
2188 */ | 2210 */ |
2189 WebInspector.DOMModel.fromTarget = function(target) | 2211 WebInspector.DOMModel.fromTarget = function(target) |
2190 { | 2212 { |
2191 return /** @type {?WebInspector.DOMModel} */ (target.model(WebInspector.DOMM odel)); | 2213 return /** @type {?WebInspector.DOMModel} */ (target.model(WebInspector.DOMM odel)); |
2192 } | 2214 } |
OLD | NEW |