| 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 87ea2a4ebba246a4f98d0dad57f6afb0f8a6f179..e92c28fd043fb0e31cfce4757ce9deaa4e8e96d0 100644
|
| --- a/third_party/WebKit/Source/core/layout/LayoutObject.h
|
| +++ b/third_party/WebKit/Source/core/layout/LayoutObject.h
|
| @@ -1702,6 +1702,13 @@ class CORE_EXPORT LayoutObject : public ImageResourceObserver,
|
| void clearPreviousVisualRects() {
|
| m_layoutObject.clearPreviousVisualRects();
|
| }
|
| + void setNeedsPaintPropertyUpdate() {
|
| + m_layoutObject.setNeedsPaintPropertyUpdate();
|
| + }
|
| + void clearNeedsPaintPropertyUpdate() {
|
| + m_layoutObject.clearNeedsPaintPropertyUpdate();
|
| + }
|
| +
|
| protected:
|
| friend class PaintPropertyTreeBuilder;
|
| // The following two functions can be called from PaintPropertyTreeBuilder
|
| @@ -1724,6 +1731,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); }
|
| // Clears the IsScrollAnchorObject bit if and only if no ScrollAnchors still
|
| // reference this LayoutObject.
|
| @@ -2110,6 +2134,7 @@ class CORE_EXPORT LayoutObject : public ImageResourceObserver,
|
| m_hasPreviousLocationInBacking(false),
|
| m_hasPreviousSelectionVisualRect(false),
|
| m_hasPreviousBoxGeometries(false),
|
| + m_needsPaintPropertyUpdate(true),
|
| m_positionedState(IsStaticallyPositioned),
|
| m_selectionState(SelectionNone),
|
| m_backgroundObscurationState(BackgroundObscurationStatusInvalid),
|
| @@ -2278,9 +2303,13 @@ class CORE_EXPORT LayoutObject : public ImageResourceObserver,
|
| HasPreviousSelectionVisualRect);
|
| ADD_BOOLEAN_BITFIELD(hasPreviousBoxGeometries, HasPreviousBoxGeometries);
|
|
|
| + // Whether the paint properties need to be updated. For more details, see
|
| + // LayoutObject::needsPaintPropertyUpdate().
|
| + ADD_BOOLEAN_BITFIELD(needsPaintPropertyUpdate, NeedsPaintPropertyUpdate);
|
| +
|
| protected:
|
| // Use protected to avoid warning about unused variable.
|
| - unsigned m_unusedBits : 10;
|
| + unsigned m_unusedBits : 9;
|
|
|
| private:
|
| // This is the cached 'position' value of this object
|
|
|