Chromium Code Reviews| Index: third_party/WebKit/Source/core/input/PointerEventManager.cpp |
| diff --git a/third_party/WebKit/Source/core/input/PointerEventManager.cpp b/third_party/WebKit/Source/core/input/PointerEventManager.cpp |
| index 5a18188771175f635344fb342c9b6c0b0ac91bbf..fd67aa362bd4c3ac6dcb7cfdf903e38f78de183a 100644 |
| --- a/third_party/WebKit/Source/core/input/PointerEventManager.cpp |
| +++ b/third_party/WebKit/Source/core/input/PointerEventManager.cpp |
| @@ -307,7 +307,10 @@ void PointerEventManager::sendTouchCancelPointerEvent(PassRefPtrWillBeRawPtr<Eve |
| getEffectiveTargetForPointerEvent(target, pointerEvent->pointerId()), |
| pointerEvent.get()); |
| - setNodeUnderPointer(pointerEvent, nullptr); |
| + releasePointerCapture(pointerEvent->pointerId()); |
| + |
| + // Sending the leave/out events as well as lostpointercapture if required |
| + processCaptureAndPositionOfPointerEvent(pointerEvent, nullptr); |
| removePointer(pointerEvent); |
| } |
| @@ -332,9 +335,17 @@ WebInputEventResult PointerEventManager::sendTouchPointerEvent( |
| getEffectiveTargetForPointerEvent(target, pointerEvent->pointerId()), |
| pointerEvent.get()); |
| + // Setting the implicit capture for touch |
| + if (touchPoint.state() == PlatformTouchPoint::TouchPressed) |
| + setPointerCapture(pointerEvent->pointerId(), target); |
| + |
| if (touchPoint.state() == PlatformTouchPoint::TouchReleased |
| || touchPoint.state() == PlatformTouchPoint::TouchCancelled) { |
| - setNodeUnderPointer(pointerEvent, nullptr); |
| + releasePointerCapture(pointerEvent->pointerId()); |
| + |
| + // Sending the leave/out events as well as lostpointercapture if required |
|
mustaq
2016/04/05 15:46:18
Replace "...if required" with something like "...b
Navid Zolghadr
2016/04/05 16:23:51
Done.
|
| + processCaptureAndPositionOfPointerEvent(pointerEvent, nullptr); |
| + |
| removePointer(pointerEvent); |
| } |
| @@ -401,6 +412,8 @@ void PointerEventManager::clear() |
| m_preventMouseEventForPointerTypeMouse = false; |
| m_pointerEventFactory.clear(); |
| m_nodeUnderPointer.clear(); |
| + m_pointerCaptureTarget.clear(); |
| + m_pendingPointerCaptureTarget.clear(); |
| } |
| void PointerEventManager::processCaptureAndPositionOfPointerEvent( |
| @@ -566,6 +579,12 @@ bool PointerEventManager::isActive(const int pointerId) |
| return m_pointerEventFactory.isActive(pointerId); |
| } |
| +WebPointerProperties::PointerType PointerEventManager::getPointerEventType( |
| + const int pointerId) |
| +{ |
| + return m_pointerEventFactory.getPointerType(pointerId); |
| +} |
| + |
| DEFINE_TRACE(PointerEventManager) |
| { |
| #if ENABLE(OILPAN) |