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 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
276 | 276 |
277 void customizedScroll(const Node& startNode, ScrollState&); | 277 void customizedScroll(const Node& startNode, ScrollState&); |
278 | 278 |
279 HitTestResult hitTestResultInFrame(LocalFrame*, const LayoutPoint&, HitTestR
equest::HitTestRequestType hitType = HitTestRequest::ReadOnly | HitTestRequest::
Active); | 279 HitTestResult hitTestResultInFrame(LocalFrame*, const LayoutPoint&, HitTestR
equest::HitTestRequestType hitType = HitTestRequest::ReadOnly | HitTestRequest::
Active); |
280 | 280 |
281 void invalidateClick(); | 281 void invalidateClick(); |
282 | 282 |
283 void updateMouseEventTargetNode(Node*, const PlatformMouseEvent&); | 283 void updateMouseEventTargetNode(Node*, const PlatformMouseEvent&); |
284 | 284 |
285 // Returns true when the sent PE has defaultPrevented or defaultHandled set. | 285 // Returns true when the sent PE has defaultPrevented or defaultHandled set. |
286 bool dispatchPointerEventForMouseEvent(Node* target, const AtomicString& eve
ntType, const PlatformMouseEvent&, Node* relatedTarget); | 286 bool dispatchPointerEventForMouseEvent(Node* target, const AtomicString& eve
ntType, const PlatformMouseEvent&, Node* relatedTarget = nullptr); |
287 | 287 |
288 // Dispatches mouseover, mouseout, mouseenter and mouseleave events to appro
priate nodes when the mouse pointer moves from one node to another. | 288 // 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
&); | 289 void sendMouseEventsForNodeTransition(Node*, Node*, const PlatformMouseEvent
&); |
290 | 290 |
291 MouseEventWithHitTestResults prepareMouseEvent(const HitTestRequest&, const
PlatformMouseEvent&); | 291 MouseEventWithHitTestResults prepareMouseEvent(const HitTestRequest&, const
PlatformMouseEvent&); |
292 | 292 |
293 bool dispatchMouseEvent(const AtomicString& eventType, Node* target, int cli
ckCount, const PlatformMouseEvent&); | 293 bool dispatchMouseEvent(const AtomicString& eventType, Node* target, int cli
ckCount, const PlatformMouseEvent&); |
294 bool dispatchDragEvent(const AtomicString& eventType, Node* target, const Pl
atformMouseEvent&, DataTransfer*); | 294 bool dispatchDragEvent(const AtomicString& eventType, Node* target, const Pl
atformMouseEvent&, DataTransfer*); |
295 | 295 |
296 void clearDragDataTransfer(); | 296 void clearDragDataTransfer(); |
(...skipping 28 matching lines...) Expand all Loading... |
325 bool handleGestureShowPress(); | 325 bool handleGestureShowPress(); |
326 | 326 |
327 bool handleScrollGestureOnResizer(Node*, const PlatformGestureEvent&); | 327 bool handleScrollGestureOnResizer(Node*, const PlatformGestureEvent&); |
328 | 328 |
329 bool passScrollGestureEventToWidget(const PlatformGestureEvent&, LayoutObjec
t*); | 329 bool passScrollGestureEventToWidget(const PlatformGestureEvent&, LayoutObjec
t*); |
330 | 330 |
331 AutoscrollController* autoscrollController() const; | 331 AutoscrollController* autoscrollController() const; |
332 bool panScrollInProgress() const; | 332 bool panScrollInProgress() const; |
333 void setLastKnownMousePosition(const PlatformMouseEvent&); | 333 void setLastKnownMousePosition(const PlatformMouseEvent&); |
334 | 334 |
| 335 void conditionallyEnableMouseEventForPointerTypeMouse(const PlatformMouseEve
nt&); |
| 336 |
335 bool shouldTopControlsConsumeScroll(FloatSize) const; | 337 bool shouldTopControlsConsumeScroll(FloatSize) const; |
336 | 338 |
337 // If the given element is a shadow host and its root has delegatesFocus=fal
se flag, | 339 // If the given element is a shadow host and its root has delegatesFocus=fal
se flag, |
338 // slide focus to its inner element. Returns true if the resulting focus is
different from | 340 // slide focus to its inner element. Returns true if the resulting focus is
different from |
339 // the given element. | 341 // the given element. |
340 bool slideFocusOnShadowHostIfNecessary(const Element&); | 342 bool slideFocusOnShadowHostIfNecessary(const Element&); |
341 | 343 |
342 void dispatchPointerEventsForTouchEvent(const PlatformTouchEvent&, WillBeHea
pVector<TouchInfo>&); | 344 void dispatchPointerEventsForTouchEvent(const PlatformTouchEvent&, WillBeHea
pVector<TouchInfo>&); |
343 void sendPointerCancels(WillBeHeapVector<TouchInfo>&); | 345 void sendPointerCancels(WillBeHeapVector<TouchInfo>&); |
344 | 346 |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
407 TouchTargetMap m_targetForTouchID; | 409 TouchTargetMap m_targetForTouchID; |
408 | 410 |
409 // If set, the document of the active touch sequence. Unset if no touch sequ
ence active. | 411 // If set, the document of the active touch sequence. Unset if no touch sequ
ence active. |
410 RefPtrWillBeMember<Document> m_touchSequenceDocument; | 412 RefPtrWillBeMember<Document> m_touchSequenceDocument; |
411 RefPtr<UserGestureToken> m_touchSequenceUserGestureToken; | 413 RefPtr<UserGestureToken> m_touchSequenceUserGestureToken; |
412 | 414 |
413 bool m_touchPressed; | 415 bool m_touchPressed; |
414 | 416 |
415 PointerIdManager m_pointerIdManager; | 417 PointerIdManager m_pointerIdManager; |
416 | 418 |
| 419 // Prevents firing mousedown, mousemove & mouseup in-between a canceled poin
terdown and next pointerup/pointercancel. |
| 420 // See "PREVENT MOUSE EVENT flag" in the spec: |
| 421 // https://w3c.github.io/pointerevents/#compatibility-mapping-with-mouse-e
vents |
| 422 bool m_preventMouseEventForPointerTypeMouse; |
| 423 |
417 // This is set upon sending a pointercancel for touch, prevents PE dispatche
s for touches until | 424 // This is set upon sending a pointercancel for touch, prevents PE dispatche
s for touches until |
418 // all touch-points become inactive. | 425 // all touch-points become inactive. |
419 // TODO(mustaq): Consider a state per pointerType, as in PointerIdManager? E
xclude mouse? | 426 // TODO(mustaq): Consider a state per pointerType, as in PointerIdManager? E
xclude mouse? |
420 bool m_inPointerCanceledState; | 427 bool m_inPointerCanceledState; |
421 | 428 |
422 RefPtrWillBeMember<Node> m_scrollGestureHandlingNode; | 429 RefPtrWillBeMember<Node> m_scrollGestureHandlingNode; |
423 bool m_lastGestureScrollOverWidget; | 430 bool m_lastGestureScrollOverWidget; |
424 // The most recent element to scroll natively during this scroll | 431 // The most recent element to scroll natively during this scroll |
425 // sequence. Null if no native element has scrolled this scroll | 432 // sequence. Null if no native element has scrolled this scroll |
426 // sequence, or if the most recent element to scroll used scroll | 433 // sequence, or if the most recent element to scroll used scroll |
(...skipping 17 matching lines...) Expand all Loading... |
444 // scroll which shouldn't propagate can't cause any element to | 451 // scroll which shouldn't propagate can't cause any element to |
445 // scroll other than the |m_previousGestureScrolledNode|. | 452 // scroll other than the |m_previousGestureScrolledNode|. |
446 bool m_deltaConsumedForScrollSequence; | 453 bool m_deltaConsumedForScrollSequence; |
447 }; | 454 }; |
448 | 455 |
449 } // namespace blink | 456 } // namespace blink |
450 | 457 |
451 WTF_ALLOW_INIT_WITH_MEM_FUNCTIONS(blink::EventHandler::TouchInfo); | 458 WTF_ALLOW_INIT_WITH_MEM_FUNCTIONS(blink::EventHandler::TouchInfo); |
452 | 459 |
453 #endif // EventHandler_h | 460 #endif // EventHandler_h |
OLD | NEW |