Index: Source/core/rendering/RenderObject.h |
diff --git a/Source/core/rendering/RenderObject.h b/Source/core/rendering/RenderObject.h |
index d6ca80c9ec6ba09046894ad916749cf3417e68b7..38281267a91f570b9e645286cc792887148f34eb 100644 |
--- a/Source/core/rendering/RenderObject.h |
+++ b/Source/core/rendering/RenderObject.h |
@@ -117,6 +117,7 @@ enum InvalidationReason { |
InvalidationScroll, |
InvalidationSelection, |
InvalidationLayer, |
+ InvalidationRendererInsertion, |
InvalidationRendererRemoval, |
InvalidationPaintRectangle |
}; |
@@ -833,9 +834,6 @@ public: |
void getTextDecorations(unsigned decorations, AppliedTextDecoration& underline, AppliedTextDecoration& overline, AppliedTextDecoration& linethrough, bool quirksMode = false, bool firstlineStyle = false); |
- void setHadPaintInvalidation(); |
- bool hadPaintInvalidation() const; |
- |
// Return the RenderLayerModelObject in the container chain which is responsible for painting this object, or 0 |
// if painting is root-relative. This is the container that should be passed to the 'forPaintInvalidation' |
// methods. |
@@ -1015,8 +1013,9 @@ public: |
const LayoutPoint& previousPositionFromPaintInvalidationBacking() const { return m_previousPositionFromPaintInvalidationBacking; } |
void setPreviousPositionFromPaintInvalidationBacking(const LayoutPoint& positionFromPaintInvalidationBacking) { m_previousPositionFromPaintInvalidationBacking = positionFromPaintInvalidationBacking; } |
- bool shouldDoFullPaintInvalidation() const { return m_bitfields.shouldDoFullPaintInvalidation(); } |
+ bool shouldDoFullPaintInvalidation() const { return m_bitfields.fullPaintInvalidationReason() != InvalidationNone; } |
void setShouldDoFullPaintInvalidation(bool, MarkingBehavior = MarkContainingBlockChain); |
+ void setShouldDoFullPaintInvalidationWithReason(InvalidationReason, MarkingBehavior = MarkContainingBlockChain); |
bool shouldInvalidateOverflowForPaint() const { return m_bitfields.shouldInvalidateOverflowForPaint(); } |
@@ -1198,7 +1197,6 @@ private: |
public: |
RenderObjectBitfields(Node* node) |
: m_selfNeedsLayout(false) |
- , m_shouldDoFullPaintInvalidation(false) |
, m_shouldInvalidateOverflowForPaint(false) |
, m_shouldDoFullPaintInvalidationIfSelfPaintingLayer(false) |
// FIXME: We should remove mayNeedPaintInvalidation once we are able to |
@@ -1237,12 +1235,12 @@ private: |
, m_selectionState(SelectionNone) |
, m_flowThreadState(NotInsideFlowThread) |
, m_boxDecorationBackgroundState(NoBoxDecorationBackground) |
+ , m_fullPaintInvalidationReason(InvalidationNone) |
{ |
} |
- // 32 bits have been used in the first word, and 11 in the second. |
+ // 32 bits have been used in the first word, and 14 in the second. |
ADD_BOOLEAN_BITFIELD(selfNeedsLayout, SelfNeedsLayout); |
- ADD_BOOLEAN_BITFIELD(shouldDoFullPaintInvalidation, ShouldDoFullPaintInvalidation); |
ADD_BOOLEAN_BITFIELD(shouldInvalidateOverflowForPaint, ShouldInvalidateOverflowForPaint); |
ADD_BOOLEAN_BITFIELD(shouldDoFullPaintInvalidationIfSelfPaintingLayer, ShouldDoFullPaintInvalidationIfSelfPaintingLayer); |
ADD_BOOLEAN_BITFIELD(mayNeedPaintInvalidation, MayNeedPaintInvalidation); |
@@ -1290,6 +1288,7 @@ private: |
unsigned m_selectionState : 3; // SelectionState |
unsigned m_flowThreadState : 2; // FlowThreadState |
unsigned m_boxDecorationBackgroundState : 2; // BoxDecorationBackgroundState |
+ unsigned m_fullPaintInvalidationReason : 4; // InvalidationReason |
public: |
bool isOutOfFlowPositioned() const { return m_positionedState == IsOutOfFlowPositioned; } |
@@ -1311,6 +1310,9 @@ private: |
ALWAYS_INLINE BoxDecorationBackgroundState boxDecorationBackgroundState() const { return static_cast<BoxDecorationBackgroundState>(m_boxDecorationBackgroundState); } |
ALWAYS_INLINE void setBoxDecorationBackgroundState(BoxDecorationBackgroundState s) { m_boxDecorationBackgroundState = s; } |
+ |
+ InvalidationReason fullPaintInvalidationReason() const { return static_cast<InvalidationReason>(m_fullPaintInvalidationReason); } |
+ void setFullPaintInvalidationReason(InvalidationReason reason) { m_fullPaintInvalidationReason = reason; } |
}; |
#undef ADD_BOOLEAN_BITFIELD |