OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Nikolas Zimmermann <zimmermann@kde
.org> | 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Nikolas Zimmermann <zimmermann@kde
.org> |
3 * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org> |
4 * | 4 * |
5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
9 * | 9 * |
10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
(...skipping 11 matching lines...) Expand all Loading... |
22 #define SVGMarkerElement_h | 22 #define SVGMarkerElement_h |
23 | 23 |
24 #include "bindings/v8/ExceptionState.h" | 24 #include "bindings/v8/ExceptionState.h" |
25 #include "core/svg/SVGAnimatedAngle.h" | 25 #include "core/svg/SVGAnimatedAngle.h" |
26 #include "core/svg/SVGAnimatedBoolean.h" | 26 #include "core/svg/SVGAnimatedBoolean.h" |
27 #include "core/svg/SVGAnimatedEnumeration.h" | 27 #include "core/svg/SVGAnimatedEnumeration.h" |
28 #include "core/svg/SVGAnimatedLength.h" | 28 #include "core/svg/SVGAnimatedLength.h" |
29 #include "core/svg/SVGAnimatedPreserveAspectRatio.h" | 29 #include "core/svg/SVGAnimatedPreserveAspectRatio.h" |
30 #include "core/svg/SVGAnimatedRect.h" | 30 #include "core/svg/SVGAnimatedRect.h" |
31 #include "core/svg/SVGElement.h" | 31 #include "core/svg/SVGElement.h" |
32 #include "core/svg/SVGExternalResourcesRequired.h" | |
33 #include "core/svg/SVGFitToViewBox.h" | 32 #include "core/svg/SVGFitToViewBox.h" |
34 | 33 |
35 namespace WebCore { | 34 namespace WebCore { |
36 | 35 |
37 enum SVGMarkerUnitsType { | 36 enum SVGMarkerUnitsType { |
38 SVGMarkerUnitsUnknown = 0, | 37 SVGMarkerUnitsUnknown = 0, |
39 SVGMarkerUnitsUserSpaceOnUse, | 38 SVGMarkerUnitsUserSpaceOnUse, |
40 SVGMarkerUnitsStrokeWidth | 39 SVGMarkerUnitsStrokeWidth |
41 }; | 40 }; |
42 | 41 |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 | 87 |
89 TrackExceptionState es; | 88 TrackExceptionState es; |
90 angle.setValueAsString(value, es); | 89 angle.setValueAsString(value, es); |
91 if (!es.hadException()) | 90 if (!es.hadException()) |
92 return SVGMarkerOrientAngle; | 91 return SVGMarkerOrientAngle; |
93 return SVGMarkerOrientUnknown; | 92 return SVGMarkerOrientUnknown; |
94 } | 93 } |
95 }; | 94 }; |
96 | 95 |
97 class SVGMarkerElement FINAL : public SVGElement, | 96 class SVGMarkerElement FINAL : public SVGElement, |
98 public SVGExternalResourcesRequired, | |
99 public SVGFitToViewBox { | 97 public SVGFitToViewBox { |
100 public: | 98 public: |
101 // Forward declare enumerations in the W3C naming scheme, for IDL generation
. | 99 // Forward declare enumerations in the W3C naming scheme, for IDL generation
. |
102 enum { | 100 enum { |
103 SVG_MARKERUNITS_UNKNOWN = SVGMarkerUnitsUnknown, | 101 SVG_MARKERUNITS_UNKNOWN = SVGMarkerUnitsUnknown, |
104 SVG_MARKERUNITS_USERSPACEONUSE = SVGMarkerUnitsUserSpaceOnUse, | 102 SVG_MARKERUNITS_USERSPACEONUSE = SVGMarkerUnitsUserSpaceOnUse, |
105 SVG_MARKERUNITS_STROKEWIDTH = SVGMarkerUnitsStrokeWidth | 103 SVG_MARKERUNITS_STROKEWIDTH = SVGMarkerUnitsStrokeWidth |
106 }; | 104 }; |
107 | 105 |
108 enum { | 106 enum { |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 static const AtomicString& orientTypeIdentifier(); | 138 static const AtomicString& orientTypeIdentifier(); |
141 static const AtomicString& orientAngleIdentifier(); | 139 static const AtomicString& orientAngleIdentifier(); |
142 | 140 |
143 BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGMarkerElement) | 141 BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGMarkerElement) |
144 DECLARE_ANIMATED_LENGTH(RefX, refX) | 142 DECLARE_ANIMATED_LENGTH(RefX, refX) |
145 DECLARE_ANIMATED_LENGTH(RefY, refY) | 143 DECLARE_ANIMATED_LENGTH(RefY, refY) |
146 DECLARE_ANIMATED_LENGTH(MarkerWidth, markerWidth) | 144 DECLARE_ANIMATED_LENGTH(MarkerWidth, markerWidth) |
147 DECLARE_ANIMATED_LENGTH(MarkerHeight, markerHeight) | 145 DECLARE_ANIMATED_LENGTH(MarkerHeight, markerHeight) |
148 DECLARE_ANIMATED_ENUMERATION(MarkerUnits, markerUnits, SVGMarkerUnitsTyp
e) | 146 DECLARE_ANIMATED_ENUMERATION(MarkerUnits, markerUnits, SVGMarkerUnitsTyp
e) |
149 DECLARE_ANIMATED_ANGLE(OrientAngle, orientAngle) | 147 DECLARE_ANIMATED_ANGLE(OrientAngle, orientAngle) |
150 DECLARE_ANIMATED_BOOLEAN(ExternalResourcesRequired, externalResourcesReq
uired) | |
151 DECLARE_ANIMATED_RECT(ViewBox, viewBox) | 148 DECLARE_ANIMATED_RECT(ViewBox, viewBox) |
152 DECLARE_ANIMATED_PRESERVEASPECTRATIO(PreserveAspectRatio, preserveAspect
Ratio) | 149 DECLARE_ANIMATED_PRESERVEASPECTRATIO(PreserveAspectRatio, preserveAspect
Ratio) |
153 END_DECLARE_ANIMATED_PROPERTIES | 150 END_DECLARE_ANIMATED_PROPERTIES |
154 | 151 |
155 public: | 152 public: |
156 // Custom 'orientType' property. | 153 // Custom 'orientType' property. |
157 static void synchronizeOrientType(SVGElement* contextElement); | 154 static void synchronizeOrientType(SVGElement* contextElement); |
158 static PassRefPtr<SVGAnimatedProperty> lookupOrCreateOrientTypeWrapper(SVGEl
ement* contextElement); | 155 static PassRefPtr<SVGAnimatedProperty> lookupOrCreateOrientTypeWrapper(SVGEl
ement* contextElement); |
159 SVGMarkerOrientType& orientTypeCurrentValue() const { return m_orientType.va
lue; } | 156 SVGMarkerOrientType& orientTypeCurrentValue() const { return m_orientType.va
lue; } |
160 SVGMarkerOrientType& orientTypeBaseValue() const { return m_orientType.value
; } | 157 SVGMarkerOrientType& orientTypeBaseValue() const { return m_orientType.value
; } |
161 void setOrientTypeBaseValue(const SVGMarkerOrientType& type) { m_orientType.
value = type; } | 158 void setOrientTypeBaseValue(const SVGMarkerOrientType& type) { m_orientType.
value = type; } |
162 PassRefPtr<SVGAnimatedEnumerationPropertyTearOff<SVGMarkerOrientType> > orie
ntType(); | 159 PassRefPtr<SVGAnimatedEnumerationPropertyTearOff<SVGMarkerOrientType> > orie
ntType(); |
163 | 160 |
164 private: | 161 private: |
165 mutable SVGSynchronizableAnimatedProperty<SVGMarkerOrientType> m_orientType; | 162 mutable SVGSynchronizableAnimatedProperty<SVGMarkerOrientType> m_orientType; |
166 }; | 163 }; |
167 | 164 |
168 DEFINE_NODE_TYPE_CASTS(SVGMarkerElement, hasTagName(SVGNames::markerTag)); | 165 DEFINE_NODE_TYPE_CASTS(SVGMarkerElement, hasTagName(SVGNames::markerTag)); |
169 | 166 |
170 } | 167 } |
171 | 168 |
172 #endif | 169 #endif |
OLD | NEW |