| Index: Source/core/editing/FrameSelection.cpp
|
| diff --git a/Source/core/editing/FrameSelection.cpp b/Source/core/editing/FrameSelection.cpp
|
| index df236f8f75946dda54c909588173f5a4d24b6f50..b15480a15be9b8c16fc14e0b8e9744f9c66192bc 100644
|
| --- a/Source/core/editing/FrameSelection.cpp
|
| +++ b/Source/core/editing/FrameSelection.cpp
|
| @@ -299,6 +299,18 @@ void FrameSelection::setSelection(const VisibleSelection& newSelection, SetSelec
|
| m_frame->domWindow()->enqueueDocumentEvent(Event::create(EventTypeNames::selectionchange));
|
| }
|
|
|
| +bool FrameSelection::collapseToEnd()
|
| +{
|
| + // Check for selection is editable and whether it's range selection or not.
|
| + if (!selection().rootEditableElement() || !isRange())
|
| + return false;
|
| +
|
| + // Collapsing the selection to end of range selection.
|
| + moveTo(m_selection.end(), DOWNSTREAM);
|
| +
|
| + return true;
|
| +}
|
| +
|
| static bool removingNodeRemovesPosition(Node& node, const Position& position)
|
| {
|
| if (!position.anchorNode())
|
|
|