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

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

Issue 23886003: Have HTMLElements / SVGElements constructors take a Document reference in argument (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Another Android build fix Created 7 years, 3 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/SVGCircleElement.h ('k') | Source/core/svg/SVGClipPathElement.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 26 matching lines...) Expand all
37 DEFINE_ANIMATED_BOOLEAN(SVGCircleElement, SVGNames::externalResourcesRequiredAtt r, ExternalResourcesRequired, externalResourcesRequired) 37 DEFINE_ANIMATED_BOOLEAN(SVGCircleElement, SVGNames::externalResourcesRequiredAtt r, ExternalResourcesRequired, externalResourcesRequired)
38 38
39 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGCircleElement) 39 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGCircleElement)
40 REGISTER_LOCAL_ANIMATED_PROPERTY(cx) 40 REGISTER_LOCAL_ANIMATED_PROPERTY(cx)
41 REGISTER_LOCAL_ANIMATED_PROPERTY(cy) 41 REGISTER_LOCAL_ANIMATED_PROPERTY(cy)
42 REGISTER_LOCAL_ANIMATED_PROPERTY(r) 42 REGISTER_LOCAL_ANIMATED_PROPERTY(r)
43 REGISTER_LOCAL_ANIMATED_PROPERTY(externalResourcesRequired) 43 REGISTER_LOCAL_ANIMATED_PROPERTY(externalResourcesRequired)
44 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGGraphicsElement) 44 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGGraphicsElement)
45 END_REGISTER_ANIMATED_PROPERTIES 45 END_REGISTER_ANIMATED_PROPERTIES
46 46
47 inline SVGCircleElement::SVGCircleElement(const QualifiedName& tagName, Document * document) 47 inline SVGCircleElement::SVGCircleElement(const QualifiedName& tagName, Document & document)
48 : SVGGraphicsElement(tagName, document) 48 : SVGGraphicsElement(tagName, document)
49 , m_cx(LengthModeWidth) 49 , m_cx(LengthModeWidth)
50 , m_cy(LengthModeHeight) 50 , m_cy(LengthModeHeight)
51 , m_r(LengthModeOther) 51 , m_r(LengthModeOther)
52 { 52 {
53 ASSERT(hasTagName(SVGNames::circleTag)); 53 ASSERT(hasTagName(SVGNames::circleTag));
54 ScriptWrappable::init(this); 54 ScriptWrappable::init(this);
55 registerAnimatedPropertiesForSVGCircleElement(); 55 registerAnimatedPropertiesForSVGCircleElement();
56 } 56 }
57 57
58 PassRefPtr<SVGCircleElement> SVGCircleElement::create(const QualifiedName& tagNa me, Document* document) 58 PassRefPtr<SVGCircleElement> SVGCircleElement::create(const QualifiedName& tagNa me, Document& document)
59 { 59 {
60 return adoptRef(new SVGCircleElement(tagName, document)); 60 return adoptRef(new SVGCircleElement(tagName, document));
61 } 61 }
62 62
63 bool SVGCircleElement::isSupportedAttribute(const QualifiedName& attrName) 63 bool SVGCircleElement::isSupportedAttribute(const QualifiedName& attrName)
64 { 64 {
65 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); 65 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ());
66 if (supportedAttributes.isEmpty()) { 66 if (supportedAttributes.isEmpty()) {
67 SVGLangSpace::addSupportedAttributes(supportedAttributes); 67 SVGLangSpace::addSupportedAttributes(supportedAttributes);
68 SVGExternalResourcesRequired::addSupportedAttributes(supportedAttributes ); 68 SVGExternalResourcesRequired::addSupportedAttributes(supportedAttributes );
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 || cyCurrentValue().isRelative() 133 || cyCurrentValue().isRelative()
134 || rCurrentValue().isRelative(); 134 || rCurrentValue().isRelative();
135 } 135 }
136 136
137 RenderObject* SVGCircleElement::createRenderer(RenderStyle*) 137 RenderObject* SVGCircleElement::createRenderer(RenderStyle*)
138 { 138 {
139 return new RenderSVGEllipse(this); 139 return new RenderSVGEllipse(this);
140 } 140 }
141 141
142 } 142 }
OLDNEW
« no previous file with comments | « Source/core/svg/SVGCircleElement.h ('k') | Source/core/svg/SVGClipPathElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698