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

Unified Diff: third_party/WebKit/Source/core/editing/iterators/TextIteratorTextNodeHandler.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/iterators/TextIteratorTextNodeHandler.cpp
diff --git a/third_party/WebKit/Source/core/editing/iterators/TextIteratorTextNodeHandler.cpp b/third_party/WebKit/Source/core/editing/iterators/TextIteratorTextNodeHandler.cpp
index 10d340b977448843fabff0bbf4e62664593e10a2..e4bf6aeffaf43c2e7c4fd68178a07ba42be38811 100644
--- a/third_party/WebKit/Source/core/editing/iterators/TextIteratorTextNodeHandler.cpp
+++ b/third_party/WebKit/Source/core/editing/iterators/TextIteratorTextNodeHandler.cpp
@@ -175,8 +175,7 @@ void TextIteratorTextNodeHandler::HandleTextNodeInRange(Text* node,
// Used when text boxes are out of order (Hebrew/Arabic w/ embeded LTR text)
if (layout_object->ContainsReversedText()) {
sorted_text_boxes_.clear();
- for (InlineTextBox* text_box = layout_object->FirstTextBox(); text_box;
- text_box = text_box->NextTextBox()) {
+ for (InlineTextBox* text_box : InlineTextBoxesOf(*layout_object)) {
sorted_text_boxes_.push_back(text_box);
}
std::sort(sorted_text_boxes_.begin(), sorted_text_boxes_.end(),

Powered by Google App Engine
This is Rietveld 408576698