| 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 c4cf35150e68a740cc9b2c61775d1e1e8db32475..bbff038c681c2ae0a61a5dfb97f7bc6fbf9cf660 100644
|
| --- a/third_party/WebKit/Source/core/layout/LayoutObject.h
|
| +++ b/third_party/WebKit/Source/core/layout/LayoutObject.h
|
| @@ -1723,6 +1723,11 @@ class CORE_EXPORT LayoutObject : public ImageResourceObserver,
|
| m_layoutObject.clearPreviousPaintInvalidationRects();
|
| }
|
|
|
| + void setPaintPropertiesInvalid() {
|
| + m_layoutObject.setPaintPropertiesInvalid();
|
| + }
|
| + void setPaintPropertiesValid() { m_layoutObject.setPaintPropertiesValid(); }
|
| +
|
| protected:
|
| friend class PaintPropertyTreeBuilder;
|
| // The following two functions can be called from PaintPropertyTreeBuilder
|
| @@ -1745,6 +1750,21 @@ class CORE_EXPORT LayoutObject : public ImageResourceObserver,
|
| return MutableForPainting(*this);
|
| }
|
|
|
| + // Paint properties (see: |ObjectPaintProperties|) are built from the Object's
|
| + // state (location, transform style, etc.) and need to be invalidated when
|
| + // these values change (see: PaintPropertyTreeBuilder). Invalid paint
|
| + // properties will be rebuilt during the next document lifecycle update.
|
| + void setPaintPropertiesInvalid() {
|
| + m_bitfields.setPaintPropertiesValid(false);
|
| + }
|
| + void setPaintPropertiesValid() {
|
| + DCHECK_EQ(document().lifecycle().state(), DocumentLifecycle::InPrePaint);
|
| + m_bitfields.setPaintPropertiesValid(true);
|
| + }
|
| + bool paintPropertiesValid() const {
|
| + return m_bitfields.paintPropertiesValid();
|
| + }
|
| +
|
| void setIsScrollAnchorObject() { m_bitfields.setIsScrollAnchorObject(true); }
|
|
|
| // If unconditionally is true, you are responsible for ensuring that
|
| @@ -2120,12 +2140,13 @@ class CORE_EXPORT LayoutObject : public ImageResourceObserver,
|
| m_isScrollAnchorObject(false),
|
| m_scrollAnchorDisablingStyleChanged(false),
|
| m_hasBoxDecorationBackground(false),
|
| + m_paintPropertiesValid(false),
|
| m_positionedState(IsStaticallyPositioned),
|
| m_selectionState(SelectionNone),
|
| m_backgroundObscurationState(BackgroundObscurationStatusInvalid),
|
| m_fullPaintInvalidationReason(PaintInvalidationNone) {}
|
|
|
| - // 32 bits have been used in the first word, and 18 in the second.
|
| + // 32 bits have been used in the first word, and 19 in the second.
|
|
|
| // Self needs layout means that this layout object is marked for a full
|
| // layout. This is the default layout but it is expensive as it recomputes
|
| @@ -2286,6 +2307,10 @@ class CORE_EXPORT LayoutObject : public ImageResourceObserver,
|
| ADD_BOOLEAN_BITFIELD(hasBoxDecorationBackground,
|
| HasBoxDecorationBackground);
|
|
|
| + // Whether the object paint properties are up to date with the Object's
|
| + // state (see: setPaintPropertiesInvalid and setPaintPropertiesValid).
|
| + ADD_BOOLEAN_BITFIELD(paintPropertiesValid, PaintPropertiesValid)
|
| +
|
| private:
|
| // This is the cached 'position' value of this object
|
| // (see ComputedStyle::position).
|
|
|