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

Unified Diff: third_party/WebKit/Source/core/paint/PaintLayer.cpp

Issue 1537133002: Renaming: distinguish ancestor, container and paintInvalidationContainer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@SelectionInvalidation
Patch Set: Created 5 years 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/paint/PaintLayer.cpp
diff --git a/third_party/WebKit/Source/core/paint/PaintLayer.cpp b/third_party/WebKit/Source/core/paint/PaintLayer.cpp
index c08e5cb19c52bd634aca0d75ba8b30539d533c71..2dceaeae8e4ef534b0b90de81abc2be492c9e506 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayer.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayer.cpp
@@ -492,7 +492,7 @@ void PaintLayer::clearPaginationRecursive()
LayoutPoint PaintLayer::positionFromPaintInvalidationBacking(const LayoutObject* layoutObject, const LayoutBoxModelObject* paintInvalidationContainer, const PaintInvalidationState* paintInvalidationState)
{
- FloatPoint point = layoutObject->localToContainerPoint(FloatPoint(), paintInvalidationContainer, 0, 0, paintInvalidationState);
+ FloatPoint point = layoutObject->localToAncestorPoint(FloatPoint(), paintInvalidationContainer, 0, 0, paintInvalidationState);
// FIXME: Eventually we are going to unify coordinates in GraphicsLayer space.
if (paintInvalidationContainer && paintInvalidationContainer->layer()->groupedMapping())
@@ -515,7 +515,7 @@ void PaintLayer::mapPointToPaintBackingCoordinates(const LayoutBoxModelObject* p
// |paintInvalidationContainer| may have a local 2D transform on it, so take that into account when mapping into the space of the
// transformed ancestor.
- point = paintInvalidationContainer->localToContainerPoint(point, transformedAncestor);
+ point = paintInvalidationContainer->localToAncestorPoint(point, transformedAncestor);
point.moveBy(-paintInvalidationLayer->groupedMapping()->squashingOffsetFromTransformedAncestor());
}
@@ -534,7 +534,7 @@ void PaintLayer::mapRectToPaintBackingCoordinates(const LayoutBoxModelObject* pa
// |paintInvalidationContainer| may have a local 2D transform on it, so take that into account when mapping into the space of the
// transformed ancestor.
- rect = LayoutRect(paintInvalidationContainer->localToContainerQuad(FloatRect(rect), transformedAncestor).boundingBox());
+ rect = LayoutRect(paintInvalidationContainer->localToAncestorQuad(FloatRect(rect), transformedAncestor).boundingBox());
rect.moveBy(-paintInvalidationLayer->groupedMapping()->squashingOffsetFromTransformedAncestor());
}
@@ -542,7 +542,7 @@ void PaintLayer::mapRectToPaintBackingCoordinates(const LayoutBoxModelObject* pa
void PaintLayer::mapRectToPaintInvalidationBacking(const LayoutObject* layoutObject, const LayoutBoxModelObject* paintInvalidationContainer, LayoutRect& rect, const PaintInvalidationState* paintInvalidationState)
{
if (!paintInvalidationContainer->layer()->groupedMapping()) {
- layoutObject->mapToVisibleRectInContainerSpace(paintInvalidationContainer, rect, paintInvalidationState);
+ layoutObject->mapToVisibleRectInAncestorSpace(paintInvalidationContainer, rect, paintInvalidationState);
return;
}
@@ -550,7 +550,7 @@ void PaintLayer::mapRectToPaintInvalidationBacking(const LayoutObject* layoutObj
// layer. This is because all layers that squash together need to issue paint invalidations w.r.t. a single container that is
// an ancestor of all of them, in order to properly take into account any local transforms etc.
// FIXME: remove this special-case code that works around the paint invalidation code structure.
- layoutObject->mapToVisibleRectInContainerSpace(paintInvalidationContainer, rect, paintInvalidationState);
+ layoutObject->mapToVisibleRectInAncestorSpace(paintInvalidationContainer, rect, paintInvalidationState);
mapRectToPaintBackingCoordinates(paintInvalidationContainer, rect);
}
@@ -874,7 +874,7 @@ LayoutPoint PaintLayer::computeOffsetFromTransformedAncestor() const
TransformState transformState(TransformState::ApplyTransformDirection, FloatPoint());
// FIXME: add a test that checks flipped writing mode and ApplyContainerFlip are correct.
- layoutObject()->mapLocalToContainer(properties.transformAncestor ? properties.transformAncestor->layoutObject() : 0, transformState, ApplyContainerFlip);
+ layoutObject()->mapLocalToAncestor(properties.transformAncestor ? properties.transformAncestor->layoutObject() : 0, transformState, ApplyContainerFlip);
transformState.flatten();
return LayoutPoint(transformState.lastPlanarPoint());
}
« no previous file with comments | « third_party/WebKit/Source/core/paint/ObjectPainter.cpp ('k') | third_party/WebKit/Source/core/paint/PaintLayerClipper.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698