| 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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 return false; | 128 return false; |
| 129 | 129 |
| 130 HeapHashSet<Member<SVGGradientElement>> processedGradients; | 130 HeapHashSet<Member<SVGGradientElement>> processedGradients; |
| 131 SVGGradientElement* current = this; | 131 SVGGradientElement* current = this; |
| 132 | 132 |
| 133 setGradientAttributes(current, attributes); | 133 setGradientAttributes(current, attributes); |
| 134 processedGradients.add(current); | 134 processedGradients.add(current); |
| 135 | 135 |
| 136 while (true) { | 136 while (true) { |
| 137 // Respect xlink:href, take attributes from referenced element | 137 // Respect xlink:href, take attributes from referenced element |
| 138 Node* refNode = SVGURIReference::targetElementFromIRIString(current->hre
f()->currentValue()->value(), treeScope()); | 138 Node* refNode = SVGURIReference::targetElementFromIRIString(current->hre
f()->currentValue()->value(), treeScopeOrDocument()); |
| 139 if (refNode && isSVGGradientElement(*refNode)) { | 139 if (refNode && isSVGGradientElement(*refNode)) { |
| 140 current = toSVGGradientElement(refNode); | 140 current = toSVGGradientElement(refNode); |
| 141 | 141 |
| 142 // Cycle detection | 142 // Cycle detection |
| 143 if (processedGradients.contains(current)) | 143 if (processedGradients.contains(current)) |
| 144 return true; | 144 return true; |
| 145 | 145 |
| 146 if (!current->layoutObject()) | 146 if (!current->layoutObject()) |
| 147 return false; | 147 return false; |
| 148 | 148 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 159 | 159 |
| 160 bool SVGLinearGradientElement::selfHasRelativeLengths() const | 160 bool SVGLinearGradientElement::selfHasRelativeLengths() const |
| 161 { | 161 { |
| 162 return m_x1->currentValue()->isRelative() | 162 return m_x1->currentValue()->isRelative() |
| 163 || m_y1->currentValue()->isRelative() | 163 || m_y1->currentValue()->isRelative() |
| 164 || m_x2->currentValue()->isRelative() | 164 || m_x2->currentValue()->isRelative() |
| 165 || m_y2->currentValue()->isRelative(); | 165 || m_y2->currentValue()->isRelative(); |
| 166 } | 166 } |
| 167 | 167 |
| 168 } // namespace blink | 168 } // namespace blink |
| OLD | NEW |