Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(377)

Unified Diff: third_party/WebKit/Source/core/events/PointerEventFactory.cpp

Issue 1838973003: Send lostpointercapture on touch capturing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/events/PointerEventFactory.cpp
diff --git a/third_party/WebKit/Source/core/events/PointerEventFactory.cpp b/third_party/WebKit/Source/core/events/PointerEventFactory.cpp
index 04490da249950fe039c2c8180037c7427548963f..a86ba84b0552390c7ab5a2b9eebbd5a79840b58d 100644
--- a/third_party/WebKit/Source/core/events/PointerEventFactory.cpp
+++ b/third_party/WebKit/Source/core/events/PointerEventFactory.cpp
@@ -62,17 +62,20 @@ float getPointerEventPressure(float force, int buttons)
return force;
}
-void PointerEventFactory::setIdTypeButtons(PointerEventInit &pointerEventInit,
+bool PointerEventFactory::setIdTypeButtons(PointerEventInit &pointerEventInit,
const WebPointerProperties &pointerProperties, unsigned buttons)
{
const WebPointerProperties::PointerType pointerType = pointerProperties.pointerType;
const IncomingId incomingId(pointerType, pointerProperties.id);
+ int previousCurrentId = m_currentId;
int pointerId = addIdAndActiveButtons(incomingId, buttons != 0);
pointerEventInit.setButtons(buttons);
pointerEventInit.setPointerId(pointerId);
pointerEventInit.setPointerType(pointerTypeNameForWebPointPointerType(pointerType));
pointerEventInit.setIsPrimary(isPrimary(pointerId));
+
+ return previousCurrentId != m_currentId;
}
PassRefPtrWillBeRawPtr<PointerEvent> PointerEventFactory::create(
@@ -128,7 +131,7 @@ PassRefPtrWillBeRawPtr<PointerEvent> PointerEventFactory::create(
PassRefPtrWillBeRawPtr<PointerEvent> PointerEventFactory::create(const AtomicString& type,
const PlatformTouchPoint& touchPoint, PlatformEvent::Modifiers modifiers,
const double width, const double height,
- const double clientX, const double clientY)
+ const double clientX, const double clientY, bool &isNew)
{
const PlatformTouchPoint::TouchState pointState = touchPoint.state();
@@ -143,7 +146,7 @@ PassRefPtrWillBeRawPtr<PointerEvent> PointerEventFactory::create(const AtomicStr
PointerEventInit pointerEventInit;
- setIdTypeButtons(pointerEventInit, touchPoint.pointerProperties(),
+ isNew = setIdTypeButtons(pointerEventInit, touchPoint.pointerProperties(),
pointerReleasedOrCancelled ? 0 : 1);
pointerEventInit.setWidth(width);

Powered by Google App Engine
This is Rietveld 408576698