OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 /** | 194 /** |
195 * @param {!Array.<!LayerTreeAgent.Layer>} layers | 195 * @param {!Array.<!LayerTreeAgent.Layer>} layers |
196 * @param {function()} callback | 196 * @param {function()} callback |
197 */ | 197 */ |
198 _resolveBackendNodeIdsForLayers: function(layers, callback) | 198 _resolveBackendNodeIdsForLayers: function(layers, callback) |
199 { | 199 { |
200 var idsToResolve = {}; | 200 var idsToResolve = {}; |
201 var requestedIds = []; | 201 var requestedIds = []; |
202 for (var i = 0; i < layers.length; ++i) { | 202 for (var i = 0; i < layers.length; ++i) { |
203 var backendNodeId = layers[i].backendNodeId; | 203 var backendNodeId = layers[i].backendNodeId; |
204 if (!backendNodeId || this._backendNodeIdToNodeId[backendNodeId] ||
idsToResolve[backendNodeId]) | 204 if (!backendNodeId || idsToResolve[backendNodeId] || |
| 205 (this._backendNodeIdToNodeId[backendNodeId] && WebInspector.domA
gent.nodeForId(this._backendNodeIdToNodeId[backendNodeId]))) { |
205 continue; | 206 continue; |
| 207 } |
206 idsToResolve[backendNodeId] = true; | 208 idsToResolve[backendNodeId] = true; |
207 requestedIds.push(backendNodeId); | 209 requestedIds.push(backendNodeId); |
208 } | 210 } |
209 if (!requestedIds.length) { | 211 if (!requestedIds.length) { |
210 callback(); | 212 callback(); |
211 return; | 213 return; |
212 } | 214 } |
213 WebInspector.domAgent.pushNodesByBackendIdsToFrontend(requestedIds, popu
lateBackendNodeIdMap.bind(this)); | 215 WebInspector.domAgent.pushNodesByBackendIdsToFrontend(requestedIds, popu
lateBackendNodeIdMap.bind(this)); |
214 | 216 |
215 /** | 217 /** |
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
491 | 493 |
492 /** | 494 /** |
493 * @param {!LayerTreeAgent.LayerId} layerId | 495 * @param {!LayerTreeAgent.LayerId} layerId |
494 * @param {!DOMAgent.Rect} clipRect | 496 * @param {!DOMAgent.Rect} clipRect |
495 */ | 497 */ |
496 layerPainted: function(layerId, clipRect) | 498 layerPainted: function(layerId, clipRect) |
497 { | 499 { |
498 this._layerTreeModel._layerPainted(layerId, clipRect); | 500 this._layerTreeModel._layerPainted(layerId, clipRect); |
499 } | 501 } |
500 } | 502 } |
OLD | NEW |