| 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 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 PassRefPtr<TypeBuilder::Array<TypeBuilder::LayerTree::Layer> > InspectorLayerTre
eAgent::buildLayerTree() | 205 PassRefPtr<TypeBuilder::Array<TypeBuilder::LayerTree::Layer> > InspectorLayerTre
eAgent::buildLayerTree() |
| 206 { | 206 { |
| 207 PaintLayerCompositor* compositor = paintLayerCompositor(); | 207 PaintLayerCompositor* compositor = paintLayerCompositor(); |
| 208 if (!compositor || !compositor->inCompositingMode()) | 208 if (!compositor || !compositor->inCompositingMode()) |
| 209 return nullptr; | 209 return nullptr; |
| 210 | 210 |
| 211 LayerIdToNodeIdMap layerIdToNodeIdMap; | 211 LayerIdToNodeIdMap layerIdToNodeIdMap; |
| 212 RefPtr<TypeBuilder::Array<TypeBuilder::LayerTree::Layer> > layers = TypeBuil
der::Array<TypeBuilder::LayerTree::Layer>::create(); | 212 RefPtr<TypeBuilder::Array<TypeBuilder::LayerTree::Layer> > layers = TypeBuil
der::Array<TypeBuilder::LayerTree::Layer>::create(); |
| 213 buildLayerIdToNodeIdMap(compositor->rootLayer(), layerIdToNodeIdMap); | 213 buildLayerIdToNodeIdMap(compositor->rootLayer(), layerIdToNodeIdMap); |
| 214 int scrollingLayerId = m_inspectedFrames->root()->view()->layerForScrolling(
)->platformLayer()->id(); | 214 int scrollingLayerId = m_inspectedFrames->root()->view()->layerForScrolling(
)->platformLayer()->id(); |
| 215 bool haveWheelEventHandlers = m_inspectedFrames->root()->chromeClient().have
WheelEventHandlers(); | 215 bool haveBlockingWheelEventHandlers = m_inspectedFrames->root()->chromeClien
t().eventListenerProperties(WebEventListenerClass::MouseWheel) == WebEventListen
erProperties::Blocking; |
| 216 | 216 |
| 217 gatherGraphicsLayers(rootGraphicsLayer(), layerIdToNodeIdMap, layers, haveWh
eelEventHandlers, scrollingLayerId); | 217 gatherGraphicsLayers(rootGraphicsLayer(), layerIdToNodeIdMap, layers, haveBl
ockingWheelEventHandlers, scrollingLayerId); |
| 218 return layers.release(); | 218 return layers.release(); |
| 219 } | 219 } |
| 220 | 220 |
| 221 void InspectorLayerTreeAgent::buildLayerIdToNodeIdMap(PaintLayer* root, LayerIdT
oNodeIdMap& layerIdToNodeIdMap) | 221 void InspectorLayerTreeAgent::buildLayerIdToNodeIdMap(PaintLayer* root, LayerIdT
oNodeIdMap& layerIdToNodeIdMap) |
| 222 { | 222 { |
| 223 if (root->hasCompositedLayerMapping()) { | 223 if (root->hasCompositedLayerMapping()) { |
| 224 if (Node* node = root->layoutObject()->generatingNode()) { | 224 if (Node* node = root->layoutObject()->generatingNode()) { |
| 225 GraphicsLayer* graphicsLayer = root->compositedLayerMapping()->child
ForSuperlayers(); | 225 GraphicsLayer* graphicsLayer = root->compositedLayerMapping()->child
ForSuperlayers(); |
| 226 layerIdToNodeIdMap.set(graphicsLayer->platformLayer()->id(), idForNo
de(node)); | 226 layerIdToNodeIdMap.set(graphicsLayer->platformLayer()->id(), idForNo
de(node)); |
| 227 } | 227 } |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 467 void InspectorLayerTreeAgent::didRemovePageOverlay(const GraphicsLayer* layer) | 467 void InspectorLayerTreeAgent::didRemovePageOverlay(const GraphicsLayer* layer) |
| 468 { | 468 { |
| 469 size_t index = m_pageOverlayLayerIds.find(layer->platformLayer()->id()); | 469 size_t index = m_pageOverlayLayerIds.find(layer->platformLayer()->id()); |
| 470 if (index == WTF::kNotFound) | 470 if (index == WTF::kNotFound) |
| 471 return; | 471 return; |
| 472 m_pageOverlayLayerIds.remove(index); | 472 m_pageOverlayLayerIds.remove(index); |
| 473 } | 473 } |
| 474 | 474 |
| 475 | 475 |
| 476 } // namespace blink | 476 } // namespace blink |
| OLD | NEW |