| Index: Source/core/layout/LayoutView.cpp
|
| diff --git a/Source/core/layout/LayoutView.cpp b/Source/core/layout/LayoutView.cpp
|
| index 6a6419d91d6bbfc57de34fdf7748911a7464bc4a..02cf3b7ef69509b48842686f84599d70966a069c 100644
|
| --- a/Source/core/layout/LayoutView.cpp
|
| +++ b/Source/core/layout/LayoutView.cpp
|
| @@ -803,11 +803,11 @@ void LayoutView::commitPendingSelectionAlgorithm()
|
| // 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 = startPos.downstream();
|
| + PositionType candidate = mostBackwardCaretPosition(startPos);
|
| if (isVisuallyEquivalentCandidate(candidate))
|
| startPos = candidate;
|
| PositionType endPos = Strategy::selectionEnd(selection);
|
| - candidate = endPos.upstream();
|
| + candidate = mostForwardCaretPosition(endPos);
|
| if (isVisuallyEquivalentCandidate(candidate))
|
| endPos = candidate;
|
|
|
|
|