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

Side by Side Diff: Source/core/svg/SVGRadialGradientElement.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/SVGRadialGradientElement.h ('k') | Source/core/svg/SVGRectElement.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 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> 4 * Copyright (C) 2008 Eric Seidel <eric@webkit.org>
5 * Copyright (C) 2008 Dirk Schulze <krit@webkit.org> 5 * Copyright (C) 2008 Dirk Schulze <krit@webkit.org>
6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGRadialGradientElement) 44 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGRadialGradientElement)
45 REGISTER_LOCAL_ANIMATED_PROPERTY(cx) 45 REGISTER_LOCAL_ANIMATED_PROPERTY(cx)
46 REGISTER_LOCAL_ANIMATED_PROPERTY(cy) 46 REGISTER_LOCAL_ANIMATED_PROPERTY(cy)
47 REGISTER_LOCAL_ANIMATED_PROPERTY(r) 47 REGISTER_LOCAL_ANIMATED_PROPERTY(r)
48 REGISTER_LOCAL_ANIMATED_PROPERTY(fx) 48 REGISTER_LOCAL_ANIMATED_PROPERTY(fx)
49 REGISTER_LOCAL_ANIMATED_PROPERTY(fy) 49 REGISTER_LOCAL_ANIMATED_PROPERTY(fy)
50 REGISTER_LOCAL_ANIMATED_PROPERTY(fr) 50 REGISTER_LOCAL_ANIMATED_PROPERTY(fr)
51 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGGradientElement) 51 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGGradientElement)
52 END_REGISTER_ANIMATED_PROPERTIES 52 END_REGISTER_ANIMATED_PROPERTIES
53 53
54 inline SVGRadialGradientElement::SVGRadialGradientElement(const QualifiedName& t agName, Document& document) 54 inline SVGRadialGradientElement::SVGRadialGradientElement(Document& document)
55 : SVGGradientElement(tagName, document) 55 : SVGGradientElement(SVGNames::radialGradientTag, document)
56 , m_cx(LengthModeWidth, "50%") 56 , m_cx(LengthModeWidth, "50%")
57 , m_cy(LengthModeHeight, "50%") 57 , m_cy(LengthModeHeight, "50%")
58 , m_r(LengthModeOther, "50%") 58 , m_r(LengthModeOther, "50%")
59 , m_fx(LengthModeWidth) 59 , m_fx(LengthModeWidth)
60 , m_fy(LengthModeHeight) 60 , m_fy(LengthModeHeight)
61 , m_fr(LengthModeOther, "0%") 61 , m_fr(LengthModeOther, "0%")
62 { 62 {
63 // Spec: If the cx/cy/r/fr attribute is not specified, the effect is as if a value of "50%" were specified. 63 // Spec: If the cx/cy/r/fr attribute is not specified, the effect is as if a value of "50%" were specified.
64 ASSERT(hasTagName(SVGNames::radialGradientTag));
65 ScriptWrappable::init(this); 64 ScriptWrappable::init(this);
66 registerAnimatedPropertiesForSVGRadialGradientElement(); 65 registerAnimatedPropertiesForSVGRadialGradientElement();
67 } 66 }
68 67
69 PassRefPtr<SVGRadialGradientElement> SVGRadialGradientElement::create(const Qual ifiedName& tagName, Document& document) 68 PassRefPtr<SVGRadialGradientElement> SVGRadialGradientElement::create(Document& document)
70 { 69 {
71 return adoptRef(new SVGRadialGradientElement(tagName, document)); 70 return adoptRef(new SVGRadialGradientElement(document));
72 } 71 }
73 72
74 bool SVGRadialGradientElement::isSupportedAttribute(const QualifiedName& attrNam e) 73 bool SVGRadialGradientElement::isSupportedAttribute(const QualifiedName& attrNam e)
75 { 74 {
76 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); 75 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ());
77 if (supportedAttributes.isEmpty()) { 76 if (supportedAttributes.isEmpty()) {
78 supportedAttributes.add(SVGNames::cxAttr); 77 supportedAttributes.add(SVGNames::cxAttr);
79 supportedAttributes.add(SVGNames::cyAttr); 78 supportedAttributes.add(SVGNames::cyAttr);
80 supportedAttributes.add(SVGNames::fxAttr); 79 supportedAttributes.add(SVGNames::fxAttr);
81 supportedAttributes.add(SVGNames::fyAttr); 80 supportedAttributes.add(SVGNames::fyAttr);
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 { 211 {
213 return cxCurrentValue().isRelative() 212 return cxCurrentValue().isRelative()
214 || cyCurrentValue().isRelative() 213 || cyCurrentValue().isRelative()
215 || rCurrentValue().isRelative() 214 || rCurrentValue().isRelative()
216 || fxCurrentValue().isRelative() 215 || fxCurrentValue().isRelative()
217 || fyCurrentValue().isRelative() 216 || fyCurrentValue().isRelative()
218 || frCurrentValue().isRelative(); 217 || frCurrentValue().isRelative();
219 } 218 }
220 219
221 } 220 }
OLDNEW
« no previous file with comments | « Source/core/svg/SVGRadialGradientElement.h ('k') | Source/core/svg/SVGRectElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698