Index: third_party/WebKit/Source/platform/graphics/paint/ClipPaintPropertyNode.h |
diff --git a/third_party/WebKit/Source/platform/graphics/paint/ClipPaintPropertyNode.h b/third_party/WebKit/Source/platform/graphics/paint/ClipPaintPropertyNode.h |
index 943de30cdc924214168aed3e957b07db631e2ea8..40ed0288c79385d38478fc9005edd95ec2b204ef 100644 |
--- a/third_party/WebKit/Source/platform/graphics/paint/ClipPaintPropertyNode.h |
+++ b/third_party/WebKit/Source/platform/graphics/paint/ClipPaintPropertyNode.h |
@@ -21,6 +21,8 @@ namespace blink { |
// and an (optional) parent ClipPaintPropertyNode for inherited clips. |
class PLATFORM_EXPORT ClipPaintPropertyNode : public RefCounted<ClipPaintPropertyNode> { |
public: |
+ using Value = FloatRoundedRect; |
pdr.
2016/07/21 21:34:07
Can a refptr to the local transform space be inclu
|
+ |
static PassRefPtr<ClipPaintPropertyNode> create( |
PassRefPtr<TransformPaintPropertyNode> localTransformSpace, |
const FloatRoundedRect& clipRect, |
@@ -29,12 +31,28 @@ public: |
return adoptRef(new ClipPaintPropertyNode(localTransformSpace, clipRect, parent)); |
} |
+ // This form is required by PaintPropertyTreeBuilder::updateObjectPaintProperties(). |
+ static PassRefPtr<ClipPaintPropertyNode> create(const Value& value, PassRefPtr<ClipPaintPropertyNode> parent) |
+ { |
+ return adoptRef(new ClipPaintPropertyNode(nullptr, value, parent)); |
+ } |
+ |
const TransformPaintPropertyNode* localTransformSpace() const { return m_localTransformSpace.get(); } |
+ const Value& value() const { return m_clipRect; } |
const FloatRoundedRect& clipRect() const { return m_clipRect; } |
// Reference to inherited clips, or nullptr if this is the only clip. |
const ClipPaintPropertyNode* parent() const { return m_parent.get(); } |
+ // Moves this node and its subtrees under another parent. |
+ void setParent(PassRefPtr<ClipPaintPropertyNode> parent) { m_parent = parent; } |
+ |
+ // This is separate from the create() method for child node for two purposes: |
+ // 1. to let the method have the same parameter list as the method of other paint |
+ // property node classes, so that they can be used in the same template; |
pdr.
2016/07/21 21:34:06
Nit: ; -> .
|
+ // 2. to allow to reuse an existing node in a new tree. |
+ void setLocalTransformSpace(PassRefPtr<TransformPaintPropertyNode> localTransformSpace) { m_localTransformSpace = localTransformSpace; } |
+ |
private: |
ClipPaintPropertyNode(PassRefPtr<TransformPaintPropertyNode> localTransformSpace, const FloatRoundedRect& clipRect, PassRefPtr<ClipPaintPropertyNode> parent) |
: m_localTransformSpace(localTransformSpace), m_clipRect(clipRect), m_parent(parent) { } |