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

Unified Diff: Source/core/testing/Internals.cpp

Issue 358913003: Get rid of one-off code in ScrollingCoordinator to handle graphics layer offsets. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix. Created 6 years, 6 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
« no previous file with comments | « Source/core/rendering/compositing/CompositedLayerMapping.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/testing/Internals.cpp
diff --git a/Source/core/testing/Internals.cpp b/Source/core/testing/Internals.cpp
index 8ac6035cd745a735079c9459a97ae454b111feb7..153cdbea80451ef6d107faf3e7c47ea19302f162 100644
--- a/Source/core/testing/Internals.cpp
+++ b/Source/core/testing/Internals.cpp
@@ -1304,9 +1304,9 @@ static RenderLayer* findRenderLayerForGraphicsLayer(RenderLayer* searchRoot, Gra
{
*layerOffset = IntSize();
if (searchRoot->hasCompositedLayerMapping() && graphicsLayer == searchRoot->compositedLayerMapping()->mainGraphicsLayer()) {
- CompositedLayerMappingPtr compositedLayerMapping = searchRoot->compositedLayerMapping();
- LayoutSize offset = compositedLayerMapping->contentOffsetInCompositingLayer();
- *layerOffset = IntSize(offset.width(), offset.height());
+ LayoutRect rect;
+ RenderLayer::mapRectToPaintBackingCoordinates(searchRoot->renderer(), rect);
+ *layerOffset = IntSize(rect.x(), rect.y());
return searchRoot;
}
@@ -1320,7 +1320,9 @@ static RenderLayer* findRenderLayerForGraphicsLayer(RenderLayer* searchRoot, Gra
GraphicsLayer* squashingLayer = searchRoot->groupedMapping()->squashingLayer();
if (graphicsLayer == squashingLayer) {
*layerType ="squashing";
- *layerOffset = -searchRoot->offsetFromSquashingLayerOrigin();
+ LayoutRect rect;
+ RenderLayer::mapRectToPaintBackingCoordinates(searchRoot->renderer(), rect);
+ *layerOffset = IntSize(rect.x(), rect.y());
return searchRoot;
}
}
« no previous file with comments | « Source/core/rendering/compositing/CompositedLayerMapping.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698