| 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 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 231 void InspectorLayerTreeAgent::buildLayerIdToNodeIdMap(Layer* root, LayerIdToNode
IdMap& layerIdToNodeIdMap) | 231 void InspectorLayerTreeAgent::buildLayerIdToNodeIdMap(Layer* root, LayerIdToNode
IdMap& layerIdToNodeIdMap) |
| 232 { | 232 { |
| 233 if (root->hasCompositedLayerMapping()) { | 233 if (root->hasCompositedLayerMapping()) { |
| 234 if (Node* node = root->renderer()->generatingNode()) { | 234 if (Node* node = root->renderer()->generatingNode()) { |
| 235 GraphicsLayer* graphicsLayer = root->compositedLayerMapping()->child
ForSuperlayers(); | 235 GraphicsLayer* graphicsLayer = root->compositedLayerMapping()->child
ForSuperlayers(); |
| 236 layerIdToNodeIdMap.set(graphicsLayer->platformLayer()->id(), idForNo
de(node)); | 236 layerIdToNodeIdMap.set(graphicsLayer->platformLayer()->id(), idForNo
de(node)); |
| 237 } | 237 } |
| 238 } | 238 } |
| 239 for (Layer* child = root->firstChild(); child; child = child->nextSibling()) | 239 for (Layer* child = root->firstChild(); child; child = child->nextSibling()) |
| 240 buildLayerIdToNodeIdMap(child, layerIdToNodeIdMap); | 240 buildLayerIdToNodeIdMap(child, layerIdToNodeIdMap); |
| 241 if (!root->renderer()->isRenderIFrame()) | 241 if (!root->renderer()->isLayoutIFrame()) |
| 242 return; | 242 return; |
| 243 FrameView* childFrameView = toFrameView(toLayoutPart(root->renderer())->widg
et()); | 243 FrameView* childFrameView = toFrameView(toLayoutPart(root->renderer())->widg
et()); |
| 244 if (RenderView* childRenderView = childFrameView->renderView()) { | 244 if (RenderView* childRenderView = childFrameView->renderView()) { |
| 245 if (LayerCompositor* childCompositor = childRenderView->compositor()) | 245 if (LayerCompositor* childCompositor = childRenderView->compositor()) |
| 246 buildLayerIdToNodeIdMap(childCompositor->rootLayer(), layerIdToNodeI
dMap); | 246 buildLayerIdToNodeIdMap(childCompositor->rootLayer(), layerIdToNodeI
dMap); |
| 247 } | 247 } |
| 248 } | 248 } |
| 249 | 249 |
| 250 void InspectorLayerTreeAgent::gatherGraphicsLayers(GraphicsLayer* root, HashMap<
int, int>& layerIdToNodeIdMap, RefPtr<TypeBuilder::Array<TypeBuilder::LayerTree:
:Layer> >& layers) | 250 void InspectorLayerTreeAgent::gatherGraphicsLayers(GraphicsLayer* root, HashMap<
int, int>& layerIdToNodeIdMap, RefPtr<TypeBuilder::Array<TypeBuilder::LayerTree:
:Layer> >& layers) |
| 251 { | 251 { |
| (...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 486 void InspectorLayerTreeAgent::didRemovePageOverlay(const GraphicsLayer* layer) | 486 void InspectorLayerTreeAgent::didRemovePageOverlay(const GraphicsLayer* layer) |
| 487 { | 487 { |
| 488 size_t index = m_pageOverlayLayerIds.find(layer->platformLayer()->id()); | 488 size_t index = m_pageOverlayLayerIds.find(layer->platformLayer()->id()); |
| 489 if (index == WTF::kNotFound) | 489 if (index == WTF::kNotFound) |
| 490 return; | 490 return; |
| 491 m_pageOverlayLayerIds.remove(index); | 491 m_pageOverlayLayerIds.remove(index); |
| 492 } | 492 } |
| 493 | 493 |
| 494 | 494 |
| 495 } // namespace blink | 495 } // namespace blink |
| OLD | NEW |