| 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 virtual bool hasVariableReference() const = 0; | 61 virtual bool hasVariableReference() const = 0; |
| 62 | 62 |
| 63 public: | 63 public: |
| 64 virtual ~CSSBasicShape() { } | 64 virtual ~CSSBasicShape() { } |
| 65 | 65 |
| 66 protected: | 66 protected: |
| 67 CSSBasicShape() { } | 67 CSSBasicShape() { } |
| 68 RefPtr<CSSPrimitiveValue> m_layoutBox; | 68 RefPtr<CSSPrimitiveValue> m_layoutBox; |
| 69 }; | 69 }; |
| 70 | 70 |
| 71 class CSSBasicShapeRectangle : public CSSBasicShape { | 71 class CSSBasicShapeRectangle FINAL : public CSSBasicShape { |
| 72 public: | 72 public: |
| 73 static PassRefPtr<CSSBasicShapeRectangle> create() { return adoptRef(new CSS
BasicShapeRectangle); } | 73 static PassRefPtr<CSSBasicShapeRectangle> create() { return adoptRef(new CSS
BasicShapeRectangle); } |
| 74 | 74 |
| 75 CSSPrimitiveValue* x() const { return m_x.get(); } | 75 CSSPrimitiveValue* x() const { return m_x.get(); } |
| 76 CSSPrimitiveValue* y() const { return m_y.get(); } | 76 CSSPrimitiveValue* y() const { return m_y.get(); } |
| 77 CSSPrimitiveValue* width() const { return m_width.get(); } | 77 CSSPrimitiveValue* width() const { return m_width.get(); } |
| 78 CSSPrimitiveValue* height() const { return m_height.get(); } | 78 CSSPrimitiveValue* height() const { return m_height.get(); } |
| 79 CSSPrimitiveValue* radiusX() const { return m_radiusX.get(); } | 79 CSSPrimitiveValue* radiusX() const { return m_radiusX.get(); } |
| 80 CSSPrimitiveValue* radiusY() const { return m_radiusY.get(); } | 80 CSSPrimitiveValue* radiusY() const { return m_radiusY.get(); } |
| 81 | 81 |
| 82 void setX(PassRefPtr<CSSPrimitiveValue> x) { m_x = x; } | 82 void setX(PassRefPtr<CSSPrimitiveValue> x) { m_x = x; } |
| 83 void setY(PassRefPtr<CSSPrimitiveValue> y) { m_y = y; } | 83 void setY(PassRefPtr<CSSPrimitiveValue> y) { m_y = y; } |
| 84 void setWidth(PassRefPtr<CSSPrimitiveValue> width) { m_width = width; } | 84 void setWidth(PassRefPtr<CSSPrimitiveValue> width) { m_width = width; } |
| 85 void setHeight(PassRefPtr<CSSPrimitiveValue> height) { m_height = height; } | 85 void setHeight(PassRefPtr<CSSPrimitiveValue> height) { m_height = height; } |
| 86 void setRadiusX(PassRefPtr<CSSPrimitiveValue> radiusX) { m_radiusX = radiusX
; } | 86 void setRadiusX(PassRefPtr<CSSPrimitiveValue> radiusX) { m_radiusX = radiusX
; } |
| 87 void setRadiusY(PassRefPtr<CSSPrimitiveValue> radiusY) { m_radiusY = radiusY
; } | 87 void setRadiusY(PassRefPtr<CSSPrimitiveValue> radiusY) { m_radiusY = radiusY
; } |
| 88 | 88 |
| 89 virtual Type type() const { return CSSBasicShapeRectangleType; } | 89 virtual Type type() const OVERRIDE { return CSSBasicShapeRectangleType; } |
| 90 virtual String cssText() const; | 90 virtual String cssText() const OVERRIDE; |
| 91 virtual bool equals(const CSSBasicShape&) const; | 91 virtual bool equals(const CSSBasicShape&) const OVERRIDE; |
| 92 | 92 |
| 93 virtual String serializeResolvingVariables(const HashMap<AtomicString, Strin
g>&) const; | 93 virtual String serializeResolvingVariables(const HashMap<AtomicString, Strin
g>&) const OVERRIDE; |
| 94 virtual bool hasVariableReference() const; | 94 virtual bool hasVariableReference() const OVERRIDE; |
| 95 | 95 |
| 96 private: | 96 private: |
| 97 CSSBasicShapeRectangle() { } | 97 CSSBasicShapeRectangle() { } |
| 98 | 98 |
| 99 RefPtr<CSSPrimitiveValue> m_y; | 99 RefPtr<CSSPrimitiveValue> m_y; |
| 100 RefPtr<CSSPrimitiveValue> m_x; | 100 RefPtr<CSSPrimitiveValue> m_x; |
| 101 RefPtr<CSSPrimitiveValue> m_width; | 101 RefPtr<CSSPrimitiveValue> m_width; |
| 102 RefPtr<CSSPrimitiveValue> m_height; | 102 RefPtr<CSSPrimitiveValue> m_height; |
| 103 RefPtr<CSSPrimitiveValue> m_radiusX; | 103 RefPtr<CSSPrimitiveValue> m_radiusX; |
| 104 RefPtr<CSSPrimitiveValue> m_radiusY; | 104 RefPtr<CSSPrimitiveValue> m_radiusY; |
| 105 }; | 105 }; |
| 106 | 106 |
| 107 class CSSBasicShapeInsetRectangle : public CSSBasicShape { | 107 class CSSBasicShapeInsetRectangle FINAL : public CSSBasicShape { |
| 108 public: | 108 public: |
| 109 static PassRefPtr<CSSBasicShapeInsetRectangle> create() { return adoptRef(ne
w CSSBasicShapeInsetRectangle); } | 109 static PassRefPtr<CSSBasicShapeInsetRectangle> create() { return adoptRef(ne
w CSSBasicShapeInsetRectangle); } |
| 110 | 110 |
| 111 CSSPrimitiveValue* top() const { return m_top.get(); } | 111 CSSPrimitiveValue* top() const { return m_top.get(); } |
| 112 CSSPrimitiveValue* right() const { return m_right.get(); } | 112 CSSPrimitiveValue* right() const { return m_right.get(); } |
| 113 CSSPrimitiveValue* bottom() const { return m_bottom.get(); } | 113 CSSPrimitiveValue* bottom() const { return m_bottom.get(); } |
| 114 CSSPrimitiveValue* left() const { return m_left.get(); } | 114 CSSPrimitiveValue* left() const { return m_left.get(); } |
| 115 CSSPrimitiveValue* radiusX() const { return m_radiusX.get(); } | 115 CSSPrimitiveValue* radiusX() const { return m_radiusX.get(); } |
| 116 CSSPrimitiveValue* radiusY() const { return m_radiusY.get(); } | 116 CSSPrimitiveValue* radiusY() const { return m_radiusY.get(); } |
| 117 | 117 |
| 118 void setTop(PassRefPtr<CSSPrimitiveValue> top) { m_top = top; } | 118 void setTop(PassRefPtr<CSSPrimitiveValue> top) { m_top = top; } |
| 119 void setRight(PassRefPtr<CSSPrimitiveValue> right) { m_right = right; } | 119 void setRight(PassRefPtr<CSSPrimitiveValue> right) { m_right = right; } |
| 120 void setBottom(PassRefPtr<CSSPrimitiveValue> bottom) { m_bottom = bottom; } | 120 void setBottom(PassRefPtr<CSSPrimitiveValue> bottom) { m_bottom = bottom; } |
| 121 void setLeft(PassRefPtr<CSSPrimitiveValue> left) { m_left = left; } | 121 void setLeft(PassRefPtr<CSSPrimitiveValue> left) { m_left = left; } |
| 122 void setRadiusX(PassRefPtr<CSSPrimitiveValue> radiusX) { m_radiusX = radiusX
; } | 122 void setRadiusX(PassRefPtr<CSSPrimitiveValue> radiusX) { m_radiusX = radiusX
; } |
| 123 void setRadiusY(PassRefPtr<CSSPrimitiveValue> radiusY) { m_radiusY = radiusY
; } | 123 void setRadiusY(PassRefPtr<CSSPrimitiveValue> radiusY) { m_radiusY = radiusY
; } |
| 124 | 124 |
| 125 virtual Type type() const { return CSSBasicShapeInsetRectangleType; } | 125 virtual Type type() const OVERRIDE { return CSSBasicShapeInsetRectangleType;
} |
| 126 virtual String cssText() const; | 126 virtual String cssText() const OVERRIDE; |
| 127 virtual bool equals(const CSSBasicShape&) const; | 127 virtual bool equals(const CSSBasicShape&) const OVERRIDE; |
| 128 | 128 |
| 129 virtual String serializeResolvingVariables(const HashMap<AtomicString, Strin
g>&) const; | 129 virtual String serializeResolvingVariables(const HashMap<AtomicString, Strin
g>&) const OVERRIDE; |
| 130 virtual bool hasVariableReference() const; | 130 virtual bool hasVariableReference() const OVERRIDE; |
| 131 | 131 |
| 132 private: | 132 private: |
| 133 CSSBasicShapeInsetRectangle() { } | 133 CSSBasicShapeInsetRectangle() { } |
| 134 | 134 |
| 135 RefPtr<CSSPrimitiveValue> m_right; | 135 RefPtr<CSSPrimitiveValue> m_right; |
| 136 RefPtr<CSSPrimitiveValue> m_top; | 136 RefPtr<CSSPrimitiveValue> m_top; |
| 137 RefPtr<CSSPrimitiveValue> m_bottom; | 137 RefPtr<CSSPrimitiveValue> m_bottom; |
| 138 RefPtr<CSSPrimitiveValue> m_left; | 138 RefPtr<CSSPrimitiveValue> m_left; |
| 139 RefPtr<CSSPrimitiveValue> m_radiusX; | 139 RefPtr<CSSPrimitiveValue> m_radiusX; |
| 140 RefPtr<CSSPrimitiveValue> m_radiusY; | 140 RefPtr<CSSPrimitiveValue> m_radiusY; |
| 141 }; | 141 }; |
| 142 | 142 |
| 143 class CSSBasicShapeCircle : public CSSBasicShape { | 143 class CSSBasicShapeCircle FINAL : public CSSBasicShape { |
| 144 public: | 144 public: |
| 145 static PassRefPtr<CSSBasicShapeCircle> create() { return adoptRef(new CSSBas
icShapeCircle); } | 145 static PassRefPtr<CSSBasicShapeCircle> create() { return adoptRef(new CSSBas
icShapeCircle); } |
| 146 | 146 |
| 147 virtual Type type() const OVERRIDE { return CSSBasicShapeCircleType; } | 147 virtual Type type() const OVERRIDE { return CSSBasicShapeCircleType; } |
| 148 virtual String cssText() const; | 148 virtual String cssText() const OVERRIDE; |
| 149 virtual bool equals(const CSSBasicShape&) const; | 149 virtual bool equals(const CSSBasicShape&) const OVERRIDE; |
| 150 | 150 |
| 151 CSSPrimitiveValue* centerX() const { return m_centerX.get(); } | 151 CSSPrimitiveValue* centerX() const { return m_centerX.get(); } |
| 152 CSSPrimitiveValue* centerY() const { return m_centerY.get(); } | 152 CSSPrimitiveValue* centerY() const { return m_centerY.get(); } |
| 153 CSSPrimitiveValue* radius() const { return m_radius.get(); } | 153 CSSPrimitiveValue* radius() const { return m_radius.get(); } |
| 154 | 154 |
| 155 void setCenterX(PassRefPtr<CSSPrimitiveValue> centerX) { m_centerX = centerX
; } | 155 void setCenterX(PassRefPtr<CSSPrimitiveValue> centerX) { m_centerX = centerX
; } |
| 156 void setCenterY(PassRefPtr<CSSPrimitiveValue> centerY) { m_centerY = centerY
; } | 156 void setCenterY(PassRefPtr<CSSPrimitiveValue> centerY) { m_centerY = centerY
; } |
| 157 void setRadius(PassRefPtr<CSSPrimitiveValue> radius) { m_radius = radius; } | 157 void setRadius(PassRefPtr<CSSPrimitiveValue> radius) { m_radius = radius; } |
| 158 | 158 |
| 159 virtual String serializeResolvingVariables(const HashMap<AtomicString, Strin
g>&) const; | 159 virtual String serializeResolvingVariables(const HashMap<AtomicString, Strin
g>&) const OVERRIDE; |
| 160 virtual bool hasVariableReference() const; | 160 virtual bool hasVariableReference() const OVERRIDE; |
| 161 | 161 |
| 162 private: | 162 private: |
| 163 CSSBasicShapeCircle() { } | 163 CSSBasicShapeCircle() { } |
| 164 | 164 |
| 165 RefPtr<CSSPrimitiveValue> m_centerX; | 165 RefPtr<CSSPrimitiveValue> m_centerX; |
| 166 RefPtr<CSSPrimitiveValue> m_centerY; | 166 RefPtr<CSSPrimitiveValue> m_centerY; |
| 167 RefPtr<CSSPrimitiveValue> m_radius; | 167 RefPtr<CSSPrimitiveValue> m_radius; |
| 168 }; | 168 }; |
| 169 | 169 |
| 170 class CSSDeprecatedBasicShapeCircle : public CSSBasicShape { | 170 class CSSDeprecatedBasicShapeCircle FINAL : public CSSBasicShape { |
| 171 public: | 171 public: |
| 172 static PassRefPtr<CSSDeprecatedBasicShapeCircle> create() { return adoptRef(
new CSSDeprecatedBasicShapeCircle); } | 172 static PassRefPtr<CSSDeprecatedBasicShapeCircle> create() { return adoptRef(
new CSSDeprecatedBasicShapeCircle); } |
| 173 | 173 |
| 174 CSSPrimitiveValue* centerX() const { return m_centerX.get(); } | 174 CSSPrimitiveValue* centerX() const { return m_centerX.get(); } |
| 175 CSSPrimitiveValue* centerY() const { return m_centerY.get(); } | 175 CSSPrimitiveValue* centerY() const { return m_centerY.get(); } |
| 176 CSSPrimitiveValue* radius() const { return m_radius.get(); } | 176 CSSPrimitiveValue* radius() const { return m_radius.get(); } |
| 177 | 177 |
| 178 void setCenterX(PassRefPtr<CSSPrimitiveValue> centerX) { m_centerX = centerX
; } | 178 void setCenterX(PassRefPtr<CSSPrimitiveValue> centerX) { m_centerX = centerX
; } |
| 179 void setCenterY(PassRefPtr<CSSPrimitiveValue> centerY) { m_centerY = centerY
; } | 179 void setCenterY(PassRefPtr<CSSPrimitiveValue> centerY) { m_centerY = centerY
; } |
| 180 void setRadius(PassRefPtr<CSSPrimitiveValue> radius) { m_radius = radius; } | 180 void setRadius(PassRefPtr<CSSPrimitiveValue> radius) { m_radius = radius; } |
| 181 | 181 |
| 182 virtual Type type() const OVERRIDE { return CSSDeprecatedBasicShapeCircleTyp
e; } | 182 virtual Type type() const OVERRIDE { return CSSDeprecatedBasicShapeCircleTyp
e; } |
| 183 | 183 |
| 184 virtual String cssText() const; | 184 virtual String cssText() const OVERRIDE; |
| 185 virtual bool equals(const CSSBasicShape&) const; | 185 virtual bool equals(const CSSBasicShape&) const OVERRIDE; |
| 186 | 186 |
| 187 virtual String serializeResolvingVariables(const HashMap<AtomicString, Strin
g>&) const; | 187 virtual String serializeResolvingVariables(const HashMap<AtomicString, Strin
g>&) const OVERRIDE; |
| 188 virtual bool hasVariableReference() const; | 188 virtual bool hasVariableReference() const OVERRIDE; |
| 189 | 189 |
| 190 private: | 190 private: |
| 191 CSSDeprecatedBasicShapeCircle() { } | 191 CSSDeprecatedBasicShapeCircle() { } |
| 192 | 192 |
| 193 RefPtr<CSSPrimitiveValue> m_centerY; | 193 RefPtr<CSSPrimitiveValue> m_centerY; |
| 194 RefPtr<CSSPrimitiveValue> m_centerX; | 194 RefPtr<CSSPrimitiveValue> m_centerX; |
| 195 RefPtr<CSSPrimitiveValue> m_radius; | 195 RefPtr<CSSPrimitiveValue> m_radius; |
| 196 }; | 196 }; |
| 197 | 197 |
| 198 class CSSBasicShapeEllipse : public CSSBasicShape { | 198 class CSSBasicShapeEllipse FINAL : public CSSBasicShape { |
| 199 public: | 199 public: |
| 200 static PassRefPtr<CSSBasicShapeEllipse> create() { return adoptRef(new CSSBa
sicShapeEllipse); } | 200 static PassRefPtr<CSSBasicShapeEllipse> create() { return adoptRef(new CSSBa
sicShapeEllipse); } |
| 201 | 201 |
| 202 virtual Type type() const OVERRIDE { return CSSBasicShapeEllipseType; } | 202 virtual Type type() const OVERRIDE { return CSSBasicShapeEllipseType; } |
| 203 virtual String cssText() const; | 203 virtual String cssText() const OVERRIDE; |
| 204 virtual bool equals(const CSSBasicShape&) const; | 204 virtual bool equals(const CSSBasicShape&) const OVERRIDE; |
| 205 | 205 |
| 206 CSSPrimitiveValue* centerX() const { return m_centerX.get(); } | 206 CSSPrimitiveValue* centerX() const { return m_centerX.get(); } |
| 207 CSSPrimitiveValue* centerY() const { return m_centerY.get(); } | 207 CSSPrimitiveValue* centerY() const { return m_centerY.get(); } |
| 208 CSSPrimitiveValue* radiusX() const { return m_radiusX.get(); } | 208 CSSPrimitiveValue* radiusX() const { return m_radiusX.get(); } |
| 209 CSSPrimitiveValue* radiusY() const { return m_radiusY.get(); } | 209 CSSPrimitiveValue* radiusY() const { return m_radiusY.get(); } |
| 210 | 210 |
| 211 void setCenterX(PassRefPtr<CSSPrimitiveValue> centerX) { m_centerX = centerX
; } | 211 void setCenterX(PassRefPtr<CSSPrimitiveValue> centerX) { m_centerX = centerX
; } |
| 212 void setCenterY(PassRefPtr<CSSPrimitiveValue> centerY) { m_centerY = centerY
; } | 212 void setCenterY(PassRefPtr<CSSPrimitiveValue> centerY) { m_centerY = centerY
; } |
| 213 void setRadiusX(PassRefPtr<CSSPrimitiveValue> radiusX) { m_radiusX = radiusX
; } | 213 void setRadiusX(PassRefPtr<CSSPrimitiveValue> radiusX) { m_radiusX = radiusX
; } |
| 214 void setRadiusY(PassRefPtr<CSSPrimitiveValue> radiusY) { m_radiusY = radiusY
; } | 214 void setRadiusY(PassRefPtr<CSSPrimitiveValue> radiusY) { m_radiusY = radiusY
; } |
| 215 | 215 |
| 216 virtual String serializeResolvingVariables(const HashMap<AtomicString, Strin
g>&) const; | 216 virtual String serializeResolvingVariables(const HashMap<AtomicString, Strin
g>&) const OVERRIDE; |
| 217 virtual bool hasVariableReference() const; | 217 virtual bool hasVariableReference() const OVERRIDE; |
| 218 | 218 |
| 219 private: | 219 private: |
| 220 CSSBasicShapeEllipse() { } | 220 CSSBasicShapeEllipse() { } |
| 221 | 221 |
| 222 RefPtr<CSSPrimitiveValue> m_centerX; | 222 RefPtr<CSSPrimitiveValue> m_centerX; |
| 223 RefPtr<CSSPrimitiveValue> m_centerY; | 223 RefPtr<CSSPrimitiveValue> m_centerY; |
| 224 RefPtr<CSSPrimitiveValue> m_radiusX; | 224 RefPtr<CSSPrimitiveValue> m_radiusX; |
| 225 RefPtr<CSSPrimitiveValue> m_radiusY; | 225 RefPtr<CSSPrimitiveValue> m_radiusY; |
| 226 }; | 226 }; |
| 227 | 227 |
| 228 class CSSDeprecatedBasicShapeEllipse : public CSSBasicShape { | 228 class CSSDeprecatedBasicShapeEllipse FINAL : public CSSBasicShape { |
| 229 public: | 229 public: |
| 230 static PassRefPtr<CSSDeprecatedBasicShapeEllipse> create() { return adoptRef
(new CSSDeprecatedBasicShapeEllipse); } | 230 static PassRefPtr<CSSDeprecatedBasicShapeEllipse> create() { return adoptRef
(new CSSDeprecatedBasicShapeEllipse); } |
| 231 | 231 |
| 232 CSSPrimitiveValue* centerX() const { return m_centerX.get(); } | 232 CSSPrimitiveValue* centerX() const { return m_centerX.get(); } |
| 233 CSSPrimitiveValue* centerY() const { return m_centerY.get(); } | 233 CSSPrimitiveValue* centerY() const { return m_centerY.get(); } |
| 234 CSSPrimitiveValue* radiusX() const { return m_radiusX.get(); } | 234 CSSPrimitiveValue* radiusX() const { return m_radiusX.get(); } |
| 235 CSSPrimitiveValue* radiusY() const { return m_radiusY.get(); } | 235 CSSPrimitiveValue* radiusY() const { return m_radiusY.get(); } |
| 236 | 236 |
| 237 void setCenterX(PassRefPtr<CSSPrimitiveValue> centerX) { m_centerX = centerX
; } | 237 void setCenterX(PassRefPtr<CSSPrimitiveValue> centerX) { m_centerX = centerX
; } |
| 238 void setCenterY(PassRefPtr<CSSPrimitiveValue> centerY) { m_centerY = centerY
; } | 238 void setCenterY(PassRefPtr<CSSPrimitiveValue> centerY) { m_centerY = centerY
; } |
| 239 void setRadiusX(PassRefPtr<CSSPrimitiveValue> radiusX) { m_radiusX = radiusX
; } | 239 void setRadiusX(PassRefPtr<CSSPrimitiveValue> radiusX) { m_radiusX = radiusX
; } |
| 240 void setRadiusY(PassRefPtr<CSSPrimitiveValue> radiusY) { m_radiusY = radiusY
; } | 240 void setRadiusY(PassRefPtr<CSSPrimitiveValue> radiusY) { m_radiusY = radiusY
; } |
| 241 | 241 |
| 242 virtual Type type() const { return CSSDeprecatedBasicShapeEllipseType; } | 242 virtual Type type() const OVERRIDE { return CSSDeprecatedBasicShapeEllipseTy
pe; } |
| 243 virtual String cssText() const; | 243 virtual String cssText() const OVERRIDE; |
| 244 virtual bool equals(const CSSBasicShape&) const; | 244 virtual bool equals(const CSSBasicShape&) const OVERRIDE; |
| 245 | 245 |
| 246 virtual String serializeResolvingVariables(const HashMap<AtomicString, Strin
g>&) const; | 246 virtual String serializeResolvingVariables(const HashMap<AtomicString, Strin
g>&) const OVERRIDE; |
| 247 virtual bool hasVariableReference() const; | 247 virtual bool hasVariableReference() const OVERRIDE; |
| 248 | 248 |
| 249 private: | 249 private: |
| 250 CSSDeprecatedBasicShapeEllipse() { } | 250 CSSDeprecatedBasicShapeEllipse() { } |
| 251 | 251 |
| 252 RefPtr<CSSPrimitiveValue> m_centerX; | 252 RefPtr<CSSPrimitiveValue> m_centerX; |
| 253 RefPtr<CSSPrimitiveValue> m_centerY; | 253 RefPtr<CSSPrimitiveValue> m_centerY; |
| 254 RefPtr<CSSPrimitiveValue> m_radiusX; | 254 RefPtr<CSSPrimitiveValue> m_radiusX; |
| 255 RefPtr<CSSPrimitiveValue> m_radiusY; | 255 RefPtr<CSSPrimitiveValue> m_radiusY; |
| 256 }; | 256 }; |
| 257 | 257 |
| 258 class CSSBasicShapePolygon : public CSSBasicShape { | 258 class CSSBasicShapePolygon FINAL : public CSSBasicShape { |
| 259 public: | 259 public: |
| 260 static PassRefPtr<CSSBasicShapePolygon> create() { return adoptRef(new CSSBa
sicShapePolygon); } | 260 static PassRefPtr<CSSBasicShapePolygon> create() { return adoptRef(new CSSBa
sicShapePolygon); } |
| 261 | 261 |
| 262 void appendPoint(PassRefPtr<CSSPrimitiveValue> x, PassRefPtr<CSSPrimitiveVal
ue> y) | 262 void appendPoint(PassRefPtr<CSSPrimitiveValue> x, PassRefPtr<CSSPrimitiveVal
ue> y) |
| 263 { | 263 { |
| 264 m_values.append(x); | 264 m_values.append(x); |
| 265 m_values.append(y); | 265 m_values.append(y); |
| 266 } | 266 } |
| 267 | 267 |
| 268 PassRefPtr<CSSPrimitiveValue> getXAt(unsigned i) const { return m_values.at(
i * 2); } | 268 PassRefPtr<CSSPrimitiveValue> getXAt(unsigned i) const { return m_values.at(
i * 2); } |
| 269 PassRefPtr<CSSPrimitiveValue> getYAt(unsigned i) const { return m_values.at(
i * 2 + 1); } | 269 PassRefPtr<CSSPrimitiveValue> getYAt(unsigned i) const { return m_values.at(
i * 2 + 1); } |
| 270 const Vector<RefPtr<CSSPrimitiveValue> >& values() const { return m_values;
} | 270 const Vector<RefPtr<CSSPrimitiveValue> >& values() const { return m_values;
} |
| 271 | 271 |
| 272 void setWindRule(WindRule w) { m_windRule = w; } | 272 void setWindRule(WindRule w) { m_windRule = w; } |
| 273 WindRule windRule() const { return m_windRule; } | 273 WindRule windRule() const { return m_windRule; } |
| 274 | 274 |
| 275 virtual Type type() const { return CSSBasicShapePolygonType; } | 275 virtual Type type() const OVERRIDE { return CSSBasicShapePolygonType; } |
| 276 virtual String cssText() const; | 276 virtual String cssText() const OVERRIDE; |
| 277 virtual bool equals(const CSSBasicShape&) const; | 277 virtual bool equals(const CSSBasicShape&) const OVERRIDE; |
| 278 virtual String serializeResolvingVariables(const HashMap<AtomicString, Strin
g>&) const; | 278 virtual String serializeResolvingVariables(const HashMap<AtomicString, Strin
g>&) const OVERRIDE; |
| 279 virtual bool hasVariableReference() const; | 279 virtual bool hasVariableReference() const OVERRIDE; |
| 280 | 280 |
| 281 private: | 281 private: |
| 282 CSSBasicShapePolygon() | 282 CSSBasicShapePolygon() |
| 283 : m_windRule(RULE_NONZERO) | 283 : m_windRule(RULE_NONZERO) |
| 284 { | 284 { |
| 285 } | 285 } |
| 286 | 286 |
| 287 Vector<RefPtr<CSSPrimitiveValue> > m_values; | 287 Vector<RefPtr<CSSPrimitiveValue> > m_values; |
| 288 WindRule m_windRule; | 288 WindRule m_windRule; |
| 289 }; | 289 }; |
| 290 | 290 |
| 291 } // namespace WebCore | 291 } // namespace WebCore |
| 292 | 292 |
| 293 #endif // CSSBasicShapes_h | 293 #endif // CSSBasicShapes_h |
| OLD | NEW |