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

Unified Diff: third_party/WebKit/Source/core/layout/svg/LayoutSVGInlineText.cpp

Issue 2929763002: Introduce InlineTextBoxesOf() for ease of loop over InlineTextBox of LayoutText (Closed)
Patch Set: 2017-06-08T17:21:30 Revise variable name in ComputeInlineBoxPositionTempalte to make patch size smaller Created 3 years, 6 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 | « third_party/WebKit/Source/core/layout/LayoutText.cpp ('k') | 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/layout/svg/LayoutSVGInlineText.cpp
diff --git a/third_party/WebKit/Source/core/layout/svg/LayoutSVGInlineText.cpp b/third_party/WebKit/Source/core/layout/svg/LayoutSVGInlineText.cpp
index 8d8bed6c8780dbc9907868ea24f60e3339db1ce7..9e2070a8a18704e3d64fe2c18f73d979f64b295a 100644
--- a/third_party/WebKit/Source/core/layout/svg/LayoutSVGInlineText.cpp
+++ b/third_party/WebKit/Source/core/layout/svg/LayoutSVGInlineText.cpp
@@ -125,7 +125,7 @@ LayoutRect LayoutSVGInlineText::LocalCaretRect(InlineBox* box,
FloatRect LayoutSVGInlineText::FloatLinesBoundingBox() const {
FloatRect bounding_box;
- for (InlineTextBox* box = FirstTextBox(); box; box = box->NextTextBox())
+ for (InlineTextBox* box : InlineTextBoxesOf(*this))
bounding_box.Unite(FloatRect(box->FrameRect()));
return bounding_box;
}
@@ -177,7 +177,7 @@ PositionWithAffinity LayoutSVGInlineText::PositionForPoint(
const SVGTextFragment* closest_distance_fragment = nullptr;
SVGInlineTextBox* closest_distance_box = nullptr;
- for (InlineTextBox* box = FirstTextBox(); box; box = box->NextTextBox()) {
+ for (InlineTextBox* box : InlineTextBoxesOf(*this)) {
if (!box->IsSVGInlineTextBox())
continue;
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutText.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698