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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp

Issue 1950573003: Improve handling of PaintInvalidationLayer (renamed to PaintInvalidationSubtree) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@LocationChange
Patch Set: Created 4 years, 7 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/LayoutBoxModelObject.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp b/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp
index cacade76ccdec0aa563cb49b7fbbf187cd4f69bc..762eb058847fb854534bb050653e272e9898ba35 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp
@@ -166,7 +166,7 @@ void LayoutBoxModelObject::styleWillChange(StyleDifference diff, const ComputedS
FloatStateForStyleChange::setWasFloating(this, isFloating());
if (const ComputedStyle* oldStyle = style()) {
- if (parent() && diff.needsPaintInvalidationLayer()) {
+ if (parent() && diff.needsPaintInvalidationSubtree()) {
if (oldStyle->hasAutoClip() != newStyle.hasAutoClip()
|| oldStyle->clip() != newStyle.clip())
layer()->clipper().clearClipRectsIncludingDescendants();
@@ -398,17 +398,14 @@ void LayoutBoxModelObject::invalidateTreeIfNeeded(const PaintInvalidationState&
PaintInvalidationReason reason = invalidatePaintIfNeeded(newPaintInvalidationState);
clearPaintInvalidationFlags(newPaintInvalidationState);
- if (reason == PaintInvalidationDelayedFull)
- paintInvalidationState.pushDelayedPaintInvalidationTarget(*this);
-
if (previousPosition != previousPositionFromPaintInvalidationBacking())
- newPaintInvalidationState.setForceSubtreeInvalidationWithinContainer();
+ newPaintInvalidationState.setForceSubtreeInvalidationCheckingWithinContainer();
// 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();
+ newPaintInvalidationState.setForceSubtreeInvalidationCheckingWithinContainer();
// TODO(wangxianzhu): This is a workaround for crbug.com/490725. We don't have enough saved information to do accurate check
// of clipping change. Will remove when we remove rect-based paint invalidation.
@@ -418,7 +415,7 @@ void LayoutBoxModelObject::invalidateTreeIfNeeded(const PaintInvalidationState&
&& hasOverflowClip())
newPaintInvalidationState.setForceSubtreeInvalidationRectUpdateWithinContainer();
- newPaintInvalidationState.updateForChildren();
+ newPaintInvalidationState.updateForChildren(reason);
invalidatePaintOfSubtreesIfNeeded(newPaintInvalidationState);
}
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBox.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutObject.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698