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

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

Issue 264963004: Mark when we may have been invalidated to early out on repaintTreeAfterLayout. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: With expectations. Created 6 years, 7 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/RenderFlexibleBox.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 bd27cc85d31a91811bfb79949d3c105b1ab14e10..bbd53eedf4cffd918e1f61829cb4e775fa519cde 100644
--- a/Source/core/rendering/RenderObject.h
+++ b/Source/core/rendering/RenderObject.h
@@ -1010,6 +1010,21 @@ public:
bool layoutDidGetCalled() { return m_bitfields.layoutDidGetCalled(); }
void setLayoutDidGetCalled(bool b) { m_bitfields.setLayoutDidGetCalled(b); }
+ bool mayNeedInvalidation() { return m_bitfields.mayNeedInvalidation(); }
+ void setMayNeedInvalidation(bool b)
+ {
+ m_bitfields.setMayNeedInvalidation(b);
+
+ // Make sure our parent is marked as needing invalidation.
+ if (b && parent() && !parent()->mayNeedInvalidation())
+ parent()->setMayNeedInvalidation(b);
+ }
+
+ bool shouldCheckForInvalidationAfterLayout()
+ {
+ return layoutDidGetCalled() || mayNeedInvalidation();
+ }
+
bool shouldDisableLayoutState() const { return hasColumns() || hasTransform() || hasReflection() || style()->isFlippedBlocksWritingMode(); }
void setNeedsOverflowRecalcAfterStyleChange();
@@ -1125,6 +1140,9 @@ private:
, m_shouldDoFullRepaintAfterLayout(false)
, m_shouldRepaintOverflow(false)
, m_shouldDoFullRepaintIfSelfPaintingLayer(false)
+ // FIXME: We should remove mayNeedInvalidation once we are able to
+ // use the other layout flags to detect the same cases. crbug.com/370118
+ , m_mayNeedInvalidation(false)
, m_onlyNeededPositionedMovementLayout(false)
, m_needsPositionedMovementLayout(false)
, m_normalChildNeedsLayout(false)
@@ -1159,11 +1177,12 @@ private:
{
}
- // 32 bits have been used in the first word, and 5 in the second.
+ // 32 bits have been used in the first word, and 6 in the second.
ADD_BOOLEAN_BITFIELD(selfNeedsLayout, SelfNeedsLayout);
ADD_BOOLEAN_BITFIELD(shouldDoFullRepaintAfterLayout, ShouldDoFullRepaintAfterLayout);
ADD_BOOLEAN_BITFIELD(shouldRepaintOverflow, ShouldRepaintOverflow);
ADD_BOOLEAN_BITFIELD(shouldDoFullRepaintIfSelfPaintingLayer, ShouldDoFullRepaintIfSelfPaintingLayer);
+ ADD_BOOLEAN_BITFIELD(mayNeedInvalidation, MayNeedInvalidation);
ADD_BOOLEAN_BITFIELD(onlyNeededPositionedMovementLayout, OnlyNeededPositionedMovementLayout);
ADD_BOOLEAN_BITFIELD(needsPositionedMovementLayout, NeedsPositionedMovementLayout);
ADD_BOOLEAN_BITFIELD(normalChildNeedsLayout, NormalChildNeedsLayout);
« no previous file with comments | « Source/core/rendering/RenderFlexibleBox.cpp ('k') | Source/core/rendering/RenderObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698