Index: Source/core/css/CSSBasicShapes.h |
diff --git a/Source/core/css/CSSBasicShapes.h b/Source/core/css/CSSBasicShapes.h |
index 8383c0593186fc0741e2697e82b9c2c9036e417d..c23021772324f42f3878a14e3b5f8b62ae5f0c26 100644 |
--- a/Source/core/css/CSSBasicShapes.h |
+++ b/Source/core/css/CSSBasicShapes.h |
@@ -41,11 +41,12 @@ namespace WebCore { |
class CSSBasicShape : public RefCounted<CSSBasicShape> { |
public: |
enum Type { |
- CSSBasicShapeRectangleType = 1, |
- CSSBasicShapeCircleType = 2, |
- CSSBasicShapeEllipseType = 3, |
- CSSBasicShapePolygonType = 4, |
- CSSBasicShapeInsetRectangleType = 5 |
+ CSSBasicShapeRectangleType, |
+ CSSDeprecatedBasicShapeCircleType, |
+ CSSBasicShapeEllipseType, |
+ CSSBasicShapePolygonType, |
+ CSSBasicShapeInsetRectangleType, |
+ CSSBasicShapeCircleType |
}; |
virtual Type type() const = 0; |
@@ -142,6 +143,33 @@ class CSSBasicShapeCircle : public CSSBasicShape { |
public: |
static PassRefPtr<CSSBasicShapeCircle> create() { return adoptRef(new CSSBasicShapeCircle); } |
+ virtual Type type() const OVERRIDE { return CSSBasicShapeCircleType; } |
+ virtual String cssText() const; |
+ virtual bool equals(const CSSBasicShape&) const; |
+ |
+ CSSPrimitiveValue* centerX() const { return m_centerX.get(); } |
+ CSSPrimitiveValue* centerY() const { return m_centerY.get(); } |
+ CSSPrimitiveValue* radius() const { return m_radius.get(); } |
+ |
+ void setCenterX(PassRefPtr<CSSPrimitiveValue> centerX) { m_centerX = centerX; } |
+ void setCenterY(PassRefPtr<CSSPrimitiveValue> centerY) { m_centerY = centerY; } |
+ void setRadius(PassRefPtr<CSSPrimitiveValue> radius) { m_radius = radius; } |
+ |
+ virtual String serializeResolvingVariables(const HashMap<AtomicString, String>&) const; |
+ virtual bool hasVariableReference() const; |
+ |
+private: |
+ CSSBasicShapeCircle() { } |
+ |
+ RefPtr<CSSPrimitiveValue> m_centerX; |
+ RefPtr<CSSPrimitiveValue> m_centerY; |
+ RefPtr<CSSPrimitiveValue> m_radius; |
+}; |
+ |
+class CSSDeprecatedBasicShapeCircle : public CSSBasicShape { |
+public: |
+ static PassRefPtr<CSSDeprecatedBasicShapeCircle> create() { return adoptRef(new CSSDeprecatedBasicShapeCircle); } |
+ |
CSSPrimitiveValue* centerX() const { return m_centerX.get(); } |
CSSPrimitiveValue* centerY() const { return m_centerY.get(); } |
CSSPrimitiveValue* radius() const { return m_radius.get(); } |
@@ -150,7 +178,8 @@ public: |
void setCenterY(PassRefPtr<CSSPrimitiveValue> centerY) { m_centerY = centerY; } |
void setRadius(PassRefPtr<CSSPrimitiveValue> radius) { m_radius = radius; } |
- virtual Type type() const { return CSSBasicShapeCircleType; } |
+ virtual Type type() const OVERRIDE { return CSSDeprecatedBasicShapeCircleType; } |
+ |
virtual String cssText() const; |
virtual bool equals(const CSSBasicShape&) const; |
@@ -158,7 +187,7 @@ public: |
virtual bool hasVariableReference() const; |
private: |
- CSSBasicShapeCircle() { } |
+ CSSDeprecatedBasicShapeCircle() { } |
RefPtr<CSSPrimitiveValue> m_centerY; |
RefPtr<CSSPrimitiveValue> m_centerX; |