| Index: third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.h
|
| diff --git a/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.h b/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.h
|
| index a1d60a1e2f09a74a8cf6b9e4d306470424921efe..8bc1a2dc59279dbfca125f83391f480fbdeff05c 100644
|
| --- a/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.h
|
| +++ b/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.h
|
| @@ -68,49 +68,61 @@ public:
|
| void buildTreeNodes(const LayoutObject&, PaintPropertyTreeBuilderContext&);
|
|
|
| private:
|
| + // Result of computeXXX() functions to indicate which type of paint property node is needed for the object.
|
| + enum PaintPropertyNodeType {
|
| + NoNode,
|
| + NormalNode,
|
| + // See isPaintPropertyIsolationBoundary() in PaintPropertyTreeBuilder.cpp.
|
| + IsolationNode,
|
| + };
|
| +
|
| // Common logic to update a paint property. It tries to reuse the existing paint property node of
|
| // the object if the value is not changed. Returns the existing or newly created paint property node,
|
| // or nullptr if no paint property node is needed.
|
| // It requires a ComputeProperty function which computes the paint property node value if needed and
|
| - // returns true, or returns false if no paint property node value is needed.
|
| + // returns PaintPropertyNodeType.
|
| template <
|
| typename PropertyNode,
|
| PropertyNode* (ObjectPaintProperties::*Getter)() const,
|
| void (ObjectPaintProperties::*Setter)(PassRefPtr<PropertyNode>),
|
| - bool (*ComputeProperty)(const LayoutObject&, PaintPropertyTreeBuilderContext&, typename PropertyNode::Value&)>
|
| + PaintPropertyNodeType (*ComputeProperty)(const LayoutObject&, PaintPropertyTreeBuilderContext&, typename PropertyNode::Value&)>
|
| static PropertyNode* updateObjectPaintProperty(const LayoutObject&, PaintPropertyTreeBuilderContext&, PropertyNode*& contextProperty);
|
|
|
| - static bool computePaintOffsetTranslation(const LayoutObject&, PaintPropertyTreeBuilderContext&, TransformPaintPropertyNode::Value&);
|
| + static PaintPropertyNodeType computePaintOffsetTranslation(const LayoutObject&, PaintPropertyTreeBuilderContext&, TransformPaintPropertyNode::Value&);
|
| static void updatePaintOffsetTranslation(const LayoutObject&, PaintPropertyTreeBuilderContext&);
|
|
|
| - static bool computeTransform(const LayoutObject&, PaintPropertyTreeBuilderContext&, TransformPaintPropertyNode::Value&);
|
| + static PaintPropertyNodeType computeTransform(const LayoutObject&, PaintPropertyTreeBuilderContext&, TransformPaintPropertyNode::Value&);
|
| static void updateTransform(const LayoutObject&, PaintPropertyTreeBuilderContext&);
|
|
|
| - static bool computeEffect(const LayoutObject&, PaintPropertyTreeBuilderContext&, EffectPaintPropertyNode::Value&);
|
| + static PaintPropertyNodeType computeEffect(const LayoutObject&, PaintPropertyTreeBuilderContext&, EffectPaintPropertyNode::Value&);
|
| static void updateEffect(const LayoutObject&, PaintPropertyTreeBuilderContext&);
|
|
|
| - static bool computeCssClip(const LayoutObject&, PaintPropertyTreeBuilderContext&, ClipPaintPropertyNode::Value&);
|
| + static PaintPropertyNodeType computeCssClip(const LayoutObject&, PaintPropertyTreeBuilderContext&, ClipPaintPropertyNode::Value&);
|
| static void updateCssClip(const LayoutObject&, PaintPropertyTreeBuilderContext&);
|
|
|
| static void updateLocalBorderBoxContext(const LayoutObject&, const PaintPropertyTreeBuilderContext&);
|
|
|
| - static bool computeScrollbarPaintOffset(const LayoutObject&, const PaintPropertyTreeBuilderContext&, TransformPaintPropertyNode::Value&);
|
| + static PaintPropertyNodeType computeScrollbarPaintOffset(const LayoutObject&, const PaintPropertyTreeBuilderContext&, TransformPaintPropertyNode::Value&);
|
| static void updateScrollbarPaintOffset(const LayoutObject&, const PaintPropertyTreeBuilderContext&);
|
|
|
| - static bool computeOverflowClip(const LayoutObject&, PaintPropertyTreeBuilderContext&, ClipPaintPropertyNode::Value&);
|
| + static PaintPropertyNodeType computeOverflowClip(const LayoutObject&, PaintPropertyTreeBuilderContext&, ClipPaintPropertyNode::Value&);
|
| static void updateOverflowClip(const LayoutObject&, PaintPropertyTreeBuilderContext&);
|
|
|
| - static bool computePerspective(const LayoutObject&, PaintPropertyTreeBuilderContext&, TransformPaintPropertyNode::Value&);
|
| + static PaintPropertyNodeType computePerspective(const LayoutObject&, PaintPropertyTreeBuilderContext&, TransformPaintPropertyNode::Value&);
|
| static void updatePerspective(const LayoutObject&, PaintPropertyTreeBuilderContext&);
|
|
|
| - static bool computeSvgLocalToBorderBoxTransform(const LayoutObject&, PaintPropertyTreeBuilderContext&, TransformPaintPropertyNode::Value&);
|
| + static PaintPropertyNodeType computeSvgLocalToBorderBoxTransform(const LayoutObject&, PaintPropertyTreeBuilderContext&, TransformPaintPropertyNode::Value&);
|
| static void updateSvgLocalToBorderBoxTransform(const LayoutObject&, PaintPropertyTreeBuilderContext&);
|
|
|
| - static bool computeScrollTranslation(const LayoutObject&, PaintPropertyTreeBuilderContext&, TransformPaintPropertyNode::Value&);
|
| + static PaintPropertyNodeType computeScrollTranslation(const LayoutObject&, PaintPropertyTreeBuilderContext&, TransformPaintPropertyNode::Value&);
|
| static void updateScrollTranslation(const LayoutObject&, PaintPropertyTreeBuilderContext&);
|
|
|
| - static bool computeOutOfFlowContext(const LayoutObject&, PaintPropertyTreeBuilderContext&, ClipPaintPropertyNode::Value&);
|
| + static PaintPropertyNodeType computeOutOfFlowContext(const LayoutObject&, PaintPropertyTreeBuilderContext&, ClipPaintPropertyNode::Value&);
|
| static void updateOutOfFlowContext(const LayoutObject&, PaintPropertyTreeBuilderContext&);
|
| +
|
| +#if DCHECK_IS_ON()
|
| + static void checkPropertyIsolationBoundaryForStackingContext(const LayoutObject&);
|
| +#endif
|
| };
|
|
|
| } // namespace blink
|
|
|