| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2006 Nikolas Zimmermann <zimmermann@kde.org> |
| 3 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 3 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
| 4 * | 4 * |
| 5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
| 6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
| 7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
| 8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
| 9 * | 9 * |
| 10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
| (...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 259 | 259 |
| 260 // Apply tile image transformations. | 260 // Apply tile image transformations. |
| 261 if (!tileImageTransform.isIdentity()) | 261 if (!tileImageTransform.isIdentity()) |
| 262 tileImageContext->concatCTM(tileImageTransform); | 262 tileImageContext->concatCTM(tileImageTransform); |
| 263 | 263 |
| 264 AffineTransform contentTransformation; | 264 AffineTransform contentTransformation; |
| 265 if (attributes.patternContentUnits() == SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBO
UNDINGBOX) | 265 if (attributes.patternContentUnits() == SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBO
UNDINGBOX) |
| 266 contentTransformation = tileImageTransform; | 266 contentTransformation = tileImageTransform; |
| 267 | 267 |
| 268 // Draw the content into the ImageBuffer. | 268 // Draw the content into the ImageBuffer. |
| 269 for (Node* node = attributes.patternContentElement()->firstChild(); node; no
de = node->nextSibling()) { | 269 for (Element* element = ElementTraversal::firstWithin(*attributes.patternCon
tentElement()); element; element = ElementTraversal::nextSibling(*element)) { |
| 270 if (!node->isSVGElement() || !node->renderer()) | 270 if (!element->isSVGElement() || !element->renderer()) |
| 271 continue; | 271 continue; |
| 272 if (node->renderer()->needsLayout()) | 272 if (element->renderer()->needsLayout()) |
| 273 return nullptr; | 273 return nullptr; |
| 274 SVGRenderingContext::renderSubtree(tileImage->context(), node->renderer(
), contentTransformation); | 274 SVGRenderingContext::renderSubtree(tileImage->context(), element->render
er(), contentTransformation); |
| 275 } | 275 } |
| 276 | 276 |
| 277 return tileImage.release(); | 277 return tileImage.release(); |
| 278 } | 278 } |
| 279 | 279 |
| 280 } | 280 } |
| OLD | NEW |