| 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 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 | 178 |
| 179 if (!attributes.hasFr() && current->hasAttribute(SVGNames::frAttr)) | 179 if (!attributes.hasFr() && current->hasAttribute(SVGNames::frAttr)) |
| 180 attributes.setFr(radial->frCurrentValue()); | 180 attributes.setFr(radial->frCurrentValue()); |
| 181 } | 181 } |
| 182 | 182 |
| 183 processedGradients.add(current); | 183 processedGradients.add(current); |
| 184 | 184 |
| 185 // Respect xlink:href, take attributes from referenced element | 185 // Respect xlink:href, take attributes from referenced element |
| 186 Node* refNode = SVGURIReference::targetElementFromIRIString(current->hre
fCurrentValue(), document()); | 186 Node* refNode = SVGURIReference::targetElementFromIRIString(current->hre
fCurrentValue(), document()); |
| 187 if (refNode && (refNode->hasTagName(SVGNames::radialGradientTag) || refN
ode->hasTagName(SVGNames::linearGradientTag))) { | 187 if (refNode && (refNode->hasTagName(SVGNames::radialGradientTag) || refN
ode->hasTagName(SVGNames::linearGradientTag))) { |
| 188 current = static_cast<SVGGradientElement*>(refNode); | 188 current = toSVGGradientElement(refNode); |
| 189 | 189 |
| 190 // Cycle detection | 190 // Cycle detection |
| 191 if (processedGradients.contains(current)) { | 191 if (processedGradients.contains(current)) { |
| 192 current = 0; | 192 current = 0; |
| 193 break; | 193 break; |
| 194 } | 194 } |
| 195 | 195 |
| 196 isRadial = current->hasTagName(SVGNames::radialGradientTag); | 196 isRadial = current->hasTagName(SVGNames::radialGradientTag); |
| 197 } else | 197 } else |
| 198 current = 0; | 198 current = 0; |
| (...skipping 12 matching lines...) Expand all 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 |