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

Unified Diff: third_party/WebKit/Source/core/layout/line/InlineTextBox.cpp

Issue 2833343002: Change SelectionStartEnd() returning values instead of assigning into ref args. (Closed)
Patch Set: rebase Created 3 years, 8 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/line/InlineTextBox.cpp
diff --git a/third_party/WebKit/Source/core/layout/line/InlineTextBox.cpp b/third_party/WebKit/Source/core/layout/line/InlineTextBox.cpp
index 2399a9e8338c3bad5295016a67d81c8320b1d863..7cd60044d830c3f81a8b9a3a0444c66f0c44d1e7 100644
--- a/third_party/WebKit/Source/core/layout/line/InlineTextBox.cpp
+++ b/third_party/WebKit/Source/core/layout/line/InlineTextBox.cpp
@@ -138,7 +138,7 @@ SelectionState InlineTextBox::GetSelectionState() const {
if (state == SelectionStart || state == SelectionEnd ||
state == SelectionBoth) {
int start_pos, end_pos;
- GetLineLayoutItem().SelectionStartEnd(start_pos, end_pos);
+ std::tie(start_pos, end_pos) = GetLineLayoutItem().SelectionStartEnd();
// The position after a hard line break is considered to be past its end.
// See the corresponding code in InlineTextBox::isSelected.
int last_selectable = Start() + Len() - (IsLineBreak() ? 1 : 0);
@@ -502,7 +502,7 @@ void InlineTextBox::SelectionStartEnd(int& s_pos, int& e_pos) const {
start_pos = 0;
end_pos = GetLineLayoutItem().TextLength();
} else {
- GetLineLayoutItem().SelectionStartEnd(start_pos, end_pos);
+ std::tie(start_pos, end_pos) = GetLineLayoutItem().SelectionStartEnd();
if (GetLineLayoutItem().GetSelectionState() == SelectionStart)
end_pos = GetLineLayoutItem().TextLength();
else if (GetLineLayoutItem().GetSelectionState() == SelectionEnd)
« no previous file with comments | « third_party/WebKit/Source/core/layout/api/LineLayoutText.h ('k') | third_party/WebKit/Source/core/page/TouchAdjustment.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698