Chromium Code Reviews| Index: Source/core/rendering/shapes/Shape.cpp |
| diff --git a/Source/core/rendering/shapes/Shape.cpp b/Source/core/rendering/shapes/Shape.cpp |
| index c45b5b4a2c1cf9d1efe7034c3622c7eecb2a2457..1a5cab8b797c93fce9b690457f58f4763c9784ff 100644 |
| --- a/Source/core/rendering/shapes/Shape.cpp |
| +++ b/Source/core/rendering/shapes/Shape.cpp |
| @@ -30,6 +30,7 @@ |
| #include "config.h" |
| #include "core/rendering/shapes/Shape.h" |
| +#include "core/css/BasicShapeFunctions.h" |
| #include "core/fetch/ImageResource.h" |
| #include "core/rendering/shapes/BoxShape.h" |
| #include "core/rendering/shapes/PolygonShape.h" |
| @@ -154,8 +155,13 @@ PassOwnPtr<Shape> Shape::createShape(const BasicShape* basicShape, const LayoutS |
| } |
| case BasicShape::BasicShapeCircleType: { |
| - // FIXME implement layout. |
| - shape = createRectangleShape(FloatRect(0, 0, boxWidth, boxHeight), FloatSize(0, 0)); |
| + const BasicShapeCircle* circle = static_cast<const BasicShapeCircle*>(basicShape); |
| + float centerX = floatValueForCenterCoordinate(circle->centerX(), boxWidth); |
|
leviw_travelin_and_unemployed
2014/01/07 19:41:34
I don't love having these coordinates split up so
|
| + float centerY = floatValueForCenterCoordinate(circle->centerY(), boxHeight); |
| + float radius = circle->floatValueForRadiusInBox(boxWidth, boxHeight); |
| + FloatPoint logicalCenter = physicalPointToLogical(FloatPoint(centerX, centerY), logicalBoxSize.height(), writingMode); |
| + |
| + shape = createCircleShape(logicalCenter, radius); |
| break; |
| } |