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

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

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 #ifndef PointerEventFactory_h 5 #ifndef PointerEventFactory_h
6 #define PointerEventFactory_h 6 #define PointerEventFactory_h
7 7
8 #include "core/CoreExport.h" 8 #include "core/CoreExport.h"
9 #include "core/events/PointerEvent.h" 9 #include "core/events/PointerEvent.h"
10 #include "public/platform/WebPointerProperties.h" 10 #include "public/platform/WebPointerProperties.h"
(...skipping 19 matching lines...) Expand all
30 ~PointerEventFactory(); 30 ~PointerEventFactory();
31 31
32 PassRefPtrWillBeRawPtr<PointerEvent> create( 32 PassRefPtrWillBeRawPtr<PointerEvent> create(
33 const AtomicString& mouseEventName, const PlatformMouseEvent&, 33 const AtomicString& mouseEventName, const PlatformMouseEvent&,
34 PassRefPtrWillBeRawPtr<EventTarget> relatedTarget, 34 PassRefPtrWillBeRawPtr<EventTarget> relatedTarget,
35 PassRefPtrWillBeRawPtr<AbstractView>); 35 PassRefPtrWillBeRawPtr<AbstractView>);
36 36
37 PassRefPtrWillBeRawPtr<PointerEvent> create(const AtomicString& type, 37 PassRefPtrWillBeRawPtr<PointerEvent> create(const AtomicString& type,
38 const PlatformTouchPoint&, PlatformEvent::Modifiers, 38 const PlatformTouchPoint&, PlatformEvent::Modifiers,
39 const double width, const double height, 39 const double width, const double height,
40 const double clientX, const double clientY); 40 const double clientX, const double clientY, bool &isNew);
41 41
42 PassRefPtrWillBeRawPtr<PointerEvent> createPointerCancelEvent( 42 PassRefPtrWillBeRawPtr<PointerEvent> createPointerCancelEvent(
43 const PlatformTouchPoint&); 43 const PlatformTouchPoint&);
44 44
45 // For creating capture events (i.e got/lostpointercapture) 45 // For creating capture events (i.e got/lostpointercapture)
46 PassRefPtrWillBeRawPtr<PointerEvent> createPointerCaptureEvent( 46 PassRefPtrWillBeRawPtr<PointerEvent> createPointerCaptureEvent(
47 PassRefPtrWillBeRawPtr<PointerEvent>, 47 PassRefPtrWillBeRawPtr<PointerEvent>,
48 const AtomicString&); 48 const AtomicString&);
49 49
50 // For creating transition events (i.e pointerout/leave/over/enter) 50 // For creating transition events (i.e pointerout/leave/over/enter)
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 IncomingId incomingId; 82 IncomingId incomingId;
83 bool isActiveButtons; 83 bool isActiveButtons;
84 PointerAttributes() {} 84 PointerAttributes() {}
85 PointerAttributes(IncomingId incomingId, unsigned isActiveButtons) 85 PointerAttributes(IncomingId incomingId, unsigned isActiveButtons)
86 : incomingId(incomingId) 86 : incomingId(incomingId)
87 , isActiveButtons(isActiveButtons) {} 87 , isActiveButtons(isActiveButtons) {}
88 } PointerAttributes; 88 } PointerAttributes;
89 89
90 int addIdAndActiveButtons(const IncomingId, bool isActiveButtons); 90 int addIdAndActiveButtons(const IncomingId, bool isActiveButtons);
91 bool isPrimary(const int) const; 91 bool isPrimary(const int) const;
92 void setIdTypeButtons(PointerEventInit &, const WebPointerProperties &, 92 bool setIdTypeButtons(PointerEventInit &, const WebPointerProperties &,
93 unsigned buttons); 93 unsigned buttons);
94 94
95 static const int s_invalidId; 95 static const int s_invalidId;
96 static const int s_mouseId; 96 static const int s_mouseId;
97 97
98 int m_currentId; 98 int m_currentId;
99 HashMap<IncomingId, int, WTF::PairHash<int, int>, WTF::PairHashTraits<Unsign edHash, UnsignedHash>> m_pointerIncomingIdMapping; 99 HashMap<IncomingId, int, WTF::PairHash<int, int>, WTF::PairHashTraits<Unsign edHash, UnsignedHash>> m_pointerIncomingIdMapping;
100 HashMap<int, PointerAttributes, WTF::IntHash<int>, UnsignedHash> m_pointerId Mapping; 100 HashMap<int, PointerAttributes, WTF::IntHash<int>, UnsignedHash> m_pointerId Mapping;
101 int m_primaryId[static_cast<int>(WebPointerProperties::PointerType::LastEntr y) + 1]; 101 int m_primaryId[static_cast<int>(WebPointerProperties::PointerType::LastEntr y) + 1];
102 int m_idCount[static_cast<int>(WebPointerProperties::PointerType::LastEntry) + 1]; 102 int m_idCount[static_cast<int>(WebPointerProperties::PointerType::LastEntry) + 1];
103 }; 103 };
104 104
105 } // namespace blink 105 } // namespace blink
106 106
107 #endif // PointerEventFactory_h 107 #endif // PointerEventFactory_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698