Chromium Code Reviews| Index: third_party/WebKit/Source/core/input/PointerEventManager.h |
| diff --git a/third_party/WebKit/Source/core/input/PointerEventManager.h b/third_party/WebKit/Source/core/input/PointerEventManager.h |
| index 5b74b984e4a43ed8ff323c057a6b17beac280d19..3f7d085fa34274fab325310bea6da2d87bb406b2 100644 |
| --- a/third_party/WebKit/Source/core/input/PointerEventManager.h |
| +++ b/third_party/WebKit/Source/core/input/PointerEventManager.h |
| @@ -29,7 +29,8 @@ public: |
| PassRefPtrWillBeRawPtr<Node>, const AtomicString& type, |
| int clickCount, const PlatformMouseEvent&, |
| PassRefPtrWillBeRawPtr<Node> relatedTarget, |
| - PassRefPtrWillBeRawPtr<AbstractView>); |
| + PassRefPtrWillBeRawPtr<AbstractView>, |
| + PassRefPtrWillBeRawPtr<Node> lastNodeUnderMouse); |
| // Returns whether the event is consumed or not |
| WebInputEventResult sendTouchPointerEvent( |
| @@ -41,19 +42,20 @@ public: |
| void sendTouchCancelPointerEvent(PassRefPtrWillBeRawPtr<EventTarget>, |
| const PlatformTouchPoint&); |
| - // Sends node transition events (pointer|mouse)(out|leave|over|enter) to the corresponding targets |
| - void sendNodeTransitionEvents(PassRefPtrWillBeRawPtr<Node> exitedNode, |
| + // Sends node transition events mouseout/leave/over/enter to the |
| + // corresponding targets. This function sends pointerout/leave/over/enter |
| + // only when isFrameBoundaryTransition is true which indicates the |
|
Rick Byers
2016/03/29 16:37:14
nit: can you add a little more detail on why the f
Navid Zolghadr
2016/03/29 17:44:03
I explained a bit more here in this comment. Essen
|
| + // transition is over the document boundary and not only the elements border |
| + // inside the document. |
| + void sendMouseAndPossiblyPointerNodeTransitionEvents( |
| + PassRefPtrWillBeRawPtr<Node> exitedNode, |
| PassRefPtrWillBeRawPtr<Node> enteredNode, |
| const PlatformMouseEvent&, |
| - PassRefPtrWillBeRawPtr<AbstractView>); |
| + PassRefPtrWillBeRawPtr<AbstractView>, bool isFrameBoundaryTransition); |
| // Clear all the existing ids. |
| void clear(); |
| - // May clear PREVENT MOUSE EVENT flag as per pointer event spec: |
| - // https://w3c.github.io/pointerevents/#compatibility-mapping-with-mouse-events |
| - void conditionallyEnableMouseEventForPointerTypeMouse(unsigned); |
| - |
| void elementRemoved(EventTarget*); |
| void setPointerCapture(int, EventTarget*); |
| void releasePointerCapture(int, EventTarget*); |
| @@ -86,12 +88,29 @@ private: |
| const PlatformMouseEvent& = PlatformMouseEvent(), |
| bool sendMouseEvent = false); |
| void setNodeUnderPointer(PassRefPtrWillBeRawPtr<PointerEvent>, |
| - PassRefPtrWillBeRawPtr<EventTarget>); |
| - void processPendingPointerCapture( |
| + PassRefPtrWillBeRawPtr<EventTarget>, bool sendEvent = true); |
| + |
| + // Returns whether the pointer capture is changed. In this case this |
| + // function will take care of transition events and setNodeUnderPointer |
| + // should not send transition events. |
| + bool processPendingPointerCapture( |
| const PassRefPtrWillBeRawPtr<PointerEvent>, |
| const PassRefPtrWillBeRawPtr<EventTarget>, |
| const PlatformMouseEvent& = PlatformMouseEvent(), |
| bool sendMouseEvent = false); |
| + |
| + // Processes the capture state of a pointer, updates node under |
| + // pointer, and sends corresponding transition events for pointer if |
| + // setPointerPosition is true. It also sends corresponding transition events |
| + // for mouse if sendMouseEvent is true. |
| + void processCaptureAndPositionOfPointerEvent( |
| + const PassRefPtrWillBeRawPtr<PointerEvent>, |
| + const PassRefPtrWillBeRawPtr<EventTarget> hitTestTarget, |
| + const PassRefPtrWillBeRawPtr<EventTarget> lastNodeUnderMouse = nullptr, |
| + const PlatformMouseEvent& = PlatformMouseEvent(), |
| + bool sendMouseEvent = false, |
| + bool setPointerPosition = true); |
| + |
| void removeTargetFromPointerCapturingMapping( |
| PointerCapturingMap&, const EventTarget*); |
| PassRefPtrWillBeRawPtr<EventTarget> getEffectiveTargetForPointerEvent( |