Index: Source/core/css/CSSBasicShapes.h |
diff --git a/Source/core/css/CSSBasicShapes.h b/Source/core/css/CSSBasicShapes.h |
index ca8c661fc47c365a52f77f5be9dee7fd230490fe..71fb6ee280e1eda1ed1e7575338659ab6385dab2 100644 |
--- a/Source/core/css/CSSBasicShapes.h |
+++ b/Source/core/css/CSSBasicShapes.h |
@@ -42,10 +42,12 @@ class CSSBasicShape : public RefCounted<CSSBasicShape> { |
public: |
enum Type { |
CSSBasicShapeRectangleType = 1, |
- CSSBasicShapeCircleType = 2, |
- CSSBasicShapeEllipseType = 3, |
- CSSBasicShapePolygonType = 4, |
- CSSBasicShapeInsetRectangleType = 5 |
+ CSSDeprecatedBasicShapeCircleType = 2, |
+ CSSDeprecatedBasicShapeEllipseType = 3, |
+ CSSBasicShapeEllipseType = 4, |
+ CSSBasicShapePolygonType = 5, |
+ CSSBasicShapeInsetRectangleType = 6, |
+ CSSBasicShapeCircleType = 7 |
bemjb
2013/12/07 00:05:32
Should you remove the explicit numbers in this pat
|
}; |
virtual Type type() const = 0; |
@@ -60,6 +62,8 @@ public: |
protected: |
CSSBasicShape() { } |
+ |
+ RefPtr<CSSPrimitiveValue> m_box; |
}; |
class CSSBasicShapeRectangle : public CSSBasicShape { |
@@ -138,6 +142,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(); } |
@@ -146,7 +177,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; |
@@ -154,7 +186,7 @@ public: |
virtual bool hasVariableReference() const; |
private: |
- CSSBasicShapeCircle() { } |
+ CSSDeprecatedBasicShapeCircle() { } |
RefPtr<CSSPrimitiveValue> m_centerY; |
RefPtr<CSSPrimitiveValue> m_centerX; |
@@ -165,6 +197,10 @@ class CSSBasicShapeEllipse : public CSSBasicShape { |
public: |
static PassRefPtr<CSSBasicShapeEllipse> create() { return adoptRef(new CSSBasicShapeEllipse); } |
+ virtual Type type() const OVERRIDE { return CSSBasicShapeEllipseType; } |
+ 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* radiusX() const { return m_radiusX.get(); } |
@@ -175,7 +211,33 @@ public: |
void setRadiusX(PassRefPtr<CSSPrimitiveValue> radiusX) { m_radiusX = radiusX; } |
void setRadiusY(PassRefPtr<CSSPrimitiveValue> radiusY) { m_radiusY = radiusY; } |
- virtual Type type() const { return CSSBasicShapeEllipseType; } |
+ virtual String serializeResolvingVariables(const HashMap<AtomicString, String>&) const; |
+ virtual bool hasVariableReference() const; |
+ |
+private: |
+ CSSBasicShapeEllipse() { } |
+ |
+ RefPtr<CSSPrimitiveValue> m_centerX; |
+ RefPtr<CSSPrimitiveValue> m_centerY; |
+ RefPtr<CSSPrimitiveValue> m_radiusX; |
+ RefPtr<CSSPrimitiveValue> m_radiusY; |
+}; |
+ |
+class CSSDeprecatedBasicShapeEllipse : public CSSBasicShape { |
+public: |
+ static PassRefPtr<CSSDeprecatedBasicShapeEllipse> create() { return adoptRef(new CSSDeprecatedBasicShapeEllipse); } |
+ |
+ CSSPrimitiveValue* centerX() const { return m_centerX.get(); } |
+ CSSPrimitiveValue* centerY() const { return m_centerY.get(); } |
+ CSSPrimitiveValue* radiusX() const { return m_radiusX.get(); } |
+ CSSPrimitiveValue* radiusY() const { return m_radiusY.get(); } |
+ |
+ void setCenterX(PassRefPtr<CSSPrimitiveValue> centerX) { m_centerX = centerX; } |
+ void setCenterY(PassRefPtr<CSSPrimitiveValue> centerY) { m_centerY = centerY; } |
+ void setRadiusX(PassRefPtr<CSSPrimitiveValue> radiusX) { m_radiusX = radiusX; } |
+ void setRadiusY(PassRefPtr<CSSPrimitiveValue> radiusY) { m_radiusY = radiusY; } |
+ |
+ virtual Type type() const { return CSSDeprecatedBasicShapeEllipseType; } |
virtual String cssText() const; |
virtual bool equals(const CSSBasicShape&) const; |
@@ -183,7 +245,7 @@ public: |
virtual bool hasVariableReference() const; |
private: |
- CSSBasicShapeEllipse() { } |
+ CSSDeprecatedBasicShapeEllipse() { } |
RefPtr<CSSPrimitiveValue> m_centerX; |
RefPtr<CSSPrimitiveValue> m_centerY; |