Chromium Code Reviews| Index: Source/core/inspector/InspectorLayerTreeAgent.cpp |
| diff --git a/Source/core/inspector/InspectorLayerTreeAgent.cpp b/Source/core/inspector/InspectorLayerTreeAgent.cpp |
| index b91d04a1051f2e6bc6a8837bea0ff71f4421c2e5..2498ae681bd4d2835f7335202b8eebd2e6ba2193 100644 |
| --- a/Source/core/inspector/InspectorLayerTreeAgent.cpp |
| +++ b/Source/core/inspector/InspectorLayerTreeAgent.cpp |
| @@ -181,6 +181,8 @@ void InspectorLayerTreeAgent::getLayers(ErrorString* errorString, const int* nod |
| *errorString = "Not in the compositing mode"; |
| return; |
| } |
| + // FIXME: when inspector layer access is made asynchronous, this will probably need to be changed. |
| + compositor->updateCompositingLayers(CompositingUpdateFinishAllDeferredWork); |
| if (!nodeId) { |
| buildLayerIdToNodeIdMap(errorString, compositor->rootRenderLayer(), layerIdToNodeIdMap); |
| gatherGraphicsLayers(compositor->rootGraphicsLayer(), layerIdToNodeIdMap, layers); |
| @@ -197,6 +199,10 @@ void InspectorLayerTreeAgent::getLayers(ErrorString* errorString, const int* nod |
| return; |
| } |
| RenderLayer* enclosingLayer = renderer->enclosingLayer(); |
| + if (!enclosingLayer->enclosingCompositingLayer() || !enclosingLayer->enclosingCompositingLayer()->compositedLayerMapping()) { |
|
caseq
2013/10/18 05:39:56
I think this is never supposed to be true now that
|
| + *errorString = "No CompositedLayerMapping for the provided node"; |
| + return; |
| + } |
| GraphicsLayer* enclosingGraphicsLayer = enclosingLayer->enclosingCompositingLayer()->compositedLayerMapping()->childForSuperlayers(); |
| buildLayerIdToNodeIdMap(errorString, enclosingLayer, layerIdToNodeIdMap); |
| gatherGraphicsLayers(enclosingGraphicsLayer, layerIdToNodeIdMap, layers); |