| Index: Source/core/page/EventHandler.cpp
|
| diff --git a/Source/core/page/EventHandler.cpp b/Source/core/page/EventHandler.cpp
|
| index 149019579056f9ccd7b6b6b2a6da84949e294f2c..1a296024b6f8877f8e8fb3ba3188ebcf14b4517f 100644
|
| --- a/Source/core/page/EventHandler.cpp
|
| +++ b/Source/core/page/EventHandler.cpp
|
| @@ -558,7 +558,7 @@ bool EventHandler::handleMousePressEventSingleClick(const MouseEventWithHitTestR
|
| granularity = m_frame->selection().granularity();
|
| newSelection.expandUsingGranularity(m_frame->selection().granularity());
|
| }
|
| - } else if (m_selectionInitiationState != ExtendedSelection) {
|
| + } else {
|
| newSelection = expandSelectionToRespectUserSelectAll(innerNode, VisibleSelection(visiblePos));
|
| }
|
|
|
| @@ -629,6 +629,7 @@ bool EventHandler::handleMousePressEvent(const MouseEventWithHitTestResults& eve
|
|
|
| bool swallowEvent = false;
|
| m_mousePressed = true;
|
| + m_selectionInitiationState = HaveNotStartedSelection;
|
|
|
| if (event.event().clickCount() == 2)
|
| swallowEvent = handleMousePressEventDoubleClick(event);
|
| @@ -1301,10 +1302,6 @@ bool EventHandler::handleMousePressEvent(const PlatformMouseEvent& mouseEvent)
|
| m_frame->selection().setCaretBlinkingSuspended(true);
|
|
|
| bool swallowEvent = !dispatchMouseEvent(EventTypeNames::mousedown, mev.innerNode(), m_clickCount, mouseEvent, true);
|
| - // m_selectionInitiationState is initialized after dispatching mousedown event in order not to keep the selection by DOM APIs
|
| - // Because we can't give the user the chance to handle the selection by user action like dragging if we keep the selection in case of mousedown.
|
| - // FireFox also has the same behavior and it's more compatible with other browsers.
|
| - m_selectionInitiationState = HaveNotStartedSelection;
|
| HitTestResult hitTestResult = hitTestResultInFrame(m_frame, mouseEvent.position(), HitTestRequest::ReadOnly);
|
| swallowEvent = swallowEvent || handleMouseFocus(MouseEventWithHitTestResults(mouseEvent, hitTestResult));
|
| m_capturesDragging = !swallowEvent || mev.scrollbar();
|
| @@ -2294,7 +2291,6 @@ bool EventHandler::handleGestureTap(const GestureEventWithHitTestResults& target
|
| static_cast<PlatformEvent::Modifiers>(modifiers | PlatformEvent::LeftButtonDown),
|
| PlatformMouseEvent::FromTouch, gestureEvent.timestamp());
|
| bool swallowMouseDownEvent = !dispatchMouseEvent(EventTypeNames::mousedown, currentHitTest.innerNode(), gestureEvent.tapCount(), fakeMouseDown, true);
|
| - m_selectionInitiationState = HaveNotStartedSelection;
|
| if (!swallowMouseDownEvent)
|
| swallowMouseDownEvent = handleMouseFocus(MouseEventWithHitTestResults(fakeMouseDown, currentHitTest));
|
| if (!swallowMouseDownEvent)
|
| @@ -3042,12 +3038,6 @@ void EventHandler::notifyElementActivated()
|
| m_lastDeferredTapElement = nullptr;
|
| }
|
|
|
| -void EventHandler::notifySelectionChanged()
|
| -{
|
| - if (m_frame->selection().isRange())
|
| - m_selectionInitiationState = ExtendedSelection;
|
| -}
|
| -
|
| bool EventHandler::handleAccessKey(const PlatformKeyboardEvent& evt)
|
| {
|
| // FIXME: Ignoring the state of Shift key is what neither IE nor Firefox do.
|
|
|