Index: Source/core/layout/LayoutObject.cpp |
diff --git a/Source/core/layout/LayoutObject.cpp b/Source/core/layout/LayoutObject.cpp |
index 99aa447fc57f3e52a9d4b00e267a3f877b6f4cf4..0045aa7dabca1564cab5c7f62583f4d5af1efbbc 100644 |
--- a/Source/core/layout/LayoutObject.cpp |
+++ b/Source/core/layout/LayoutObject.cpp |
@@ -1198,11 +1198,6 @@ void LayoutObject::invalidateDisplayItemClient(const DisplayItemClientWrapper& d |
void LayoutObject::invalidateDisplayItemClients(const LayoutBoxModelObject& paintInvalidationContainer) const |
{ |
paintInvalidationContainer.invalidateDisplayItemClientOnBacking(*this); |
- |
- if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { |
pdr.
2015/09/15 03:03:59
Restoring this (instead of the setNeedsRepaint bel
|
- if (DeprecatedPaintLayer* enclosingLayer = this->enclosingLayer()) |
- enclosingLayer->setNeedsRepaint(); |
- } |
} |
LayoutRect LayoutObject::boundsRectForPaintInvalidation(const LayoutBoxModelObject* paintInvalidationContainer, const PaintInvalidationState* paintInvalidationState) const |
@@ -1336,9 +1331,9 @@ PaintInvalidationReason LayoutObject::invalidatePaintIfNeeded(PaintInvalidationS |
return PaintInvalidationNone; // Don't invalidate paints if we're printing. |
const LayoutRect oldBounds = previousPaintInvalidationRect(); |
- const LayoutPoint oldLocation = previousPositionFromPaintInvalidationBacking(); |
+ const LayoutPoint oldLocation = RuntimeEnabledFeatures::slimmingPaintV2Enabled() ? LayoutPoint() : previousPositionFromPaintInvalidationBacking(); |
LayoutRect newBounds = boundsRectForPaintInvalidation(&paintInvalidationContainer, &paintInvalidationState); |
- LayoutPoint newLocation = DeprecatedPaintLayer::positionFromPaintInvalidationBacking(this, &paintInvalidationContainer, &paintInvalidationState); |
+ LayoutPoint newLocation = RuntimeEnabledFeatures::slimmingPaintV2Enabled() ? LayoutPoint() : DeprecatedPaintLayer::positionFromPaintInvalidationBacking(this, &paintInvalidationContainer, &paintInvalidationState); |
// Composited scrolling should not be included in the bounds and position tracking, because the graphics layer backing the scroller |
// does not move on scroll. |
@@ -1349,7 +1344,8 @@ PaintInvalidationReason LayoutObject::invalidatePaintIfNeeded(PaintInvalidationS |
} |
setPreviousPaintInvalidationRect(newBounds); |
- setPreviousPositionFromPaintInvalidationBacking(newLocation); |
+ if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled()) |
+ setPreviousPositionFromPaintInvalidationBacking(newLocation); |
PaintInvalidationReason invalidationReason = paintInvalidationReason(paintInvalidationContainer, oldBounds, oldLocation, newBounds, newLocation); |
@@ -3140,6 +3136,15 @@ static PaintInvalidationReason documentLifecycleBasedPaintInvalidationReason(con |
inline void LayoutObject::markContainerChainForPaintInvalidation() |
{ |
+ // Setting layer-needs-repaint doesn't mean we'll fully repaint the layer, but |
+ // means we won't skip painting of the whole layer with a CachedSubsequenceDisplayItem. |
+ // This is to ensure we'll check paint offset changes of the objects on the layer. |
+ // We'll still use cached display items for non-invalidated objects on the layer. |
+ if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { |
+ if (DeprecatedPaintLayer* enclosingLayer = this->enclosingLayer()) |
+ enclosingLayer->setNeedsRepaint(); |
+ } |
+ |
for (LayoutObject* container = this->containerCrossingFrameBoundaries(); container && !container->shouldCheckForPaintInvalidationRegardlessOfPaintInvalidationState(); container = container->containerCrossingFrameBoundaries()) |
container->m_bitfields.setChildShouldCheckForPaintInvalidation(true); |
} |