| Index: third_party/WebKit/Source/core/paint/PaintInvalidator.h
|
| diff --git a/third_party/WebKit/Source/core/paint/PaintInvalidator.h b/third_party/WebKit/Source/core/paint/PaintInvalidator.h
|
| index 7813bdb83e2c72849a4ecd4420f15412f1f795c9..dea766bb8bf8c414e28d73b94841396c7a8624f8 100644
|
| --- a/third_party/WebKit/Source/core/paint/PaintInvalidator.h
|
| +++ b/third_party/WebKit/Source/core/paint/PaintInvalidator.h
|
| @@ -31,7 +31,12 @@ struct PaintInvalidatorContext {
|
| paintInvalidationContainer(parentContext.paintInvalidationContainer),
|
| paintInvalidationContainerForStackedContents(
|
| parentContext.paintInvalidationContainerForStackedContents),
|
| - paintingLayer(parentContext.paintingLayer) {}
|
| + paintingLayer(parentContext.paintingLayer),
|
| + shouldAdjustPaintOffsetToContainer(
|
| + parentContext.shouldAdjustPaintOffsetToContainer),
|
| + shouldAdjustPaintOffsetToContainerForStackedContents(
|
| + parentContext
|
| + .shouldAdjustPaintOffsetToContainerForStackedContents) {}
|
|
|
| // This method is temporary to adapt PaintInvalidatorContext and the legacy
|
| // PaintInvalidationState for code shared by old code and new code.
|
| @@ -69,7 +74,7 @@ struct PaintInvalidatorContext {
|
|
|
| PaintLayer* paintingLayer = nullptr;
|
|
|
| - // Store the new and old visual rects in the paint invalidation backing's
|
| + // Store the old and new visual rects in the paint invalidation backing's
|
| // coordinates. The rects do *not* account for composited scrolling.
|
| // See LayoutObject::adjustVisualRectForCompositedScrolling().
|
| LayoutRect oldVisualRect;
|
| @@ -82,6 +87,17 @@ struct PaintInvalidatorContext {
|
| // LayoutObject::adjustVisualRectForCompositedScrolling().
|
| LayoutPoint oldLocation;
|
| LayoutPoint newLocation;
|
| +
|
| + // Stores the old and new offsets to paint this object, relative to the
|
| + // containing transform node.
|
| + LayoutPoint oldPaintOffset;
|
| + LayoutPoint newPaintOffset;
|
| +
|
| + // PaintPropertyTreeBuilder computes paint offset relative to the containing
|
| + // transform node. If the transform node is above paintInvalidationContainer,
|
| + // we need to adjust paint offset into paintInvalidationContainer space.
|
| + bool shouldAdjustPaintOffsetToContainer = false;
|
| + bool shouldAdjustPaintOffsetToContainerForStackedContents = false;
|
| };
|
|
|
| class PaintInvalidator {
|
|
|