| 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, |
| 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 13 * Library General Public License for more details. | 13 * Library General Public License for more details. |
| 14 * | 14 * |
| 15 * You should have received a copy of the GNU Library General Public License | 15 * You should have received a copy of the GNU Library General Public License |
| 16 * along with this library; see the file COPYING.LIB. If not, write to | 16 * along with this library; see the file COPYING.LIB. If not, write to |
| 17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
| 18 * Boston, MA 02110-1301, USA. | 18 * Boston, MA 02110-1301, USA. |
| 19 */ | 19 */ |
| 20 | 20 |
| 21 #ifndef SVGMarkerElement_h | 21 #ifndef SVGMarkerElement_h |
| 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" | |
| 30 #include "core/svg/SVGAnimatedRect.h" | |
| 31 #include "core/svg/SVGElement.h" | 29 #include "core/svg/SVGElement.h" |
| 32 #include "core/svg/SVGFitToViewBox.h" | 30 #include "core/svg/SVGFitToViewBox.h" |
| 33 | 31 |
| 34 namespace WebCore { | 32 namespace WebCore { |
| 35 | 33 |
| 36 enum SVGMarkerUnitsType { | 34 enum SVGMarkerUnitsType { |
| 37 SVGMarkerUnitsUnknown = 0, | 35 SVGMarkerUnitsUnknown = 0, |
| 38 SVGMarkerUnitsUserSpaceOnUse, | 36 SVGMarkerUnitsUserSpaceOnUse, |
| 39 SVGMarkerUnitsStrokeWidth | 37 SVGMarkerUnitsStrokeWidth |
| 40 }; | 38 }; |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 | 113 |
| 116 void setOrientToAuto(); | 114 void setOrientToAuto(); |
| 117 void setOrientToAngle(const SVGAngle&); | 115 void setOrientToAngle(const SVGAngle&); |
| 118 | 116 |
| 119 static const SVGPropertyInfo* orientTypePropertyInfo(); | 117 static const SVGPropertyInfo* orientTypePropertyInfo(); |
| 120 | 118 |
| 121 SVGAnimatedLength* refX() const { return m_refX.get(); } | 119 SVGAnimatedLength* refX() const { return m_refX.get(); } |
| 122 SVGAnimatedLength* refY() const { return m_refY.get(); } | 120 SVGAnimatedLength* refY() const { return m_refY.get(); } |
| 123 SVGAnimatedLength* markerWidth() const { return m_markerWidth.get(); } | 121 SVGAnimatedLength* markerWidth() const { return m_markerWidth.get(); } |
| 124 SVGAnimatedLength* markerHeight() const { return m_markerHeight.get(); } | 122 SVGAnimatedLength* markerHeight() const { return m_markerHeight.get(); } |
| 125 SVGAnimatedRect* viewBox() const { return m_viewBox.get(); } | |
| 126 | 123 |
| 127 // Custom 'orientType' property. | 124 // Custom 'orientType' property. |
| 128 static void synchronizeOrientType(SVGElement* contextElement); | 125 static void synchronizeOrientType(SVGElement* contextElement); |
| 129 static PassRefPtr<SVGAnimatedProperty> lookupOrCreateOrientTypeWrapper(SVGEl
ement* contextElement); | 126 static PassRefPtr<SVGAnimatedProperty> lookupOrCreateOrientTypeWrapper(SVGEl
ement* contextElement); |
| 130 SVGMarkerOrientType& orientTypeCurrentValue() const { return m_orientType.va
lue; } | 127 SVGMarkerOrientType& orientTypeCurrentValue() const { return m_orientType.va
lue; } |
| 131 SVGMarkerOrientType& orientTypeBaseValue() const { return m_orientType.value
; } | 128 SVGMarkerOrientType& orientTypeBaseValue() const { return m_orientType.value
; } |
| 132 void setOrientTypeBaseValue(const SVGMarkerOrientType& type) { m_orientType.
value = type; } | 129 void setOrientTypeBaseValue(const SVGMarkerOrientType& type) { m_orientType.
value = type; } |
| 133 PassRefPtr<SVGAnimatedEnumerationPropertyTearOff<SVGMarkerOrientType> > orie
ntType(); | 130 PassRefPtr<SVGAnimatedEnumerationPropertyTearOff<SVGMarkerOrientType> > orie
ntType(); |
| 134 SVGAnimatedPreserveAspectRatio* preserveAspectRatio() { return m_preserveAsp
ectRatio.get(); } | |
| 135 | 131 |
| 136 private: | 132 private: |
| 137 explicit SVGMarkerElement(Document&); | 133 explicit SVGMarkerElement(Document&); |
| 138 | 134 |
| 139 virtual bool needsPendingResourceHandling() const OVERRIDE { return false; } | 135 virtual bool needsPendingResourceHandling() const OVERRIDE { return false; } |
| 140 | 136 |
| 141 bool isSupportedAttribute(const QualifiedName&); | 137 bool isSupportedAttribute(const QualifiedName&); |
| 142 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR
IDE; | 138 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR
IDE; |
| 143 virtual void svgAttributeChanged(const QualifiedName&) OVERRIDE; | 139 virtual void svgAttributeChanged(const QualifiedName&) OVERRIDE; |
| 144 virtual void childrenChanged(bool changedByParser = false, Node* beforeChang
e = 0, Node* afterChange = 0, int childCountDelta = 0) OVERRIDE; | 140 virtual void childrenChanged(bool changedByParser = false, Node* beforeChang
e = 0, Node* afterChange = 0, int childCountDelta = 0) OVERRIDE; |
| 145 | 141 |
| 146 virtual RenderObject* createRenderer(RenderStyle*) OVERRIDE; | 142 virtual RenderObject* createRenderer(RenderStyle*) OVERRIDE; |
| 147 virtual bool rendererIsNeeded(const RenderStyle&) OVERRIDE { return true; } | 143 virtual bool rendererIsNeeded(const RenderStyle&) OVERRIDE { return true; } |
| 148 | 144 |
| 149 virtual bool selfHasRelativeLengths() const OVERRIDE; | 145 virtual bool selfHasRelativeLengths() const OVERRIDE; |
| 150 | 146 |
| 151 void synchronizeOrientType(); | 147 void synchronizeOrientType(); |
| 152 | 148 |
| 153 static const AtomicString& orientTypeIdentifier(); | 149 static const AtomicString& orientTypeIdentifier(); |
| 154 static const AtomicString& orientAngleIdentifier(); | 150 static const AtomicString& orientAngleIdentifier(); |
| 155 | 151 |
| 156 RefPtr<SVGAnimatedLength> m_refX; | 152 RefPtr<SVGAnimatedLength> m_refX; |
| 157 RefPtr<SVGAnimatedLength> m_refY; | 153 RefPtr<SVGAnimatedLength> m_refY; |
| 158 RefPtr<SVGAnimatedLength> m_markerWidth; | 154 RefPtr<SVGAnimatedLength> m_markerWidth; |
| 159 RefPtr<SVGAnimatedLength> m_markerHeight; | 155 RefPtr<SVGAnimatedLength> m_markerHeight; |
| 160 RefPtr<SVGAnimatedRect> m_viewBox; | |
| 161 RefPtr<SVGAnimatedPreserveAspectRatio> m_preserveAspectRatio; | |
| 162 mutable SVGSynchronizableAnimatedProperty<SVGMarkerOrientType> m_orientType; | 156 mutable SVGSynchronizableAnimatedProperty<SVGMarkerOrientType> m_orientType; |
| 163 BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGMarkerElement) | 157 BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGMarkerElement) |
| 164 DECLARE_ANIMATED_ENUMERATION(MarkerUnits, markerUnits, SVGMarkerUnitsTyp
e) | 158 DECLARE_ANIMATED_ENUMERATION(MarkerUnits, markerUnits, SVGMarkerUnitsTyp
e) |
| 165 DECLARE_ANIMATED_ANGLE(OrientAngle, orientAngle) | 159 DECLARE_ANIMATED_ANGLE(OrientAngle, orientAngle) |
| 166 END_DECLARE_ANIMATED_PROPERTIES | 160 END_DECLARE_ANIMATED_PROPERTIES |
| 167 }; | 161 }; |
| 168 | 162 |
| 169 DEFINE_NODE_TYPE_CASTS(SVGMarkerElement, hasTagName(SVGNames::markerTag)); | 163 DEFINE_NODE_TYPE_CASTS(SVGMarkerElement, hasTagName(SVGNames::markerTag)); |
| 170 | 164 |
| 171 } | 165 } |
| 172 | 166 |
| 173 #endif | 167 #endif |
| OLD | NEW |