Index: Source/core/rendering/RenderObject.h |
diff --git a/Source/core/rendering/RenderObject.h b/Source/core/rendering/RenderObject.h |
index f28fedfd783af02831e7a58a00040231eb7f4f93..5bd4b91aefb59054a88974c6302d19509b524812 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. |
@@ -1017,8 +1015,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 = InvalidationFull, MarkingBehavior = MarkContainingBlockChain); |
Julien - ping for review
2014/09/26 17:56:24
I don't think the default InvalidationReason is gi
Xianzhu
2014/09/26 18:36:21
- Removed the default value for InvalidationReason
|
bool shouldInvalidateOverflowForPaint() const { return m_bitfields.shouldInvalidateOverflowForPaint(); } |
@@ -1200,7 +1199,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 |
@@ -1239,12 +1237,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. |
Julien - ping for review
2014/09/26 17:56:24
Let's update the number of remaining bits please!
Xianzhu
2014/09/26 18:36:21
Done.
|
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); |
@@ -1292,6 +1290,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; } |
@@ -1313,6 +1312,13 @@ 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) |
+ { |
+ ASSERT(reason != InvalidationIncremental); |
+ m_fullPaintInvalidationReason = reason; |
+ } |
}; |
#undef ADD_BOOLEAN_BITFIELD |