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

Side by Side Diff: third_party/WebKit/Source/core/css/CSSBasicShapeValues.h

Issue 2382653006: Split CSSPrimitiveValue into CSSPrimitiveValue and CSSIdentifierValue (Closed)
Patch Set: Make check-webkit-style happy Created 4 years, 2 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 unified diff | Download patch
OLDNEW
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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 public: 44 public:
45 static CSSBasicShapeCircleValue* create() { 45 static CSSBasicShapeCircleValue* create() {
46 return new CSSBasicShapeCircleValue; 46 return new CSSBasicShapeCircleValue;
47 } 47 }
48 48
49 String customCSSText() const; 49 String customCSSText() const;
50 bool equals(const CSSBasicShapeCircleValue&) const; 50 bool equals(const CSSBasicShapeCircleValue&) const;
51 51
52 CSSValue* centerX() const { return m_centerX.get(); } 52 CSSValue* centerX() const { return m_centerX.get(); }
53 CSSValue* centerY() const { return m_centerY.get(); } 53 CSSValue* centerY() const { return m_centerY.get(); }
54 CSSPrimitiveValue* radius() const { return m_radius.get(); } 54 CSSValue* radius() const { return m_radius.get(); }
55 55
56 // TODO(sashab): Remove these and pass them as arguments in the constructor. 56 // TODO(sashab): Remove these and pass them as arguments in the constructor.
57 void setCenterX(CSSValue* centerX) { m_centerX = centerX; } 57 void setCenterX(CSSValue* centerX) { m_centerX = centerX; }
58 void setCenterY(CSSValue* centerY) { m_centerY = centerY; } 58 void setCenterY(CSSValue* centerY) { m_centerY = centerY; }
59 void setRadius(CSSPrimitiveValue* radius) { m_radius = radius; } 59 void setRadius(CSSValue* radius) { m_radius = radius; }
60 60
61 DECLARE_TRACE_AFTER_DISPATCH(); 61 DECLARE_TRACE_AFTER_DISPATCH();
62 62
63 private: 63 private:
64 CSSBasicShapeCircleValue() : CSSValue(BasicShapeCircleClass) {} 64 CSSBasicShapeCircleValue() : CSSValue(BasicShapeCircleClass) {}
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() { 73 static CSSBasicShapeEllipseValue* create() {
74 return new CSSBasicShapeEllipseValue; 74 return new CSSBasicShapeEllipseValue;
75 } 75 }
76 76
77 String customCSSText() const; 77 String customCSSText() const;
78 bool equals(const CSSBasicShapeEllipseValue&) const; 78 bool equals(const CSSBasicShapeEllipseValue&) const;
79 79
80 CSSValue* centerX() const { return m_centerX.get(); } 80 CSSValue* centerX() const { return m_centerX.get(); }
81 CSSValue* centerY() const { return m_centerY.get(); } 81 CSSValue* centerY() const { return m_centerY.get(); }
82 CSSPrimitiveValue* radiusX() const { return m_radiusX.get(); } 82 CSSValue* radiusX() const { return m_radiusX.get(); }
83 CSSPrimitiveValue* radiusY() const { return m_radiusY.get(); } 83 CSSValue* radiusY() const { return m_radiusY.get(); }
84 84
85 // TODO(sashab): Remove these and pass them as arguments in the constructor. 85 // TODO(sashab): Remove these and pass them as arguments in the constructor.
86 void setCenterX(CSSValue* centerX) { m_centerX = centerX; } 86 void setCenterX(CSSValue* centerX) { m_centerX = centerX; }
87 void setCenterY(CSSValue* centerY) { m_centerY = centerY; } 87 void setCenterY(CSSValue* centerY) { m_centerY = centerY; }
88 void setRadiusX(CSSPrimitiveValue* radiusX) { m_radiusX = radiusX; } 88 void setRadiusX(CSSValue* radiusX) { m_radiusX = radiusX; }
89 void setRadiusY(CSSPrimitiveValue* radiusY) { m_radiusY = radiusY; } 89 void setRadiusY(CSSValue* radiusY) { m_radiusY = radiusY; }
90 90
91 DECLARE_TRACE_AFTER_DISPATCH(); 91 DECLARE_TRACE_AFTER_DISPATCH();
92 92
93 private: 93 private:
94 CSSBasicShapeEllipseValue() : CSSValue(BasicShapeEllipseClass) {} 94 CSSBasicShapeEllipseValue() : CSSValue(BasicShapeEllipseClass) {}
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() { 104 static CSSBasicShapePolygonValue* create() {
105 return new CSSBasicShapePolygonValue; 105 return new CSSBasicShapePolygonValue;
106 } 106 }
107 107
108 void appendPoint(CSSPrimitiveValue* x, CSSPrimitiveValue* y) { 108 void appendPoint(CSSPrimitiveValue* x, CSSPrimitiveValue* y) {
109 m_values.append(x); 109 m_values.append(x);
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 isBasicShapeCircleValue()); 212 isBasicShapeCircleValue());
213 DEFINE_CSS_VALUE_TYPE_CASTS(CSSBasicShapeEllipseValue, 213 DEFINE_CSS_VALUE_TYPE_CASTS(CSSBasicShapeEllipseValue,
214 isBasicShapeEllipseValue()); 214 isBasicShapeEllipseValue());
215 DEFINE_CSS_VALUE_TYPE_CASTS(CSSBasicShapePolygonValue, 215 DEFINE_CSS_VALUE_TYPE_CASTS(CSSBasicShapePolygonValue,
216 isBasicShapePolygonValue()); 216 isBasicShapePolygonValue());
217 DEFINE_CSS_VALUE_TYPE_CASTS(CSSBasicShapeInsetValue, isBasicShapeInsetValue()); 217 DEFINE_CSS_VALUE_TYPE_CASTS(CSSBasicShapeInsetValue, isBasicShapeInsetValue());
218 218
219 } // namespace blink 219 } // namespace blink
220 220
221 #endif // CSSBasicShapeValues_h 221 #endif // CSSBasicShapeValues_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/BasicShapeFunctions.cpp ('k') | third_party/WebKit/Source/core/css/CSSBasicShapeValues.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698