OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2009, 2010, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2009, 2010, 2011 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 24 matching lines...) Expand all Loading... |
35 #include "core/style/ComputedStyleConstants.h" | 35 #include "core/style/ComputedStyleConstants.h" |
36 #include "platform/Cursor.h" | 36 #include "platform/Cursor.h" |
37 #include "platform/PlatformMouseEvent.h" | 37 #include "platform/PlatformMouseEvent.h" |
38 #include "platform/PlatformTouchPoint.h" | 38 #include "platform/PlatformTouchPoint.h" |
39 #include "platform/Timer.h" | 39 #include "platform/Timer.h" |
40 #include "platform/UserGestureIndicator.h" | 40 #include "platform/UserGestureIndicator.h" |
41 #include "platform/geometry/LayoutPoint.h" | 41 #include "platform/geometry/LayoutPoint.h" |
42 #include "platform/heap/Handle.h" | 42 #include "platform/heap/Handle.h" |
43 #include "platform/scroll/ScrollTypes.h" | 43 #include "platform/scroll/ScrollTypes.h" |
44 #include "public/platform/WebFocusType.h" | 44 #include "public/platform/WebFocusType.h" |
| 45 #include "public/platform/WebInputEventResult.h" |
45 #include "wtf/Forward.h" | 46 #include "wtf/Forward.h" |
46 #include "wtf/HashMap.h" | 47 #include "wtf/HashMap.h" |
47 #include "wtf/HashTraits.h" | 48 #include "wtf/HashTraits.h" |
48 #include "wtf/RefPtr.h" | 49 #include "wtf/RefPtr.h" |
49 | 50 |
50 namespace blink { | 51 namespace blink { |
51 | 52 |
52 class AutoscrollController; | 53 class AutoscrollController; |
53 class DataTransfer; | 54 class DataTransfer; |
54 class PaintLayer; | 55 class PaintLayer; |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 void dispatchFakeMouseMoveEventSoonInQuad(const FloatQuad&); | 108 void dispatchFakeMouseMoveEventSoonInQuad(const FloatQuad&); |
108 | 109 |
109 HitTestResult hitTestResultAtPoint(const LayoutPoint&, | 110 HitTestResult hitTestResultAtPoint(const LayoutPoint&, |
110 HitTestRequest::HitTestRequestType hitType = HitTestRequest::ReadOnly |
HitTestRequest::Active, | 111 HitTestRequest::HitTestRequestType hitType = HitTestRequest::ReadOnly |
HitTestRequest::Active, |
111 const LayoutSize& padding = LayoutSize()); | 112 const LayoutSize& padding = LayoutSize()); |
112 | 113 |
113 bool mousePressed() const { return m_mousePressed; } | 114 bool mousePressed() const { return m_mousePressed; } |
114 | 115 |
115 void setCapturingMouseEventsNode(PassRefPtrWillBeRawPtr<Node>); // A caller
is responsible for resetting capturing node to 0. | 116 void setCapturingMouseEventsNode(PassRefPtrWillBeRawPtr<Node>); // A caller
is responsible for resetting capturing node to 0. |
116 | 117 |
117 bool updateDragAndDrop(const PlatformMouseEvent&, DataTransfer*); | 118 WebInputEventResult updateDragAndDrop(const PlatformMouseEvent&, DataTransfe
r*); |
118 void cancelDragAndDrop(const PlatformMouseEvent&, DataTransfer*); | 119 void cancelDragAndDrop(const PlatformMouseEvent&, DataTransfer*); |
119 bool performDragAndDrop(const PlatformMouseEvent&, DataTransfer*); | 120 WebInputEventResult performDragAndDrop(const PlatformMouseEvent&, DataTransf
er*); |
120 void updateDragStateAfterEditDragIfNeeded(Element* rootEditableElement); | 121 void updateDragStateAfterEditDragIfNeeded(Element* rootEditableElement); |
121 | 122 |
122 void scheduleHoverStateUpdate(); | 123 void scheduleHoverStateUpdate(); |
123 void scheduleCursorUpdate(); | 124 void scheduleCursorUpdate(); |
124 | 125 |
125 // Return whether a mouse cursor update is currently pending. Used for test
ing. | 126 // Return whether a mouse cursor update is currently pending. Used for test
ing. |
126 bool cursorUpdatePending(); | 127 bool cursorUpdatePending(); |
127 | 128 |
128 void setResizingFrameSet(HTMLFrameSetElement*); | 129 void setResizingFrameSet(HTMLFrameSetElement*); |
129 | 130 |
130 void resizeScrollableAreaDestroyed(); | 131 void resizeScrollableAreaDestroyed(); |
131 | 132 |
132 IntPoint lastKnownMousePosition() const; | 133 IntPoint lastKnownMousePosition() const; |
133 | 134 |
134 // Attempts to scroll the DOM tree. If that fails, scrolls the view. | 135 // Attempts to scroll the DOM tree. If that fails, scrolls the view. |
135 // If the view can't be scrolled either, recursively bubble to the parent fr
ame. | 136 // If the view can't be scrolled either, recursively bubble to the parent fr
ame. |
136 bool bubblingScroll(ScrollDirection, ScrollGranularity, Node* startingNode =
nullptr); | 137 bool bubblingScroll(ScrollDirection, ScrollGranularity, Node* startingNode =
nullptr); |
137 | 138 |
138 bool handleMouseMoveEvent(const PlatformMouseEvent&); | 139 WebInputEventResult handleMouseMoveEvent(const PlatformMouseEvent&); |
139 void handleMouseLeaveEvent(const PlatformMouseEvent&); | 140 void handleMouseLeaveEvent(const PlatformMouseEvent&); |
140 | 141 |
141 bool handleMousePressEvent(const PlatformMouseEvent&); | 142 WebInputEventResult handleMousePressEvent(const PlatformMouseEvent&); |
142 bool handleMouseReleaseEvent(const PlatformMouseEvent&); | 143 WebInputEventResult handleMouseReleaseEvent(const PlatformMouseEvent&); |
143 bool handleWheelEvent(const PlatformWheelEvent&); | 144 WebInputEventResult handleWheelEvent(const PlatformWheelEvent&); |
144 void defaultWheelEventHandler(Node*, WheelEvent*); | 145 void defaultWheelEventHandler(Node*, WheelEvent*); |
145 | 146 |
146 // Called on the local root frame exactly once per gesture event. | 147 // Called on the local root frame exactly once per gesture event. |
147 bool handleGestureEvent(const PlatformGestureEvent&); | 148 WebInputEventResult handleGestureEvent(const PlatformGestureEvent&); |
148 bool handleGestureEvent(const GestureEventWithHitTestResults&); | 149 WebInputEventResult handleGestureEvent(const GestureEventWithHitTestResults&
); |
149 | 150 |
150 // Clear the old hover/active state within frames before moving the hover st
ate to the another frame | 151 // Clear the old hover/active state within frames before moving the hover st
ate to the another frame |
151 void updateGestureHoverActiveState(const HitTestRequest&, Element*); | 152 void updateGestureHoverActiveState(const HitTestRequest&, Element*); |
152 | 153 |
153 // Hit-test the provided (non-scroll) gesture event, applying touch-adjustme
nt and updating | 154 // Hit-test the provided (non-scroll) gesture event, applying touch-adjustme
nt and updating |
154 // hover/active state across all frames if necessary. This should be called
at most once | 155 // hover/active state across all frames if necessary. This should be called
at most once |
155 // per gesture event, and called on the local root frame. | 156 // per gesture event, and called on the local root frame. |
156 // Note: This is similar to (the less clearly named) prepareMouseEvent. | 157 // Note: This is similar to (the less clearly named) prepareMouseEvent. |
157 // FIXME: Remove readOnly param when there is only ever a single call to thi
s. | 158 // FIXME: Remove readOnly param when there is only ever a single call to thi
s. |
158 GestureEventWithHitTestResults targetGestureEvent(const PlatformGestureEvent
&, bool readOnly = false); | 159 GestureEventWithHitTestResults targetGestureEvent(const PlatformGestureEvent
&, bool readOnly = false); |
159 GestureEventWithHitTestResults hitTestResultForGestureEvent(const PlatformGe
stureEvent&, HitTestRequest::HitTestRequestType); | 160 GestureEventWithHitTestResults hitTestResultForGestureEvent(const PlatformGe
stureEvent&, HitTestRequest::HitTestRequestType); |
160 // Handle the provided non-scroll gesture event. Should be called only on th
e inner frame. | 161 // Handle the provided non-scroll gesture event. Should be called only on th
e inner frame. |
161 bool handleGestureEventInFrame(const GestureEventWithHitTestResults&); | 162 WebInputEventResult handleGestureEventInFrame(const GestureEventWithHitTestR
esults&); |
162 | 163 |
163 // Handle the provided scroll gesture event, propagating down to child frame
s as necessary. | 164 // Handle the provided scroll gesture event, propagating down to child frame
s as necessary. |
164 bool handleGestureScrollEvent(const PlatformGestureEvent&); | 165 WebInputEventResult handleGestureScrollEvent(const PlatformGestureEvent&); |
165 bool handleGestureScrollEnd(const PlatformGestureEvent&); | 166 WebInputEventResult handleGestureScrollEnd(const PlatformGestureEvent&); |
166 bool isScrollbarHandlingGestures() const; | 167 bool isScrollbarHandlingGestures() const; |
167 | 168 |
168 bool bestClickableNodeForHitTestResult(const HitTestResult&, IntPoint& targe
tPoint, Node*& targetNode); | 169 bool bestClickableNodeForHitTestResult(const HitTestResult&, IntPoint& targe
tPoint, Node*& targetNode); |
169 bool bestContextMenuNodeForHitTestResult(const HitTestResult&, IntPoint& tar
getPoint, Node*& targetNode); | 170 bool bestContextMenuNodeForHitTestResult(const HitTestResult&, IntPoint& tar
getPoint, Node*& targetNode); |
170 // FIXME: This doesn't appear to be used outside tests anymore, what path ar
e we using now and is it tested? | 171 // FIXME: This doesn't appear to be used outside tests anymore, what path ar
e we using now and is it tested? |
171 bool bestZoomableAreaForTouchPoint(const IntPoint& touchCenter, const IntSiz
e& touchRadius, IntRect& targetArea, Node*& targetNode); | 172 bool bestZoomableAreaForTouchPoint(const IntPoint& touchCenter, const IntSiz
e& touchRadius, IntRect& targetArea, Node*& targetNode); |
172 | 173 |
173 bool sendContextMenuEvent(const PlatformMouseEvent&, Node* overrideTargetNod
e = nullptr); | 174 WebInputEventResult sendContextMenuEvent(const PlatformMouseEvent&, Node* ov
errideTargetNode = nullptr); |
174 bool sendContextMenuEventForKey(Element* overrideTargetElement = nullptr); | 175 WebInputEventResult sendContextMenuEventForKey(Element* overrideTargetElemen
t = nullptr); |
175 bool sendContextMenuEventForGesture(const GestureEventWithHitTestResults&); | 176 WebInputEventResult sendContextMenuEventForGesture(const GestureEventWithHit
TestResults&); |
176 | 177 |
177 void setMouseDownMayStartAutoscroll() { m_mouseDownMayStartAutoscroll = true
; } | 178 void setMouseDownMayStartAutoscroll() { m_mouseDownMayStartAutoscroll = true
; } |
178 | 179 |
179 static PlatformEvent::Modifiers accessKeyModifiers(); | 180 static PlatformEvent::Modifiers accessKeyModifiers(); |
180 bool handleAccessKey(const PlatformKeyboardEvent&); | 181 bool handleAccessKey(const PlatformKeyboardEvent&); |
181 bool keyEvent(const PlatformKeyboardEvent&); | 182 WebInputEventResult keyEvent(const PlatformKeyboardEvent&); |
182 void defaultKeyboardEventHandler(KeyboardEvent*); | 183 void defaultKeyboardEventHandler(KeyboardEvent*); |
183 | 184 |
184 bool handleTextInputEvent(const String& text, Event* underlyingEvent = nullp
tr, TextEventInputType = TextEventInputKeyboard); | 185 bool handleTextInputEvent(const String& text, Event* underlyingEvent = nullp
tr, TextEventInputType = TextEventInputKeyboard); |
185 void defaultTextInputEventHandler(TextEvent*); | 186 void defaultTextInputEventHandler(TextEvent*); |
186 | 187 |
187 void dragSourceEndedAt(const PlatformMouseEvent&, DragOperation); | 188 void dragSourceEndedAt(const PlatformMouseEvent&, DragOperation); |
188 | 189 |
189 void focusDocumentView(); | 190 void focusDocumentView(); |
190 | 191 |
191 void capsLockStateMayHaveChanged(); // Only called by FrameSelection | 192 void capsLockStateMayHaveChanged(); // Only called by FrameSelection |
192 | 193 |
193 bool handleTouchEvent(const PlatformTouchEvent&); | 194 WebInputEventResult handleTouchEvent(const PlatformTouchEvent&); |
194 | 195 |
195 bool useHandCursor(Node*, bool isOverLink); | 196 bool useHandCursor(Node*, bool isOverLink); |
196 | 197 |
197 void notifyElementActivated(); | 198 void notifyElementActivated(); |
198 | 199 |
199 PassRefPtr<UserGestureToken> takeLastMouseDownGestureToken() { return m_last
MouseDownUserGestureToken.release(); } | 200 PassRefPtr<UserGestureToken> takeLastMouseDownGestureToken() { return m_last
MouseDownUserGestureToken.release(); } |
200 | 201 |
201 int clickCount() { return m_clickCount; } | 202 int clickCount() { return m_clickCount; } |
202 | 203 |
203 SelectionController& selectionController() const { return *m_selectionContro
ller; } | 204 SelectionController& selectionController() const { return *m_selectionContro
ller; } |
(...skipping 14 matching lines...) Expand all Loading... |
218 FloatSize adjustedRadius; | 219 FloatSize adjustedRadius; |
219 bool knownTarget; | 220 bool knownTarget; |
220 bool consumed; | 221 bool consumed; |
221 }; | 222 }; |
222 | 223 |
223 private: | 224 private: |
224 static DragState& dragState(); | 225 static DragState& dragState(); |
225 | 226 |
226 DataTransfer* createDraggingDataTransfer() const; | 227 DataTransfer* createDraggingDataTransfer() const; |
227 | 228 |
228 bool handleMouseMoveOrLeaveEvent(const PlatformMouseEvent&, HitTestResult* h
overedNode = nullptr, bool onlyUpdateScrollbars = false, bool forceLeave = false
); | 229 WebInputEventResult handleMouseMoveOrLeaveEvent(const PlatformMouseEvent&, H
itTestResult* hoveredNode = nullptr, bool onlyUpdateScrollbars = false, bool for
ceLeave = false); |
229 bool handleMousePressEvent(const MouseEventWithHitTestResults&); | 230 WebInputEventResult handleMousePressEvent(const MouseEventWithHitTestResults
&); |
230 bool handleMouseFocus(const MouseEventWithHitTestResults&, InputDeviceCapabi
lities* sourceCapabilities); | 231 WebInputEventResult handleMouseFocus(const MouseEventWithHitTestResults&, In
putDeviceCapabilities* sourceCapabilities); |
231 bool handleMouseDraggedEvent(const MouseEventWithHitTestResults&); | 232 WebInputEventResult handleMouseDraggedEvent(const MouseEventWithHitTestResul
ts&); |
232 bool handleMouseReleaseEvent(const MouseEventWithHitTestResults&); | 233 WebInputEventResult handleMouseReleaseEvent(const MouseEventWithHitTestResul
ts&); |
233 | 234 |
234 HitTestRequest::HitTestRequestType getHitTypeForGestureType(PlatformEvent::T
ype); | 235 HitTestRequest::HitTestRequestType getHitTypeForGestureType(PlatformEvent::T
ype); |
235 void applyTouchAdjustment(PlatformGestureEvent*, HitTestResult*); | 236 void applyTouchAdjustment(PlatformGestureEvent*, HitTestResult*); |
236 bool handleGestureTap(const GestureEventWithHitTestResults&); | 237 WebInputEventResult handleGestureTap(const GestureEventWithHitTestResults&); |
237 bool handleGestureLongPress(const GestureEventWithHitTestResults&); | 238 WebInputEventResult handleGestureLongPress(const GestureEventWithHitTestResu
lts&); |
238 bool handleGestureLongTap(const GestureEventWithHitTestResults&); | 239 WebInputEventResult handleGestureLongTap(const GestureEventWithHitTestResult
s&); |
239 bool handleGestureScrollUpdate(const PlatformGestureEvent&); | 240 WebInputEventResult handleGestureScrollUpdate(const PlatformGestureEvent&); |
240 bool handleGestureScrollBegin(const PlatformGestureEvent&); | 241 WebInputEventResult handleGestureScrollBegin(const PlatformGestureEvent&); |
241 void clearGestureScrollState(); | 242 void clearGestureScrollState(); |
242 | 243 |
243 void updateGestureTargetNodeForMouseEvent(const GestureEventWithHitTestResul
ts&); | 244 void updateGestureTargetNodeForMouseEvent(const GestureEventWithHitTestResul
ts&); |
244 | 245 |
245 bool shouldApplyTouchAdjustment(const PlatformGestureEvent&) const; | 246 bool shouldApplyTouchAdjustment(const PlatformGestureEvent&) const; |
246 | 247 |
247 OptionalCursor selectCursor(const HitTestResult&); | 248 OptionalCursor selectCursor(const HitTestResult&); |
248 OptionalCursor selectAutoCursor(const HitTestResult&, Node*, const Cursor& i
Beam); | 249 OptionalCursor selectAutoCursor(const HitTestResult&, Node*, const Cursor& i
Beam); |
249 | 250 |
250 void hoverTimerFired(Timer<EventHandler>*); | 251 void hoverTimerFired(Timer<EventHandler>*); |
(...skipping 25 matching lines...) Expand all Loading... |
276 | 277 |
277 void customizedScroll(const Node& startNode, ScrollState&); | 278 void customizedScroll(const Node& startNode, ScrollState&); |
278 | 279 |
279 HitTestResult hitTestResultInFrame(LocalFrame*, const LayoutPoint&, HitTestR
equest::HitTestRequestType hitType = HitTestRequest::ReadOnly | HitTestRequest::
Active); | 280 HitTestResult hitTestResultInFrame(LocalFrame*, const LayoutPoint&, HitTestR
equest::HitTestRequestType hitType = HitTestRequest::ReadOnly | HitTestRequest::
Active); |
280 | 281 |
281 void invalidateClick(); | 282 void invalidateClick(); |
282 | 283 |
283 void updateMouseEventTargetNode(Node*, const PlatformMouseEvent&); | 284 void updateMouseEventTargetNode(Node*, const PlatformMouseEvent&); |
284 | 285 |
285 // Returns true when the sent PE has defaultPrevented or defaultHandled set. | 286 // Returns true when the sent PE has defaultPrevented or defaultHandled set. |
286 bool dispatchPointerEvent(Node* target, const AtomicString& eventType, const
PlatformMouseEvent&, Node* relatedTarget = nullptr); | 287 WebInputEventResult dispatchPointerEvent(Node* target, const AtomicString& e
ventType, const PlatformMouseEvent&, Node* relatedTarget = nullptr); |
287 | 288 |
288 // Dispatches mouseover, mouseout, mouseenter and mouseleave events to appro
priate nodes when the mouse pointer moves from one node to another. | 289 // Dispatches mouseover, mouseout, mouseenter and mouseleave events to appro
priate nodes when the mouse pointer moves from one node to another. |
289 void sendMouseEventsForNodeTransition(Node*, Node*, const PlatformMouseEvent
&); | 290 void sendMouseEventsForNodeTransition(Node*, Node*, const PlatformMouseEvent
&); |
290 | 291 |
291 MouseEventWithHitTestResults prepareMouseEvent(const HitTestRequest&, const
PlatformMouseEvent&); | 292 MouseEventWithHitTestResults prepareMouseEvent(const HitTestRequest&, const
PlatformMouseEvent&); |
292 | 293 |
293 bool dispatchMouseEvent(const AtomicString& eventType, Node* target, int cli
ckCount, const PlatformMouseEvent&); | 294 WebInputEventResult dispatchMouseEvent(const AtomicString& eventType, Node*
target, int clickCount, const PlatformMouseEvent&); |
294 | 295 |
295 // Dispatches ME after corresponding PE provided the PE has not been cancele
d. The eventType arg | 296 // Dispatches ME after corresponding PE provided the PE has not been cancele
d. The eventType arg |
296 // must be a mouse event that can be gated though a preventDefaulted pointer
down (i.e., one of | 297 // must be a mouse event that can be gated though a preventDefaulted pointer
down (i.e., one of |
297 // {mousedown, mousemove, mouseup}). | 298 // {mousedown, mousemove, mouseup}). |
298 // TODO(mustaq): Can we avoid the clickCount param, instead use PlatformMous
eEvent's count? | 299 // TODO(mustaq): Can we avoid the clickCount param, instead use PlatformMous
eEvent's count? |
299 // Same applied to dispatchMouseEvent() above. | 300 // Same applied to dispatchMouseEvent() above. |
300 bool updatePointerTargetAndDispatchEvents(const AtomicString& mouseEventType
, Node* target, | 301 WebInputEventResult updatePointerTargetAndDispatchEvents(const AtomicString&
mouseEventType, Node* target, |
301 int clickCount, const PlatformMouseEvent&); | 302 int clickCount, const PlatformMouseEvent&); |
302 | 303 |
303 bool dispatchDragEvent(const AtomicString& eventType, Node* target, const Pl
atformMouseEvent&, DataTransfer*); | 304 WebInputEventResult dispatchDragEvent(const AtomicString& eventType, Node* t
arget, const PlatformMouseEvent&, DataTransfer*); |
304 | 305 |
305 void clearDragDataTransfer(); | 306 void clearDragDataTransfer(); |
306 | 307 |
307 bool handleDrag(const MouseEventWithHitTestResults&, DragInitiator); | 308 bool handleDrag(const MouseEventWithHitTestResults&, DragInitiator); |
308 bool tryStartDrag(const MouseEventWithHitTestResults&); | 309 bool tryStartDrag(const MouseEventWithHitTestResults&); |
309 void clearDragState(); | 310 void clearDragState(); |
310 | 311 |
311 bool dispatchDragSrcEvent(const AtomicString& eventType, const PlatformMouse
Event&); | 312 WebInputEventResult dispatchDragSrcEvent(const AtomicString& eventType, cons
t PlatformMouseEvent&); |
312 | 313 |
313 bool dragHysteresisExceeded(const IntPoint&) const; | 314 bool dragHysteresisExceeded(const IntPoint&) const; |
314 | 315 |
315 bool passMousePressEventToSubframe(MouseEventWithHitTestResults&, LocalFrame
* subframe); | 316 WebInputEventResult passMousePressEventToSubframe(MouseEventWithHitTestResul
ts&, LocalFrame* subframe); |
316 bool passMouseMoveEventToSubframe(MouseEventWithHitTestResults&, LocalFrame*
subframe, HitTestResult* hoveredNode = nullptr); | 317 WebInputEventResult passMouseMoveEventToSubframe(MouseEventWithHitTestResult
s&, LocalFrame* subframe, HitTestResult* hoveredNode = nullptr); |
317 bool passMouseReleaseEventToSubframe(MouseEventWithHitTestResults&, LocalFra
me* subframe); | 318 WebInputEventResult passMouseReleaseEventToSubframe(MouseEventWithHitTestRes
ults&, LocalFrame* subframe); |
318 | 319 |
319 bool passMousePressEventToScrollbar(MouseEventWithHitTestResults&); | 320 bool passMousePressEventToScrollbar(MouseEventWithHitTestResults&); |
320 | 321 |
321 bool passWheelEventToWidget(const PlatformWheelEvent&, Widget&); | 322 WebInputEventResult passWheelEventToWidget(const PlatformWheelEvent&, Widget
&); |
322 void defaultSpaceEventHandler(KeyboardEvent*); | 323 void defaultSpaceEventHandler(KeyboardEvent*); |
323 void defaultBackspaceEventHandler(KeyboardEvent*); | 324 void defaultBackspaceEventHandler(KeyboardEvent*); |
324 void defaultTabEventHandler(KeyboardEvent*); | 325 void defaultTabEventHandler(KeyboardEvent*); |
325 void defaultEscapeEventHandler(KeyboardEvent*); | 326 void defaultEscapeEventHandler(KeyboardEvent*); |
326 void defaultArrowEventHandler(WebFocusType, KeyboardEvent*); | 327 void defaultArrowEventHandler(WebFocusType, KeyboardEvent*); |
327 | 328 |
328 void updateLastScrollbarUnderMouse(Scrollbar*, bool); | 329 void updateLastScrollbarUnderMouse(Scrollbar*, bool); |
329 | 330 |
330 void setFrameWasScrolledByUser(); | 331 void setFrameWasScrolledByUser(); |
331 | 332 |
332 bool capturesDragging() const { return m_capturesDragging; } | 333 bool capturesDragging() const { return m_capturesDragging; } |
333 | 334 |
334 bool handleGestureShowPress(); | 335 WebInputEventResult handleGestureShowPress(); |
335 | 336 |
336 bool handleScrollGestureOnResizer(Node*, const PlatformGestureEvent&); | 337 bool handleScrollGestureOnResizer(Node*, const PlatformGestureEvent&); |
337 | 338 |
338 bool passScrollGestureEventToWidget(const PlatformGestureEvent&, LayoutObjec
t*); | 339 WebInputEventResult passScrollGestureEventToWidget(const PlatformGestureEven
t&, LayoutObject*); |
339 | 340 |
340 AutoscrollController* autoscrollController() const; | 341 AutoscrollController* autoscrollController() const; |
341 bool panScrollInProgress() const; | 342 bool panScrollInProgress() const; |
342 void setLastKnownMousePosition(const PlatformMouseEvent&); | 343 void setLastKnownMousePosition(const PlatformMouseEvent&); |
343 | 344 |
344 void conditionallyEnableMouseEventForPointerTypeMouse(const PlatformMouseEve
nt&); | 345 void conditionallyEnableMouseEventForPointerTypeMouse(const PlatformMouseEve
nt&); |
345 | 346 |
346 bool shouldTopControlsConsumeScroll(FloatSize) const; | 347 bool shouldTopControlsConsumeScroll(FloatSize) const; |
347 | 348 |
348 // If the given element is a shadow host and its root has delegatesFocus=fal
se flag, | 349 // If the given element is a shadow host and its root has delegatesFocus=fal
se flag, |
349 // slide focus to its inner element. Returns true if the resulting focus is
different from | 350 // slide focus to its inner element. Returns true if the resulting focus is
different from |
350 // the given element. | 351 // the given element. |
351 bool slideFocusOnShadowHostIfNecessary(const Element&); | 352 bool slideFocusOnShadowHostIfNecessary(const Element&); |
352 | 353 |
353 void dispatchPointerEvents(const PlatformTouchEvent&, WillBeHeapVector<Touch
Info>&); | 354 void dispatchPointerEvents(const PlatformTouchEvent&, WillBeHeapVector<Touch
Info>&); |
354 void sendPointerCancels(WillBeHeapVector<TouchInfo>&); | 355 void sendPointerCancels(WillBeHeapVector<TouchInfo>&); |
355 | 356 |
356 bool dispatchTouchEvents(const PlatformTouchEvent&, WillBeHeapVector<TouchIn
fo>&, bool, bool); | 357 WebInputEventResult dispatchTouchEvents(const PlatformTouchEvent&, WillBeHea
pVector<TouchInfo>&, bool, bool); |
357 | 358 |
358 // NOTE: If adding a new field to this class please ensure that it is | 359 // NOTE: If adding a new field to this class please ensure that it is |
359 // cleared in |EventHandler::clear()|. | 360 // cleared in |EventHandler::clear()|. |
360 | 361 |
361 const RawPtrWillBeMember<LocalFrame> m_frame; | 362 const RawPtrWillBeMember<LocalFrame> m_frame; |
362 | 363 |
363 bool m_mousePressed; | 364 bool m_mousePressed; |
364 bool m_capturesDragging; | 365 bool m_capturesDragging; |
365 RefPtrWillBeMember<Node> m_mousePressNode; | 366 RefPtrWillBeMember<Node> m_mousePressNode; |
366 | 367 |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
460 // scroll which shouldn't propagate can't cause any element to | 461 // scroll which shouldn't propagate can't cause any element to |
461 // scroll other than the |m_previousGestureScrolledNode|. | 462 // scroll other than the |m_previousGestureScrolledNode|. |
462 bool m_deltaConsumedForScrollSequence; | 463 bool m_deltaConsumedForScrollSequence; |
463 }; | 464 }; |
464 | 465 |
465 } // namespace blink | 466 } // namespace blink |
466 | 467 |
467 WTF_ALLOW_INIT_WITH_MEM_FUNCTIONS(blink::EventHandler::TouchInfo); | 468 WTF_ALLOW_INIT_WITH_MEM_FUNCTIONS(blink::EventHandler::TouchInfo); |
468 | 469 |
469 #endif // EventHandler_h | 470 #endif // EventHandler_h |
OLD | NEW |