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

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

Issue 18214003: Change static_cast<SVGImageElement*> with toSVGImageElement. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix build break Created 7 years, 6 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 | Source/core/svg/SVGImageElement.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/svg/RenderSVGImage.cpp
diff --git a/Source/core/rendering/svg/RenderSVGImage.cpp b/Source/core/rendering/svg/RenderSVGImage.cpp
index 5edf820bc06b18b549352c675c29f26704b85a75..7860926bf3f2106e123e882030cd75b95a5efd6d 100644
--- a/Source/core/rendering/svg/RenderSVGImage.cpp
+++ b/Source/core/rendering/svg/RenderSVGImage.cpp
@@ -57,7 +57,7 @@ RenderSVGImage::~RenderSVGImage()
bool RenderSVGImage::updateImageViewport()
{
- SVGImageElement* image = static_cast<SVGImageElement*>(node());
+ SVGImageElement* image = toSVGImageElement(node());
FloatRect oldBoundaries = m_objectBoundingBox;
bool updatedViewport = false;
@@ -97,7 +97,7 @@ void RenderSVGImage::layout()
bool transformOrBoundariesUpdate = m_needsTransformUpdate || m_needsBoundariesUpdate;
if (m_needsTransformUpdate) {
- m_localTransform = static_cast<SVGImageElement*>(node())->animatedLocalTransform();
+ m_localTransform = toSVGImageElement(node())->animatedLocalTransform();
m_needsTransformUpdate = false;
}
@@ -162,7 +162,7 @@ void RenderSVGImage::paintForeground(PaintInfo& paintInfo)
FloatRect destRect = m_objectBoundingBox;
FloatRect srcRect(0, 0, image->width(), image->height());
- SVGImageElement* imageElement = static_cast<SVGImageElement*>(node());
+ SVGImageElement* imageElement = toSVGImageElement(node());
imageElement->preserveAspectRatio().transformRect(destRect, srcRect);
bool useLowQualityScaling = false;
« no previous file with comments | « no previous file | Source/core/svg/SVGImageElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698