| Index: third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp | 
| diff --git a/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp b/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp | 
| index 75d52860e94d9a1014d4770d59a0fe07351fc066..b45eeb72d9511a6f95fd480855ca16e9cc9d2e57 100644 | 
| --- a/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp | 
| +++ b/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp | 
| @@ -63,6 +63,7 @@ | 
| #include "platform/geometry/TransformState.h" | 
| #include "platform/graphics/BitmapImage.h" | 
| #include "platform/graphics/GraphicsContext.h" | 
| +#include "platform/graphics/GraphicsScreen.h" | 
| #include "platform/graphics/paint/ClipDisplayItem.h" | 
| #include "platform/graphics/paint/CullRect.h" | 
| #include "platform/graphics/paint/PaintController.h" | 
| @@ -1921,6 +1922,8 @@ void CompositedLayerMapping::updateImageContents() | 
| if (!image) | 
| return; | 
|  | 
| +    int64_t previousId = setCurrentScreenId(reinterpret_cast<int64_t>(layoutObject()->frame()->page())); | 
| + | 
| // This is a no-op if the layer doesn't have an inner layer for the image. | 
| m_graphicsLayer->setContentsToImage(image, imageLayoutObject->shouldRespectImageOrientation()); | 
|  | 
| @@ -1933,6 +1936,8 @@ void CompositedLayerMapping::updateImageContents() | 
| // the image. So we have to kick the animation each time; this has the downside that the | 
| // image will keep animating, even if its layer is not visible. | 
| image->startAnimation(); | 
| + | 
| +    setCurrentScreenId(previousId); | 
| } | 
|  | 
| FloatPoint3D CompositedLayerMapping::computeTransformOrigin(const IntRect& borderBox) const | 
| @@ -2321,6 +2326,12 @@ void CompositedLayerMapping::paintContents(const GraphicsLayer* graphicsLayer, G | 
| { | 
| // https://code.google.com/p/chromium/issues/detail?id=343772 | 
| DisableCompositingQueryAsserts disabler; | 
| + | 
| +    int64_t previousId = setCurrentScreenId(reinterpret_cast<int64_t>(layoutObject()->frame()->page())); | 
| + | 
| +    // fprintf(stderr, "CompositedLayerMapping::paintContents begins page %ld\n", (long int) currentScreenId()); | 
| +    // fflush(stderr); | 
| + | 
| #if ENABLE(ASSERT) | 
| // FIXME: once the state machine is ready, this can be removed and we can refer to that instead. | 
| if (Page* page = layoutObject()->frame()->page()) | 
| @@ -2376,11 +2387,18 @@ void CompositedLayerMapping::paintContents(const GraphicsLayer* graphicsLayer, G | 
| ScrollableAreaPainter(*m_owningLayer.scrollableArea()).paintScrollCorner(&context, -scrollCornerAndResizerLocation, cullRect); | 
| ScrollableAreaPainter(*m_owningLayer.scrollableArea()).paintResizer(&context, -scrollCornerAndResizerLocation, cullRect); | 
| } | 
| + | 
| InspectorInstrumentation::didPaint(m_owningLayer.layoutObject(), graphicsLayer, &context, LayoutRect(interestRect)); | 
| + | 
| #if ENABLE(ASSERT) | 
| if (Page* page = layoutObject()->frame()->page()) | 
| page->setIsPainting(false); | 
| #endif | 
| + | 
| +    // fprintf(stderr, "CompositedLayerMapping::paintContents ends page %ld\n", (long int) currentScreenId()); | 
| +    // fflush(stderr); | 
| + | 
| +    setCurrentScreenId(previousId); | 
| } | 
|  | 
| bool CompositedLayerMapping::isTrackingPaintInvalidations() const | 
|  |