Chromium Code Reviews| Index: third_party/WebKit/Source/core/paint/FindPropertiesNeedingUpdate.h |
| diff --git a/third_party/WebKit/Source/core/paint/FindPropertiesNeedingUpdate.h b/third_party/WebKit/Source/core/paint/FindPropertiesNeedingUpdate.h |
| index fb3358b3aa74a4532ceb25d031c6e892b3e722f8..827c92de388f628589ca27bbc20ea09bd7b150ab 100644 |
| --- a/third_party/WebKit/Source/core/paint/FindPropertiesNeedingUpdate.h |
| +++ b/third_party/WebKit/Source/core/paint/FindPropertiesNeedingUpdate.h |
| @@ -22,9 +22,13 @@ namespace blink { |
| class FindFrameViewPropertiesNeedingUpdateScope { |
| public: |
| - FindFrameViewPropertiesNeedingUpdateScope(FrameView* frameView) |
| + FindFrameViewPropertiesNeedingUpdateScope( |
| + FrameView* frameView, |
| + PaintPropertyTreeBuilderContext& context) |
| : m_frameView(frameView), |
| - m_neededPaintPropertyUpdate(frameView->needsPaintPropertyUpdate()) { |
| + m_neededPaintPropertyUpdate(frameView->needsPaintPropertyUpdate()), |
| + m_context(context), |
| + m_hadForceSubtreeUpdate(context.forceSubtreeUpdate) { |
|
chrishtr
2016/12/01 02:36:35
Can you also use this field to check that forceSub
pdr.
2016/12/01 09:35:35
This class catches underinvalidation by checking t
|
| // No need to check when already marked as needing an update. |
| if (m_neededPaintPropertyUpdate) |
| return; |
| @@ -52,13 +56,16 @@ class FindFrameViewPropertiesNeedingUpdateScope { |
| DCHECK_PTR_VAL_EQ(m_contentClip, m_frameView->contentClip()); |
| DCHECK_PTR_VAL_EQ(m_scrollTranslation, m_frameView->scrollTranslation()); |
| DCHECK_PTR_VAL_EQ(m_scroll, m_frameView->scroll()); |
| - // Restore original clean bit. |
| + // Restore original clean bits. |
| m_frameView->clearNeedsPaintPropertyUpdate(); |
| + m_context.forceSubtreeUpdate = m_hadForceSubtreeUpdate; |
| } |
| private: |
| Persistent<FrameView> m_frameView; |
| bool m_neededPaintPropertyUpdate; |
| + PaintPropertyTreeBuilderContext& m_context; |
| + bool m_hadForceSubtreeUpdate; |
| RefPtr<TransformPaintPropertyNode> m_preTranslation; |
| RefPtr<ClipPaintPropertyNode> m_contentClip; |
| RefPtr<TransformPaintPropertyNode> m_scrollTranslation; |
| @@ -67,9 +74,13 @@ class FindFrameViewPropertiesNeedingUpdateScope { |
| class FindObjectPropertiesNeedingUpdateScope { |
| public: |
| - FindObjectPropertiesNeedingUpdateScope(const LayoutObject& object) |
| + FindObjectPropertiesNeedingUpdateScope( |
| + const LayoutObject& object, |
| + PaintPropertyTreeBuilderContext& context) |
| : m_object(object), |
| - m_neededPaintPropertyUpdate(object.needsPaintPropertyUpdate()) { |
| + m_neededPaintPropertyUpdate(object.needsPaintPropertyUpdate()), |
| + m_context(context), |
| + m_hadForceSubtreeUpdate(context.forceSubtreeUpdate) { |
| // No need to check when already marked as needing an update. |
| if (m_neededPaintPropertyUpdate) |
| return; |
| @@ -128,13 +139,16 @@ class FindObjectPropertiesNeedingUpdateScope { |
| } else { |
| DCHECK_EQ(!!m_properties, !!objectProperties); |
| } |
| - // Restore original clean bit. |
| + // Restore original clean bits. |
| const_cast<LayoutObject&>(m_object).clearNeedsPaintPropertyUpdate(); |
| + m_context.forceSubtreeUpdate = m_hadForceSubtreeUpdate; |
| } |
| private: |
| const LayoutObject& m_object; |
| bool m_neededPaintPropertyUpdate; |
| + PaintPropertyTreeBuilderContext& m_context; |
| + bool m_hadForceSubtreeUpdate; |
| std::unique_ptr<const ObjectPaintProperties> m_properties; |
| }; |