Index: Source/core/rendering/RenderObject.h |
diff --git a/Source/core/rendering/RenderObject.h b/Source/core/rendering/RenderObject.h |
index 96e2848c46e42e825ec21e079a0178d379c21fae..0cca4fd54ce0ba50eb562c67a2a018b8ca251997 100644 |
--- a/Source/core/rendering/RenderObject.h |
+++ b/Source/core/rendering/RenderObject.h |
@@ -246,6 +246,27 @@ public: |
renderer->assertRendererLaidOut(); |
} |
+ void assertRendererClearedPaintInvalidationState() const |
+ { |
+ if (paintInvalidationStateIsDirty()) { |
dsinclair
2014/07/11 20:48:55
if (!paintInvalidationStateIsDirt())
return;
Julien - ping for review
2014/07/11 20:52:46
A'right.
|
+ showRenderTreeForThis(); |
dsinclair
2014/07/11 20:48:55
Is this included on purpose?
Julien - ping for review
2014/07/11 20:52:46
It is, see assertRendererLaidOut() above. The reas
|
+ ASSERT_NOT_REACHED(); |
+ } |
+ } |
+ |
+ 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 |
bool skipInvalidationWhenLaidOutChildren() const; |
@@ -1008,10 +1029,10 @@ public: |
// layoutDidGetCalled indicates whether this render object was re-laid-out |
// since the last call to setLayoutDidGetCalled(false) on this object. |
- bool layoutDidGetCalled() { return m_bitfields.layoutDidGetCalled(); } |
+ bool layoutDidGetCalled() const { return m_bitfields.layoutDidGetCalled(); } |
void setLayoutDidGetCalled(bool b) { m_bitfields.setLayoutDidGetCalled(b); } |
- bool mayNeedPaintInvalidation() { return m_bitfields.mayNeedPaintInvalidation(); } |
+ bool mayNeedPaintInvalidation() const { return m_bitfields.mayNeedPaintInvalidation(); } |
void setMayNeedPaintInvalidation(bool b) |
{ |
m_bitfields.setMayNeedPaintInvalidation(b); |
@@ -1026,7 +1047,7 @@ public: |
bool shouldCheckForPaintInvalidationAfterLayout() |
{ |
- return layoutDidGetCalled() || mayNeedPaintInvalidation(); |
+ return layoutDidGetCalled() || mayNeedPaintInvalidation() || shouldDoFullPaintInvalidationAfterLayout(); |
} |
bool supportsLayoutStateCachedOffsets() const { return !hasColumns() && !hasTransform() && !hasReflection() && !style()->isFlippedBlocksWritingMode(); } |
@@ -1112,6 +1133,12 @@ private: |
#ifndef NDEBUG |
void checkBlockPositionedObjectsNeedLayout(); |
+ |
+ bool paintInvalidationStateIsDirty() const |
+ { |
+ return layoutDidGetCalled() || shouldDoFullPaintInvalidationAfterLayout() || shouldDoFullPaintInvalidationIfSelfPaintingLayer() |
+ || onlyNeededPositionedMovementLayout() || neededLayoutBecauseOfChildren() || mayNeedPaintInvalidation(); |
+ } |
#endif |
const char* invalidationReasonToString(InvalidationReason) const; |