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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 | 56 |
57 inline SVGLinearGradientElement::SVGLinearGradientElement(const QualifiedName& t
agName, Document* document) | 57 inline SVGLinearGradientElement::SVGLinearGradientElement(const QualifiedName& t
agName, Document* document) |
58 : SVGGradientElement(tagName, document) | 58 : SVGGradientElement(tagName, document) |
59 , m_x1(LengthModeWidth) | 59 , m_x1(LengthModeWidth) |
60 , m_y1(LengthModeHeight) | 60 , m_y1(LengthModeHeight) |
61 , m_x2(LengthModeWidth, "100%") | 61 , m_x2(LengthModeWidth, "100%") |
62 , m_y2(LengthModeHeight) | 62 , m_y2(LengthModeHeight) |
63 { | 63 { |
64 // Spec: If the x2 attribute is not specified, the effect is as if a value o
f "100%" were specified. | 64 // Spec: If the x2 attribute is not specified, the effect is as if a value o
f "100%" were specified. |
65 ASSERT(hasTagName(SVGNames::linearGradientTag)); | 65 ASSERT(hasTagName(SVGNames::linearGradientTag)); |
| 66 ScriptWrappable::init(this); |
66 registerAnimatedPropertiesForSVGLinearGradientElement(); | 67 registerAnimatedPropertiesForSVGLinearGradientElement(); |
67 } | 68 } |
68 | 69 |
69 PassRefPtr<SVGLinearGradientElement> SVGLinearGradientElement::create(const Qual
ifiedName& tagName, Document* document) | 70 PassRefPtr<SVGLinearGradientElement> SVGLinearGradientElement::create(const Qual
ifiedName& tagName, Document* document) |
70 { | 71 { |
71 return adoptRef(new SVGLinearGradientElement(tagName, document)); | 72 return adoptRef(new SVGLinearGradientElement(tagName, document)); |
72 } | 73 } |
73 | 74 |
74 bool SVGLinearGradientElement::isSupportedAttribute(const QualifiedName& attrNam
e) | 75 bool SVGLinearGradientElement::isSupportedAttribute(const QualifiedName& attrNam
e) |
75 { | 76 { |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 { | 194 { |
194 return x1().isRelative() | 195 return x1().isRelative() |
195 || y1().isRelative() | 196 || y1().isRelative() |
196 || x2().isRelative() | 197 || x2().isRelative() |
197 || y2().isRelative(); | 198 || y2().isRelative(); |
198 } | 199 } |
199 | 200 |
200 } | 201 } |
201 | 202 |
202 #endif // ENABLE(SVG) | 203 #endif // ENABLE(SVG) |
OLD | NEW |