| Index: Source/core/testing/Internals.cpp
|
| diff --git a/Source/core/testing/Internals.cpp b/Source/core/testing/Internals.cpp
|
| index 5cacf1c22cefcf96bf49b194a38d93b2f97319c2..0a6dff2ad5403dc64c0f0576f93ff8fd4e1c424c 100644
|
| --- a/Source/core/testing/Internals.cpp
|
| +++ b/Source/core/testing/Internals.cpp
|
| @@ -1257,7 +1257,9 @@ unsigned Internals::touchEventHandlerCount(Document* document, ExceptionState& e
|
|
|
| static RenderLayer* findRenderLayerForGraphicsLayer(RenderLayer* searchRoot, GraphicsLayer* graphicsLayer, String* layerType)
|
| {
|
| - if (searchRoot->compositedLayerMapping() && graphicsLayer == searchRoot->compositedLayerMapping()->mainGraphicsLayer())
|
| + // Note, we only want to return the RenderLayer that _truly_ owns the GraphicsLayer, not just the
|
| + // first RenderLayer we encounter that paints into it.
|
| + if (searchRoot->compositingState() == PaintsIntoOwnBacking && graphicsLayer == searchRoot->compositedLayerMapping()->mainGraphicsLayer())
|
| return searchRoot;
|
|
|
| GraphicsLayer* layerForScrolling = searchRoot->scrollableArea() ? searchRoot->scrollableArea()->layerForScrolling() : 0;
|
| @@ -1740,7 +1742,7 @@ String Internals::elementLayerTreeAsText(Element* element, unsigned flags, Excep
|
|
|
| RenderLayer* layer = toRenderBox(renderer)->layer();
|
| if (!layer
|
| - || !layer->compositedLayerMapping()
|
| + || !layer->hasCompositedLayerMapping()
|
| || !layer->compositedLayerMapping()->mainGraphicsLayer()) {
|
| // Don't raise exception in these cases which may be normally used in tests.
|
| return String();
|
|
|