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

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

Issue 68643007: Remove QualifiedName argument from SVGElement::create functions (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Patch for landing Created 7 years, 1 month 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/SVGRectElement.h ('k') | Source/core/svg/SVGSVGElement.h » ('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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 REGISTER_LOCAL_ANIMATED_PROPERTY(x) 43 REGISTER_LOCAL_ANIMATED_PROPERTY(x)
44 REGISTER_LOCAL_ANIMATED_PROPERTY(y) 44 REGISTER_LOCAL_ANIMATED_PROPERTY(y)
45 REGISTER_LOCAL_ANIMATED_PROPERTY(width) 45 REGISTER_LOCAL_ANIMATED_PROPERTY(width)
46 REGISTER_LOCAL_ANIMATED_PROPERTY(height) 46 REGISTER_LOCAL_ANIMATED_PROPERTY(height)
47 REGISTER_LOCAL_ANIMATED_PROPERTY(rx) 47 REGISTER_LOCAL_ANIMATED_PROPERTY(rx)
48 REGISTER_LOCAL_ANIMATED_PROPERTY(ry) 48 REGISTER_LOCAL_ANIMATED_PROPERTY(ry)
49 REGISTER_LOCAL_ANIMATED_PROPERTY(externalResourcesRequired) 49 REGISTER_LOCAL_ANIMATED_PROPERTY(externalResourcesRequired)
50 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGGraphicsElement) 50 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGGraphicsElement)
51 END_REGISTER_ANIMATED_PROPERTIES 51 END_REGISTER_ANIMATED_PROPERTIES
52 52
53 inline SVGRectElement::SVGRectElement(const QualifiedName& tagName, Document& do cument) 53 inline SVGRectElement::SVGRectElement(Document& document)
54 : SVGGeometryElement(tagName, document) 54 : SVGGeometryElement(SVGNames::rectTag, document)
55 , m_x(LengthModeWidth) 55 , m_x(LengthModeWidth)
56 , m_y(LengthModeHeight) 56 , m_y(LengthModeHeight)
57 , m_width(LengthModeWidth) 57 , m_width(LengthModeWidth)
58 , m_height(LengthModeHeight) 58 , m_height(LengthModeHeight)
59 , m_rx(LengthModeWidth) 59 , m_rx(LengthModeWidth)
60 , m_ry(LengthModeHeight) 60 , m_ry(LengthModeHeight)
61 { 61 {
62 ASSERT(hasTagName(SVGNames::rectTag));
63 ScriptWrappable::init(this); 62 ScriptWrappable::init(this);
64 registerAnimatedPropertiesForSVGRectElement(); 63 registerAnimatedPropertiesForSVGRectElement();
65 } 64 }
66 65
67 PassRefPtr<SVGRectElement> SVGRectElement::create(const QualifiedName& tagName, Document& document) 66 PassRefPtr<SVGRectElement> SVGRectElement::create(Document& document)
68 { 67 {
69 return adoptRef(new SVGRectElement(tagName, document)); 68 return adoptRef(new SVGRectElement(document));
70 } 69 }
71 70
72 bool SVGRectElement::isSupportedAttribute(const QualifiedName& attrName) 71 bool SVGRectElement::isSupportedAttribute(const QualifiedName& attrName)
73 { 72 {
74 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); 73 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ());
75 if (supportedAttributes.isEmpty()) { 74 if (supportedAttributes.isEmpty()) {
76 SVGLangSpace::addSupportedAttributes(supportedAttributes); 75 SVGLangSpace::addSupportedAttributes(supportedAttributes);
77 SVGExternalResourcesRequired::addSupportedAttributes(supportedAttributes ); 76 SVGExternalResourcesRequired::addSupportedAttributes(supportedAttributes );
78 supportedAttributes.add(SVGNames::xAttr); 77 supportedAttributes.add(SVGNames::xAttr);
79 supportedAttributes.add(SVGNames::yAttr); 78 supportedAttributes.add(SVGNames::yAttr);
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 || rxCurrentValue().isRelative() 156 || rxCurrentValue().isRelative()
158 || ryCurrentValue().isRelative(); 157 || ryCurrentValue().isRelative();
159 } 158 }
160 159
161 RenderObject* SVGRectElement::createRenderer(RenderStyle*) 160 RenderObject* SVGRectElement::createRenderer(RenderStyle*)
162 { 161 {
163 return new RenderSVGRect(this); 162 return new RenderSVGRect(this);
164 } 163 }
165 164
166 } 165 }
OLDNEW
« no previous file with comments | « Source/core/svg/SVGRectElement.h ('k') | Source/core/svg/SVGSVGElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698