Index: third_party/WebKit/Source/core/style/ClipPathOperation.h |
diff --git a/third_party/WebKit/Source/core/style/ClipPathOperation.h b/third_party/WebKit/Source/core/style/ClipPathOperation.h |
index 16405443cb531a41e8c76197864b4bb47463d7d1..e08e4d4f0fe46518fb4045b702eb14e198450c3e 100644 |
--- a/third_party/WebKit/Source/core/style/ClipPathOperation.h |
+++ b/third_party/WebKit/Source/core/style/ClipPathOperation.h |
@@ -31,6 +31,7 @@ |
#define ClipPathOperation_h |
#include "core/style/BasicShapes.h" |
+#include "core/svg/SVGElementProxy.h" |
#include "platform/graphics/Path.h" |
#include "wtf/PtrUtil.h" |
#include "wtf/RefCounted.h" |
@@ -39,6 +40,10 @@ |
namespace blink { |
+class SVGElement; |
+class SVGResourceClient; |
+class TreeScope; |
+ |
class ClipPathOperation : public RefCounted<ClipPathOperation> { |
public: |
enum OperationType { REFERENCE, SHAPE }; |
@@ -61,25 +66,26 @@ class ReferenceClipPathOperation final : public ClipPathOperation { |
public: |
static PassRefPtr<ReferenceClipPathOperation> create( |
const String& url, |
- const AtomicString& fragment) { |
- return adoptRef(new ReferenceClipPathOperation(url, fragment)); |
+ SVGElementProxy& elementProxy) { |
+ return adoptRef(new ReferenceClipPathOperation(url, elementProxy)); |
} |
+ void addClient(SVGResourceClient*); |
+ void removeClient(SVGResourceClient*); |
+ |
+ SVGElement* findElement(TreeScope&) const; |
+ |
const String& url() const { return m_url; } |
- const AtomicString& fragment() const { return m_fragment; } |
private: |
- bool operator==(const ClipPathOperation& o) const override { |
- return isSameType(o) && |
- m_url == static_cast<const ReferenceClipPathOperation&>(o).m_url; |
- } |
+ bool operator==(const ClipPathOperation&) const override; |
OperationType type() const override { return REFERENCE; } |
- ReferenceClipPathOperation(const String& url, const AtomicString& fragment) |
- : m_url(url), m_fragment(fragment) {} |
+ ReferenceClipPathOperation(const String& url, SVGElementProxy& elementProxy) |
+ : m_elementProxy(&elementProxy), m_url(url) {} |
+ Persistent<SVGElementProxy> m_elementProxy; |
String m_url; |
- AtomicString m_fragment; |
}; |
DEFINE_TYPE_CASTS(ReferenceClipPathOperation, |