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

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: sync. 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 6248097b19031e13208183b785a026fa7d0538de..ba435fa1a255686307fda3757ca4de6ee8b01ebe 100644
--- a/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp
+++ b/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp
@@ -2282,6 +2282,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
@@ -2317,7 +2319,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()->visibleContentRectForPainting()));
IntRect enclosingGraphicsLayerBounds(enclosingIntRect(graphicsLayerBounds));

Powered by Google App Engine
This is Rietveld 408576698