| Index: Source/core/layout/LayoutView.cpp
|
| diff --git a/Source/core/layout/LayoutView.cpp b/Source/core/layout/LayoutView.cpp
|
| index 6a6419d91d6bbfc57de34fdf7748911a7464bc4a..6d382e74a7b20b63b47724a53c4b8287df0b300c 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 = mostForwardCaretPosition(startPos);
|
| if (isVisuallyEquivalentCandidate(candidate))
|
| startPos = candidate;
|
| PositionType endPos = Strategy::selectionEnd(selection);
|
| - candidate = endPos.upstream();
|
| + candidate = mostBackwardCaretPosition(endPos);
|
| if (isVisuallyEquivalentCandidate(candidate))
|
| endPos = candidate;
|
|
|
|
|