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 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 tileImageContext->concatCTM(tileImageTransform); | 267 tileImageContext->concatCTM(tileImageTransform); |
268 | 268 |
269 AffineTransform contentTransformation; | 269 AffineTransform contentTransformation; |
270 if (attributes.patternContentUnits() == SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBO
UNDINGBOX) | 270 if (attributes.patternContentUnits() == SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBO
UNDINGBOX) |
271 contentTransformation = tileImageTransform; | 271 contentTransformation = tileImageTransform; |
272 | 272 |
273 // Draw the content into the ImageBuffer. | 273 // Draw the content into the ImageBuffer. |
274 for (Node* node = attributes.patternContentElement()->firstChild(); node; no
de = node->nextSibling()) { | 274 for (Node* node = attributes.patternContentElement()->firstChild(); node; no
de = node->nextSibling()) { |
275 if (!node->isSVGElement() || !static_cast<SVGElement*>(node)->isStyled()
|| !node->renderer()) | 275 if (!node->isSVGElement() || !static_cast<SVGElement*>(node)->isStyled()
|| !node->renderer()) |
276 continue; | 276 continue; |
| 277 if (node->renderer()->needsLayout()) |
| 278 return nullptr; |
277 SVGImageBufferTools::renderSubtreeToImageBuffer(tileImage.get(), node->r
enderer(), contentTransformation); | 279 SVGImageBufferTools::renderSubtreeToImageBuffer(tileImage.get(), node->r
enderer(), contentTransformation); |
278 } | 280 } |
279 | 281 |
280 return tileImage.release(); | 282 return tileImage.release(); |
281 } | 283 } |
282 | 284 |
283 } | 285 } |
284 | 286 |
285 #endif | 287 #endif |
OLD | NEW |