| 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 847e803c1ca5155766cedaf38d5c1dd39e2c2c48..07ee52b732ba1e5926887cf34841bcb4def4dcc4 100644
|
| --- a/third_party/WebKit/Source/core/layout/LayoutObject.h
|
| +++ b/third_party/WebKit/Source/core/layout/LayoutObject.h
|
| @@ -41,6 +41,7 @@
|
| #include "core/loader/resource/ImageResourceObserver.h"
|
| #include "core/paint/LayerHitTestRects.h"
|
| #include "core/paint/PaintPhase.h"
|
| +#include "core/paint/RarePaintData.h"
|
| #include "core/style/ComputedStyle.h"
|
| #include "platform/geometry/FloatQuad.h"
|
| #include "platform/geometry/LayoutRect.h"
|
| @@ -415,59 +416,10 @@ class CORE_EXPORT LayoutObject : public ImageResourceObserver,
|
| // to paint contents of this LayoutObject. See: m_contentsProperties comment.
|
| const PropertyTreeState* contentsProperties() const {
|
| DCHECK(RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled());
|
| - if (m_rarePaintData)
|
| - return m_rarePaintData->contentsProperties();
|
| - return nullptr;
|
| + return m_rarePaintData ? m_rarePaintData->contentsProperties() : nullptr;
|
| }
|
|
|
| private:
|
| - // This is for paint-related data that is not needed on all LayoutObjects.
|
| - // TODO(pdr): Store LayoutBoxModelObject's m_paintLayer in this structure.
|
| - class CORE_EXPORT RarePaintData {
|
| - WTF_MAKE_NONCOPYABLE(RarePaintData);
|
| - USING_FAST_MALLOC(RarePaintData);
|
| -
|
| - public:
|
| - RarePaintData();
|
| - ~RarePaintData();
|
| -
|
| - ObjectPaintProperties* paintProperties() const {
|
| - return m_paintProperties.get();
|
| - }
|
| - ObjectPaintProperties& ensurePaintProperties();
|
| -
|
| - PropertyTreeState* localBorderBoxProperties() const {
|
| - return m_localBorderBoxProperties.get();
|
| - }
|
| -
|
| - void clearLocalBorderBoxProperties();
|
| - void setLocalBorderBoxProperties(PropertyTreeState&);
|
| - const PropertyTreeState* contentsProperties() const;
|
| -
|
| - private:
|
| - // Holds references to the paint property nodes created by this object.
|
| - std::unique_ptr<ObjectPaintProperties> m_paintProperties;
|
| -
|
| - // This is a complete set of property nodes that should be used as a
|
| - // starting point to paint a LayoutObject. This data is cached because some
|
| - // properties inherit from the containing block chain instead of the
|
| - // painting parent and cannot be derived in O(1) during the paint walk.
|
| - //
|
| - // For example: <div style='opacity: 0.3;'/>
|
| - // The div's local border box properties would have an opacity 0.3 effect
|
| - // node. Even though the div has no transform, its local border box
|
| - // properties would have a transform node that points to the div's
|
| - // ancestor transform space.
|
| - std::unique_ptr<PropertyTreeState> m_localBorderBoxProperties;
|
| -
|
| - // This is the complete set of property nodes that can be used to paint the
|
| - // contents of this object. It is similar to m_localBorderBoxProperties but
|
| - // includes properties (e.g., overflow clip, scroll translation) that apply
|
| - // to contents. This cached value is derived from m_localBorderBoxProperties
|
| - // and m_paintProperties and should be invalidated when these change.
|
| - mutable std::unique_ptr<PropertyTreeState> m_contentsProperties;
|
| - };
|
| -
|
| RarePaintData& ensureRarePaintData();
|
| RarePaintData* rarePaintData() { return m_rarePaintData.get(); }
|
|
|
|
|