| 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 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 241 | 241 |
| 242 gatherGraphicsLayers(rootGraphicsLayer(), layerIdToNodeIdMap, layers, | 242 gatherGraphicsLayers(rootGraphicsLayer(), layerIdToNodeIdMap, layers, |
| 243 haveBlockingWheelEventHandlers, scrollingLayerId); | 243 haveBlockingWheelEventHandlers, scrollingLayerId); |
| 244 return layers; | 244 return layers; |
| 245 } | 245 } |
| 246 | 246 |
| 247 void InspectorLayerTreeAgent::buildLayerIdToNodeIdMap( | 247 void InspectorLayerTreeAgent::buildLayerIdToNodeIdMap( |
| 248 PaintLayer* root, | 248 PaintLayer* root, |
| 249 LayerIdToNodeIdMap& layerIdToNodeIdMap) { | 249 LayerIdToNodeIdMap& layerIdToNodeIdMap) { |
| 250 if (root->hasCompositedLayerMapping()) { | 250 if (root->hasCompositedLayerMapping()) { |
| 251 if (Node* node = root->layoutObject()->generatingNode()) { | 251 if (Node* node = root->layoutObject().generatingNode()) { |
| 252 GraphicsLayer* graphicsLayer = | 252 GraphicsLayer* graphicsLayer = |
| 253 root->compositedLayerMapping()->childForSuperlayers(); | 253 root->compositedLayerMapping()->childForSuperlayers(); |
| 254 layerIdToNodeIdMap.set(graphicsLayer->platformLayer()->id(), | 254 layerIdToNodeIdMap.set(graphicsLayer->platformLayer()->id(), |
| 255 idForNode(node)); | 255 idForNode(node)); |
| 256 } | 256 } |
| 257 } | 257 } |
| 258 for (PaintLayer* child = root->firstChild(); child; | 258 for (PaintLayer* child = root->firstChild(); child; |
| 259 child = child->nextSibling()) | 259 child = child->nextSibling()) |
| 260 buildLayerIdToNodeIdMap(child, layerIdToNodeIdMap); | 260 buildLayerIdToNodeIdMap(child, layerIdToNodeIdMap); |
| 261 if (!root->layoutObject()->isLayoutIFrame()) | 261 if (!root->layoutObject().isLayoutIFrame()) |
| 262 return; | 262 return; |
| 263 FrameView* childFrameView = | 263 FrameView* childFrameView = |
| 264 toFrameView(toLayoutPart(root->layoutObject())->widget()); | 264 toFrameView(toLayoutPart(root->layoutObject()).widget()); |
| 265 LayoutViewItem childLayoutViewItem = childFrameView->layoutViewItem(); | 265 LayoutViewItem childLayoutViewItem = childFrameView->layoutViewItem(); |
| 266 if (!childLayoutViewItem.isNull()) { | 266 if (!childLayoutViewItem.isNull()) { |
| 267 if (PaintLayerCompositor* childCompositor = | 267 if (PaintLayerCompositor* childCompositor = |
| 268 childLayoutViewItem.compositor()) | 268 childLayoutViewItem.compositor()) |
| 269 buildLayerIdToNodeIdMap(childCompositor->rootLayer(), layerIdToNodeIdMap); | 269 buildLayerIdToNodeIdMap(childCompositor->rootLayer(), layerIdToNodeIdMap); |
| 270 } | 270 } |
| 271 } | 271 } |
| 272 | 272 |
| 273 void InspectorLayerTreeAgent::gatherGraphicsLayers( | 273 void InspectorLayerTreeAgent::gatherGraphicsLayers( |
| 274 GraphicsLayer* root, | 274 GraphicsLayer* root, |
| (...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 498 } | 498 } |
| 499 | 499 |
| 500 void InspectorLayerTreeAgent::didRemovePageOverlay(const GraphicsLayer* layer) { | 500 void InspectorLayerTreeAgent::didRemovePageOverlay(const GraphicsLayer* layer) { |
| 501 size_t index = m_pageOverlayLayerIds.find(layer->platformLayer()->id()); | 501 size_t index = m_pageOverlayLayerIds.find(layer->platformLayer()->id()); |
| 502 if (index == WTF::kNotFound) | 502 if (index == WTF::kNotFound) |
| 503 return; | 503 return; |
| 504 m_pageOverlayLayerIds.remove(index); | 504 m_pageOverlayLayerIds.remove(index); |
| 505 } | 505 } |
| 506 | 506 |
| 507 } // namespace blink | 507 } // namespace blink |
| OLD | NEW |