| Index: third_party/WebKit/Source/core/paint/ObjectPaintInvalidator.cpp
|
| diff --git a/third_party/WebKit/Source/core/paint/ObjectPaintInvalidator.cpp b/third_party/WebKit/Source/core/paint/ObjectPaintInvalidator.cpp
|
| index cc06d4a84ffa768d2562263632f4bc878371f461..db0804782ceeb5418071daf003eae07f179f2b4d 100644
|
| --- a/third_party/WebKit/Source/core/paint/ObjectPaintInvalidator.cpp
|
| +++ b/third_party/WebKit/Source/core/paint/ObjectPaintInvalidator.cpp
|
| @@ -362,8 +362,8 @@ PaintInvalidationReason ObjectPaintInvalidatorWithContext::computePaintInvalidat
|
| if (m_object.shouldDoFullPaintInvalidation())
|
| return m_object.fullPaintInvalidationReason();
|
|
|
| - if (m_context.oldBounds.isEmpty() && m_context.newBounds.isEmpty())
|
| - return PaintInvalidationNone;
|
| + //if (m_context.oldBounds.isEmpty() && m_context.newBounds.isEmpty())
|
| + // return PaintInvalidationNone;
|
|
|
| if (backgroundObscurationChanged)
|
| return PaintInvalidationBackgroundObscurationChange;
|
| @@ -388,7 +388,12 @@ PaintInvalidationReason ObjectPaintInvalidatorWithContext::computePaintInvalidat
|
| // not sure whether paint invalidation is actually needed just based on information known
|
| // to LayoutObject. For example, a LayoutBox may need paint invalidation if border box changes.
|
| if (m_context.oldBounds == m_context.newBounds)
|
| - return locationChanged ? PaintInvalidationLocationChange : PaintInvalidationIncremental;
|
| + return locationChanged ? PaintInvalidationLocationChange : PaintInvalidationNone;
|
| +
|
| + // If we shifted, we don't know the exact reason so we are conservative and trigger a full invalidation. Shifting could
|
| + // be caused by some layout property (left / top) or some in-flow layoutObject inserted / removed before us in the tree.
|
| + if (m_context.newBounds.location() != m_context.oldBounds.location())
|
| + return PaintInvalidationBoundsChange;
|
|
|
| // If the size is zero on one of our bounds then we know we're going to have
|
| // to do a full invalidation of either old bounds or new bounds.
|
| @@ -397,11 +402,6 @@ PaintInvalidationReason ObjectPaintInvalidatorWithContext::computePaintInvalidat
|
| if (m_context.newBounds.isEmpty())
|
| return PaintInvalidationBecameInvisible;
|
|
|
| - // If we shifted, we don't know the exact reason so we are conservative and trigger a full invalidation. Shifting could
|
| - // be caused by some layout property (left / top) or some in-flow layoutObject inserted / removed before us in the tree.
|
| - if (m_context.newBounds.location() != m_context.oldBounds.location())
|
| - return PaintInvalidationBoundsChange;
|
| -
|
| if (locationChanged)
|
| return PaintInvalidationLocationChange;
|
|
|
| @@ -413,7 +413,7 @@ void ObjectPaintInvalidatorWithContext::invalidateSelectionIfNeeded(PaintInvalid
|
| // Update selection rect when we are doing full invalidation (in case that the object is moved,
|
| // composite status changed, etc.) or shouldInvalidationSelection is set (in case that the
|
| // selection itself changed).
|
| - bool fullInvalidation = isImmediateFullPaintInvalidationReason(reason);
|
| + bool fullInvalidation = isFullPaintInvalidationReason(reason); // isImmediateFullPaintInvalidationReason(reason);
|
| if (!fullInvalidation && !m_object.shouldInvalidateSelection())
|
| return;
|
|
|
| @@ -439,8 +439,8 @@ PaintInvalidationReason ObjectPaintInvalidatorWithContext::invalidatePaintIfNeed
|
| // This is because we need to update the previous selection rect regardless.
|
| invalidateSelectionIfNeeded(reason);
|
|
|
| - if (reason == PaintInvalidationIncremental && !incrementallyInvalidatePaint())
|
| - reason = PaintInvalidationNone;
|
| + //if (reason == PaintInvalidationIncremental && !incrementallyInvalidatePaint())
|
| + // reason = PaintInvalidationNone;
|
|
|
| switch (reason) {
|
| case PaintInvalidationNone:
|
| @@ -455,6 +455,7 @@ PaintInvalidationReason ObjectPaintInvalidatorWithContext::invalidatePaintIfNeed
|
| }
|
| return PaintInvalidationNone;
|
| case PaintInvalidationIncremental:
|
| + incrementallyInvalidatePaint();
|
| break;
|
| case PaintInvalidationDelayedFull:
|
| return PaintInvalidationDelayedFull;
|
|
|