Chromium Code Reviews| Index: third_party/WebKit/Source/core/events/PointerEventManager.h |
| diff --git a/third_party/WebKit/Source/core/events/PointerEventManager.h b/third_party/WebKit/Source/core/events/PointerEventManager.h |
| index ea851f1b29d581ad7efb15ad4820d0df00c51af3..1bb4a459716ab079af69ecac2b62057307590145 100644 |
| --- a/third_party/WebKit/Source/core/events/PointerEventManager.h |
| +++ b/third_party/WebKit/Source/core/events/PointerEventManager.h |
| @@ -53,22 +53,36 @@ public: |
| // Returns the node capturing this pointer id, and null if no node is capturing it. |
| EventTarget* getCapturingNode(PassRefPtrWillBeRawPtr<PointerEvent>); |
| + void elementRemoved(EventTarget*); |
| + void setPointerCapture(int, EventTarget*); |
| + void releasePointerCapture(int, EventTarget*); |
| + void implicitReleasePointerCapture(int); |
| + bool isActive(const int); |
| + EventTarget* getMouseCapturingNode(); |
| + |
| private: |
| - typedef long MappedId; |
| typedef std::pair<int, int> IncomingId; |
| - |
| - MappedId add(const IncomingId); |
| - bool isPrimary(const MappedId) const; |
| - void setIdAndType(PointerEventInit &, const WebPointerProperties &); |
| - |
| - static const MappedId s_invalidId; |
| - static const MappedId s_mouseId; |
| - |
| - PointerEventManager::MappedId m_currentId; |
| - HashMap<IncomingId, MappedId, WTF::PairHash<int, int>, WTF::PairHashTraits<WTF::UnsignedWithZeroKeyHashTraits<int>, WTF::UnsignedWithZeroKeyHashTraits<int>>> m_idMapping; |
| - HashMap<MappedId, IncomingId, WTF::IntHash<MappedId>, WTF::UnsignedWithZeroKeyHashTraits<MappedId>> m_idReverseMapping; |
| - MappedId m_primaryId[static_cast<int>(WebPointerProperties::PointerType::LastEntry) + 1]; |
| - MappedId m_idCount[static_cast<int>(WebPointerProperties::PointerType::LastEntry) + 1]; |
| + typedef WillBeHeapHashMap<int, RefPtrWillBeMember<EventTarget>> PointerCapturingMap; |
| + |
| + int addAndUpdateButtons(const IncomingId, const int); |
| + int add(const IncomingId); |
| + bool isPrimary(const int) const; |
| + void setIdAndType(PointerEventInit &, const WebPointerProperties &, int); |
| + bool isActiveButtons(const int); |
| + void processPendingPointerCapture(int); |
| + void removeTargetFromPointerCapturingMapping(PointerCapturingMap&, EventTarget*); |
| + |
| + static const int s_invalidId; |
| + static const int s_mouseId; |
| + |
| + int m_currentId; |
| + HashMap<IncomingId, int, WTF::PairHash<int, int>, WTF::PairHashTraits<WTF::UnsignedWithZeroKeyHashTraits<int>, WTF::UnsignedWithZeroKeyHashTraits<int>>> m_idMapping; |
|
mustaq
2016/02/06 04:36:31
Please combine the next two hashmaps into one, thi
Navid Zolghadr
2016/02/08 15:58:42
Did you mean m_idReverseMapping and m_lastButtons
|
| + HashMap<int, IncomingId, WTF::IntHash<int>, WTF::UnsignedWithZeroKeyHashTraits<int>> m_idReverseMapping; |
| + HashMap<int, int, WTF::IntHash<int>, WTF::UnsignedWithZeroKeyHashTraits<int>> m_lastButtons; |
|
mustaq
2016/02/06 04:36:31
Can you make it <int, bool>? s/m_lastButtons/m_isA
Navid Zolghadr
2016/02/08 15:58:42
Although right now I only use it as bool. But I th
|
| + int m_primaryId[static_cast<int>(WebPointerProperties::PointerType::LastEntry) + 1]; |
| + int m_idCount[static_cast<int>(WebPointerProperties::PointerType::LastEntry) + 1]; |
| + PointerCapturingMap m_pointerCaptureTarget; |
| + PointerCapturingMap m_pendingPointerCaptureTarget; |
| }; |
| } // namespace blink |