Index: Source/core/rendering/RenderBox.cpp |
diff --git a/Source/core/rendering/RenderBox.cpp b/Source/core/rendering/RenderBox.cpp |
index 1ae12b7948fe9c51c568c366921f4d32b5f5212e..cb9942a5365470cbf1fb5eba41da44052d3ccadf 100644 |
--- a/Source/core/rendering/RenderBox.cpp |
+++ b/Source/core/rendering/RenderBox.cpp |
@@ -1547,32 +1547,6 @@ bool RenderBox::repaintLayerRectsForImage(WrappedImagePtr image, const FillLayer |
return false; |
} |
-void RenderBox::invalidateTreeIfNeeded(const PaintInvalidationState& paintInvalidationState) |
-{ |
- // FIXME: Currently only using this logic for RenderBox and its ilk. Ideally, RenderBlockFlows with |
- // inline children should track a dirty rect in local coordinates for dirty lines instead of invalidating |
- // the world. |
- // FIXME: We should still be recursing through inline's children, as they can have boxes, but we don't |
- // appear to have tests for this? |
- // FIXME: SVG should probably also go through this unified paint invalidation system. |
- ASSERT(!needsLayout()); |
- |
- if (!shouldCheckForPaintInvalidation()) |
- return; |
- |
- bool establishesNewPaintInvalidationContainer = isPaintInvalidationContainer(); |
- const RenderLayerModelObject& newPaintInvalidationContainer = *adjustCompositedContainerForSpecialAncestors(establishesNewPaintInvalidationContainer ? this : &paintInvalidationState.paintInvalidationContainer()); |
- ASSERT(&newPaintInvalidationContainer == containerForPaintInvalidation()); |
- |
- invalidatePaintIfNeeded(paintInvalidationState, newPaintInvalidationContainer); |
- |
- // This is for the next invalidatePaintIfNeeded so must be after invalidatePaintIfNeeded. |
- savePreviousBorderBoxSizeIfNeeded(); |
- |
- PaintInvalidationState childTreeWalkState(paintInvalidationState, *this, newPaintInvalidationContainer); |
- RenderObject::invalidateTreeIfNeeded(childTreeWalkState); |
-} |
- |
void RenderBox::invalidatePaintIfNeeded(const PaintInvalidationState& paintInvalidationState, const RenderLayerModelObject& newPaintInvalidationContainer) |
{ |
const LayoutRect oldPaintInvalidationRect = previousPaintInvalidationRect(); |
@@ -1583,29 +1557,30 @@ void RenderBox::invalidatePaintIfNeeded(const PaintInvalidationState& paintInval |
// If we are set to do a full paint invalidation that means the RenderView will be |
// issue paint invalidations. We can then skip issuing of paint invalidations for the child |
// renderers as they'll be covered by the RenderView. |
- if (view()->doingFullPaintInvalidation()) |
- return; |
- |
- if ((onlyNeededPositionedMovementLayout() && compositingState() != PaintsIntoOwnBacking) |
- || (shouldDoFullPaintInvalidationIfSelfPaintingLayer() |
- && hasLayer() |
- && layer()->isSelfPaintingLayer())) { |
- setShouldDoFullPaintInvalidation(true, MarkOnlyThis); |
- } |
+ if (!view()->doingFullPaintInvalidation()) { |
+ if ((onlyNeededPositionedMovementLayout() && compositingState() != PaintsIntoOwnBacking) |
+ || (shouldDoFullPaintInvalidationIfSelfPaintingLayer() |
+ && hasLayer() |
+ && layer()->isSelfPaintingLayer())) { |
+ setShouldDoFullPaintInvalidation(true, MarkOnlyThis); |
+ } |
- if (!RenderObject::invalidatePaintIfNeeded(newPaintInvalidationContainer, oldPaintInvalidationRect, oldPositionFromPaintInvalidationContainer, paintInvalidationState)) |
- invalidatePaintForOverflowIfNeeded(); |
- |
- // Issue paint invalidations for any scrollbars if there is a scrollable area for this renderer. |
- if (enclosingLayer()) { |
- if (RenderLayerScrollableArea* area = enclosingLayer()->scrollableArea()) { |
- if (area->hasVerticalBarDamage()) |
- invalidatePaintRectangle(area->verticalBarDamage()); |
- if (area->hasHorizontalBarDamage()) |
- invalidatePaintRectangle(area->horizontalBarDamage()); |
- area->resetScrollbarDamage(); |
+ if (!RenderObject::invalidatePaintIfNeeded(newPaintInvalidationContainer, oldPaintInvalidationRect, oldPositionFromPaintInvalidationContainer, paintInvalidationState)) |
+ invalidatePaintForOverflowIfNeeded(); |
+ |
+ // Issue paint invalidations for any scrollbars if there is a scrollable area for this renderer. |
+ if (enclosingLayer()) { |
+ if (RenderLayerScrollableArea* area = enclosingLayer()->scrollableArea()) { |
+ if (area->hasVerticalBarDamage()) |
+ invalidatePaintRectangle(area->verticalBarDamage()); |
+ if (area->hasHorizontalBarDamage()) |
+ invalidatePaintRectangle(area->horizontalBarDamage()); |
+ area->resetScrollbarDamage(); |
+ } |
} |
} |
+ |
+ savePreviousBorderBoxSizeIfNeeded(); |
dsinclair
2014/08/05 15:09:47
Should we keep the comment that this has to be aft
leviw_travelin_and_unemployed
2014/08/05 22:34:44
Done.
|
} |
bool RenderBox::pushContentsClip(PaintInfo& paintInfo, const LayoutPoint& accumulatedOffset, ContentsClipBehavior contentsClipBehavior) |