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

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

Issue 204843002: Reduce invalidation on children-needs-layout containers (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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 579d0067ccf0c72776770269ab2e7ba50542e070..7f5047e1ebe5fe7c304a0f7cfc1263e233c0618f 100644
--- a/Source/core/rendering/RenderObject.h
+++ b/Source/core/rendering/RenderObject.h
@@ -407,6 +407,9 @@ public:
setNeedsLayout();
}
+ bool hasNothingToPaint() const { return m_bitfields.hasNothingToPaint(); }
+ void setHasNothingToPaint(bool b) { return m_bitfields.setHasNothingToPaint(b); }
+
enum FlowThreadState {
NotInsideFlowThread = 0,
InsideOutOfFlowThread = 1,
@@ -525,6 +528,8 @@ public:
bool hasBackground() const { return style()->hasBackground(); }
bool hasEntirelyFixedBackground() const;
+ bool needsLayoutBecauseOfChildren() const { return needsLayout() && !selfNeedsLayout() && !needsPositionedMovementLayout() && !needsSimplifiedNormalFlowLayout(); }
+
bool needsLayout() const
{
return m_bitfields.selfNeedsLayout() || m_bitfields.normalChildNeedsLayout() || m_bitfields.posChildNeedsLayout()
@@ -1124,6 +1129,7 @@ private:
, m_hasCounterNodeMap(false)
, m_everHadLayout(false)
, m_ancestorLineBoxDirty(false)
+ , m_hasNothingToPaint(false)
, m_childrenInline(false)
, m_hasColumns(false)
, m_layoutDidGetCalled(false)
@@ -1163,6 +1169,8 @@ private:
ADD_BOOLEAN_BITFIELD(everHadLayout, EverHadLayout);
ADD_BOOLEAN_BITFIELD(ancestorLineBoxDirty, AncestorLineBoxDirty);
+ ADD_BOOLEAN_BITFIELD(hasNothingToPaint, HasNothingToPaint);
+
// from RenderBlock
ADD_BOOLEAN_BITFIELD(childrenInline, ChildrenInline);
ADD_BOOLEAN_BITFIELD(hasColumns, HasColumns);

Powered by Google App Engine
This is Rietveld 408576698