Index: Source/core/rendering/svg/RenderSVGResourceClipper.cpp |
diff --git a/Source/core/rendering/svg/RenderSVGResourceClipper.cpp b/Source/core/rendering/svg/RenderSVGResourceClipper.cpp |
index 92a96dd39496417cc3831ae5ff8a3b8e389470fc..9da09f9d9f0c299df32978dd0d74385de5bcab12 100644 |
--- a/Source/core/rendering/svg/RenderSVGResourceClipper.cpp |
+++ b/Source/core/rendering/svg/RenderSVGResourceClipper.cpp |
@@ -127,7 +127,7 @@ bool RenderSVGResourceClipper::pathOnlyClipping(GraphicsContext* context, const |
} |
} |
// Only one visible shape/path was found. Directly continue clipping and transform the content to userspace if necessary. |
- if (static_cast<SVGClipPathElement*>(node())->clipPathUnitsCurrentValue() == SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX) { |
+ if (toSVGClipPathElement(node())->clipPathUnitsCurrentValue() == SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX) { |
AffineTransform transform; |
transform.translate(objectBoundingBox.x(), objectBoundingBox.y()); |
transform.scaleNonUniform(objectBoundingBox.width(), objectBoundingBox.height()); |
@@ -152,7 +152,7 @@ bool RenderSVGResourceClipper::applyClippingToContext(RenderObject* object, cons |
m_clipper.set(object, new ClipperData); |
bool shouldCreateClipData = false; |
- AffineTransform animatedLocalTransform = static_cast<SVGClipPathElement*>(node())->animatedLocalTransform(); |
+ AffineTransform animatedLocalTransform = toSVGClipPathElement(node())->animatedLocalTransform(); |
ClipperData* clipperData = m_clipper.get(object); |
if (!clipperData->clipMaskImage) { |
if (pathOnlyClipping(context, animatedLocalTransform, objectBoundingBox)) |
@@ -208,8 +208,7 @@ bool RenderSVGResourceClipper::drawContentIntoMaskImage(ClipperData* clipperData |
ASSERT(maskContext); |
AffineTransform maskContentTransformation; |
- SVGClipPathElement* clipPath = static_cast<SVGClipPathElement*>(node()); |
- if (clipPath->clipPathUnitsCurrentValue() == SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX) { |
+ if (toSVGClipPathElement(node())->clipPathUnitsCurrentValue() == SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX) { |
maskContentTransformation.translate(objectBoundingBox.x(), objectBoundingBox.y()); |
maskContentTransformation.scaleNonUniform(objectBoundingBox.width(), objectBoundingBox.height()); |
maskContext->concatCTM(maskContentTransformation); |
@@ -277,7 +276,7 @@ void RenderSVGResourceClipper::calculateClipContentRepaintRect() |
continue; |
m_clipBoundaries.unite(renderer->localToParentTransform().mapRect(renderer->repaintRectInLocalCoordinates())); |
} |
- m_clipBoundaries = static_cast<SVGClipPathElement*>(node())->animatedLocalTransform().mapRect(m_clipBoundaries); |
+ m_clipBoundaries = toSVGClipPathElement(node())->animatedLocalTransform().mapRect(m_clipBoundaries); |
} |
bool RenderSVGResourceClipper::hitTestClipContent(const FloatRect& objectBoundingBox, const FloatPoint& nodeAtPoint) |
@@ -286,7 +285,7 @@ bool RenderSVGResourceClipper::hitTestClipContent(const FloatRect& objectBoundin |
if (!SVGRenderSupport::pointInClippingArea(this, point)) |
return false; |
- SVGClipPathElement* clipPathElement = static_cast<SVGClipPathElement*>(node()); |
+ SVGClipPathElement* clipPathElement = toSVGClipPathElement(node()); |
if (clipPathElement->clipPathUnitsCurrentValue() == SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX) { |
AffineTransform transform; |
transform.translate(objectBoundingBox.x(), objectBoundingBox.y()); |
@@ -320,7 +319,7 @@ FloatRect RenderSVGResourceClipper::resourceBoundingBox(RenderObject* object) |
if (m_clipBoundaries.isEmpty()) |
calculateClipContentRepaintRect(); |
- if (static_cast<SVGClipPathElement*>(node())->clipPathUnitsCurrentValue() == SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX) { |
+ if (toSVGClipPathElement(node())->clipPathUnitsCurrentValue() == SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX) { |
FloatRect objectBoundingBox = object->objectBoundingBox(); |
AffineTransform transform; |
transform.translate(objectBoundingBox.x(), objectBoundingBox.y()); |