Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(107)

Side by Side Diff: Source/core/rendering/svg/RenderSVGResourcePattern.cpp

Issue 171663005: Consistently use ElementTraversal API when looking for an Element (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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 }
OLDNEW
« no previous file with comments | « Source/core/rendering/svg/RenderSVGResourceMasker.cpp ('k') | Source/core/svg/SVGAnimateMotionElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698