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

Unified Diff: third_party/WebKit/Source/core/editing/EditingUtilities.h

Issue 2802953002: Avoid duplicate functions/code in core/editing: computeDistance (Closed)
Patch Set: 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/EditingUtilities.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/editing/EditingUtilities.h
diff --git a/third_party/WebKit/Source/core/editing/EditingUtilities.h b/third_party/WebKit/Source/core/editing/EditingUtilities.h
index 7f24f312bbb627f95d0907420623dbd707678ec9..1e3c6bc7733eadd0229d009007735825791547e8 100644
--- a/third_party/WebKit/Source/core/editing/EditingUtilities.h
+++ b/third_party/WebKit/Source/core/editing/EditingUtilities.h
@@ -418,6 +418,18 @@ String stringWithRebalancedWhitespace(const String&,
const String& nonBreakingSpaceString();
// -------------------------------------------------------------------------
+// Distance calculation functions
+// -------------------------------------------------------------------------
+
+// If current position is at grapheme boundary, return 0; otherwise, return the
+// distance to its nearest left grapheme boundary.
+size_t computeDistanceToLeftGraphemeBoundary(const Position&);
+
+// If current position is at grapheme boundary, return 0; otherwise, return the
+// distance to its nearest right grapheme boundary.
+size_t computeDistanceToRightGraphemeBoundary(const Position&);
+
+// -------------------------------------------------------------------------
// Events
// -------------------------------------------------------------------------
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/EditingUtilities.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698