Chromium Code Reviews| Index: Source/core/rendering/RenderObject.h |
| diff --git a/Source/core/rendering/RenderObject.h b/Source/core/rendering/RenderObject.h |
| index 22bdd386c6b815855846a9895665926a705966d8..95126c4c60305f327959a19e59f38cdc9d9dfa43 100644 |
| --- a/Source/core/rendering/RenderObject.h |
| +++ b/Source/core/rendering/RenderObject.h |
| @@ -252,6 +252,14 @@ public: |
| #endif |
| + bool skipInvalidationWhenLaidOutChildren() const; |
| + |
| + // FIXME: This could be used when changing the size of a renderer without children to skip some invalidations. |
| + bool rendererHasNoBoxEffect() const |
| + { |
| + return !style()->hasVisualOverflowingEffect() && !style()->hasBorder() && !style()->hasBackground(); |
| + } |
| + |
| // Obtains the nearest enclosing block (including this block) that contributes a first-line style to our inline |
| // children. |
| virtual RenderBlock* firstLineBlock() const; |
| @@ -533,6 +541,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() |
| @@ -1020,6 +1030,9 @@ public: |
| parent()->setMayNeedPaintInvalidation(b); |
| } |
| + bool neededLayoutBecauseOfChildren() const { return m_bitfields.neededLayoutBecauseOfChildren(); } |
| + void setNeededLayoutBecauseOfChildren(bool b) { m_bitfields.setNeededLayoutBecauseOfChildren(b); } |
| + |
| bool shouldCheckForPaintInvalidationAfterLayout() |
| { |
| return layoutDidGetCalled() || mayNeedPaintInvalidation(); |
| @@ -1147,6 +1160,7 @@ private: |
| // use the other layout flags to detect the same cases. crbug.com/370118 |
| , m_mayNeedPaintInvalidation(false) |
| , m_onlyNeededPositionedMovementLayout(false) |
| + , m_neededLayoutBecauseOfChildren(false) |
| , m_needsPositionedMovementLayout(false) |
| , m_normalChildNeedsLayout(false) |
| , m_posChildNeedsLayout(false) |
| @@ -1187,6 +1201,7 @@ private: |
| ADD_BOOLEAN_BITFIELD(shouldDoFullPaintInvalidationIfSelfPaintingLayer, ShouldDoFullPaintInvalidationIfSelfPaintingLayer); |
| ADD_BOOLEAN_BITFIELD(mayNeedPaintInvalidation, MayNeedPaintInvalidation); |
| ADD_BOOLEAN_BITFIELD(onlyNeededPositionedMovementLayout, OnlyNeededPositionedMovementLayout); |
| + ADD_BOOLEAN_BITFIELD(neededLayoutBecauseOfChildren, NeededLayoutBecauseOfChildren); |
| ADD_BOOLEAN_BITFIELD(needsPositionedMovementLayout, NeedsPositionedMovementLayout); |
| ADD_BOOLEAN_BITFIELD(normalChildNeedsLayout, NormalChildNeedsLayout); |
| ADD_BOOLEAN_BITFIELD(posChildNeedsLayout, PosChildNeedsLayout); |
| @@ -1344,9 +1359,11 @@ inline void RenderObject::setNeedsLayoutAndFullPaintInvalidation(MarkingBehavior |
| inline void RenderObject::clearNeedsLayout() |
| { |
| + // FIXME: Branch? |
|
leviw_travelin_and_unemployed
2014/06/13 00:03:42
Can you be a *little* more descriptive here? Are y
Julien - ping for review
2014/06/30 22:36:29
This wasn't meant for public consumption but I for
|
| if (needsPositionedMovementLayoutOnly()) |
| setOnlyNeededPositionedMovementLayout(true); |
| setLayoutDidGetCalled(true); |
| + setNeededLayoutBecauseOfChildren(needsLayoutBecauseOfChildren()); |
| setSelfNeedsLayout(false); |
| setEverHadLayout(true); |
| setPosChildNeedsLayout(false); |