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

Side by Side Diff: Source/core/svg/SVGRadialGradientElement.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/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(const QualifiedName& t agName, Document& document)
55 : SVGGradientElement(tagName, document) 55 : SVGGradientElement(tagName, 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)); 64 ASSERT(hasTagName(SVGNames::radialGradientTag));
65 ScriptWrappable::init(this); 65 ScriptWrappable::init(this);
66 registerAnimatedPropertiesForSVGRadialGradientElement(); 66 registerAnimatedPropertiesForSVGRadialGradientElement();
67 } 67 }
68 68
69 PassRefPtr<SVGRadialGradientElement> SVGRadialGradientElement::create(const Qual ifiedName& tagName, Document* document) 69 PassRefPtr<SVGRadialGradientElement> SVGRadialGradientElement::create(const Qual ifiedName& tagName, Document& document)
70 { 70 {
71 return adoptRef(new SVGRadialGradientElement(tagName, document)); 71 return adoptRef(new SVGRadialGradientElement(tagName, document));
72 } 72 }
73 73
74 bool SVGRadialGradientElement::isSupportedAttribute(const QualifiedName& attrNam e) 74 bool SVGRadialGradientElement::isSupportedAttribute(const QualifiedName& attrNam e)
75 { 75 {
76 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); 76 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ());
77 if (supportedAttributes.isEmpty()) { 77 if (supportedAttributes.isEmpty()) {
78 supportedAttributes.add(SVGNames::cxAttr); 78 supportedAttributes.add(SVGNames::cxAttr);
79 supportedAttributes.add(SVGNames::cyAttr); 79 supportedAttributes.add(SVGNames::cyAttr);
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 { 211 {
212 return cxCurrentValue().isRelative() 212 return cxCurrentValue().isRelative()
213 || cyCurrentValue().isRelative() 213 || cyCurrentValue().isRelative()
214 || rCurrentValue().isRelative() 214 || rCurrentValue().isRelative()
215 || fxCurrentValue().isRelative() 215 || fxCurrentValue().isRelative()
216 || fyCurrentValue().isRelative() 216 || fyCurrentValue().isRelative()
217 || frCurrentValue().isRelative(); 217 || frCurrentValue().isRelative();
218 } 218 }
219 219
220 } 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