OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved. | 2 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above | 8 * 1. Redistributions of source code must retain the above |
9 * copyright notice, this list of conditions and the following | 9 * copyright notice, this list of conditions and the following |
10 * disclaimer. | 10 * disclaimer. |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 | 42 |
43 class CSSBasicShapeCircleValue final : public CSSValue { | 43 class CSSBasicShapeCircleValue final : public CSSValue { |
44 public: | 44 public: |
45 static CSSBasicShapeCircleValue* create() { return new CSSBasicShapeCircleVa
lue; } | 45 static CSSBasicShapeCircleValue* create() { return new CSSBasicShapeCircleVa
lue; } |
46 | 46 |
47 String customCSSText() const; | 47 String customCSSText() const; |
48 bool equals(const CSSBasicShapeCircleValue&) const; | 48 bool equals(const CSSBasicShapeCircleValue&) const; |
49 | 49 |
50 CSSValue* centerX() const { return m_centerX.get(); } | 50 CSSValue* centerX() const { return m_centerX.get(); } |
51 CSSValue* centerY() const { return m_centerY.get(); } | 51 CSSValue* centerY() const { return m_centerY.get(); } |
52 CSSPrimitiveValue* radius() const { return m_radius.get(); } | 52 CSSValue* radius() const { return m_radius.get(); } |
53 | 53 |
54 // TODO(sashab): Remove these and pass them as arguments in the constructor. | 54 // TODO(sashab): Remove these and pass them as arguments in the constructor. |
55 void setCenterX(CSSValue* centerX) { m_centerX = centerX; } | 55 void setCenterX(CSSValue* centerX) { m_centerX = centerX; } |
56 void setCenterY(CSSValue* centerY) { m_centerY = centerY; } | 56 void setCenterY(CSSValue* centerY) { m_centerY = centerY; } |
57 void setRadius(CSSPrimitiveValue* radius) { m_radius = radius; } | 57 void setRadius(CSSValue* radius) { m_radius = radius; } |
58 | 58 |
59 DECLARE_TRACE_AFTER_DISPATCH(); | 59 DECLARE_TRACE_AFTER_DISPATCH(); |
60 | 60 |
61 private: | 61 private: |
62 CSSBasicShapeCircleValue() | 62 CSSBasicShapeCircleValue() |
63 : CSSValue(BasicShapeCircleClass) | 63 : CSSValue(BasicShapeCircleClass) |
64 { } | 64 { } |
65 | 65 |
66 Member<CSSValue> m_centerX; | 66 Member<CSSValue> m_centerX; |
67 Member<CSSValue> m_centerY; | 67 Member<CSSValue> m_centerY; |
68 Member<CSSPrimitiveValue> m_radius; | 68 Member<CSSValue> m_radius; |
69 }; | 69 }; |
70 | 70 |
71 class CSSBasicShapeEllipseValue final : public CSSValue { | 71 class CSSBasicShapeEllipseValue final : public CSSValue { |
72 public: | 72 public: |
73 static CSSBasicShapeEllipseValue* create() { return new CSSBasicShapeEllipse
Value; } | 73 static CSSBasicShapeEllipseValue* create() { return new CSSBasicShapeEllipse
Value; } |
74 | 74 |
75 String customCSSText() const; | 75 String customCSSText() const; |
76 bool equals(const CSSBasicShapeEllipseValue&) const; | 76 bool equals(const CSSBasicShapeEllipseValue&) const; |
77 | 77 |
78 CSSValue* centerX() const { return m_centerX.get(); } | 78 CSSValue* centerX() const { return m_centerX.get(); } |
79 CSSValue* centerY() const { return m_centerY.get(); } | 79 CSSValue* centerY() const { return m_centerY.get(); } |
80 CSSPrimitiveValue* radiusX() const { return m_radiusX.get(); } | 80 CSSValue* radiusX() const { return m_radiusX.get(); } |
81 CSSPrimitiveValue* radiusY() const { return m_radiusY.get(); } | 81 CSSValue* radiusY() const { return m_radiusY.get(); } |
82 | 82 |
83 // TODO(sashab): Remove these and pass them as arguments in the constructor. | 83 // TODO(sashab): Remove these and pass them as arguments in the constructor. |
84 void setCenterX(CSSValue* centerX) { m_centerX = centerX; } | 84 void setCenterX(CSSValue* centerX) { m_centerX = centerX; } |
85 void setCenterY(CSSValue* centerY) { m_centerY = centerY; } | 85 void setCenterY(CSSValue* centerY) { m_centerY = centerY; } |
86 void setRadiusX(CSSPrimitiveValue* radiusX) { m_radiusX = radiusX; } | 86 void setRadiusX(CSSValue* radiusX) { m_radiusX = radiusX; } |
87 void setRadiusY(CSSPrimitiveValue* radiusY) { m_radiusY = radiusY; } | 87 void setRadiusY(CSSValue* radiusY) { m_radiusY = radiusY; } |
88 | 88 |
89 DECLARE_TRACE_AFTER_DISPATCH(); | 89 DECLARE_TRACE_AFTER_DISPATCH(); |
90 | 90 |
91 private: | 91 private: |
92 CSSBasicShapeEllipseValue() | 92 CSSBasicShapeEllipseValue() |
93 : CSSValue(BasicShapeEllipseClass) | 93 : CSSValue(BasicShapeEllipseClass) |
94 { } | 94 { } |
95 | 95 |
96 Member<CSSValue> m_centerX; | 96 Member<CSSValue> m_centerX; |
97 Member<CSSValue> m_centerY; | 97 Member<CSSValue> m_centerY; |
98 Member<CSSPrimitiveValue> m_radiusX; | 98 Member<CSSValue> m_radiusX; |
99 Member<CSSPrimitiveValue> m_radiusY; | 99 Member<CSSValue> m_radiusY; |
100 }; | 100 }; |
101 | 101 |
102 class CSSBasicShapePolygonValue final : public CSSValue { | 102 class CSSBasicShapePolygonValue final : public CSSValue { |
103 public: | 103 public: |
104 static CSSBasicShapePolygonValue* create() { return new CSSBasicShapePolygon
Value; } | 104 static CSSBasicShapePolygonValue* create() { return new CSSBasicShapePolygon
Value; } |
105 | 105 |
106 void appendPoint(CSSPrimitiveValue* x, CSSPrimitiveValue* y) | 106 void appendPoint(CSSPrimitiveValue* x, CSSPrimitiveValue* y) |
107 { | 107 { |
108 m_values.append(x); | 108 m_values.append(x); |
109 m_values.append(y); | 109 m_values.append(y); |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 }; | 202 }; |
203 | 203 |
204 DEFINE_CSS_VALUE_TYPE_CASTS(CSSBasicShapeCircleValue, isBasicShapeCircleValue())
; | 204 DEFINE_CSS_VALUE_TYPE_CASTS(CSSBasicShapeCircleValue, isBasicShapeCircleValue())
; |
205 DEFINE_CSS_VALUE_TYPE_CASTS(CSSBasicShapeEllipseValue, isBasicShapeEllipseValue(
)); | 205 DEFINE_CSS_VALUE_TYPE_CASTS(CSSBasicShapeEllipseValue, isBasicShapeEllipseValue(
)); |
206 DEFINE_CSS_VALUE_TYPE_CASTS(CSSBasicShapePolygonValue, isBasicShapePolygonValue(
)); | 206 DEFINE_CSS_VALUE_TYPE_CASTS(CSSBasicShapePolygonValue, isBasicShapePolygonValue(
)); |
207 DEFINE_CSS_VALUE_TYPE_CASTS(CSSBasicShapeInsetValue, isBasicShapeInsetValue()); | 207 DEFINE_CSS_VALUE_TYPE_CASTS(CSSBasicShapeInsetValue, isBasicShapeInsetValue()); |
208 | 208 |
209 } // namespace blink | 209 } // namespace blink |
210 | 210 |
211 #endif // CSSBasicShapeValues_h | 211 #endif // CSSBasicShapeValues_h |
OLD | NEW |