| Index: third_party/WebKit/Source/core/paint/BoxPaintInvalidator.cpp
|
| diff --git a/third_party/WebKit/Source/core/paint/BoxPaintInvalidator.cpp b/third_party/WebKit/Source/core/paint/BoxPaintInvalidator.cpp
|
| index e101e5a101c65debed493b93c1b3e872c5f260b8..904cd4659cffeff19de662a9474e980f84cc9d52 100644
|
| --- a/third_party/WebKit/Source/core/paint/BoxPaintInvalidator.cpp
|
| +++ b/third_party/WebKit/Source/core/paint/BoxPaintInvalidator.cpp
|
| @@ -34,7 +34,7 @@ void BoxPaintInvalidator::boxWillBeDestroyed(const LayoutBox& box)
|
|
|
| bool BoxPaintInvalidator::incrementallyInvalidatePaint()
|
| {
|
| - bool result = ObjectPaintInvalidatorWithContext(m_box, m_context).incrementallyInvalidatePaint();
|
| + bool result = false; // ObjectPaintInvalidatorWithContext(m_box, m_context).incrementallyInvalidatePaint();
|
|
|
| bool hasBoxDecorations = m_box.styleRef().hasBoxDecorations();
|
| if (!m_box.styleRef().hasBackground() && !hasBoxDecorations)
|
| @@ -109,7 +109,8 @@ PaintInvalidationReason BoxPaintInvalidator::computePaintInvalidationReason()
|
| {
|
| PaintInvalidationReason reason = ObjectPaintInvalidatorWithContext(m_box, m_context).computePaintInvalidationReason();
|
|
|
| - if (isImmediateFullPaintInvalidationReason(reason) || reason == PaintInvalidationNone)
|
| + if (reason != PaintInvalidationDelayedFull && isFullPaintInvalidationReason(reason))
|
| + // isImmediateFullPaintInvalidationReason(reason) || reason == PaintInvalidationNone)
|
| return reason;
|
|
|
| if (m_box.mayNeedPaintInvalidationAnimatedBackgroundImage() && !m_box.backgroundIsKnownToBeObscured())
|
| @@ -138,7 +139,7 @@ PaintInvalidationReason BoxPaintInvalidator::computePaintInvalidationReason()
|
| // because the difference between oldBounds and newBounds doesn't cover all area needing invalidation.
|
| // FIXME: Should also consider ancestor transforms since paintInvalidationContainer. crbug.com/426111.
|
| if (reason == PaintInvalidationIncremental
|
| - && m_context.oldBounds != m_context.newBounds
|
| + // && m_context.oldBounds != m_context.newBounds
|
| && m_context.paintInvalidationContainer != m_box
|
| && m_box.hasLayer() && m_box.layer()->transform()
|
| && !m_box.layer()->transform()->isIdentityOrTranslation())
|
| @@ -153,7 +154,7 @@ PaintInvalidationReason BoxPaintInvalidator::computePaintInvalidationReason()
|
| if (!style.hasBackground() && !style.hasBoxDecorations()) {
|
| // We could let incremental invalidation cover non-composited scrollbars, but just
|
| // do a full invalidation because incremental invalidation will go away with slimming paint.
|
| - if (reason == PaintInvalidationIncremental && m_context.oldBounds != m_context.newBounds && m_box.hasNonCompositedScrollbars())
|
| + if (reason == PaintInvalidationIncremental && /* m_context.oldBounds != m_context.newBounds && */ m_box.hasNonCompositedScrollbars())
|
| return PaintInvalidationBorderBoxChange;
|
| return reason;
|
| }
|
| @@ -190,11 +191,20 @@ PaintInvalidationReason BoxPaintInvalidator::computePaintInvalidationReason()
|
| if (oldBorderBoxSize.height() != newBorderBoxSize.height() && m_box.mustInvalidateBackgroundOrBorderPaintOnHeightChange())
|
| return PaintInvalidationBorderBoxChange;
|
|
|
| + if (reason == PaintInvalidationNone && (style.hasBackground() || style.hasBoxDecorations()))
|
| + reason = PaintInvalidationIncremental;
|
| +
|
| return reason;
|
| }
|
|
|
| PaintInvalidationReason BoxPaintInvalidator::invalidatePaintIfNeeded()
|
| {
|
| + PaintInvalidationReason reason = ObjectPaintInvalidatorWithContext(m_box, m_context).invalidatePaintIfNeededWithComputedReason(computePaintInvalidationReason());
|
| +
|
| + if (reason == PaintInvalidationIncremental)
|
| + incrementallyInvalidatePaint();
|
| +
|
| + /*
|
| PaintInvalidationReason reason = computePaintInvalidationReason();
|
| if (reason == PaintInvalidationIncremental) {
|
| if (incrementallyInvalidatePaint()) {
|
| @@ -209,6 +219,7 @@ PaintInvalidationReason BoxPaintInvalidator::invalidatePaintIfNeeded()
|
| } else {
|
| reason = ObjectPaintInvalidatorWithContext(m_box, m_context).invalidatePaintIfNeededWithComputedReason(reason);
|
| }
|
| + */
|
|
|
| if (PaintLayerScrollableArea* area = m_box.getScrollableArea())
|
| area->invalidatePaintOfScrollControlsIfNeeded(m_context);
|
|
|