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

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

Issue 2616103003: Add absoluteSelectionBoundsOf() to GranularityStrategy class (Closed)
Patch Set: update comment Created 3 years, 11 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/GranularityStrategy.cpp
diff --git a/third_party/WebKit/Source/core/editing/GranularityStrategy.cpp b/third_party/WebKit/Source/core/editing/GranularityStrategy.cpp
index d6d932089cc42a96387ec97749dbc25b643f65f3..62d82b70da680d0179514cb2850268cbd785b7e3 100644
--- a/third_party/WebKit/Source/core/editing/GranularityStrategy.cpp
+++ b/third_party/WebKit/Source/core/editing/GranularityStrategy.cpp
@@ -12,12 +12,12 @@ namespace blink {
enum class BoundAdjust { CurrentPosIfOnBound, NextBoundIfOnBound };
enum class SearchDirection { SearchBackwards, SearchForward };
-// We use the bottom-left corner of the caret rect to represent the
+// We use the bottom-left corner of the selection rect to represent the
// location of a VisiblePosition. This way locations corresponding to
// VisiblePositions on the same line will all have the same y coordinate
// unless the text is transformed.
static IntPoint positionLocation(const VisiblePosition& vp) {
- return absoluteCaretBoundsOf(vp).minXMaxYCorner();
+ return absoluteSelectionBoundsOf(vp).minXMaxYCorner();
}
// Order is specified using the same contract as comparePositions.

Powered by Google App Engine
This is Rietveld 408576698