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

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

Issue 18233024: Use toSVGFilterElement instead of static_cast<..> (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
« no previous file with comments | « Source/core/rendering/svg/RenderSVGResourceFilter.h ('k') | Source/core/rendering/svg/SVGResources.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/svg/RenderSVGResourceFilter.cpp
diff --git a/Source/core/rendering/svg/RenderSVGResourceFilter.cpp b/Source/core/rendering/svg/RenderSVGResourceFilter.cpp
index 1f0913e062b36455542aa2e136fe2a16a9cc631b..9342e7bfb1ab92a425006f7e109c1e4498f2a79b 100644
--- a/Source/core/rendering/svg/RenderSVGResourceFilter.cpp
+++ b/Source/core/rendering/svg/RenderSVGResourceFilter.cpp
@@ -79,7 +79,7 @@ void RenderSVGResourceFilter::removeClientFromCache(RenderObject* client, bool m
PassRefPtr<SVGFilterBuilder> RenderSVGResourceFilter::buildPrimitives(SVGFilter* filter)
{
- SVGFilterElement* filterElement = static_cast<SVGFilterElement*>(node());
+ SVGFilterElement* filterElement = toSVGFilterElement(node());
FloatRect targetBoundingBox = filter->targetBoundingBox();
// Add effects to the builder
@@ -139,7 +139,7 @@ bool RenderSVGResourceFilter::applyResource(RenderObject* object, RenderStyle*,
OwnPtr<FilterData> filterData(adoptPtr(new FilterData));
FloatRect targetBoundingBox = object->objectBoundingBox();
- SVGFilterElement* filterElement = static_cast<SVGFilterElement*>(node());
+ SVGFilterElement* filterElement = toSVGFilterElement(node());
filterData->boundaries = SVGLengthContext::resolveRectangle<SVGFilterElement>(filterElement, filterElement->filterUnitsCurrentValue(), targetBoundingBox);
if (filterData->boundaries.isEmpty())
return false;
@@ -311,7 +311,7 @@ void RenderSVGResourceFilter::postApplyResource(RenderObject* object, GraphicsCo
FloatRect RenderSVGResourceFilter::resourceBoundingBox(RenderObject* object)
{
- if (SVGFilterElement* element = static_cast<SVGFilterElement*>(node()))
+ if (SVGFilterElement* element = toSVGFilterElement(node()))
return SVGLengthContext::resolveRectangle<SVGFilterElement>(element, element->filterUnitsCurrentValue(), object->objectBoundingBox());
return FloatRect();
« no previous file with comments | « Source/core/rendering/svg/RenderSVGResourceFilter.h ('k') | Source/core/rendering/svg/SVGResources.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698