Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1004)

Unified Diff: Source/core/rendering/RenderObject.h

Issue 393673003: Revert "Enforce clearing renderers' paint invalidation state" (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/rendering/RenderBox.cpp ('k') | Source/core/rendering/RenderObject.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderObject.h
diff --git a/Source/core/rendering/RenderObject.h b/Source/core/rendering/RenderObject.h
index 0acf4962c6c281f4ef9f01bebe56e798d2a47bff..c2f0b2529f918a74d73fa1cdd499cd81315ae069 100644
--- a/Source/core/rendering/RenderObject.h
+++ b/Source/core/rendering/RenderObject.h
@@ -246,27 +246,6 @@ public:
renderer->assertRendererLaidOut();
}
- void assertRendererClearedPaintInvalidationState() const
- {
- if (paintInvalidationStateIsDirty()) {
- showRenderTreeForThis();
- 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;
@@ -1016,14 +995,7 @@ public:
void setPreviousPositionFromPaintInvalidationContainer(const LayoutPoint& location) { m_previousPositionFromPaintInvalidationContainer = location; }
bool shouldDoFullPaintInvalidationAfterLayout() const { return m_bitfields.shouldDoFullPaintInvalidationAfterLayout(); }
- void setShouldDoFullPaintInvalidationAfterLayout(bool b, MarkingBehavior markBehavior = MarkContainingBlockChain)
- {
- m_bitfields.setShouldDoFullPaintInvalidationAfterLayout(b);
-
- if (markBehavior == MarkContainingBlockChain && b)
- markContainingBlockChainForPaintInvalidation();
- }
-
+ void setShouldDoFullPaintInvalidationAfterLayout(bool b) { m_bitfields.setShouldDoFullPaintInvalidationAfterLayout(b); }
bool shouldInvalidateOverflowForPaint() const { return m_bitfields.shouldInvalidateOverflowForPaint(); }
bool shouldDoFullPaintInvalidationIfSelfPaintingLayer() const { return m_bitfields.shouldDoFullPaintInvalidationIfSelfPaintingLayer(); }
@@ -1036,17 +1008,17 @@ public:
// 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(); }
@@ -1054,7 +1026,7 @@ public:
bool shouldCheckForPaintInvalidationAfterLayout()
{
- return layoutDidGetCalled() || mayNeedPaintInvalidation() || shouldDoFullPaintInvalidationAfterLayout();
+ return layoutDidGetCalled() || mayNeedPaintInvalidation();
}
bool supportsLayoutStateCachedOffsets() const { return !hasColumns() && !hasTransform() && !hasReflection() && !style()->isFlippedBlocksWritingMode(); }
@@ -1140,21 +1112,9 @@ private:
#ifndef NDEBUG
void checkBlockPositionedObjectsNeedLayout();
-
- bool paintInvalidationStateIsDirty() const
- {
- return layoutDidGetCalled() || shouldDoFullPaintInvalidationAfterLayout() || shouldDoFullPaintInvalidationIfSelfPaintingLayer()
- || onlyNeededPositionedMovementLayout() || neededLayoutBecauseOfChildren() || mayNeedPaintInvalidation();
- }
#endif
const char* invalidationReasonToString(InvalidationReason) const;
- void markContainingBlockChainForPaintInvalidation()
- {
- for (RenderObject* container = this->container(); container && !container->shouldCheckForPaintInvalidationAfterLayout(); container = container->container())
- container->setMayNeedPaintInvalidation(true);
- }
-
static bool isAllowedToModifyRenderTreeStructure(Document&);
RefPtr<RenderStyle> m_style;
« no previous file with comments | « Source/core/rendering/RenderBox.cpp ('k') | Source/core/rendering/RenderObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698