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

Unified Diff: third_party/WebKit/Source/core/editing/SelectionModifierCharacter.cpp

Issue 2939023003: Reduce indentation in TraverseInternalAlgorithm() for {Left,Right}PositionOf() (Closed)
Patch Set: 2017-06-16T18:40:17 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 | « 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/editing/SelectionModifierCharacter.cpp
diff --git a/third_party/WebKit/Source/core/editing/SelectionModifierCharacter.cpp b/third_party/WebKit/Source/core/editing/SelectionModifierCharacter.cpp
index 58aeaf3a224fe46e0afef099397d189217b5f389..8c9f62689ceb2240ad0a0dea5e2899b3ca723cf4 100644
--- a/third_party/WebKit/Source/core/editing/SelectionModifierCharacter.cpp
+++ b/third_party/WebKit/Source/core/editing/SelectionModifierCharacter.cpp
@@ -342,22 +342,22 @@ static PositionTemplate<Strategy> TraverseInternalAlgorithm(
if (!prev_box || prev_box->BidiLevel() < level)
continue;
}
- } else {
- // Trailing edge of a secondary run. Set to the leading edge of
- // the entire run.
- while (true) {
- box = Traversal::FindBackwardBoundaryOfEntireBidiRun(*box, level);
- if (box->BidiLevel() == level)
- break;
- level = box->BidiLevel();
- box = Traversal::FindForwardBoundaryOfEntireBidiRun(*box, level);
- if (box->BidiLevel() == level)
- break;
- level = box->BidiLevel();
- }
- line_layout_item = box->GetLineLayoutItem();
- offset = Traversal::CaretMinOffsetOf(primary_direction, *box);
+ break;
+ }
+ // Trailing edge of a secondary run. Set to the leading edge of
+ // the entire run.
+ while (true) {
+ box = Traversal::FindBackwardBoundaryOfEntireBidiRun(*box, level);
+ if (box->BidiLevel() == level)
+ break;
+ level = box->BidiLevel();
+ box = Traversal::FindForwardBoundaryOfEntireBidiRun(*box, level);
+ if (box->BidiLevel() == level)
+ break;
+ level = box->BidiLevel();
}
+ line_layout_item = box->GetLineLayoutItem();
+ offset = Traversal::CaretMinOffsetOf(primary_direction, *box);
break;
}
« 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