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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 if (!attributes.hasY2() && linear->y2()->isSpecified()) | 130 if (!attributes.hasY2() && linear->y2()->isSpecified()) |
131 attributes.setY2(linear->y2()->currentValue()); | 131 attributes.setY2(linear->y2()->currentValue()); |
132 } | 132 } |
133 } | 133 } |
134 | 134 |
135 bool SVGLinearGradientElement::collectGradientAttributes(LinearGradientAttribute
s& attributes) | 135 bool SVGLinearGradientElement::collectGradientAttributes(LinearGradientAttribute
s& attributes) |
136 { | 136 { |
137 if (!renderer()) | 137 if (!renderer()) |
138 return false; | 138 return false; |
139 | 139 |
140 WillBeHeapHashSet<RawPtrWillBeMember<SVGGradientElement> > processedGradient
s; | 140 WillBeHeapHashSet<RawPtrWillBeMember<SVGGradientElement>> processedGradients
; |
141 SVGGradientElement* current = this; | 141 SVGGradientElement* current = this; |
142 | 142 |
143 setGradientAttributes(current, attributes); | 143 setGradientAttributes(current, attributes); |
144 processedGradients.add(current); | 144 processedGradients.add(current); |
145 | 145 |
146 while (true) { | 146 while (true) { |
147 // Respect xlink:href, take attributes from referenced element | 147 // Respect xlink:href, take attributes from referenced element |
148 Node* refNode = SVGURIReference::targetElementFromIRIString(current->hre
f()->currentValue()->value(), treeScope()); | 148 Node* refNode = SVGURIReference::targetElementFromIRIString(current->hre
f()->currentValue()->value(), treeScope()); |
149 if (refNode && isSVGGradientElement(*refNode)) { | 149 if (refNode && isSVGGradientElement(*refNode)) { |
150 current = toSVGGradientElement(refNode); | 150 current = toSVGGradientElement(refNode); |
(...skipping 18 matching lines...) Expand all Loading... |
169 | 169 |
170 bool SVGLinearGradientElement::selfHasRelativeLengths() const | 170 bool SVGLinearGradientElement::selfHasRelativeLengths() const |
171 { | 171 { |
172 return m_x1->currentValue()->isRelative() | 172 return m_x1->currentValue()->isRelative() |
173 || m_y1->currentValue()->isRelative() | 173 || m_y1->currentValue()->isRelative() |
174 || m_x2->currentValue()->isRelative() | 174 || m_x2->currentValue()->isRelative() |
175 || m_y2->currentValue()->isRelative(); | 175 || m_y2->currentValue()->isRelative(); |
176 } | 176 } |
177 | 177 |
178 } // namespace blink | 178 } // namespace blink |
OLD | NEW |