| Index: third_party/WebKit/Source/core/layout/LayoutObject.h
|
| diff --git a/third_party/WebKit/Source/core/layout/LayoutObject.h b/third_party/WebKit/Source/core/layout/LayoutObject.h
|
| index 2c0ffc245410a99701fc65ede21418afc566040b..15619559481423c494bb924e366e0708e7a161fc 100644
|
| --- a/third_party/WebKit/Source/core/layout/LayoutObject.h
|
| +++ b/third_party/WebKit/Source/core/layout/LayoutObject.h
|
| @@ -1718,6 +1718,13 @@ class CORE_EXPORT LayoutObject : public ImageResourceObserver,
|
| m_layoutObject.clearPreviousPaintInvalidationRects();
|
| }
|
|
|
| + void setNeedsPaintPropertyUpdate() {
|
| + m_layoutObject.setNeedsPaintPropertyUpdate();
|
| + }
|
| + void clearNeedsPaintPropertyUpdate() {
|
| + m_layoutObject.clearNeedsPaintPropertyUpdate();
|
| + }
|
| +
|
| protected:
|
| friend class PaintPropertyTreeBuilder;
|
| // The following two functions can be called from PaintPropertyTreeBuilder
|
| @@ -1740,6 +1747,23 @@ class CORE_EXPORT LayoutObject : public ImageResourceObserver,
|
| return MutableForPainting(*this);
|
| }
|
|
|
| + // Paint properties (see: |ObjectPaintProperties|) are built from an object's
|
| + // state (location, transform, etc) as well as properties from ancestors.
|
| + // When these inputs change, setNeedsPaintPropertyUpdate will cause a property
|
| + // tree update during the next document lifecycle update.
|
| + // TODO(pdr): Add additional granularity such as the ability to signal that
|
| + // only a local paint property update is needed.
|
| + void setNeedsPaintPropertyUpdate() {
|
| + m_bitfields.setNeedsPaintPropertyUpdate(true);
|
| + }
|
| + void clearNeedsPaintPropertyUpdate() {
|
| + DCHECK_EQ(document().lifecycle().state(), DocumentLifecycle::InPrePaint);
|
| + m_bitfields.setNeedsPaintPropertyUpdate(false);
|
| + }
|
| + bool needsPaintPropertyUpdate() const {
|
| + return m_bitfields.needsPaintPropertyUpdate();
|
| + }
|
| +
|
| void setIsScrollAnchorObject() { m_bitfields.setIsScrollAnchorObject(true); }
|
|
|
| // If unconditionally is true, you are responsible for ensuring that
|
| @@ -2119,6 +2143,7 @@ class CORE_EXPORT LayoutObject : public ImageResourceObserver,
|
| m_isScrollAnchorObject(false),
|
| m_scrollAnchorDisablingStyleChanged(false),
|
| m_hasBoxDecorationBackground(false),
|
| + m_needsPaintPropertyUpdate(true),
|
| m_positionedState(IsStaticallyPositioned),
|
| m_selectionState(SelectionNone),
|
| m_backgroundObscurationState(BackgroundObscurationStatusInvalid),
|
| @@ -2283,6 +2308,10 @@ class CORE_EXPORT LayoutObject : public ImageResourceObserver,
|
| ADD_BOOLEAN_BITFIELD(hasBoxDecorationBackground,
|
| HasBoxDecorationBackground);
|
|
|
| + // Whether the paint properties need to be updated. For more details, see
|
| + // LayoutObject::needsPaintPropertyUpdate().
|
| + ADD_BOOLEAN_BITFIELD(needsPaintPropertyUpdate, NeedsPaintPropertyUpdate);
|
| +
|
| private:
|
| // This is the cached 'position' value of this object
|
| // (see ComputedStyle::position).
|
|
|