OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |