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

Unified Diff: third_party/WebKit/Source/core/editing/LayoutSelection.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/editing/LayoutSelection.cpp
diff --git a/third_party/WebKit/Source/core/editing/LayoutSelection.cpp b/third_party/WebKit/Source/core/editing/LayoutSelection.cpp
index 718f97acdc5a45c50f7af4ec522ec518368d968b..1e65111e8c7b173dd1b3d5b57988eb99bcf579f6 100644
--- a/third_party/WebKit/Source/core/editing/LayoutSelection.cpp
+++ b/third_party/WebKit/Source/core/editing/LayoutSelection.cpp
@@ -306,10 +306,9 @@ void LayoutSelection::SetSelection(
i->key->SetShouldInvalidateSelection();
}
-void LayoutSelection::SelectionStartEnd(int& start_pos, int& end_pos) {
+std::pair<int, int> LayoutSelection::SelectionStartEnd() {
Commit();
- start_pos = selection_start_pos_;
- end_pos = selection_end_pos_;
+ return std::make_pair(selection_start_pos_, selection_end_pos_);
}
void LayoutSelection::ClearSelection() {
« no previous file with comments | « third_party/WebKit/Source/core/editing/LayoutSelection.h ('k') | third_party/WebKit/Source/core/layout/LayoutObject.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698