| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2008 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005, 2008 Nikolas Zimmermann <zimmermann@kde.org> |
| 3 * Copyright (C) 2004, 2005, 2007 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2007 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 17 matching lines...) Expand all Loading... |
| 28 | 28 |
| 29 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGViewElement) | 29 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGViewElement) |
| 30 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGElement) | 30 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGElement) |
| 31 END_REGISTER_ANIMATED_PROPERTIES | 31 END_REGISTER_ANIMATED_PROPERTIES |
| 32 | 32 |
| 33 inline SVGViewElement::SVGViewElement(Document& document) | 33 inline SVGViewElement::SVGViewElement(Document& document) |
| 34 : SVGElement(SVGNames::viewTag, document) | 34 : SVGElement(SVGNames::viewTag, document) |
| 35 , m_viewBox(SVGAnimatedRect::create(this, SVGNames::viewBoxAttr)) | 35 , m_viewBox(SVGAnimatedRect::create(this, SVGNames::viewBoxAttr)) |
| 36 , m_preserveAspectRatio(SVGAnimatedPreserveAspectRatio::create(this, SVGName
s::preserveAspectRatioAttr, SVGPreserveAspectRatio::create())) | 36 , m_preserveAspectRatio(SVGAnimatedPreserveAspectRatio::create(this, SVGName
s::preserveAspectRatioAttr, SVGPreserveAspectRatio::create())) |
| 37 , m_viewTarget(SVGStaticStringList::create(this, SVGNames::viewTargetAttr)) | 37 , m_viewTarget(SVGStaticStringList::create(this, SVGNames::viewTargetAttr)) |
| 38 , m_zoomAndPan(SVGZoomAndPanMagnify) | |
| 39 { | 38 { |
| 40 ScriptWrappable::init(this); | 39 ScriptWrappable::init(this); |
| 41 | 40 |
| 42 addToPropertyMap(m_viewBox); | 41 addToPropertyMap(m_viewBox); |
| 43 addToPropertyMap(m_preserveAspectRatio); | 42 addToPropertyMap(m_preserveAspectRatio); |
| 44 addToPropertyMap(m_viewTarget); | 43 addToPropertyMap(m_viewTarget); |
| 45 registerAnimatedPropertiesForSVGViewElement(); | 44 registerAnimatedPropertiesForSVGViewElement(); |
| 46 } | 45 } |
| 47 | 46 |
| 48 PassRefPtr<SVGViewElement> SVGViewElement::create(Document& document) | 47 PassRefPtr<SVGViewElement> SVGViewElement::create(Document& document) |
| (...skipping 14 matching lines...) Expand all Loading... |
| 63 | 62 |
| 64 void SVGViewElement::parseAttribute(const QualifiedName& name, const AtomicStrin
g& value) | 63 void SVGViewElement::parseAttribute(const QualifiedName& name, const AtomicStrin
g& value) |
| 65 { | 64 { |
| 66 if (!isSupportedAttribute(name)) { | 65 if (!isSupportedAttribute(name)) { |
| 67 SVGElement::parseAttribute(name, value); | 66 SVGElement::parseAttribute(name, value); |
| 68 return; | 67 return; |
| 69 } | 68 } |
| 70 | 69 |
| 71 if (SVGFitToViewBox::parseAttribute(this, name, value)) | 70 if (SVGFitToViewBox::parseAttribute(this, name, value)) |
| 72 return; | 71 return; |
| 73 if (SVGZoomAndPan::parseAttribute(this, name, value)) | 72 if (SVGZoomAndPan::parseAttribute(name, value)) |
| 74 return; | 73 return; |
| 75 | 74 |
| 76 SVGParsingError parseError = NoError; | 75 SVGParsingError parseError = NoError; |
| 77 | 76 |
| 78 if (name == SVGNames::viewTargetAttr) | 77 if (name == SVGNames::viewTargetAttr) |
| 79 m_viewTarget->setBaseValueAsString(value, parseError); | 78 m_viewTarget->setBaseValueAsString(value, parseError); |
| 80 else | 79 else |
| 81 ASSERT_NOT_REACHED(); | 80 ASSERT_NOT_REACHED(); |
| 82 | 81 |
| 83 reportAttributeParsingError(parseError, name, value); | 82 reportAttributeParsingError(parseError, name, value); |
| 84 } | 83 } |
| 85 | 84 |
| 86 } | 85 } |
| OLD | NEW |