OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Apple Inc. All rights reserved. | 2 * Copyright (C) 2012 Apple Inc. All rights reserved. |
3 * Copyright (C) 2013 Google Inc. All rights reserved. | 3 * Copyright (C) 2013 Google Inc. All rights reserved. |
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 15 matching lines...) Expand all Loading... |
26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
30 */ | 30 */ |
31 | 31 |
32 #include "config.h" | 32 #include "config.h" |
33 | 33 |
34 #include "core/inspector/InspectorLayerTreeAgent.h" | 34 #include "core/inspector/InspectorLayerTreeAgent.h" |
35 | 35 |
| 36 #include "core/dom/DOMNodeIds.h" |
36 #include "core/dom/Document.h" | 37 #include "core/dom/Document.h" |
37 #include "core/frame/FrameHost.h" | 38 #include "core/frame/FrameHost.h" |
38 #include "core/frame/LocalFrame.h" | 39 #include "core/frame/LocalFrame.h" |
39 #include "core/frame/Settings.h" | 40 #include "core/frame/Settings.h" |
40 #include "core/inspector/IdentifiersFactory.h" | 41 #include "core/inspector/IdentifiersFactory.h" |
41 #include "core/inspector/InspectorNodeIds.h" | |
42 #include "core/inspector/InspectorPageAgent.h" | 42 #include "core/inspector/InspectorPageAgent.h" |
43 #include "core/inspector/InspectorState.h" | 43 #include "core/inspector/InspectorState.h" |
44 #include "core/inspector/InstrumentingAgents.h" | 44 #include "core/inspector/InstrumentingAgents.h" |
45 #include "core/layout/LayoutPart.h" | 45 #include "core/layout/LayoutPart.h" |
46 #include "core/layout/LayoutView.h" | 46 #include "core/layout/LayoutView.h" |
47 #include "core/layout/compositing/CompositedDeprecatedPaintLayerMapping.h" | 47 #include "core/layout/compositing/CompositedDeprecatedPaintLayerMapping.h" |
48 #include "core/layout/compositing/DeprecatedPaintLayerCompositor.h" | 48 #include "core/layout/compositing/DeprecatedPaintLayerCompositor.h" |
49 #include "core/loader/DocumentLoader.h" | 49 #include "core/loader/DocumentLoader.h" |
50 #include "platform/geometry/IntRect.h" | 50 #include "platform/geometry/IntRect.h" |
51 #include "platform/graphics/CompositingReasons.h" | 51 #include "platform/graphics/CompositingReasons.h" |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
244 return; | 244 return; |
245 layers->addItem(buildObjectForLayer(root, layerIdToNodeIdMap.get(layerId))); | 245 layers->addItem(buildObjectForLayer(root, layerIdToNodeIdMap.get(layerId))); |
246 if (GraphicsLayer* replica = root->replicaLayer()) | 246 if (GraphicsLayer* replica = root->replicaLayer()) |
247 gatherGraphicsLayers(replica, layerIdToNodeIdMap, layers); | 247 gatherGraphicsLayers(replica, layerIdToNodeIdMap, layers); |
248 for (size_t i = 0, size = root->children().size(); i < size; ++i) | 248 for (size_t i = 0, size = root->children().size(); i < size; ++i) |
249 gatherGraphicsLayers(root->children()[i], layerIdToNodeIdMap, layers); | 249 gatherGraphicsLayers(root->children()[i], layerIdToNodeIdMap, layers); |
250 } | 250 } |
251 | 251 |
252 int InspectorLayerTreeAgent::idForNode(Node* node) | 252 int InspectorLayerTreeAgent::idForNode(Node* node) |
253 { | 253 { |
254 return InspectorNodeIds::idForNode(node); | 254 return DOMNodeIds::idForNode(node); |
255 } | 255 } |
256 | 256 |
257 DeprecatedPaintLayerCompositor* InspectorLayerTreeAgent::deprecatedPaintLayerCom
positor() | 257 DeprecatedPaintLayerCompositor* InspectorLayerTreeAgent::deprecatedPaintLayerCom
positor() |
258 { | 258 { |
259 LayoutView* layoutView = m_pageAgent->inspectedFrame()->contentRenderer(); | 259 LayoutView* layoutView = m_pageAgent->inspectedFrame()->contentRenderer(); |
260 DeprecatedPaintLayerCompositor* compositor = layoutView ? layoutView->compos
itor() : nullptr; | 260 DeprecatedPaintLayerCompositor* compositor = layoutView ? layoutView->compos
itor() : nullptr; |
261 return compositor; | 261 return compositor; |
262 } | 262 } |
263 | 263 |
264 GraphicsLayer* InspectorLayerTreeAgent::rootGraphicsLayer() | 264 GraphicsLayer* InspectorLayerTreeAgent::rootGraphicsLayer() |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
464 void InspectorLayerTreeAgent::didRemovePageOverlay(const GraphicsLayer* layer) | 464 void InspectorLayerTreeAgent::didRemovePageOverlay(const GraphicsLayer* layer) |
465 { | 465 { |
466 size_t index = m_pageOverlayLayerIds.find(layer->platformLayer()->id()); | 466 size_t index = m_pageOverlayLayerIds.find(layer->platformLayer()->id()); |
467 if (index == WTF::kNotFound) | 467 if (index == WTF::kNotFound) |
468 return; | 468 return; |
469 m_pageOverlayLayerIds.remove(index); | 469 m_pageOverlayLayerIds.remove(index); |
470 } | 470 } |
471 | 471 |
472 | 472 |
473 } // namespace blink | 473 } // namespace blink |
OLD | NEW |