| 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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 | 111 |
| 112 static PassRefPtr<SVGMarkerElement> create(Document&); | 112 static PassRefPtr<SVGMarkerElement> create(Document&); |
| 113 | 113 |
| 114 AffineTransform viewBoxToViewTransform(float viewWidth, float viewHeight) co
nst; | 114 AffineTransform viewBoxToViewTransform(float viewWidth, float viewHeight) co
nst; |
| 115 | 115 |
| 116 void setOrientToAuto(); | 116 void setOrientToAuto(); |
| 117 void setOrientToAngle(const SVGAngle&); | 117 void setOrientToAngle(const SVGAngle&); |
| 118 | 118 |
| 119 static const SVGPropertyInfo* orientTypePropertyInfo(); | 119 static const SVGPropertyInfo* orientTypePropertyInfo(); |
| 120 | 120 |
| 121 SVGAnimatedLength* refX() const { return m_refX.get(); } |
| 122 SVGAnimatedLength* refY() const { return m_refY.get(); } |
| 123 SVGAnimatedLength* markerWidth() const { return m_markerWidth.get(); } |
| 124 SVGAnimatedLength* markerHeight() const { return m_markerHeight.get(); } |
| 125 |
| 121 // Custom 'orientType' property. | 126 // Custom 'orientType' property. |
| 122 static void synchronizeOrientType(SVGElement* contextElement); | 127 static void synchronizeOrientType(SVGElement* contextElement); |
| 123 static PassRefPtr<SVGAnimatedProperty> lookupOrCreateOrientTypeWrapper(SVGEl
ement* contextElement); | 128 static PassRefPtr<SVGAnimatedProperty> lookupOrCreateOrientTypeWrapper(SVGEl
ement* contextElement); |
| 124 SVGMarkerOrientType& orientTypeCurrentValue() const { return m_orientType.va
lue; } | 129 SVGMarkerOrientType& orientTypeCurrentValue() const { return m_orientType.va
lue; } |
| 125 SVGMarkerOrientType& orientTypeBaseValue() const { return m_orientType.value
; } | 130 SVGMarkerOrientType& orientTypeBaseValue() const { return m_orientType.value
; } |
| 126 void setOrientTypeBaseValue(const SVGMarkerOrientType& type) { m_orientType.
value = type; } | 131 void setOrientTypeBaseValue(const SVGMarkerOrientType& type) { m_orientType.
value = type; } |
| 127 PassRefPtr<SVGAnimatedEnumerationPropertyTearOff<SVGMarkerOrientType> > orie
ntType(); | 132 PassRefPtr<SVGAnimatedEnumerationPropertyTearOff<SVGMarkerOrientType> > orie
ntType(); |
| 128 | 133 |
| 129 private: | 134 private: |
| 130 explicit SVGMarkerElement(Document&); | 135 explicit SVGMarkerElement(Document&); |
| 131 | 136 |
| 132 virtual bool needsPendingResourceHandling() const { return false; } | 137 virtual bool needsPendingResourceHandling() const { return false; } |
| 133 | 138 |
| 134 bool isSupportedAttribute(const QualifiedName&); | 139 bool isSupportedAttribute(const QualifiedName&); |
| 135 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR
IDE; | 140 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR
IDE; |
| 136 virtual void svgAttributeChanged(const QualifiedName&); | 141 virtual void svgAttributeChanged(const QualifiedName&); |
| 137 virtual void childrenChanged(bool changedByParser = false, Node* beforeChang
e = 0, Node* afterChange = 0, int childCountDelta = 0); | 142 virtual void childrenChanged(bool changedByParser = false, Node* beforeChang
e = 0, Node* afterChange = 0, int childCountDelta = 0); |
| 138 | 143 |
| 139 virtual RenderObject* createRenderer(RenderStyle*); | 144 virtual RenderObject* createRenderer(RenderStyle*); |
| 140 virtual bool rendererIsNeeded(const RenderStyle&) { return true; } | 145 virtual bool rendererIsNeeded(const RenderStyle&) { return true; } |
| 141 | 146 |
| 142 virtual bool selfHasRelativeLengths() const; | 147 virtual bool selfHasRelativeLengths() const; |
| 143 | 148 |
| 144 void synchronizeOrientType(); | 149 void synchronizeOrientType(); |
| 145 | 150 |
| 146 static const AtomicString& orientTypeIdentifier(); | 151 static const AtomicString& orientTypeIdentifier(); |
| 147 static const AtomicString& orientAngleIdentifier(); | 152 static const AtomicString& orientAngleIdentifier(); |
| 148 | 153 |
| 154 RefPtr<SVGAnimatedLength> m_refX; |
| 155 RefPtr<SVGAnimatedLength> m_refY; |
| 156 RefPtr<SVGAnimatedLength> m_markerWidth; |
| 157 RefPtr<SVGAnimatedLength> m_markerHeight; |
| 149 mutable SVGSynchronizableAnimatedProperty<SVGMarkerOrientType> m_orientType; | 158 mutable SVGSynchronizableAnimatedProperty<SVGMarkerOrientType> m_orientType; |
| 150 | |
| 151 BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGMarkerElement) | 159 BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGMarkerElement) |
| 152 DECLARE_ANIMATED_LENGTH(RefX, refX) | |
| 153 DECLARE_ANIMATED_LENGTH(RefY, refY) | |
| 154 DECLARE_ANIMATED_LENGTH(MarkerWidth, markerWidth) | |
| 155 DECLARE_ANIMATED_LENGTH(MarkerHeight, markerHeight) | |
| 156 DECLARE_ANIMATED_ENUMERATION(MarkerUnits, markerUnits, SVGMarkerUnitsTyp
e) | 160 DECLARE_ANIMATED_ENUMERATION(MarkerUnits, markerUnits, SVGMarkerUnitsTyp
e) |
| 157 DECLARE_ANIMATED_ANGLE(OrientAngle, orientAngle) | 161 DECLARE_ANIMATED_ANGLE(OrientAngle, orientAngle) |
| 158 DECLARE_ANIMATED_RECT(ViewBox, viewBox) | 162 DECLARE_ANIMATED_RECT(ViewBox, viewBox) |
| 159 DECLARE_ANIMATED_PRESERVEASPECTRATIO(PreserveAspectRatio, preserveAspect
Ratio) | 163 DECLARE_ANIMATED_PRESERVEASPECTRATIO(PreserveAspectRatio, preserveAspect
Ratio) |
| 160 END_DECLARE_ANIMATED_PROPERTIES | 164 END_DECLARE_ANIMATED_PROPERTIES |
| 161 }; | 165 }; |
| 162 | 166 |
| 163 DEFINE_NODE_TYPE_CASTS(SVGMarkerElement, hasTagName(SVGNames::markerTag)); | 167 DEFINE_NODE_TYPE_CASTS(SVGMarkerElement, hasTagName(SVGNames::markerTag)); |
| 164 | 168 |
| 165 } | 169 } |
| 166 | 170 |
| 167 #endif | 171 #endif |
| OLD | NEW |