Index: Source/core/editing/Position.h |
diff --git a/Source/core/editing/Position.h b/Source/core/editing/Position.h |
index b6dec6faec8576217a631246c545af3f08ce37b5..1a7b840b9ef3ad31c3d302adb6b0584c29d796b3 100644 |
--- a/Source/core/editing/Position.h |
+++ b/Source/core/editing/Position.h |
@@ -45,7 +45,7 @@ class Text; |
enum class TextAffinity; |
class TreeScope; |
-enum PositionMoveType { |
+enum class PositionMoveType { |
CodePoint, // Move by a single code point. |
Character, // Move to the next Unicode character break. |
BackwardDeletion // Subject to platform conventions. |
@@ -149,12 +149,6 @@ public: |
bool isNotNull() const { return m_anchorNode; } |
bool isOrphan() const { return m_anchorNode && !m_anchorNode->inDocument(); } |
- // Move up or down the DOM by one position. |
- // Offsets are computed using layout text for nodes that have layoutObjects - but note that even when |
- // using composed characters, the result may be inside a single user-visible character if a ligature is formed. |
- PositionAlgorithm<Strategy> previous(PositionMoveType = CodePoint) const; |
- PositionAlgorithm<Strategy> next(PositionMoveType = CodePoint) const; |
- |
int compareTo(const PositionAlgorithm<Strategy>&) const; |
// These can be either inside or just before/after the node, depending on |
@@ -407,6 +401,18 @@ inline PositionInComposedTree fromPositionInDOMTree<EditingInComposedTreeStrateg |
return toPositionInComposedTree(position); |
} |
+// TODO(yosin) We should move |previousPositionOf()| and |nextPositionOf()| |
+// to "EditingUtilities.h" with |uncheckedPreviousOffset()| and |
+// |uncheckedNextOffset()|. |
+// Move up or down the DOM by one position. |
+// Offsets are computed using layout text for nodes that have layoutObjects - |
+// but note that even when using composed characters, the result may be inside |
+// a single user-visible character if a ligature is formed. |
+CORE_EXPORT Position previousPositionOf(const Position&, PositionMoveType); |
+CORE_EXPORT Position nextPositionOf(const Position&, PositionMoveType); |
+CORE_EXPORT PositionInComposedTree previousPositionOf(const PositionInComposedTree&, PositionMoveType); |
+CORE_EXPORT PositionInComposedTree nextPositionOf(const PositionInComposedTree&, PositionMoveType); |
+ |
CORE_EXPORT int uncheckedPreviousOffset(const Node*, int current); |
CORE_EXPORT int uncheckedNextOffset(const Node*, int current); |