Chromium Code Reviews| Index: third_party/WebKit/Source/core/frame/FrameView.h |
| diff --git a/third_party/WebKit/Source/core/frame/FrameView.h b/third_party/WebKit/Source/core/frame/FrameView.h |
| index 4419f0c5a9bc85c9c156bda820d95ee6ba10c10f..7afacec88119ed27cceb6ea984fc2837e3cb65dd 100644 |
| --- a/third_party/WebKit/Source/core/frame/FrameView.h |
| +++ b/third_party/WebKit/Source/core/frame/FrameView.h |
| @@ -718,6 +718,18 @@ class CORE_EXPORT FrameView final |
| return m_totalPropertyTreeStateForContents.get(); |
| } |
| + // Paint properties (e.g., m_preTranslation, etc.) are built from the |
| + // FrameView's state (e.g., x(), y(), etc.) and need to be invalidated when |
| + // these values change (see: PaintPropertyTreeBuilder::updateProperties). |
| + // Invalid paint properties will be rebuilt during the next lifecycle update |
| + // (see: FrameView::updatePaintProperties). |
| + void setPaintPropertiesInvalid() { m_paintPropertiesValid = false; } |
|
chrishtr
2016/10/21 22:03:09
...Invalid is different nomenclature from invalida
pdr.
2016/10/26 03:10:48
I've switched this to the following which is simil
|
| + void setPaintPropertiesValid() { |
| + DCHECK_EQ(lifecycle().state(), DocumentLifecycle::InPrePaint); |
| + m_paintPropertiesValid = true; |
| + } |
| + bool paintPropertiesValid() const { return m_paintPropertiesValid; } |
| + |
| // TODO(ojan): Merge this with IntersectionObserver once it lands. |
| IntRect computeVisibleArea(); |
| @@ -1059,6 +1071,9 @@ class CORE_EXPORT FrameView final |
| // properties are either created by this FrameView or are inherited from |
| // an ancestor. |
| std::unique_ptr<PropertyTreeState> m_totalPropertyTreeStateForContents; |
| + // True if the paint properties are up-to-date with the FrameView's state. |
| + // See: setPaintPropertiesValid and setPaintPropertiesInvalid. |
| + bool m_paintPropertiesValid = false; |
| // This is set on the local root frame view only. |
| DocumentLifecycle::LifecycleState m_currentUpdateLifecyclePhasesTargetState; |