Bug 121127

Summary: Use more Element iterators in SVG code.
Product: WebKit Reporter: Andreas Kling <kling>
Component: SVGAssignee: Andreas Kling <kling>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, d-r, fmalita, gyuyoung.kim, pdr, schenney, zimmermann
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
koivisto: review+
Lander none

Description Andreas Kling 2013-09-10 15:09:28 PDT
Use more Element iterators in SVG code.
Comment 1 Andreas Kling 2013-09-10 15:09:59 PDT
Created attachment 211251 [details]
Patch
Comment 2 Antti Koivisto 2013-09-10 15:17:06 PDT
Comment on attachment 211251 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=211251&action=review

> Source/WebCore/svg/SVGUseElement.cpp:615
> +    for (auto it = childrenOfType<SVGElement>(target).begin(), end = childrenOfType<SVGElement>(target).end(); it != end; ++it) {

I like doing

auto svgChildren = childrenOfType<SVGElement>(this);
for (auto it = svgChildren.begin(), end = svgChildren.end(); it != end; ++it)

Keeps the for statement shorter and avoids repetition.
Comment 3 Andreas Kling 2013-10-10 04:59:55 PDT
Created attachment 213873 [details]
Lander
Comment 4 WebKit Commit Bot 2013-10-10 05:18:23 PDT
Comment on attachment 213873 [details]
Lander

Clearing flags on attachment: 213873

Committed r157216: <http://trac.webkit.org/changeset/157216>
Comment 5 WebKit Commit Bot 2013-10-10 05:18:26 PDT
All reviewed patches have been landed.  Closing bug.