| Index: Source/core/editing/VisiblePosition.cpp
|
| diff --git a/Source/core/editing/VisiblePosition.cpp b/Source/core/editing/VisiblePosition.cpp
|
| index 6d5b4ab4690f062039d4262474898af445454412..bf33e3968a2bab42c7ef309d7664ff2a0f63bbde 100644
|
| --- a/Source/core/editing/VisiblePosition.cpp
|
| +++ b/Source/core/editing/VisiblePosition.cpp
|
| @@ -58,19 +58,6 @@ VisiblePosition::VisiblePosition(const PositionWithAffinity& positionWithAffinit
|
| init(positionWithAffinity.position(), positionWithAffinity.affinity());
|
| }
|
|
|
| -static Position canonicalPosition(const Position& passedPosition);
|
| -
|
| -void VisiblePosition::init(const Position& position, EAffinity affinity)
|
| -{
|
| - m_affinity = affinity;
|
| -
|
| - m_deepPosition = canonicalPosition(position);
|
| -
|
| - // When not at a line wrap, make sure to end up with DOWNSTREAM affinity.
|
| - if (m_affinity == UPSTREAM && (isNull() || inSameLine(VisiblePosition(position, DOWNSTREAM), *this)))
|
| - m_affinity = DOWNSTREAM;
|
| -}
|
| -
|
| VisiblePosition VisiblePosition::next(EditingBoundaryCrossingRule rule) const
|
| {
|
| VisiblePosition next(nextVisuallyDistinctCandidate(m_deepPosition), m_affinity);
|
| @@ -627,6 +614,17 @@ static Position canonicalPosition(const Position& passedPosition)
|
| return next;
|
| }
|
|
|
| +void VisiblePosition::init(const Position& position, EAffinity affinity)
|
| +{
|
| + m_affinity = affinity;
|
| +
|
| + m_deepPosition = canonicalPosition(position);
|
| +
|
| + // When not at a line wrap, make sure to end up with DOWNSTREAM affinity.
|
| + if (m_affinity == UPSTREAM && (isNull() || inSameLine(VisiblePosition(position, DOWNSTREAM), *this)))
|
| + m_affinity = DOWNSTREAM;
|
| +}
|
| +
|
| UChar32 VisiblePosition::characterAfter() const
|
| {
|
| // We canonicalize to the first of two equivalent candidates, but the second of the two candidates
|
|
|