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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 supportedAttributes.add(SVGNames::refYAttr); | 79 supportedAttributes.add(SVGNames::refYAttr); |
80 supportedAttributes.add(SVGNames::markerWidthAttr); | 80 supportedAttributes.add(SVGNames::markerWidthAttr); |
81 supportedAttributes.add(SVGNames::markerHeightAttr); | 81 supportedAttributes.add(SVGNames::markerHeightAttr); |
82 supportedAttributes.add(SVGNames::orientAttr); | 82 supportedAttributes.add(SVGNames::orientAttr); |
83 } | 83 } |
84 return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName); | 84 return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName); |
85 } | 85 } |
86 | 86 |
87 void SVGMarkerElement::parseAttribute(const QualifiedName& name, const AtomicStr
ing& value) | 87 void SVGMarkerElement::parseAttribute(const QualifiedName& name, const AtomicStr
ing& value) |
88 { | 88 { |
89 SVGParsingError parseError = NoError; | 89 parseAttributeNew(name, value); |
90 | |
91 if (!isSupportedAttribute(name)) | |
92 SVGElement::parseAttribute(name, value); | |
93 else if (name == SVGNames::markerUnitsAttr) | |
94 m_markerUnits->setBaseValueAsString(value, parseError); | |
95 else if (name == SVGNames::refXAttr) | |
96 m_refX->setBaseValueAsString(value, parseError); | |
97 else if (name == SVGNames::refYAttr) | |
98 m_refY->setBaseValueAsString(value, parseError); | |
99 else if (name == SVGNames::markerWidthAttr) | |
100 m_markerWidth->setBaseValueAsString(value, parseError); | |
101 else if (name == SVGNames::markerHeightAttr) | |
102 m_markerHeight->setBaseValueAsString(value, parseError); | |
103 else if (name == SVGNames::orientAttr) | |
104 m_orientAngle->setBaseValueAsString(value, parseError); | |
105 else if (SVGFitToViewBox::parseAttribute(name, value, document(), parseError
)) { | |
106 } else | |
107 ASSERT_NOT_REACHED(); | |
108 | |
109 reportAttributeParsingError(parseError, name, value); | |
110 } | 90 } |
111 | 91 |
112 void SVGMarkerElement::svgAttributeChanged(const QualifiedName& attrName) | 92 void SVGMarkerElement::svgAttributeChanged(const QualifiedName& attrName) |
113 { | 93 { |
114 if (!isSupportedAttribute(attrName)) { | 94 if (!isSupportedAttribute(attrName)) { |
115 SVGElement::svgAttributeChanged(attrName); | 95 SVGElement::svgAttributeChanged(attrName); |
116 return; | 96 return; |
117 } | 97 } |
118 | 98 |
119 SVGElement::InvalidationGuard invalidationGuard(this); | 99 SVGElement::InvalidationGuard invalidationGuard(this); |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 | 143 |
164 bool SVGMarkerElement::selfHasRelativeLengths() const | 144 bool SVGMarkerElement::selfHasRelativeLengths() const |
165 { | 145 { |
166 return m_refX->currentValue()->isRelative() | 146 return m_refX->currentValue()->isRelative() |
167 || m_refY->currentValue()->isRelative() | 147 || m_refY->currentValue()->isRelative() |
168 || m_markerWidth->currentValue()->isRelative() | 148 || m_markerWidth->currentValue()->isRelative() |
169 || m_markerHeight->currentValue()->isRelative(); | 149 || m_markerHeight->currentValue()->isRelative(); |
170 } | 150 } |
171 | 151 |
172 } // namespace blink | 152 } // namespace blink |
OLD | NEW |