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

Unified Diff: Source/core/rendering/svg/RenderSVGResourceMarker.cpp

Issue 19351003: Use toSVGMarkerElement() instead of static_cast<> (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebased Created 7 years, 5 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 | « Source/core/rendering/svg/RenderSVGResourceMarker.h ('k') | Source/core/svg/SVGMarkerElement.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/svg/RenderSVGResourceMarker.cpp
diff --git a/Source/core/rendering/svg/RenderSVGResourceMarker.cpp b/Source/core/rendering/svg/RenderSVGResourceMarker.cpp
index 2f5bdb108a8255ad530965df40605fb1b8a1e575..b33cc50da0c041047d15c4853dfc36e9529faee3 100644
--- a/Source/core/rendering/svg/RenderSVGResourceMarker.cpp
+++ b/Source/core/rendering/svg/RenderSVGResourceMarker.cpp
@@ -94,7 +94,7 @@ const AffineTransform& RenderSVGResourceMarker::localToParentTransform() const
FloatPoint RenderSVGResourceMarker::referencePoint() const
{
- SVGMarkerElement* marker = static_cast<SVGMarkerElement*>(node());
+ SVGMarkerElement* marker = toSVGMarkerElement(node());
ASSERT(marker);
SVGLengthContext lengthContext(marker);
@@ -103,7 +103,7 @@ FloatPoint RenderSVGResourceMarker::referencePoint() const
float RenderSVGResourceMarker::angle() const
{
- SVGMarkerElement* marker = static_cast<SVGMarkerElement*>(node());
+ SVGMarkerElement* marker = toSVGMarkerElement(node());
ASSERT(marker);
float angle = -1;
@@ -115,7 +115,7 @@ float RenderSVGResourceMarker::angle() const
AffineTransform RenderSVGResourceMarker::markerTransformation(const FloatPoint& origin, float autoAngle, float strokeWidth) const
{
- SVGMarkerElement* marker = static_cast<SVGMarkerElement*>(node());
+ SVGMarkerElement* marker = toSVGMarkerElement(node());
ASSERT(marker);
float markerAngle = angle();
@@ -157,7 +157,7 @@ AffineTransform RenderSVGResourceMarker::markerContentTransformation(const Affin
AffineTransform RenderSVGResourceMarker::viewportTransform() const
{
- SVGMarkerElement* marker = static_cast<SVGMarkerElement*>(node());
+ SVGMarkerElement* marker = toSVGMarkerElement(node());
ASSERT(marker);
return marker->viewBoxToViewTransform(m_viewport.width(), m_viewport.height());
@@ -168,7 +168,7 @@ void RenderSVGResourceMarker::calcViewport()
if (!selfNeedsLayout())
return;
- SVGMarkerElement* marker = static_cast<SVGMarkerElement*>(node());
+ SVGMarkerElement* marker = toSVGMarkerElement(node());
ASSERT(marker);
SVGLengthContext lengthContext(marker);
« no previous file with comments | « Source/core/rendering/svg/RenderSVGResourceMarker.h ('k') | Source/core/svg/SVGMarkerElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698