OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Nikolas Zimmermann <zimmermann@kde
.org> | 2 * Copyright (C) 2004, 2005, 2006, 2007, 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) Research In Motion Limited 2010. All rights reserved. | 4 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
5 * | 5 * |
6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
10 * | 10 * |
(...skipping 174 matching lines...) Loading... |
185 { | 185 { |
186 HashSet<const SVGPatternElement*> processedPatterns; | 186 HashSet<const SVGPatternElement*> processedPatterns; |
187 const SVGPatternElement* current = this; | 187 const SVGPatternElement* current = this; |
188 | 188 |
189 while (true) { | 189 while (true) { |
190 setPatternAttributes(current, attributes); | 190 setPatternAttributes(current, attributes); |
191 processedPatterns.add(current); | 191 processedPatterns.add(current); |
192 | 192 |
193 // Respect xlink:href, take attributes from referenced element | 193 // Respect xlink:href, take attributes from referenced element |
194 Node* refNode = SVGURIReference::targetElementFromIRIString(current->hre
fString(), document()); | 194 Node* refNode = SVGURIReference::targetElementFromIRIString(current->hre
fString(), document()); |
195 if (refNode && refNode->hasTagName(SVGNames::patternTag)) { | 195 if (isSVGPatternElement(refNode)) { |
196 current = toSVGPatternElement(const_cast<const Node*>(refNode)); | 196 current = toSVGPatternElement(refNode); |
197 | 197 |
198 // Cycle detection | 198 // Cycle detection |
199 if (processedPatterns.contains(current)) | 199 if (processedPatterns.contains(current)) |
200 return; | 200 return; |
201 } else { | 201 } else { |
202 return; | 202 return; |
203 } | 203 } |
204 } | 204 } |
205 | 205 |
206 ASSERT_NOT_REACHED(); | 206 ASSERT_NOT_REACHED(); |
207 } | 207 } |
208 | 208 |
209 AffineTransform SVGPatternElement::localCoordinateSpaceTransform(SVGElement::CTM
Scope) const | 209 AffineTransform SVGPatternElement::localCoordinateSpaceTransform(SVGElement::CTM
Scope) const |
210 { | 210 { |
211 AffineTransform matrix; | 211 AffineTransform matrix; |
212 m_patternTransform->currentValue()->concatenate(matrix); | 212 m_patternTransform->currentValue()->concatenate(matrix); |
213 return matrix; | 213 return matrix; |
214 } | 214 } |
215 | 215 |
216 bool SVGPatternElement::selfHasRelativeLengths() const | 216 bool SVGPatternElement::selfHasRelativeLengths() const |
217 { | 217 { |
218 return m_x->currentValue()->isRelative() | 218 return m_x->currentValue()->isRelative() |
219 || m_y->currentValue()->isRelative() | 219 || m_y->currentValue()->isRelative() |
220 || m_width->currentValue()->isRelative() | 220 || m_width->currentValue()->isRelative() |
221 || m_height->currentValue()->isRelative(); | 221 || m_height->currentValue()->isRelative(); |
222 } | 222 } |
223 | 223 |
224 } | 224 } |
OLD | NEW |