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

Side by Side Diff: third_party/WebKit/Source/core/editing/FrameSelection.cpp

Issue 2833343002: Change SelectionStartEnd() returning values instead of assigning into ref args. (Closed)
Patch Set: rebase Created 3 years, 7 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2008, 2009, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2004, 2008, 2009, 2010 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 1146 matching lines...) Expand 10 before | Expand all | Expand 10 after
1157 } 1157 }
1158 1158
1159 Range* FrameSelection::DocumentCachedRange() const { 1159 Range* FrameSelection::DocumentCachedRange() const {
1160 return selection_editor_->DocumentCachedRange(); 1160 return selection_editor_->DocumentCachedRange();
1161 } 1161 }
1162 1162
1163 void FrameSelection::ClearDocumentCachedRange() { 1163 void FrameSelection::ClearDocumentCachedRange() {
1164 selection_editor_->ClearDocumentCachedRange(); 1164 selection_editor_->ClearDocumentCachedRange();
1165 } 1165 }
1166 1166
1167 void FrameSelection::LayoutSelectionStartEnd(int& start_pos, int& end_pos) { 1167 std::pair<int, int> FrameSelection::LayoutSelectionStartEnd() {
1168 layout_selection_->SelectionStartEnd(start_pos, end_pos); 1168 return layout_selection_->SelectionStartEnd();
1169 } 1169 }
1170 1170
1171 void FrameSelection::ClearLayoutSelection() { 1171 void FrameSelection::ClearLayoutSelection() {
1172 layout_selection_->ClearSelection(); 1172 layout_selection_->ClearSelection();
1173 } 1173 }
1174 1174
1175 } // namespace blink 1175 } // namespace blink
1176 1176
1177 #ifndef NDEBUG 1177 #ifndef NDEBUG
1178 1178
1179 void showTree(const blink::FrameSelection& sel) { 1179 void showTree(const blink::FrameSelection& sel) {
1180 sel.ShowTreeForThis(); 1180 sel.ShowTreeForThis();
1181 } 1181 }
1182 1182
1183 void showTree(const blink::FrameSelection* sel) { 1183 void showTree(const blink::FrameSelection* sel) {
1184 if (sel) 1184 if (sel)
1185 sel->ShowTreeForThis(); 1185 sel->ShowTreeForThis();
1186 else 1186 else
1187 LOG(INFO) << "Cannot showTree for <null> FrameSelection."; 1187 LOG(INFO) << "Cannot showTree for <null> FrameSelection.";
1188 } 1188 }
1189 1189
1190 #endif 1190 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/editing/FrameSelection.h ('k') | third_party/WebKit/Source/core/editing/LayoutSelection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698