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

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

Issue 2920193003: Move "word" granularity related functions to VisibleUnitWord.cpp (Closed)
Patch Set: 2017-06-08T12:52:45 Created 3 years, 6 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/VisibleUnits.h
diff --git a/third_party/WebKit/Source/core/editing/VisibleUnits.h b/third_party/WebKit/Source/core/editing/VisibleUnits.h
index 099b17ec562c095644c95b878a9ee99d12e64430..e56dcb764702d0f454347162909dfb62a26a93c3 100644
--- a/third_party/WebKit/Source/core/editing/VisibleUnits.h
+++ b/third_party/WebKit/Source/core/editing/VisibleUnits.h
@@ -341,6 +341,24 @@ IntRect ComputeTextRect(const EphemeralRangeInFlatTree&);
FloatRect ComputeTextFloatRect(const EphemeralRange&);
// Export below functions only for |VisibleUnit| family.
+enum BoundarySearchContextAvailability {
+ kDontHaveMoreContext,
+ kMayHaveMoreContext
+};
+
+typedef unsigned (*BoundarySearchFunction)(const UChar*,
+ unsigned length,
+ unsigned offset,
+ BoundarySearchContextAvailability,
+ bool& need_more_context);
+
+Position NextBoundary(const VisiblePosition&, BoundarySearchFunction);
+PositionInFlatTree NextBoundary(const VisiblePositionInFlatTree&,
+ BoundarySearchFunction);
+Position PreviousBoundary(const VisiblePosition&, BoundarySearchFunction);
+PositionInFlatTree PreviousBoundary(const VisiblePositionInFlatTree&,
+ BoundarySearchFunction);
+
PositionWithAffinity HonorEditingBoundaryAtOrBefore(const PositionWithAffinity&,
const Position&);
« no previous file with comments | « third_party/WebKit/Source/core/editing/BUILD.gn ('k') | third_party/WebKit/Source/core/editing/VisibleUnits.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698