Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(451)

Unified Diff: Source/core/css/CSSBasicShapes.h

Issue 103413006: Implement parsing of the new ellipse shape syntax. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase after CSSParser rename Created 6 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/css/BasicShapeFunctions.cpp ('k') | Source/core/css/CSSBasicShapes.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/CSSBasicShapes.h
diff --git a/Source/core/css/CSSBasicShapes.h b/Source/core/css/CSSBasicShapes.h
index c23021772324f42f3878a14e3b5f8b62ae5f0c26..fef3c0105ae78f9f8bb13c93109ec63b16f54ee6 100644
--- a/Source/core/css/CSSBasicShapes.h
+++ b/Source/core/css/CSSBasicShapes.h
@@ -43,6 +43,7 @@ public:
enum Type {
CSSBasicShapeRectangleType,
CSSDeprecatedBasicShapeCircleType,
+ CSSDeprecatedBasicShapeEllipseType,
CSSBasicShapeEllipseType,
CSSBasicShapePolygonType,
CSSBasicShapeInsetRectangleType,
@@ -198,6 +199,36 @@ 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(); }
+ 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 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(); }
@@ -208,7 +239,7 @@ public:
void setRadiusX(PassRefPtr<CSSPrimitiveValue> radiusX) { m_radiusX = radiusX; }
void setRadiusY(PassRefPtr<CSSPrimitiveValue> radiusY) { m_radiusY = radiusY; }
- virtual Type type() const { return CSSBasicShapeEllipseType; }
+ virtual Type type() const { return CSSDeprecatedBasicShapeEllipseType; }
virtual String cssText() const;
virtual bool equals(const CSSBasicShape&) const;
@@ -216,7 +247,7 @@ public:
virtual bool hasVariableReference() const;
private:
- CSSBasicShapeEllipse() { }
+ CSSDeprecatedBasicShapeEllipse() { }
RefPtr<CSSPrimitiveValue> m_centerX;
RefPtr<CSSPrimitiveValue> m_centerY;
« no previous file with comments | « Source/core/css/BasicShapeFunctions.cpp ('k') | Source/core/css/CSSBasicShapes.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698