| 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 9c8a44afc74c946178bc4d837b809d3da8145e82..cc50085728994221c566246b27b820a06f5ede5c 100644
|
| --- a/third_party/WebKit/Source/core/events/PointerEventFactory.cpp
|
| +++ b/third_party/WebKit/Source/core/events/PointerEventFactory.cpp
|
| @@ -208,16 +208,16 @@ PointerEvent* PointerEventFactory::createPointerCancelEvent(
|
| }
|
|
|
| PointerEvent* PointerEventFactory::createPointerCaptureEvent(
|
| - const int pointerId,
|
| + PointerEvent* pointerEvent,
|
| const AtomicString& type)
|
| {
|
| ASSERT(type == EventTypeNames::gotpointercapture
|
| || type == EventTypeNames::lostpointercapture);
|
|
|
| - // See https://github.com/w3c/pointerevents/issues/113 as why we don't set
|
| - // any other attributes for got/lostpointercapture.
|
| PointerEventInit pointerEventInit;
|
| - pointerEventInit.setPointerId(pointerId);
|
| + pointerEventInit.setPointerId(pointerEvent->pointerId());
|
| + pointerEventInit.setPointerType(pointerEvent->pointerType());
|
| + pointerEventInit.setIsPrimary(pointerEvent->isPrimary());
|
| pointerEventInit.setBubbles(true);
|
| pointerEventInit.setCancelable(false);
|
|
|
| @@ -294,12 +294,12 @@ int PointerEventFactory::addIdAndActiveButtons(const IncomingId p,
|
| bool isActiveButtons)
|
| {
|
| // Do not add extra mouse pointer as it was added in initialization
|
| - if (p.pointerType() == WebPointerProperties::PointerType::Mouse) {
|
| + if (p.pointerType() == toInt(WebPointerProperties::PointerType::Mouse)) {
|
| m_pointerIdMapping.set(s_mouseId, PointerAttributes(p, isActiveButtons));
|
| return s_mouseId;
|
| }
|
|
|
| - int type = p.pointerTypeInt();
|
| + int type = p.pointerType();
|
| if (m_pointerIncomingIdMapping.contains(p)) {
|
| int mappedId = m_pointerIncomingIdMapping.get(p);
|
| m_pointerIdMapping.set(mappedId, PointerAttributes(p, isActiveButtons));
|
| @@ -322,7 +322,7 @@ bool PointerEventFactory::remove(const int mappedId)
|
| return false;
|
|
|
| IncomingId p = m_pointerIdMapping.get(mappedId).incomingId;
|
| - int type = p.pointerTypeInt();
|
| + int type = p.pointerType();
|
| m_pointerIdMapping.remove(mappedId);
|
| m_pointerIncomingIdMapping.remove(p);
|
| if (m_primaryId[type] == mappedId)
|
| @@ -338,7 +338,7 @@ Vector<int> PointerEventFactory::getPointerIdsOfType(
|
|
|
| for (auto iter = m_pointerIdMapping.begin(); iter != m_pointerIdMapping.end(); ++iter) {
|
| int mappedId = iter->key;
|
| - if (iter->value.incomingId.pointerType() == pointerType)
|
| + if (iter->value.incomingId.pointerType() == static_cast<int>(pointerType))
|
| mappedIds.append(mappedId);
|
| }
|
|
|
| @@ -353,7 +353,7 @@ bool PointerEventFactory::isPrimary(int mappedId) const
|
| return false;
|
|
|
| IncomingId p = m_pointerIdMapping.get(mappedId).incomingId;
|
| - return m_primaryId[p.pointerTypeInt()] == mappedId;
|
| + return m_primaryId[p.pointerType()] == mappedId;
|
| }
|
|
|
| bool PointerEventFactory::isActive(const int pointerId) const
|
|
|