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

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

Issue 19781008: Introduce toSVGRectElement(), use it (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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
Index: Source/core/rendering/svg/SVGPathData.cpp
diff --git a/Source/core/rendering/svg/SVGPathData.cpp b/Source/core/rendering/svg/SVGPathData.cpp
index b15fe3df90f452ab97064dc092700c50316646cb..e9b13ef121f2a31d4c61688ed7b8030919663505 100644
--- a/Source/core/rendering/svg/SVGPathData.cpp
+++ b/Source/core/rendering/svg/SVGPathData.cpp
@@ -111,8 +111,7 @@ static void updatePathFromPolylineElement(SVGElement* element, Path& path)
static void updatePathFromRectElement(SVGElement* element, Path& path)
{
- ASSERT(element->hasTagName(SVGNames::rectTag));
- SVGRectElement* rect = static_cast<SVGRectElement*>(element);
+ SVGRectElement* rect = toSVGRectElement(element);
SVGLengthContext lengthContext(element);
float width = rect->widthCurrentValue().value(lengthContext);

Powered by Google App Engine
This is Rietveld 408576698