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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutInline.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
Index: third_party/WebKit/Source/core/layout/LayoutInline.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutInline.cpp b/third_party/WebKit/Source/core/layout/LayoutInline.cpp
index 3c3c8fdd7f0d788628b74b37c19222456a469c47..05c4835aadd3fc8a736c303ceec0f7d67da3215b 100644
--- a/third_party/WebKit/Source/core/layout/LayoutInline.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutInline.cpp
@@ -706,8 +706,7 @@ void LayoutInline::GenerateCulledLineBoxRects(
}
} else if (curr->IsText()) {
LayoutText* curr_text = ToLayoutText(curr);
- for (InlineTextBox* child_text = curr_text->FirstTextBox(); child_text;
- child_text = child_text->NextTextBox()) {
+ for (InlineTextBox* child_text : InlineTextBoxesOf(*curr_text)) {
RootInlineBox& root_box = child_text->Root();
ComputeItemTopHeight(container, root_box, &logical_top,
&logical_height);
@@ -1340,8 +1339,7 @@ void LayoutInline::DirtyLineBoxes(bool full_layout) {
child_line->Root().MarkDirty();
} else if (curr->IsText()) {
LayoutText* curr_text = ToLayoutText(curr);
- for (InlineTextBox* child_text = curr_text->FirstTextBox();
- child_text; child_text = child_text->NextTextBox())
+ for (InlineTextBox* child_text : InlineTextBoxesOf(*curr_text))
child_text->Root().MarkDirty();
}
}
« no previous file with comments | « third_party/WebKit/Source/core/inspector/InspectorCSSAgent.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutText.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698