Index: Source/core/rendering/svg/RenderSVGResourceContainer.h |
diff --git a/Source/core/rendering/svg/RenderSVGResourceContainer.h b/Source/core/rendering/svg/RenderSVGResourceContainer.h |
index 780f503e9cdf7776016433028aaaeef4372f5099..dc4a602a99ff03f73ff178fd50af9c7c49fbc6bc 100644 |
--- a/Source/core/rendering/svg/RenderSVGResourceContainer.h |
+++ b/Source/core/rendering/svg/RenderSVGResourceContainer.h |
@@ -26,6 +26,16 @@ |
namespace blink { |
+enum RenderSVGResourceType { |
+ MaskerResourceType, |
+ MarkerResourceType, |
+ PatternResourceType, |
+ LinearGradientResourceType, |
+ RadialGradientResourceType, |
+ FilterResourceType, |
+ ClipperResourceType |
+}; |
+ |
class RenderLayer; |
class RenderSVGResourceContainer : public RenderSVGHiddenContainer, |
@@ -41,6 +51,8 @@ public: |
virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle) override final; |
virtual bool isOfType(RenderObjectType type) const override { return type == RenderObjectSVGResourceContainer || RenderSVGHiddenContainer::isOfType(type); } |
+ virtual RenderSVGResourceType resourceType() const = 0; |
+ |
void idChanged(); |
void addClientRenderLayer(Node*); |
void addClientRenderLayer(RenderLayer*); |
@@ -109,6 +121,9 @@ Renderer* getRenderSVGResourceById(TreeScope& treeScope, const AtomicString& id) |
DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderSVGResourceContainer, isSVGResourceContainer()); |
+#define DEFINE_RENDER_SVG_RESOURCE_TYPE_CASTS(thisType, typeName) \ |
+ DEFINE_TYPE_CASTS(thisType, RenderSVGResourceContainer, resource, resource->resourceType() == typeName, resource.resourceType() == typeName) |
+ |
} |
#endif |