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 30 matching lines...) Expand all Loading... |
41 { | 41 { |
42 // Spec: If the x2 attribute is not specified, the effect is as if a value o
f "100%" were specified. | 42 // Spec: If the x2 attribute is not specified, the effect is as if a value o
f "100%" were specified. |
43 m_x2->setDefaultValueAsString("100%"); | 43 m_x2->setDefaultValueAsString("100%"); |
44 | 44 |
45 addToPropertyMap(m_x1); | 45 addToPropertyMap(m_x1); |
46 addToPropertyMap(m_y1); | 46 addToPropertyMap(m_y1); |
47 addToPropertyMap(m_x2); | 47 addToPropertyMap(m_x2); |
48 addToPropertyMap(m_y2); | 48 addToPropertyMap(m_y2); |
49 } | 49 } |
50 | 50 |
| 51 void SVGLinearGradientElement::trace(Visitor* visitor) |
| 52 { |
| 53 visitor->trace(m_x1); |
| 54 visitor->trace(m_y1); |
| 55 visitor->trace(m_x2); |
| 56 visitor->trace(m_y2); |
| 57 SVGGradientElement::trace(visitor); |
| 58 } |
| 59 |
51 DEFINE_NODE_FACTORY(SVGLinearGradientElement) | 60 DEFINE_NODE_FACTORY(SVGLinearGradientElement) |
52 | 61 |
53 bool SVGLinearGradientElement::isSupportedAttribute(const QualifiedName& attrNam
e) | 62 bool SVGLinearGradientElement::isSupportedAttribute(const QualifiedName& attrNam
e) |
54 { | 63 { |
55 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); | 64 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); |
56 if (supportedAttributes.isEmpty()) { | 65 if (supportedAttributes.isEmpty()) { |
57 supportedAttributes.add(SVGNames::x1Attr); | 66 supportedAttributes.add(SVGNames::x1Attr); |
58 supportedAttributes.add(SVGNames::x2Attr); | 67 supportedAttributes.add(SVGNames::x2Attr); |
59 supportedAttributes.add(SVGNames::y1Attr); | 68 supportedAttributes.add(SVGNames::y1Attr); |
60 supportedAttributes.add(SVGNames::y2Attr); | 69 supportedAttributes.add(SVGNames::y2Attr); |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 | 171 |
163 bool SVGLinearGradientElement::selfHasRelativeLengths() const | 172 bool SVGLinearGradientElement::selfHasRelativeLengths() const |
164 { | 173 { |
165 return m_x1->currentValue()->isRelative() | 174 return m_x1->currentValue()->isRelative() |
166 || m_y1->currentValue()->isRelative() | 175 || m_y1->currentValue()->isRelative() |
167 || m_x2->currentValue()->isRelative() | 176 || m_x2->currentValue()->isRelative() |
168 || m_y2->currentValue()->isRelative(); | 177 || m_y2->currentValue()->isRelative(); |
169 } | 178 } |
170 | 179 |
171 } // namespace blink | 180 } // namespace blink |
OLD | NEW |