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 = nullptr); | 286 bool dispatchPointerEvent(Node* target, const AtomicString& eventType, 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 |
| 295 // 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 // {mousedown, mousemove, mouseup}). |
| 298 // TODO(mustaq): Can we avoid the clickCount param, instead use PlatformMous
eEvent's count? |
| 299 // Same applied to dispatchMouseEvent() above. |
| 300 bool updatePointerTargetAndDispatchEvents(const AtomicString& mouseEventType
, Node* target, |
| 301 int clickCount, const PlatformMouseEvent&); |
| 302 |
294 bool dispatchDragEvent(const AtomicString& eventType, Node* target, const Pl
atformMouseEvent&, DataTransfer*); | 303 bool dispatchDragEvent(const AtomicString& eventType, Node* target, const Pl
atformMouseEvent&, DataTransfer*); |
295 | 304 |
296 void clearDragDataTransfer(); | 305 void clearDragDataTransfer(); |
297 | 306 |
298 bool handleDrag(const MouseEventWithHitTestResults&, DragInitiator); | 307 bool handleDrag(const MouseEventWithHitTestResults&, DragInitiator); |
299 bool tryStartDrag(const MouseEventWithHitTestResults&); | 308 bool tryStartDrag(const MouseEventWithHitTestResults&); |
300 void clearDragState(); | 309 void clearDragState(); |
301 | 310 |
302 bool dispatchDragSrcEvent(const AtomicString& eventType, const PlatformMouse
Event&); | 311 bool dispatchDragSrcEvent(const AtomicString& eventType, const PlatformMouse
Event&); |
303 | 312 |
(...skipping 30 matching lines...) Expand all Loading... |
334 | 343 |
335 void conditionallyEnableMouseEventForPointerTypeMouse(const PlatformMouseEve
nt&); | 344 void conditionallyEnableMouseEventForPointerTypeMouse(const PlatformMouseEve
nt&); |
336 | 345 |
337 bool shouldTopControlsConsumeScroll(FloatSize) const; | 346 bool shouldTopControlsConsumeScroll(FloatSize) const; |
338 | 347 |
339 // If the given element is a shadow host and its root has delegatesFocus=fal
se flag, | 348 // If the given element is a shadow host and its root has delegatesFocus=fal
se flag, |
340 // slide focus to its inner element. Returns true if the resulting focus is
different from | 349 // slide focus to its inner element. Returns true if the resulting focus is
different from |
341 // the given element. | 350 // the given element. |
342 bool slideFocusOnShadowHostIfNecessary(const Element&); | 351 bool slideFocusOnShadowHostIfNecessary(const Element&); |
343 | 352 |
344 void dispatchPointerEventsForTouchEvent(const PlatformTouchEvent&, WillBeHea
pVector<TouchInfo>&); | 353 void dispatchPointerEvents(const PlatformTouchEvent&, WillBeHeapVector<Touch
Info>&); |
345 void sendPointerCancels(WillBeHeapVector<TouchInfo>&); | 354 void sendPointerCancels(WillBeHeapVector<TouchInfo>&); |
346 | 355 |
347 bool dispatchTouchEvents(const PlatformTouchEvent&, WillBeHeapVector<TouchIn
fo>&, bool, bool); | 356 bool dispatchTouchEvents(const PlatformTouchEvent&, WillBeHeapVector<TouchIn
fo>&, bool, bool); |
348 | 357 |
349 // NOTE: If adding a new field to this class please ensure that it is | 358 // NOTE: If adding a new field to this class please ensure that it is |
350 // cleared in |EventHandler::clear()|. | 359 // cleared in |EventHandler::clear()|. |
351 | 360 |
352 const RawPtrWillBeMember<LocalFrame> m_frame; | 361 const RawPtrWillBeMember<LocalFrame> m_frame; |
353 | 362 |
354 bool m_mousePressed; | 363 bool m_mousePressed; |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
451 // scroll which shouldn't propagate can't cause any element to | 460 // scroll which shouldn't propagate can't cause any element to |
452 // scroll other than the |m_previousGestureScrolledNode|. | 461 // scroll other than the |m_previousGestureScrolledNode|. |
453 bool m_deltaConsumedForScrollSequence; | 462 bool m_deltaConsumedForScrollSequence; |
454 }; | 463 }; |
455 | 464 |
456 } // namespace blink | 465 } // namespace blink |
457 | 466 |
458 WTF_ALLOW_INIT_WITH_MEM_FUNCTIONS(blink::EventHandler::TouchInfo); | 467 WTF_ALLOW_INIT_WITH_MEM_FUNCTIONS(blink::EventHandler::TouchInfo); |
459 | 468 |
460 #endif // EventHandler_h | 469 #endif // EventHandler_h |
OLD | NEW |