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, 2007 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org> |
4 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. | 4 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. |
5 * | 5 * |
6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
10 * | 10 * |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 m_markerHeight->setDefaultValueAsString("3"); | 55 m_markerHeight->setDefaultValueAsString("3"); |
56 | 56 |
57 addToPropertyMap(m_refX); | 57 addToPropertyMap(m_refX); |
58 addToPropertyMap(m_refY); | 58 addToPropertyMap(m_refY); |
59 addToPropertyMap(m_markerWidth); | 59 addToPropertyMap(m_markerWidth); |
60 addToPropertyMap(m_markerHeight); | 60 addToPropertyMap(m_markerHeight); |
61 addToPropertyMap(m_orientAngle); | 61 addToPropertyMap(m_orientAngle); |
62 addToPropertyMap(m_markerUnits); | 62 addToPropertyMap(m_markerUnits); |
63 } | 63 } |
64 | 64 |
| 65 void SVGMarkerElement::trace(Visitor* visitor) |
| 66 { |
| 67 visitor->trace(m_refX); |
| 68 visitor->trace(m_refY); |
| 69 visitor->trace(m_markerWidth); |
| 70 visitor->trace(m_markerHeight); |
| 71 visitor->trace(m_orientAngle); |
| 72 visitor->trace(m_markerUnits); |
| 73 SVGElement::trace(visitor); |
| 74 SVGFitToViewBox::trace(visitor); |
| 75 } |
| 76 |
65 DEFINE_NODE_FACTORY(SVGMarkerElement) | 77 DEFINE_NODE_FACTORY(SVGMarkerElement) |
66 | 78 |
67 AffineTransform SVGMarkerElement::viewBoxToViewTransform(float viewWidth, float
viewHeight) const | 79 AffineTransform SVGMarkerElement::viewBoxToViewTransform(float viewWidth, float
viewHeight) const |
68 { | 80 { |
69 return SVGFitToViewBox::viewBoxToViewTransform(viewBox()->currentValue()->va
lue(), preserveAspectRatio()->currentValue(), viewWidth, viewHeight); | 81 return SVGFitToViewBox::viewBoxToViewTransform(viewBox()->currentValue()->va
lue(), preserveAspectRatio()->currentValue(), viewWidth, viewHeight); |
70 } | 82 } |
71 | 83 |
72 bool SVGMarkerElement::isSupportedAttribute(const QualifiedName& attrName) | 84 bool SVGMarkerElement::isSupportedAttribute(const QualifiedName& attrName) |
73 { | 85 { |
74 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); | 86 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 object->setNeedsLayoutAndFullPaintInvalidation(); | 132 object->setNeedsLayoutAndFullPaintInvalidation(); |
121 } | 133 } |
122 | 134 |
123 void SVGMarkerElement::setOrientToAuto() | 135 void SVGMarkerElement::setOrientToAuto() |
124 { | 136 { |
125 m_orientAngle->baseValue()->orientType()->setEnumValue(SVGMarkerOrientAuto); | 137 m_orientAngle->baseValue()->orientType()->setEnumValue(SVGMarkerOrientAuto); |
126 invalidateSVGAttributes(); | 138 invalidateSVGAttributes(); |
127 svgAttributeChanged(SVGNames::orientAttr); | 139 svgAttributeChanged(SVGNames::orientAttr); |
128 } | 140 } |
129 | 141 |
130 void SVGMarkerElement::setOrientToAngle(PassRefPtr<SVGAngleTearOff> angle) | 142 void SVGMarkerElement::setOrientToAngle(PassRefPtrWillBeRawPtr<SVGAngleTearOff>
angle) |
131 { | 143 { |
132 ASSERT(angle); | 144 ASSERT(angle); |
133 RefPtr<SVGAngle> target = angle->target(); | 145 RefPtrWillBeRawPtr<SVGAngle> target = angle->target(); |
134 m_orientAngle->baseValue()->newValueSpecifiedUnits(target->unitType(), targe
t->valueInSpecifiedUnits()); | 146 m_orientAngle->baseValue()->newValueSpecifiedUnits(target->unitType(), targe
t->valueInSpecifiedUnits()); |
135 invalidateSVGAttributes(); | 147 invalidateSVGAttributes(); |
136 svgAttributeChanged(SVGNames::orientAttr); | 148 svgAttributeChanged(SVGNames::orientAttr); |
137 } | 149 } |
138 | 150 |
139 RenderObject* SVGMarkerElement::createRenderer(RenderStyle*) | 151 RenderObject* SVGMarkerElement::createRenderer(RenderStyle*) |
140 { | 152 { |
141 return new RenderSVGResourceMarker(this); | 153 return new RenderSVGResourceMarker(this); |
142 } | 154 } |
143 | 155 |
144 bool SVGMarkerElement::selfHasRelativeLengths() const | 156 bool SVGMarkerElement::selfHasRelativeLengths() const |
145 { | 157 { |
146 return m_refX->currentValue()->isRelative() | 158 return m_refX->currentValue()->isRelative() |
147 || m_refY->currentValue()->isRelative() | 159 || m_refY->currentValue()->isRelative() |
148 || m_markerWidth->currentValue()->isRelative() | 160 || m_markerWidth->currentValue()->isRelative() |
149 || m_markerHeight->currentValue()->isRelative(); | 161 || m_markerHeight->currentValue()->isRelative(); |
150 } | 162 } |
151 | 163 |
152 } // namespace blink | 164 } // namespace blink |
OLD | NEW |