| Index: third_party/WebKit/Source/core/editing/SelectionController.cpp
|
| diff --git a/third_party/WebKit/Source/core/editing/SelectionController.cpp b/third_party/WebKit/Source/core/editing/SelectionController.cpp
|
| index e26e1732d57ef92bb4111b2507ed4856c894f2d5..6db0a912dafdea61dad967c26d31f9bb57d8ce8b 100644
|
| --- a/third_party/WebKit/Source/core/editing/SelectionController.cpp
|
| +++ b/third_party/WebKit/Source/core/editing/SelectionController.cpp
|
| @@ -432,7 +432,8 @@ void SelectionController::handleMousePressEvent(const MouseEventWithHitTestResul
|
| {
|
| // If we got the event back, that must mean it wasn't prevented,
|
| // so it's allowed to start a drag or selection if it wasn't in a scrollbar.
|
| - m_mouseDownMayStartSelect = canMouseDownStartSelect(event.innerNode()) && !event.scrollbar();
|
| + m_mouseDownMayStartSelect = (canMouseDownStartSelect(event.innerNode()) || isLinkSelection(event))
|
| + && !event.scrollbar();
|
| m_mouseDownWasSingleClickInSelection = false;
|
| // Avoid double-tap touch gesture confusion by restricting multi-click side
|
| // effects, e.g., word selection, to editable regions.
|
| @@ -562,7 +563,8 @@ void SelectionController::sendContextMenuEvent(const MouseEventWithHitTestResult
|
| || !(selection().isContentEditable() || (mev.innerNode() && mev.innerNode()->isTextNode())))
|
| return;
|
|
|
| - m_mouseDownMayStartSelect = true; // context menu events are always allowed to perform a selection
|
| + // Context menu events are always allowed to perform a selection.
|
| + TemporaryChange<bool> mouseDownMayStartSelectChange(m_mouseDownMayStartSelect, true);
|
|
|
| if (mev.hitTestResult().isMisspelled())
|
| return selectClosestMisspellingFromMouseEvent(mev);
|
| @@ -623,4 +625,9 @@ FrameSelection& SelectionController::selection() const
|
| return m_frame->selection();
|
| }
|
|
|
| +bool isLinkSelection(const MouseEventWithHitTestResults& event)
|
| +{
|
| + return event.event().altKey() && event.isOverLink();
|
| +}
|
| +
|
| } // namespace blink
|
|
|