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

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, 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
Index: Source/core/rendering/RenderObject.h
diff --git a/Source/core/rendering/RenderObject.h b/Source/core/rendering/RenderObject.h
index bd27cc85d31a91811bfb79949d3c105b1ab14e10..eeb63c9d7d65fd90b3da2dbac905066ef8f1c25f 100644
--- a/Source/core/rendering/RenderObject.h
+++ b/Source/core/rendering/RenderObject.h
@@ -995,6 +995,7 @@ public:
bool shouldDoFullRepaintAfterLayout() const { return m_bitfields.shouldDoFullRepaintAfterLayout(); }
void setShouldDoFullRepaintAfterLayout(bool b) { m_bitfields.setShouldDoFullRepaintAfterLayout(b); }
+
leviw_travelin_and_unemployed 2014/05/05 18:52:32 Nit: empty line.
Julien - ping for review 2014/05/05 19:02:35 Unneeded space.
dsinclair 2014/05/05 19:38:26 Done.
dsinclair 2014/05/05 19:38:26 Done.
bool shouldRepaintOverflow() const { return m_bitfields.shouldRepaintOverflow(); }
bool shouldDoFullRepaintIfSelfPaintingLayer() const { return m_bitfields.shouldDoFullRepaintIfSelfPaintingLayer(); }
@@ -1010,6 +1011,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.
Julien - ping for review 2014/05/05 19:02:35 Interesting, the needs layout logic walks up the t
dsinclair 2014/05/05 19:38:26 Not sure what I need to do for this? We mark our p
+ if (b && parent() && !parent()->mayNeedInvalidation())
+ parent()->setMayNeedInvalidation(b);
+ }
+
+ bool shouldCheckForInvalidations()
Julien - ping for review 2014/05/05 19:02:35 I may be better to use shouldCheckForInvalidationA
dsinclair 2014/05/05 19:38:26 Done.
+ {
+ return layoutDidGetCalled() || mayNeedInvalidation();
+ }
+
bool shouldDisableLayoutState() const { return hasColumns() || hasTransform() || hasReflection() || style()->isFlippedBlocksWritingMode(); }
void setNeedsOverflowRecalcAfterStyleChange();
@@ -1125,6 +1141,7 @@ private:
, m_shouldDoFullRepaintAfterLayout(false)
, m_shouldRepaintOverflow(false)
, m_shouldDoFullRepaintIfSelfPaintingLayer(false)
+ , m_mayNeedInvalidation(false)
Julien - ping for review 2014/05/05 19:02:35 I think we should have a FIXME to remove this bool
dsinclair 2014/05/05 19:38:26 Done.
, m_onlyNeededPositionedMovementLayout(false)
, m_needsPositionedMovementLayout(false)
, m_normalChildNeedsLayout(false)
@@ -1159,11 +1176,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