Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(264)

Side by Side Diff: Source/core/svg/SVGEllipseElement.cpp

Issue 420193011: SVGElement::parseAttribute resolves property via property map (Step 2) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2005, 2006, 2008 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2004, 2005, 2006, 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 * 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 supportedAttributes.add(SVGNames::cxAttr); 52 supportedAttributes.add(SVGNames::cxAttr);
53 supportedAttributes.add(SVGNames::cyAttr); 53 supportedAttributes.add(SVGNames::cyAttr);
54 supportedAttributes.add(SVGNames::rxAttr); 54 supportedAttributes.add(SVGNames::rxAttr);
55 supportedAttributes.add(SVGNames::ryAttr); 55 supportedAttributes.add(SVGNames::ryAttr);
56 } 56 }
57 return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName); 57 return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName);
58 } 58 }
59 59
60 void SVGEllipseElement::parseAttribute(const QualifiedName& name, const AtomicSt ring& value) 60 void SVGEllipseElement::parseAttribute(const QualifiedName& name, const AtomicSt ring& value)
61 { 61 {
62 SVGParsingError parseError = NoError; 62 parseAttributeNew(name, value);
63
64 if (!isSupportedAttribute(name))
65 SVGGeometryElement::parseAttribute(name, value);
66 else if (name == SVGNames::cxAttr)
67 m_cx->setBaseValueAsString(value, parseError);
68 else if (name == SVGNames::cyAttr)
69 m_cy->setBaseValueAsString(value, parseError);
70 else if (name == SVGNames::rxAttr)
71 m_rx->setBaseValueAsString(value, parseError);
72 else if (name == SVGNames::ryAttr)
73 m_ry->setBaseValueAsString(value, parseError);
74 else
75 ASSERT_NOT_REACHED();
76
77 reportAttributeParsingError(parseError, name, value);
78 } 63 }
79 64
80 void SVGEllipseElement::svgAttributeChanged(const QualifiedName& attrName) 65 void SVGEllipseElement::svgAttributeChanged(const QualifiedName& attrName)
81 { 66 {
82 if (!isSupportedAttribute(attrName)) { 67 if (!isSupportedAttribute(attrName)) {
83 SVGGeometryElement::svgAttributeChanged(attrName); 68 SVGGeometryElement::svgAttributeChanged(attrName);
84 return; 69 return;
85 } 70 }
86 71
87 SVGElement::InvalidationGuard invalidationGuard(this); 72 SVGElement::InvalidationGuard invalidationGuard(this);
(...skipping 26 matching lines...) Expand all
114 || m_rx->currentValue()->isRelative() 99 || m_rx->currentValue()->isRelative()
115 || m_ry->currentValue()->isRelative(); 100 || m_ry->currentValue()->isRelative();
116 } 101 }
117 102
118 RenderObject* SVGEllipseElement::createRenderer(RenderStyle*) 103 RenderObject* SVGEllipseElement::createRenderer(RenderStyle*)
119 { 104 {
120 return new RenderSVGEllipse(this); 105 return new RenderSVGEllipse(this);
121 } 106 }
122 107
123 } 108 }
OLDNEW
« no previous file with comments | « Source/core/svg/SVGComponentTransferFunctionElement.cpp ('k') | Source/core/svg/SVGForeignObjectElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698