Index: Source/core/rendering/svg/RenderSVGResourceContainer.h |
diff --git a/Source/core/rendering/svg/RenderSVGResourceContainer.h b/Source/core/rendering/svg/RenderSVGResourceContainer.h |
index 7b31c1f3877d8ea44222512c5c8d2d71a8da6c6e..d640fad1a70d0bd070becf1760cecfdeb178ea89 100644 |
--- a/Source/core/rendering/svg/RenderSVGResourceContainer.h |
+++ b/Source/core/rendering/svg/RenderSVGResourceContainer.h |
@@ -42,15 +42,6 @@ public: |
virtual bool isSVGResourceContainer() const OVERRIDE FINAL { return true; } |
- template<class Renderer> |
- Renderer* cast() |
- { |
- if (Renderer::s_resourceType == resourceType()) |
- return static_cast<Renderer*>(this); |
- |
- return 0; |
- } |
- |
static AffineTransform transformOnNonScalingStroke(RenderObject*, const AffineTransform& resourceTransform); |
void idChanged(); |
@@ -114,9 +105,10 @@ inline RenderSVGResourceContainer* getRenderSVGResourceContainerById(TreeScope& |
template<typename Renderer> |
Renderer* getRenderSVGResourceById(TreeScope& treeScope, const AtomicString& id) |
{ |
- if (RenderSVGResourceContainer* container = getRenderSVGResourceContainerById(treeScope, id)) |
- return container->cast<Renderer>(); |
- |
+ if (RenderSVGResourceContainer* container = getRenderSVGResourceContainerById(treeScope, id)) { |
+ if (container->resourceType() == Renderer::s_resourceType) |
+ return static_cast<Renderer*>(container); |
+ } |
return 0; |
} |