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

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

Issue 2476813002: Move LayoutObject::m_previousPosition... into a global map in ObjectPaintInvalidator (Closed)
Patch Set: doc Created 4 years, 1 month 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 | « no previous file | third_party/WebKit/Source/core/layout/LayoutObject.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 cd3700b6bde282bb4d2fa5806ad969ea32e6947d..11cbfdda83a15d62db0babd87122df899dcaab83 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp
@@ -498,24 +498,27 @@ void LayoutBoxModelObject::invalidateTreeIfNeeded(
newPaintInvalidationState
.setForceSubtreeInvalidationCheckingWithinContainer();
+ ObjectPaintInvalidator paintInvalidator(*this);
LayoutRect previousVisualRect = this->previousVisualRect();
- LayoutPoint previousPosition = previousPositionFromPaintInvalidationBacking();
+ LayoutPoint previousLocation = paintInvalidator.previousLocationInBacking();
PaintInvalidationReason reason =
invalidatePaintIfNeeded(newPaintInvalidationState);
clearPaintInvalidationFlags();
- if (previousPosition != previousPositionFromPaintInvalidationBacking())
+ if (previousLocation != paintInvalidator.previousLocationInBacking()) {
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()))
+ if (reason != PaintInvalidationNone && hasPercentageTransform(styleRef())) {
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
@@ -525,9 +528,10 @@ void LayoutBoxModelObject::invalidateTreeIfNeeded(
!usesCompositedScrolling()
// Note that isLayoutView() below becomes unnecessary after the launch of
// root layer scrolling.
- && (hasOverflowClip() || isLayoutView()))
+ && (hasOverflowClip() || isLayoutView())) {
newPaintInvalidationState
.setForceSubtreeInvalidationRectUpdateWithinContainer();
+ }
newPaintInvalidationState.updateForChildren(reason);
invalidatePaintOfSubtreesIfNeeded(newPaintInvalidationState);
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/LayoutObject.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698