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

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: Created 6 years, 8 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
Index: Source/core/rendering/RenderObject.h
diff --git a/Source/core/rendering/RenderObject.h b/Source/core/rendering/RenderObject.h
index bd27cc85d31a91811bfb79949d3c105b1ab14e10..d7259c6419385cff97368a749477514bfe7bdc72 100644
--- a/Source/core/rendering/RenderObject.h
+++ b/Source/core/rendering/RenderObject.h
@@ -994,11 +994,22 @@ public:
void setOldOutlineRect(const LayoutRect&);
bool shouldDoFullRepaintAfterLayout() const { return m_bitfields.shouldDoFullRepaintAfterLayout(); }
- void setShouldDoFullRepaintAfterLayout(bool b) { m_bitfields.setShouldDoFullRepaintAfterLayout(b); }
+ void setShouldDoFullRepaintAfterLayout(bool b)
+ {
+ m_bitfields.setShouldDoFullRepaintAfterLayout(b);
+ if (b)
+ setMayNeedInvalidation(true);
+ }
+
bool shouldRepaintOverflow() const { return m_bitfields.shouldRepaintOverflow(); }
bool shouldDoFullRepaintIfSelfPaintingLayer() const { return m_bitfields.shouldDoFullRepaintIfSelfPaintingLayer(); }
- void setShouldDoFullRepaintIfSelfPaintingLayer(bool b) { m_bitfields.setShouldDoFullRepaintIfSelfPaintingLayer(b); }
+ void setShouldDoFullRepaintIfSelfPaintingLayer(bool b)
+ {
+ m_bitfields.setShouldDoFullRepaintIfSelfPaintingLayer(b);
+ if (b)
+ setMayNeedInvalidation(true);
+ }
bool onlyNeededPositionedMovementLayout() const { return m_bitfields.onlyNeededPositionedMovementLayout(); }
void setOnlyNeededPositionedMovementLayout(bool b) { m_bitfields.setOnlyNeededPositionedMovementLayout(b); }
@@ -1010,6 +1021,16 @@ 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 shouldDisableLayoutState() const { return hasColumns() || hasTransform() || hasReflection() || style()->isFlippedBlocksWritingMode(); }
void setNeedsOverflowRecalcAfterStyleChange();
@@ -1125,6 +1146,7 @@ private:
, m_shouldDoFullRepaintAfterLayout(false)
, m_shouldRepaintOverflow(false)
, m_shouldDoFullRepaintIfSelfPaintingLayer(false)
+ , m_mayNeedInvalidation(false)
, m_onlyNeededPositionedMovementLayout(false)
, m_needsPositionedMovementLayout(false)
, m_normalChildNeedsLayout(false)
@@ -1159,11 +1181,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);

Powered by Google App Engine
This is Rietveld 408576698