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 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 if (refNode && isSVGGradientElement(*refNode)) { | 183 if (refNode && isSVGGradientElement(*refNode)) { |
184 current = toSVGGradientElement(refNode); | 184 current = toSVGGradientElement(refNode); |
185 | 185 |
186 // Cycle detection | 186 // Cycle detection |
187 if (processedGradients.contains(current)) | 187 if (processedGradients.contains(current)) |
188 break; | 188 break; |
189 | 189 |
190 if (!current->renderer()) | 190 if (!current->renderer()) |
191 return false; | 191 return false; |
192 | 192 |
193 setGradientAttributes(current, attributes, current->hasTagName(SVGNa
mes::radialGradientTag)); | 193 setGradientAttributes(current, attributes, isSVGRadialGradientElemen
t(*current)); |
194 processedGradients.add(current); | 194 processedGradients.add(current); |
195 } else { | 195 } else { |
196 break; | 196 break; |
197 } | 197 } |
198 } | 198 } |
199 | 199 |
200 // Handle default values for fx/fy | 200 // Handle default values for fx/fy |
201 if (!attributes.hasFx()) | 201 if (!attributes.hasFx()) |
202 attributes.setFx(attributes.cx()); | 202 attributes.setFx(attributes.cx()); |
203 | 203 |
204 if (!attributes.hasFy()) | 204 if (!attributes.hasFy()) |
205 attributes.setFy(attributes.cy()); | 205 attributes.setFy(attributes.cy()); |
206 | 206 |
207 return true; | 207 return true; |
208 } | 208 } |
209 | 209 |
210 bool SVGRadialGradientElement::selfHasRelativeLengths() const | 210 bool SVGRadialGradientElement::selfHasRelativeLengths() const |
211 { | 211 { |
212 return m_cx->currentValue()->isRelative() | 212 return m_cx->currentValue()->isRelative() |
213 || m_cy->currentValue()->isRelative() | 213 || m_cy->currentValue()->isRelative() |
214 || m_r->currentValue()->isRelative() | 214 || m_r->currentValue()->isRelative() |
215 || m_fx->currentValue()->isRelative() | 215 || m_fx->currentValue()->isRelative() |
216 || m_fy->currentValue()->isRelative() | 216 || m_fy->currentValue()->isRelative() |
217 || m_fr->currentValue()->isRelative(); | 217 || m_fr->currentValue()->isRelative(); |
218 } | 218 } |
219 | 219 |
220 } | 220 } |
OLD | NEW |