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

Side by Side 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, 8 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
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 namespace blink { 7 namespace blink {
8 8
9 namespace { 9 namespace {
10 10
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 309
310 bool PointerEventFactory::isPrimary(int mappedId) const 310 bool PointerEventFactory::isPrimary(int mappedId) const
311 { 311 {
312 if (!m_pointerIdMapping.contains(mappedId)) 312 if (!m_pointerIdMapping.contains(mappedId))
313 return false; 313 return false;
314 314
315 IncomingId p = m_pointerIdMapping.get(mappedId).incomingId; 315 IncomingId p = m_pointerIdMapping.get(mappedId).incomingId;
316 return m_primaryId[p.pointerType()] == mappedId; 316 return m_primaryId[p.pointerType()] == mappedId;
317 } 317 }
318 318
319 WebPointerProperties::PointerType PointerEventFactory::getPointerType(
320 const int pointerId)
321 {
322 if (m_pointerIdMapping.contains(pointerId)) {
323 return static_cast<WebPointerProperties::PointerType>(
324 m_pointerIdMapping.get(pointerId).incomingId.pointerType());
325 }
326 return WebPointerProperties::PointerType::Unknown;
327 }
328
319 bool PointerEventFactory::isActive(const int pointerId) 329 bool PointerEventFactory::isActive(const int pointerId)
320 { 330 {
321 return m_pointerIdMapping.contains(pointerId); 331 return m_pointerIdMapping.contains(pointerId);
322 } 332 }
323 333
324 bool PointerEventFactory::isActiveButtonsState(const int pointerId) 334 bool PointerEventFactory::isActiveButtonsState(const int pointerId)
325 { 335 {
326 return m_pointerIdMapping.contains(pointerId) 336 return m_pointerIdMapping.contains(pointerId)
327 && m_pointerIdMapping.get(pointerId).isActiveButtons; 337 && m_pointerIdMapping.get(pointerId).isActiveButtons;
328 } 338 }
329 339
330 } // namespace blink 340 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/events/PointerEventFactory.h ('k') | third_party/WebKit/Source/core/input/EventHandler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698