Index: Source/core/css/BasicShapeFunctions.cpp |
diff --git a/Source/core/css/BasicShapeFunctions.cpp b/Source/core/css/BasicShapeFunctions.cpp |
index 233ef635429358fe3da022010adc452806cb2aa8..86aeb5e9451d75dca2116e3e1907bae26335bbe3 100644 |
--- a/Source/core/css/BasicShapeFunctions.cpp |
+++ b/Source/core/css/BasicShapeFunctions.cpp |
@@ -71,31 +71,6 @@ PassRefPtrWillBeRawPtr<CSSValue> valueForBasicShape(const RenderStyle& style, co |
RefPtrWillBeRawPtr<CSSBasicShape> basicShapeValue; |
switch (basicShape->type()) { |
- case BasicShape::BasicShapeRectangleType: { |
- const BasicShapeRectangle* rectangle = static_cast<const BasicShapeRectangle*>(basicShape); |
- RefPtrWillBeRawPtr<CSSBasicShapeRectangle> rectangleValue = CSSBasicShapeRectangle::create(); |
- |
- rectangleValue->setX(pool.createValue(rectangle->x(), style)); |
- rectangleValue->setY(pool.createValue(rectangle->y(), style)); |
- rectangleValue->setWidth(pool.createValue(rectangle->width(), style)); |
- rectangleValue->setHeight(pool.createValue(rectangle->height(), style)); |
- rectangleValue->setRadiusX(pool.createValue(rectangle->cornerRadiusX(), style)); |
- rectangleValue->setRadiusY(pool.createValue(rectangle->cornerRadiusY(), style)); |
- |
- basicShapeValue = rectangleValue.release(); |
- break; |
- } |
- case BasicShape::DeprecatedBasicShapeCircleType: { |
- const DeprecatedBasicShapeCircle* circle = static_cast<const DeprecatedBasicShapeCircle*>(basicShape); |
- RefPtrWillBeRawPtr<CSSDeprecatedBasicShapeCircle> circleValue = CSSDeprecatedBasicShapeCircle::create(); |
- |
- circleValue->setCenterX(pool.createValue(circle->centerX(), style)); |
- circleValue->setCenterY(pool.createValue(circle->centerY(), style)); |
- circleValue->setRadius(pool.createValue(circle->radius(), style)); |
- |
- basicShapeValue = circleValue.release(); |
- break; |
- } |
case BasicShape::BasicShapeCircleType: { |
const BasicShapeCircle* circle = static_cast<const BasicShapeCircle*>(basicShape); |
RefPtrWillBeRawPtr<CSSBasicShapeCircle> circleValue = CSSBasicShapeCircle::create(); |
@@ -106,18 +81,6 @@ PassRefPtrWillBeRawPtr<CSSValue> valueForBasicShape(const RenderStyle& style, co |
basicShapeValue = circleValue.release(); |
break; |
} |
- case BasicShape::DeprecatedBasicShapeEllipseType: { |
- const DeprecatedBasicShapeEllipse* ellipse = static_cast<const DeprecatedBasicShapeEllipse*>(basicShape); |
- RefPtrWillBeRawPtr<CSSDeprecatedBasicShapeEllipse> ellipseValue = CSSDeprecatedBasicShapeEllipse::create(); |
- |
- ellipseValue->setCenterX(pool.createValue(ellipse->centerX(), style)); |
- ellipseValue->setCenterY(pool.createValue(ellipse->centerY(), style)); |
- ellipseValue->setRadiusX(pool.createValue(ellipse->radiusX(), style)); |
- ellipseValue->setRadiusY(pool.createValue(ellipse->radiusY(), style)); |
- |
- basicShapeValue = ellipseValue.release(); |
- break; |
- } |
case BasicShape::BasicShapeEllipseType: { |
const BasicShapeEllipse* ellipse = static_cast<const BasicShapeEllipse*>(basicShape); |
RefPtrWillBeRawPtr<CSSBasicShapeEllipse> ellipseValue = CSSBasicShapeEllipse::create(); |
@@ -141,20 +104,6 @@ PassRefPtrWillBeRawPtr<CSSValue> valueForBasicShape(const RenderStyle& style, co |
basicShapeValue = polygonValue.release(); |
break; |
} |
- case BasicShape::BasicShapeInsetRectangleType: { |
- const BasicShapeInsetRectangle* rectangle = static_cast<const BasicShapeInsetRectangle*>(basicShape); |
- RefPtrWillBeRawPtr<CSSBasicShapeInsetRectangle> rectangleValue = CSSBasicShapeInsetRectangle::create(); |
- |
- rectangleValue->setTop(cssValuePool().createValue(rectangle->top())); |
- rectangleValue->setRight(cssValuePool().createValue(rectangle->right())); |
- rectangleValue->setBottom(cssValuePool().createValue(rectangle->bottom())); |
- rectangleValue->setLeft(cssValuePool().createValue(rectangle->left())); |
- rectangleValue->setRadiusX(cssValuePool().createValue(rectangle->cornerRadiusX())); |
- rectangleValue->setRadiusY(cssValuePool().createValue(rectangle->cornerRadiusY())); |
- |
- basicShapeValue = rectangleValue.release(); |
- break; |
- } |
case BasicShape::BasicShapeInsetType: { |
const BasicShapeInset* inset = static_cast<const BasicShapeInset*>(basicShape); |
RefPtrWillBeRawPtr<CSSBasicShapeInset> insetValue = CSSBasicShapeInset::create(); |
@@ -259,39 +208,6 @@ PassRefPtr<BasicShape> basicShapeForValue(const StyleResolverState& state, const |
RefPtr<BasicShape> basicShape; |
switch (basicShapeValue->type()) { |
- case CSSBasicShape::CSSBasicShapeRectangleType: { |
- const CSSBasicShapeRectangle* rectValue = static_cast<const CSSBasicShapeRectangle *>(basicShapeValue); |
- RefPtr<BasicShapeRectangle> rect = BasicShapeRectangle::create(); |
- |
- rect->setX(convertToLength(state, rectValue->x())); |
- rect->setY(convertToLength(state, rectValue->y())); |
- rect->setWidth(convertToLength(state, rectValue->width())); |
- rect->setHeight(convertToLength(state, rectValue->height())); |
- if (rectValue->radiusX()) { |
- Length radiusX = convertToLength(state, rectValue->radiusX()); |
- rect->setCornerRadiusX(radiusX); |
- if (rectValue->radiusY()) |
- rect->setCornerRadiusY(convertToLength(state, rectValue->radiusY())); |
- else |
- rect->setCornerRadiusY(radiusX); |
- } else { |
- rect->setCornerRadiusX(Length(0, Fixed)); |
- rect->setCornerRadiusY(Length(0, Fixed)); |
- } |
- basicShape = rect.release(); |
- break; |
- } |
- case CSSBasicShape::CSSDeprecatedBasicShapeCircleType: { |
- const CSSDeprecatedBasicShapeCircle* circleValue = static_cast<const CSSDeprecatedBasicShapeCircle *>(basicShapeValue); |
- RefPtr<DeprecatedBasicShapeCircle> circle = DeprecatedBasicShapeCircle::create(); |
- |
- circle->setCenterX(convertToLength(state, circleValue->centerX())); |
- circle->setCenterY(convertToLength(state, circleValue->centerY())); |
- circle->setRadius(convertToLength(state, circleValue->radius())); |
- |
- basicShape = circle.release(); |
- break; |
- } |
case CSSBasicShape::CSSBasicShapeCircleType: { |
const CSSBasicShapeCircle* circleValue = static_cast<const CSSBasicShapeCircle *>(basicShapeValue); |
RefPtr<BasicShapeCircle> circle = BasicShapeCircle::create(); |
@@ -303,18 +219,6 @@ PassRefPtr<BasicShape> basicShapeForValue(const StyleResolverState& state, const |
basicShape = circle.release(); |
break; |
} |
- case CSSBasicShape::CSSDeprecatedBasicShapeEllipseType: { |
- const CSSDeprecatedBasicShapeEllipse* ellipseValue = static_cast<const CSSDeprecatedBasicShapeEllipse *>(basicShapeValue); |
- RefPtr<DeprecatedBasicShapeEllipse> ellipse = DeprecatedBasicShapeEllipse::create(); |
- |
- ellipse->setCenterX(convertToLength(state, ellipseValue->centerX())); |
- ellipse->setCenterY(convertToLength(state, ellipseValue->centerY())); |
- ellipse->setRadiusX(convertToLength(state, ellipseValue->radiusX())); |
- ellipse->setRadiusY(convertToLength(state, ellipseValue->radiusY())); |
- |
- basicShape = ellipse.release(); |
- break; |
- } |
case CSSBasicShape::CSSBasicShapeEllipseType: { |
const CSSBasicShapeEllipse* ellipseValue = static_cast<const CSSBasicShapeEllipse *>(basicShapeValue); |
RefPtr<BasicShapeEllipse> ellipse = BasicShapeEllipse::create(); |
@@ -339,28 +243,6 @@ PassRefPtr<BasicShape> basicShapeForValue(const StyleResolverState& state, const |
basicShape = polygon.release(); |
break; |
} |
- case CSSBasicShape::CSSBasicShapeInsetRectangleType: { |
- const CSSBasicShapeInsetRectangle* rectValue = static_cast<const CSSBasicShapeInsetRectangle *>(basicShapeValue); |
- RefPtr<BasicShapeInsetRectangle> rect = BasicShapeInsetRectangle::create(); |
- |
- rect->setTop(convertToLength(state, rectValue->top())); |
- rect->setRight(convertToLength(state, rectValue->right())); |
- rect->setBottom(convertToLength(state, rectValue->bottom())); |
- rect->setLeft(convertToLength(state, rectValue->left())); |
- if (rectValue->radiusX()) { |
- Length radiusX = convertToLength(state, rectValue->radiusX()); |
- rect->setCornerRadiusX(radiusX); |
- if (rectValue->radiusY()) |
- rect->setCornerRadiusY(convertToLength(state, rectValue->radiusY())); |
- else |
- rect->setCornerRadiusY(radiusX); |
- } else { |
- rect->setCornerRadiusX(Length(0, Fixed)); |
- rect->setCornerRadiusY(Length(0, Fixed)); |
- } |
- basicShape = rect.release(); |
- break; |
- } |
case CSSBasicShape::CSSBasicShapeInsetType: { |
const CSSBasicShapeInset* rectValue = static_cast<const CSSBasicShapeInset* >(basicShapeValue); |
RefPtr<BasicShapeInset> rect = BasicShapeInset::create(); |