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

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

Issue 206133005: Remove 3-args |SVGAnimatedLength::baseValueToString()| impl. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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
« no previous file with comments | « Source/core/svg/SVGCursorElement.cpp ('k') | Source/core/svg/SVGFilterElement.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 13 matching lines...) Expand all
24 24
25 #include "core/rendering/svg/RenderSVGEllipse.h" 25 #include "core/rendering/svg/RenderSVGEllipse.h"
26 #include "core/rendering/svg/RenderSVGResource.h" 26 #include "core/rendering/svg/RenderSVGResource.h"
27 #include "core/svg/SVGElementInstance.h" 27 #include "core/svg/SVGElementInstance.h"
28 #include "core/svg/SVGLength.h" 28 #include "core/svg/SVGLength.h"
29 29
30 namespace WebCore { 30 namespace WebCore {
31 31
32 inline SVGEllipseElement::SVGEllipseElement(Document& document) 32 inline SVGEllipseElement::SVGEllipseElement(Document& document)
33 : SVGGeometryElement(SVGNames::ellipseTag, document) 33 : SVGGeometryElement(SVGNames::ellipseTag, document)
34 , m_cx(SVGAnimatedLength::create(this, SVGNames::cxAttr, SVGLength::create(L engthModeWidth))) 34 , m_cx(SVGAnimatedLength::create(this, SVGNames::cxAttr, SVGLength::create(L engthModeWidth), AllowNegativeLengths))
35 , m_cy(SVGAnimatedLength::create(this, SVGNames::cyAttr, SVGLength::create(L engthModeHeight))) 35 , m_cy(SVGAnimatedLength::create(this, SVGNames::cyAttr, SVGLength::create(L engthModeHeight), AllowNegativeLengths))
36 , m_rx(SVGAnimatedLength::create(this, SVGNames::rxAttr, SVGLength::create(L engthModeWidth))) 36 , m_rx(SVGAnimatedLength::create(this, SVGNames::rxAttr, SVGLength::create(L engthModeWidth), ForbidNegativeLengths))
37 , m_ry(SVGAnimatedLength::create(this, SVGNames::ryAttr, SVGLength::create(L engthModeHeight))) 37 , m_ry(SVGAnimatedLength::create(this, SVGNames::ryAttr, SVGLength::create(L engthModeHeight), ForbidNegativeLengths))
38 { 38 {
39 ScriptWrappable::init(this); 39 ScriptWrappable::init(this);
40 40
41 addToPropertyMap(m_cx); 41 addToPropertyMap(m_cx);
42 addToPropertyMap(m_cy); 42 addToPropertyMap(m_cy);
43 addToPropertyMap(m_rx); 43 addToPropertyMap(m_rx);
44 addToPropertyMap(m_ry); 44 addToPropertyMap(m_ry);
45 } 45 }
46 46
47 PassRefPtr<SVGEllipseElement> SVGEllipseElement::create(Document& document) 47 PassRefPtr<SVGEllipseElement> SVGEllipseElement::create(Document& document)
(...skipping 13 matching lines...) Expand all
61 return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName); 61 return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName);
62 } 62 }
63 63
64 void SVGEllipseElement::parseAttribute(const QualifiedName& name, const AtomicSt ring& value) 64 void SVGEllipseElement::parseAttribute(const QualifiedName& name, const AtomicSt ring& value)
65 { 65 {
66 SVGParsingError parseError = NoError; 66 SVGParsingError parseError = NoError;
67 67
68 if (!isSupportedAttribute(name)) 68 if (!isSupportedAttribute(name))
69 SVGGeometryElement::parseAttribute(name, value); 69 SVGGeometryElement::parseAttribute(name, value);
70 else if (name == SVGNames::cxAttr) 70 else if (name == SVGNames::cxAttr)
71 m_cx->setBaseValueAsString(value, AllowNegativeLengths, parseError); 71 m_cx->setBaseValueAsString(value, parseError);
72 else if (name == SVGNames::cyAttr) 72 else if (name == SVGNames::cyAttr)
73 m_cy->setBaseValueAsString(value, AllowNegativeLengths, parseError); 73 m_cy->setBaseValueAsString(value, parseError);
74 else if (name == SVGNames::rxAttr) 74 else if (name == SVGNames::rxAttr)
75 m_rx->setBaseValueAsString(value, ForbidNegativeLengths, parseError); 75 m_rx->setBaseValueAsString(value, parseError);
76 else if (name == SVGNames::ryAttr) 76 else if (name == SVGNames::ryAttr)
77 m_ry->setBaseValueAsString(value, ForbidNegativeLengths, parseError); 77 m_ry->setBaseValueAsString(value, parseError);
78 else 78 else
79 ASSERT_NOT_REACHED(); 79 ASSERT_NOT_REACHED();
80 80
81 reportAttributeParsingError(parseError, name, value); 81 reportAttributeParsingError(parseError, name, value);
82 } 82 }
83 83
84 void SVGEllipseElement::svgAttributeChanged(const QualifiedName& attrName) 84 void SVGEllipseElement::svgAttributeChanged(const QualifiedName& attrName)
85 { 85 {
86 if (!isSupportedAttribute(attrName)) { 86 if (!isSupportedAttribute(attrName)) {
87 SVGGeometryElement::svgAttributeChanged(attrName); 87 SVGGeometryElement::svgAttributeChanged(attrName);
(...skipping 30 matching lines...) Expand all
118 || m_rx->currentValue()->isRelative() 118 || m_rx->currentValue()->isRelative()
119 || m_ry->currentValue()->isRelative(); 119 || m_ry->currentValue()->isRelative();
120 } 120 }
121 121
122 RenderObject* SVGEllipseElement::createRenderer(RenderStyle*) 122 RenderObject* SVGEllipseElement::createRenderer(RenderStyle*)
123 { 123 {
124 return new RenderSVGEllipse(this); 124 return new RenderSVGEllipse(this);
125 } 125 }
126 126
127 } 127 }
OLDNEW
« no previous file with comments | « Source/core/svg/SVGCursorElement.cpp ('k') | Source/core/svg/SVGFilterElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698