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 21 matching lines...) Expand all Loading... |
32 | 32 |
33 #include "core/css/CSSPrimitiveValue.h" | 33 #include "core/css/CSSPrimitiveValue.h" |
34 #include "platform/graphics/WindRule.h" | 34 #include "platform/graphics/WindRule.h" |
35 #include "wtf/RefPtr.h" | 35 #include "wtf/RefPtr.h" |
36 #include "wtf/Vector.h" | 36 #include "wtf/Vector.h" |
37 #include "wtf/text/WTFString.h" | 37 #include "wtf/text/WTFString.h" |
38 | 38 |
39 namespace WebCore { | 39 namespace WebCore { |
40 | 40 |
41 class CSSBasicShape : public RefCountedWillBeGarbageCollected<CSSBasicShape> { | 41 class CSSBasicShape : public RefCountedWillBeGarbageCollected<CSSBasicShape> { |
| 42 DECLARE_EMPTY_VIRTUAL_DESTRUCTOR_WILL_BE_REMOVED(CSSBasicShape); |
42 public: | 43 public: |
43 enum Type { | 44 enum Type { |
44 CSSBasicShapeRectangleType, | 45 CSSBasicShapeRectangleType, |
45 CSSDeprecatedBasicShapeCircleType, | 46 CSSDeprecatedBasicShapeCircleType, |
46 CSSDeprecatedBasicShapeEllipseType, | 47 CSSDeprecatedBasicShapeEllipseType, |
47 CSSBasicShapeEllipseType, | 48 CSSBasicShapeEllipseType, |
48 CSSBasicShapePolygonType, | 49 CSSBasicShapePolygonType, |
49 CSSBasicShapeInsetRectangleType, | 50 CSSBasicShapeInsetRectangleType, |
50 CSSBasicShapeCircleType, | 51 CSSBasicShapeCircleType, |
51 CSSBasicShapeInsetType | 52 CSSBasicShapeInsetType |
52 }; | 53 }; |
53 | 54 |
54 virtual Type type() const = 0; | 55 virtual Type type() const = 0; |
55 virtual String cssText() const = 0; | 56 virtual String cssText() const = 0; |
56 virtual bool equals(const CSSBasicShape&) const = 0; | 57 virtual bool equals(const CSSBasicShape&) const = 0; |
57 | 58 |
58 CSSPrimitiveValue* layoutBox() const { return m_layoutBox.get(); } | 59 CSSPrimitiveValue* layoutBox() const { return m_layoutBox.get(); } |
59 void setLayoutBox(PassRefPtrWillBeRawPtr<CSSPrimitiveValue> layoutBox) { m_l
ayoutBox = layoutBox; } | 60 void setLayoutBox(PassRefPtrWillBeRawPtr<CSSPrimitiveValue> layoutBox) { m_l
ayoutBox = layoutBox; } |
60 | 61 |
61 virtual void trace(Visitor* visitor) { visitor->trace(m_layoutBox); } | 62 virtual void trace(Visitor* visitor) { visitor->trace(m_layoutBox); } |
62 | 63 |
63 public: | |
64 virtual ~CSSBasicShape() { } | |
65 | |
66 protected: | 64 protected: |
67 CSSBasicShape() { } | 65 CSSBasicShape() { } |
68 RefPtrWillBeMember<CSSPrimitiveValue> m_layoutBox; | 66 RefPtrWillBeMember<CSSPrimitiveValue> m_layoutBox; |
69 }; | 67 }; |
70 | 68 |
71 class CSSBasicShapeRectangle FINAL : public CSSBasicShape { | 69 class CSSBasicShapeRectangle FINAL : public CSSBasicShape { |
72 public: | 70 public: |
73 static PassRefPtrWillBeRawPtr<CSSBasicShapeRectangle> create() { return adop
tRefWillBeNoop(new CSSBasicShapeRectangle); } | 71 static PassRefPtrWillBeRawPtr<CSSBasicShapeRectangle> create() { return adop
tRefWillBeNoop(new CSSBasicShapeRectangle); } |
74 | 72 |
75 CSSPrimitiveValue* x() const { return m_x.get(); } | 73 CSSPrimitiveValue* x() const { return m_x.get(); } |
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
346 | 344 |
347 RefPtrWillBeMember<CSSPrimitiveValue> m_topLeftRadius; | 345 RefPtrWillBeMember<CSSPrimitiveValue> m_topLeftRadius; |
348 RefPtrWillBeMember<CSSPrimitiveValue> m_topRightRadius; | 346 RefPtrWillBeMember<CSSPrimitiveValue> m_topRightRadius; |
349 RefPtrWillBeMember<CSSPrimitiveValue> m_bottomRightRadius; | 347 RefPtrWillBeMember<CSSPrimitiveValue> m_bottomRightRadius; |
350 RefPtrWillBeMember<CSSPrimitiveValue> m_bottomLeftRadius; | 348 RefPtrWillBeMember<CSSPrimitiveValue> m_bottomLeftRadius; |
351 }; | 349 }; |
352 | 350 |
353 } // namespace WebCore | 351 } // namespace WebCore |
354 | 352 |
355 #endif // CSSBasicShapes_h | 353 #endif // CSSBasicShapes_h |
OLD | NEW |