| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "core/events/PointerEventFactory.h" | 5 #include "core/events/PointerEventFactory.h" |
| 6 | 6 |
| 7 #include "core/frame/FrameView.h" | 7 #include "core/frame/FrameView.h" |
| 8 #include "platform/geometry/FloatSize.h" | 8 #include "platform/geometry/FloatSize.h" |
| 9 | 9 |
| 10 namespace blink { | 10 namespace blink { |
| (...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 updateMousePointerEventInit(mouseEvent, view, &pointerEventInit); | 270 updateMousePointerEventInit(mouseEvent, view, &pointerEventInit); |
| 271 | 271 |
| 272 // Create coalesced events init structure only for pointermove. | 272 // Create coalesced events init structure only for pointermove. |
| 273 if (pointerEventName == EventTypeNames::pointermove) { | 273 if (pointerEventName == EventTypeNames::pointermove) { |
| 274 HeapVector<Member<PointerEvent>> coalescedPointerEvents; | 274 HeapVector<Member<PointerEvent>> coalescedPointerEvents; |
| 275 for (const auto& coalescedMouseEvent : coalescedMouseEvents) { | 275 for (const auto& coalescedMouseEvent : coalescedMouseEvents) { |
| 276 // TODO(crbug.com/694742): We will set the id from low-level OS events | 276 // TODO(crbug.com/694742): We will set the id from low-level OS events |
| 277 // and enable this DCHECK again. | 277 // and enable this DCHECK again. |
| 278 // DCHECK_EQ(mouseEvent.id, coalescedMouseEvent.id); | 278 // DCHECK_EQ(mouseEvent.id, coalescedMouseEvent.id); |
| 279 | 279 |
| 280 // TODO(crbug.com/684292): We need further investigation of why the | 280 DCHECK_EQ(mouseEvent.pointerType, coalescedMouseEvent.pointerType); |
| 281 // following DCHECK fails. | |
| 282 // DCHECK_EQ(mouseEvent.pointerType, coalescedMouseEvent.pointerType); | |
| 283 PointerEventInit coalescedEventInit = pointerEventInit; | 281 PointerEventInit coalescedEventInit = pointerEventInit; |
| 284 updateMousePointerEventInit(coalescedMouseEvent, view, | 282 updateMousePointerEventInit(coalescedMouseEvent, view, |
| 285 &coalescedEventInit); | 283 &coalescedEventInit); |
| 286 coalescedPointerEvents.push_back( | 284 coalescedPointerEvents.push_back( |
| 287 PointerEvent::create(pointerEventName, coalescedEventInit)); | 285 PointerEvent::create(pointerEventName, coalescedEventInit)); |
| 288 } | 286 } |
| 289 pointerEventInit.setCoalescedEvents(coalescedPointerEvents); | 287 pointerEventInit.setCoalescedEvents(coalescedPointerEvents); |
| 290 } | 288 } |
| 291 | 289 |
| 292 return PointerEvent::create(pointerEventName, pointerEventInit); | 290 return PointerEvent::create(pointerEventName, pointerEventInit); |
| (...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 529 const WebPointerProperties& properties) const { | 527 const WebPointerProperties& properties) const { |
| 530 if (properties.pointerType == WebPointerProperties::PointerType::Mouse) | 528 if (properties.pointerType == WebPointerProperties::PointerType::Mouse) |
| 531 return PointerEventFactory::s_mouseId; | 529 return PointerEventFactory::s_mouseId; |
| 532 IncomingId id(properties.pointerType, properties.id); | 530 IncomingId id(properties.pointerType, properties.id); |
| 533 if (m_pointerIncomingIdMapping.contains(id)) | 531 if (m_pointerIncomingIdMapping.contains(id)) |
| 534 return m_pointerIncomingIdMapping.at(id); | 532 return m_pointerIncomingIdMapping.at(id); |
| 535 return PointerEventFactory::s_invalidId; | 533 return PointerEventFactory::s_invalidId; |
| 536 } | 534 } |
| 537 | 535 |
| 538 } // namespace blink | 536 } // namespace blink |
| OLD | NEW |