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

Unified Diff: third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.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/editing/commands/CompositeEditCommand.cpp
diff --git a/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp b/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp
index 0f2b0884d68b49143006834b6c9c3508ec972fcf..253830d2f5df062bb647f0fa894825b1b86b4ac4 100644
--- a/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp
+++ b/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp
@@ -798,8 +798,7 @@ void CompositeEditCommand::DeleteInsignificantText(Text* text_node,
Vector<InlineTextBox*> sorted_text_boxes;
size_t sorted_text_boxes_position = 0;
- for (InlineTextBox* text_box = text_layout_object->FirstTextBox(); text_box;
- text_box = text_box->NextTextBox())
+ for (InlineTextBox* text_box : InlineTextBoxesOf(*text_layout_object))
sorted_text_boxes.push_back(text_box);
// If there is mixed directionality text, the boxes can be out of order,

Powered by Google App Engine
This is Rietveld 408576698