Index: Source/core/layout/PendingSelection.cpp |
diff --git a/Source/core/layout/PendingSelection.cpp b/Source/core/layout/PendingSelection.cpp |
index 7faf797afed4c752feb187ac758cc39fc503a129..49fc55bbf5b66d64624a0c98e2413d1e5673bbbb 100644 |
--- a/Source/core/layout/PendingSelection.cpp |
+++ b/Source/core/layout/PendingSelection.cpp |
@@ -87,7 +87,9 @@ VisibleSelection PendingSelection::calcVisibleSelectionAlgorithm() const |
bool paintBlockCursor = m_shouldShowBlockCursor && selectionType == SelectionType::CaretSelection && !isLogicalEndOfLine(VisiblePosition(end, affinity)); |
VisibleSelection selection; |
if (enclosingTextFormControl(start.computeContainerNode())) { |
- PositionType endPosition = paintBlockCursor ? Strategy::selectionExtent(m_selection).next() : end; |
+ // TODO(yosin) We should use |PositionMoveType::Character| to avoid |
+ // ending paint at middle of character. |
+ PositionType endPosition = paintBlockCursor ? nextPositionOf(Strategy::selectionExtent(m_selection), PositionMoveType::CodePoint) : end; |
selection.setWithoutValidation(start, endPosition); |
return selection; |
} |