Index: Source/core/rendering/RenderObject.h |
diff --git a/Source/core/rendering/RenderObject.h b/Source/core/rendering/RenderObject.h |
index c824a92c9501c93be7a9fbad5132bb04796b4d98..a646439133714d3716f98c8a827fec809e70a082 100644 |
--- a/Source/core/rendering/RenderObject.h |
+++ b/Source/core/rendering/RenderObject.h |
@@ -248,29 +248,6 @@ |
{ |
for (const RenderObject* renderer = this; renderer; renderer = renderer->nextInPreOrder()) |
renderer->assertRendererLaidOut(); |
- } |
- |
- void assertRendererClearedPaintInvalidationState() const |
- { |
-#ifndef NDEBUG |
- if (paintInvalidationStateIsDirty()) { |
- showRenderTreeForThis(); |
- ASSERT_NOT_REACHED(); |
- } |
-#endif |
- } |
- |
- void assertSubtreeClearedPaintInvalidationState() const |
- { |
- for (const RenderObject* renderer = this; renderer; renderer = renderer->nextInPreOrder()) { |
- renderer->assertRendererClearedPaintInvalidationState(); |
- |
- // Currently we skip some SVG containers for performance (see RenderSVGModelObject::invalidateTreeAfterLayout) |
- // so we just skip the underlying subtree. This is not strictly the condition in the previous function but |
- // it makes little sense to cover SVG subtrees if we know they are skipped anyway. |
- if (renderer->isSVGContainer()) |
- return; |
- } |
} |
#endif |
@@ -1022,24 +999,11 @@ |
void setPreviousPositionFromPaintInvalidationContainer(const LayoutPoint& location) { m_previousPositionFromPaintInvalidationContainer = location; } |
bool shouldDoFullPaintInvalidation() const { return m_bitfields.shouldDoFullPaintInvalidation(); } |
- void setShouldDoFullPaintInvalidation(bool b, MarkingBehavior markBehavior = MarkContainingBlockChain) |
- { |
- m_bitfields.setShouldDoFullPaintInvalidation(b); |
- |
- if (markBehavior == MarkContainingBlockChain && b) |
- markContainingBlockChainForPaintInvalidation(); |
- } |
- |
+ void setShouldDoFullPaintInvalidation(bool b) { m_bitfields.setShouldDoFullPaintInvalidation(b); } |
bool shouldInvalidateOverflowForPaint() const { return m_bitfields.shouldInvalidateOverflowForPaint(); } |
bool shouldDoFullPaintInvalidationIfSelfPaintingLayer() const { return m_bitfields.shouldDoFullPaintInvalidationIfSelfPaintingLayer(); } |
- void setShouldDoFullPaintInvalidationIfSelfPaintingLayer(bool b) |
- { |
- m_bitfields.setShouldDoFullPaintInvalidationIfSelfPaintingLayer(b); |
- |
- if (b) |
- markContainingBlockChainForPaintInvalidation(); |
- } |
+ void setShouldDoFullPaintInvalidationIfSelfPaintingLayer(bool b) { m_bitfields.setShouldDoFullPaintInvalidationIfSelfPaintingLayer(b); } |
bool onlyNeededPositionedMovementLayout() const { return m_bitfields.onlyNeededPositionedMovementLayout(); } |
void setOnlyNeededPositionedMovementLayout(bool b) { m_bitfields.setOnlyNeededPositionedMovementLayout(b); } |
@@ -1048,17 +1012,17 @@ |
// layoutDidGetCalled indicates whether this render object was re-laid-out |
// since the last call to setLayoutDidGetCalled(false) on this object. |
- bool layoutDidGetCalled() const { return m_bitfields.layoutDidGetCalled(); } |
+ bool layoutDidGetCalled() { return m_bitfields.layoutDidGetCalled(); } |
void setLayoutDidGetCalled(bool b) { m_bitfields.setLayoutDidGetCalled(b); } |
- bool mayNeedPaintInvalidation() const { return m_bitfields.mayNeedPaintInvalidation(); } |
+ bool mayNeedPaintInvalidation() { return m_bitfields.mayNeedPaintInvalidation(); } |
void setMayNeedPaintInvalidation(bool b) |
{ |
m_bitfields.setMayNeedPaintInvalidation(b); |
// Make sure our parent is marked as needing invalidation. |
- if (b) |
- markContainingBlockChainForPaintInvalidation(); |
+ if (b && parent() && !parent()->mayNeedPaintInvalidation()) |
+ parent()->setMayNeedPaintInvalidation(b); |
} |
bool neededLayoutBecauseOfChildren() const { return m_bitfields.neededLayoutBecauseOfChildren(); } |
@@ -1066,7 +1030,7 @@ |
bool shouldCheckForPaintInvalidation() |
{ |
- return layoutDidGetCalled() || mayNeedPaintInvalidation() || shouldDoFullPaintInvalidation() || shouldDoFullPaintInvalidationIfSelfPaintingLayer(); |
+ return layoutDidGetCalled() || mayNeedPaintInvalidation(); |
} |
bool supportsLayoutStateCachedOffsets() const { return !hasColumns() && !hasTransform() && !hasReflection() && !style()->isFlippedBlocksWritingMode(); } |
@@ -1152,20 +1116,8 @@ |
#if ENABLE(ASSERT) |
void checkBlockPositionedObjectsNeedLayout(); |
- |
- bool paintInvalidationStateIsDirty() const |
- { |
- return layoutDidGetCalled() || shouldDoFullPaintInvalidation() || shouldDoFullPaintInvalidationIfSelfPaintingLayer() |
- || onlyNeededPositionedMovementLayout() || neededLayoutBecauseOfChildren() || mayNeedPaintInvalidation(); |
- } |
#endif |
const char* invalidationReasonToString(InvalidationReason) const; |
- |
- void markContainingBlockChainForPaintInvalidation() |
- { |
- for (RenderObject* container = this->container(); container && !container->shouldCheckForPaintInvalidation(); container = container->container()) |
- container->setMayNeedPaintInvalidation(true); |
- } |
static bool isAllowedToModifyRenderTreeStructure(Document&); |