| Index: Source/core/page/EventHandler.h
|
| diff --git a/Source/core/page/EventHandler.h b/Source/core/page/EventHandler.h
|
| index 1d2b47a7cb35c091864e2b1d66eb0c3901b521e3..a2314445140e2e5224e4b092500258fd976636db 100644
|
| --- a/Source/core/page/EventHandler.h
|
| +++ b/Source/core/page/EventHandler.h
|
| @@ -27,6 +27,7 @@
|
| #define EventHandler_h
|
|
|
| #include "core/CoreExport.h"
|
| +#include "core/editing/TextGranularity.h"
|
| #include "core/events/TextEventInputType.h"
|
| #include "core/layout/HitTestRequest.h"
|
| #include "core/style/ComputedStyleConstants.h"
|
| @@ -75,11 +76,12 @@
|
| class ScrollableArea;
|
| class Scrollbar;
|
| class ScrollState;
|
| -class SelectionController;
|
| class TextEvent;
|
| +class VisibleSelection;
|
| class WheelEvent;
|
| class Widget;
|
|
|
| +enum AppendTrailingWhitespace { ShouldAppendTrailingWhitespace, DontAppendTrailingWhitespace };
|
| enum class DragInitiator;
|
|
|
| class CORE_EXPORT EventHandler : public NoBaseWillBeGarbageCollectedFinalized<EventHandler> {
|
| @@ -196,19 +198,30 @@
|
| PassRefPtr<UserGestureToken> takeLastMouseDownGestureToken() { return m_lastMouseDownUserGestureToken.release(); }
|
|
|
| int clickCount() { return m_clickCount; }
|
| -
|
| - SelectionController& selectionController() const { return *m_selectionController; }
|
| + bool mouseDownWasSingleClickInSelection() { return m_mouseDownWasSingleClickInSelection; }
|
|
|
| private:
|
| static DragState& dragState();
|
|
|
| DataTransfer* createDraggingDataTransfer() const;
|
|
|
| + bool updateSelectionForMouseDownDispatchingSelectStart(Node*, const VisibleSelection&, TextGranularity);
|
| + void selectClosestWordFromHitTestResult(const HitTestResult&, AppendTrailingWhitespace);
|
| + void selectClosestMisspellingFromHitTestResult(const HitTestResult&, AppendTrailingWhitespace);
|
| + void selectClosestWordFromMouseEvent(const MouseEventWithHitTestResults&);
|
| + void selectClosestMisspellingFromMouseEvent(const MouseEventWithHitTestResults&);
|
| + void selectClosestWordOrLinkFromMouseEvent(const MouseEventWithHitTestResults&);
|
| +
|
| bool handleMouseMoveOrLeaveEvent(const PlatformMouseEvent&, HitTestResult* hoveredNode = nullptr, bool onlyUpdateScrollbars = false, bool forceLeave = false);
|
| bool handleMousePressEvent(const MouseEventWithHitTestResults&);
|
| + bool handleMousePressEventSingleClick(const MouseEventWithHitTestResults&);
|
| + bool handleMousePressEventDoubleClick(const MouseEventWithHitTestResults&);
|
| + bool handleMousePressEventTripleClick(const MouseEventWithHitTestResults&);
|
| bool handleMouseFocus(const MouseEventWithHitTestResults&);
|
| bool handleMouseDraggedEvent(const MouseEventWithHitTestResults&);
|
| bool handleMouseReleaseEvent(const MouseEventWithHitTestResults&);
|
| +
|
| + bool handlePasteGlobalSelection(const PlatformMouseEvent&);
|
|
|
| HitTestRequest::HitTestRequestType getHitTypeForGestureType(PlatformEvent::Type);
|
| void applyTouchAdjustment(PlatformGestureEvent*, HitTestResult*);
|
| @@ -227,6 +240,8 @@
|
| void hoverTimerFired(Timer<EventHandler>*);
|
| void cursorUpdateTimerFired(Timer<EventHandler>*);
|
| void activeIntervalTimerFired(Timer<EventHandler>*);
|
| +
|
| + bool mouseDownMayStartSelect() const { return m_mouseDownMayStartSelect; }
|
|
|
| void fakeMouseMoveEventTimerFired(Timer<EventHandler>*);
|
| void cancelFakeMouseMoveEvent();
|
| @@ -290,6 +305,8 @@
|
| void defaultEscapeEventHandler(KeyboardEvent*);
|
| void defaultArrowEventHandler(WebFocusType, KeyboardEvent*);
|
|
|
| + void updateSelectionForMouseDrag(const HitTestResult&);
|
| +
|
| void updateLastScrollbarUnderMouse(Scrollbar*, bool);
|
|
|
| void setFrameWasScrolledByUser();
|
| @@ -321,8 +338,11 @@
|
| bool m_capturesDragging;
|
| RefPtrWillBeMember<Node> m_mousePressNode;
|
|
|
| + bool m_mouseDownMayStartSelect;
|
| bool m_mouseDownMayStartDrag;
|
| - const OwnPtrWillBeMember<SelectionController> m_selectionController;
|
| + bool m_mouseDownWasSingleClickInSelection;
|
| + enum SelectionInitiationState { HaveNotStartedSelection, PlacedCaret, ExtendedSelection };
|
| + SelectionInitiationState m_selectionInitiationState;
|
|
|
| LayoutPoint m_dragStartPos;
|
|
|
|
|