| Index: Source/core/page/EventHandler.cpp
|
| diff --git a/Source/core/page/EventHandler.cpp b/Source/core/page/EventHandler.cpp
|
| index fc4c24b96a17052cb21071c7a20c3bdcfa0da124..3af5d033886e1bb6986ee8415a78bd8162b32716 100644
|
| --- a/Source/core/page/EventHandler.cpp
|
| +++ b/Source/core/page/EventHandler.cpp
|
| @@ -698,26 +698,6 @@ void EventHandler::updateSelectionForMouseDrag()
|
| updateSelectionForMouseDrag(result);
|
| }
|
|
|
| -static VisiblePosition selectionExtentRespectingEditingBoundary(const VisibleSelection& selection, const LayoutPoint& localPoint, Node* targetNode)
|
| -{
|
| - LayoutPoint selectionEndPoint = localPoint;
|
| - Element* editableElement = selection.rootEditableElement();
|
| -
|
| - if (!targetNode->renderer())
|
| - return VisiblePosition();
|
| -
|
| - if (editableElement && !editableElement->contains(targetNode)) {
|
| - if (!editableElement->renderer())
|
| - return VisiblePosition();
|
| -
|
| - FloatPoint absolutePoint = targetNode->renderer()->localToAbsolute(FloatPoint(selectionEndPoint));
|
| - selectionEndPoint = roundedLayoutPoint(editableElement->renderer()->absoluteToLocal(absolutePoint));
|
| - targetNode = editableElement;
|
| - }
|
| -
|
| - return targetNode->renderer()->positionForPoint(selectionEndPoint);
|
| -}
|
| -
|
| void EventHandler::updateSelectionForMouseDrag(const HitTestResult& hitTestResult)
|
| {
|
| if (!m_mouseDownMayStartSelect)
|
| @@ -727,8 +707,7 @@ void EventHandler::updateSelectionForMouseDrag(const HitTestResult& hitTestResul
|
| if (!target)
|
| return;
|
|
|
| - VisiblePosition targetPosition = selectionExtentRespectingEditingBoundary(m_frame->selection()->selection(), hitTestResult.localPoint(), target);
|
| -
|
| + VisiblePosition targetPosition = m_frame->selection()->selection().visiblePositionRespectingEditingBoundary(hitTestResult.localPoint(), target);
|
| // Don't modify the selection if we're not on a node.
|
| if (targetPosition.isNull())
|
| return;
|
|
|