Index: Source/core/layout/LayoutView.cpp |
diff --git a/Source/core/layout/LayoutView.cpp b/Source/core/layout/LayoutView.cpp |
index 02cf3b7ef69509b48842686f84599d70966a069c..6a6419d91d6bbfc57de34fdf7748911a7464bc4a 100644 |
--- a/Source/core/layout/LayoutView.cpp |
+++ b/Source/core/layout/LayoutView.cpp |
@@ -803,11 +803,11 @@ |
// as the start of the selection, the selection painting code will think that content on the line containing 'foo' is selected |
// and will fill the gap before 'bar'. |
PositionType startPos = Strategy::selectionStart(selection); |
- PositionType candidate = mostBackwardCaretPosition(startPos); |
+ PositionType candidate = startPos.downstream(); |
if (isVisuallyEquivalentCandidate(candidate)) |
startPos = candidate; |
PositionType endPos = Strategy::selectionEnd(selection); |
- candidate = mostForwardCaretPosition(endPos); |
+ candidate = endPos.upstream(); |
if (isVisuallyEquivalentCandidate(candidate)) |
endPos = candidate; |