Bug 121127 - Use more Element iterators in SVG code.
Summary: Use more Element iterators in SVG code.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Andreas Kling
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-10 15:09 PDT by Andreas Kling
Modified: 2013-10-10 05:18 PDT (History)
7 users (show)

See Also:


Attachments
Patch (14.42 KB, patch)
2013-09-10 15:09 PDT, Andreas Kling
koivisto: review+
Details | Formatted Diff | Diff
Lander (14.51 KB, patch)
2013-10-10 04:59 PDT, Andreas Kling
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.