Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(17)

Unified Diff: third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp

Issue 2237433004: Adds DevTools commands for forced viewport override. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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));

Powered by Google App Engine
This is Rietveld 408576698