Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1146)

Unified Diff: Source/core/rendering/svg/RenderSVGResourceContainer.h

Issue 631233002: Remove RenderSVGResourceContainer::cast() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698