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 68195ca6945f7ab995c9e90e31483c5c4f7f5c71..aef2d23fab276d26ceda751801a63870f5d50bca 100644 |
--- a/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp |
+++ b/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp |
@@ -2274,6 +2274,8 @@ static void paintScrollbar(const Scrollbar* scrollbar, GraphicsContext& context, |
scrollbar->paint(context, CullRect(transformedClip)); |
} |
+// TODO(eseckler): Make recording distance configurable, e.g. for use in |
+// headless, where we would like to record an exact area (distance = 0). |
static const int kPixelDistanceToRecord = 4000; |
IntRect CompositedLayerMapping::recomputeInterestRect(const GraphicsLayer* graphicsLayer) const |
@@ -2309,7 +2311,7 @@ IntRect CompositedLayerMapping::recomputeInterestRect(const GraphicsLayer* graph |
while (rootView->frame()->ownerLayoutObject()) |
rootView = rootView->frame()->ownerLayoutObject()->view(); |
anchorLayoutObject->mapToVisualRectInAncestorSpace(rootView, visibleContentRect); |
- visibleContentRect.intersect(LayoutRect(rootView->frameView()->visibleContentRect())); |
+ visibleContentRect.intersect(LayoutRect(rootView->frameView()->visibleContentRectForRecording())); |
IntRect enclosingGraphicsLayerBounds(enclosingIntRect(graphicsLayerBounds)); |