Index: Source/core/rendering/shapes/Shape.cpp |
diff --git a/Source/core/rendering/shapes/Shape.cpp b/Source/core/rendering/shapes/Shape.cpp |
index 1a0fae619740533b20ef2f9ccd28dd48870d05eb..7054a6ed851f66c0cec94ed2ad2509aabd91e4e3 100644 |
--- a/Source/core/rendering/shapes/Shape.cpp |
+++ b/Source/core/rendering/shapes/Shape.cpp |
@@ -107,7 +107,7 @@ PassOwnPtr<Shape> Shape::createShape(const BasicShape* basicShape, const LayoutS |
switch (basicShape->type()) { |
case BasicShape::BasicShapeCircleType: { |
- const BasicShapeCircle* circle = static_cast<const BasicShapeCircle*>(basicShape); |
+ const BasicShapeCircle* circle = toBasicShapeCircle(basicShape); |
FloatPoint center = floatPointForCenterCoordinate(circle->centerX(), circle->centerY(), FloatSize(boxWidth, boxHeight)); |
float radius = circle->floatValueForRadiusInBox(FloatSize(boxWidth, boxHeight)); |
FloatPoint logicalCenter = physicalPointToLogical(center, logicalBoxSize.height().toFloat(), writingMode); |
@@ -117,7 +117,7 @@ PassOwnPtr<Shape> Shape::createShape(const BasicShape* basicShape, const LayoutS |
} |
case BasicShape::BasicShapeEllipseType: { |
- const BasicShapeEllipse* ellipse = static_cast<const BasicShapeEllipse*>(basicShape); |
+ const BasicShapeEllipse* ellipse = toBasicShapeEllipse(basicShape); |
FloatPoint center = floatPointForCenterCoordinate(ellipse->centerX(), ellipse->centerY(), FloatSize(boxWidth, boxHeight)); |
float radiusX = ellipse->floatValueForRadiusInBox(ellipse->radiusX(), center.x(), boxWidth); |
float radiusY = ellipse->floatValueForRadiusInBox(ellipse->radiusY(), center.y(), boxHeight); |
@@ -128,7 +128,7 @@ PassOwnPtr<Shape> Shape::createShape(const BasicShape* basicShape, const LayoutS |
} |
case BasicShape::BasicShapePolygonType: { |
- const BasicShapePolygon* polygon = static_cast<const BasicShapePolygon*>(basicShape); |
+ const BasicShapePolygon* polygon = toBasicShapePolygon(basicShape); |
const Vector<Length>& values = polygon->values(); |
size_t valuesSize = values.size(); |
ASSERT(!(valuesSize % 2)); |
@@ -144,7 +144,7 @@ PassOwnPtr<Shape> Shape::createShape(const BasicShape* basicShape, const LayoutS |
} |
case BasicShape::BasicShapeInsetType: { |
- const BasicShapeInset& inset = *static_cast<const BasicShapeInset*>(basicShape); |
+ const BasicShapeInset& inset = *toBasicShapeInset(basicShape); |
float left = floatValueForLength(inset.left(), boxWidth); |
float top = floatValueForLength(inset.top(), boxHeight); |
float right = floatValueForLength(inset.right(), boxWidth); |