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

Unified Diff: third_party/WebKit/Source/core/paint/SVGInlineTextBoxPainter.cpp

Issue 2843483002: Tidy up fragment loops in SVGInlineTextBoxPainter (Closed)
Patch Set: Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/paint/SVGInlineTextBoxPainter.cpp
diff --git a/third_party/WebKit/Source/core/paint/SVGInlineTextBoxPainter.cpp b/third_party/WebKit/Source/core/paint/SVGInlineTextBoxPainter.cpp
index 39b0007fb3c38c99e35bd2fdfb83447791718537..67c02561988d3d17728f4b335b02f5e012a64df2 100644
--- a/third_party/WebKit/Source/core/paint/SVGInlineTextBoxPainter.cpp
+++ b/third_party/WebKit/Source/core/paint/SVGInlineTextBoxPainter.cpp
@@ -167,11 +167,7 @@ void SVGInlineTextBoxPainter::PaintTextFragments(
has_visible_stroke = false;
}
- unsigned text_fragments_size = svg_inline_text_box_.TextFragments().size();
- for (unsigned i = 0; i < text_fragments_size; ++i) {
- const SVGTextFragment& fragment =
- svg_inline_text_box_.TextFragments().at(i);
-
+ for (const SVGTextFragment& fragment : svg_inline_text_box_.TextFragments()) {
GraphicsContextStateSaver state_saver(paint_info.context, false);
if (fragment.IsTransformed()) {
state_saver.Save();
@@ -587,9 +583,7 @@ Vector<SVGTextFragmentWithRange>
SVGInlineTextBoxPainter::CollectFragmentsInRange(int start_position,
int end_position) const {
Vector<SVGTextFragmentWithRange> fragment_info_list;
- const Vector<SVGTextFragment>& fragments =
- svg_inline_text_box_.TextFragments();
- for (const SVGTextFragment& fragment : fragments) {
+ for (const SVGTextFragment& fragment : svg_inline_text_box_.TextFragments()) {
// TODO(ramya.v): If these can't be negative we should use unsigned.
int fragment_start_position = start_position;
int fragment_end_position = end_position;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698