summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp')
-rw-r--r--third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp b/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp
index af2bed6..e5294b7 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp
@@ -360,12 +360,12 @@ void LayoutBoxModelObject::invalidateTreeIfNeeded(const PaintInvalidationState&
{
ASSERT(!needsLayout());
- if (!shouldCheckForPaintInvalidation(paintInvalidationState))
+ PaintInvalidationState newPaintInvalidationState(paintInvalidationState, *this);
+ if (!shouldCheckForPaintInvalidation(newPaintInvalidationState))
return;
LayoutRect previousPaintInvalidationRect = this->previousPaintInvalidationRect();
- PaintInvalidationState newPaintInvalidationState(paintInvalidationState, *this);
// TODO(wangxianzhu): Enable this assert after we fix all paintInvalidationContainer mismatch issues. crbug.com/360286
// ASSERT(&newPaintInvalidationState.paintInvalidationContainer() == &containerForPaintInvalidation());
@@ -378,6 +378,8 @@ void LayoutBoxModelObject::invalidateTreeIfNeeded(const PaintInvalidationState&
if (reason == PaintInvalidationLocationChange)
newPaintInvalidationState.setForceSubtreeInvalidationWithinContainer();
+ // TODO(wangxianzhu): Combine this function into LayoutObject::invalidateTreeIfNeeded() when removing the following workarounds.
+
// TODO(wangxianzhu): This is a workaround for crbug.com/533277. Will remove when we enable paint offset caching.
if (reason != PaintInvalidationNone && hasPercentageTransform(styleRef()))
newPaintInvalidationState.setForceSubtreeInvalidationWithinContainer();
@@ -390,7 +392,7 @@ void LayoutBoxModelObject::invalidateTreeIfNeeded(const PaintInvalidationState&
&& hasOverflowClip())
newPaintInvalidationState.setForceSubtreeInvalidationRectUpdateWithinContainer();
- newPaintInvalidationState.updatePaintOffsetAndClipForChildren();
+ newPaintInvalidationState.updateForChildren();
invalidatePaintOfSubtreesIfNeeded(newPaintInvalidationState);
}