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

Side by Side Diff: third_party/WebKit/Source/core/events/PointerEventFactory.cpp

Issue 2706513002: Revert of Re-enable DCHECK for pointertypes of coalesced events (Closed)
Patch Set: Created 3 years, 10 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 258
259 pointerEventInit.setView(view); 259 pointerEventInit.setView(view);
260 260
261 updateMousePointerEventInit(mouseEvent, view, &pointerEventInit); 261 updateMousePointerEventInit(mouseEvent, view, &pointerEventInit);
262 262
263 // Create coalesced events init structure only for pointermove. 263 // Create coalesced events init structure only for pointermove.
264 if (pointerEventName == EventTypeNames::pointermove) { 264 if (pointerEventName == EventTypeNames::pointermove) {
265 HeapVector<Member<PointerEvent>> coalescedPointerEvents; 265 HeapVector<Member<PointerEvent>> coalescedPointerEvents;
266 for (const auto& coalescedMouseEvent : coalescedMouseEvents) { 266 for (const auto& coalescedMouseEvent : coalescedMouseEvents) {
267 DCHECK_EQ(mouseEvent.id, coalescedMouseEvent.id); 267 DCHECK_EQ(mouseEvent.id, coalescedMouseEvent.id);
268 DCHECK_EQ(mouseEvent.pointerType, coalescedMouseEvent.pointerType); 268 // TODO(crbug.com/684292): We need further investigation of why the
269 // following DCHECK fails.
270 // DCHECK_EQ(mouseEvent.pointerType, coalescedMouseEvent.pointerType);
269 PointerEventInit coalescedEventInit = pointerEventInit; 271 PointerEventInit coalescedEventInit = pointerEventInit;
270 updateMousePointerEventInit(coalescedMouseEvent, view, 272 updateMousePointerEventInit(coalescedMouseEvent, view,
271 &coalescedEventInit); 273 &coalescedEventInit);
272 coalescedPointerEvents.push_back( 274 coalescedPointerEvents.push_back(
273 PointerEvent::create(pointerEventName, coalescedEventInit)); 275 PointerEvent::create(pointerEventName, coalescedEventInit));
274 } 276 }
275 pointerEventInit.setCoalescedEvents(coalescedPointerEvents); 277 pointerEventInit.setCoalescedEvents(coalescedPointerEvents);
276 } 278 }
277 279
278 return PointerEvent::create(pointerEventName, pointerEventInit); 280 return PointerEvent::create(pointerEventName, pointerEventInit);
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
515 const WebPointerProperties& properties) const { 517 const WebPointerProperties& properties) const {
516 if (properties.pointerType == WebPointerProperties::PointerType::Mouse) 518 if (properties.pointerType == WebPointerProperties::PointerType::Mouse)
517 return PointerEventFactory::s_mouseId; 519 return PointerEventFactory::s_mouseId;
518 IncomingId id(properties.pointerType, properties.id); 520 IncomingId id(properties.pointerType, properties.id);
519 if (m_pointerIncomingIdMapping.contains(id)) 521 if (m_pointerIncomingIdMapping.contains(id))
520 return m_pointerIncomingIdMapping.get(id); 522 return m_pointerIncomingIdMapping.get(id);
521 return PointerEventFactory::s_invalidId; 523 return PointerEventFactory::s_invalidId;
522 } 524 }
523 525
524 } // namespace blink 526 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698