| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2001 Peter Kelly (pmk@post.com) | 2 * Copyright (C) 2001 Peter Kelly (pmk@post.com) |
| 3 * Copyright (C) 2001 Tobias Anton (anton@stud.fbi.fh-darmstadt.de) | 3 * Copyright (C) 2001 Tobias Anton (anton@stud.fbi.fh-darmstadt.de) |
| 4 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) | 4 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) |
| 5 * Copyright (C) 2003, 2004, 2005, 2006, 2008 Apple Inc. All rights reserved. | 5 * Copyright (C) 2003, 2004, 2005, 2006, 2008 Apple Inc. All rights reserved. |
| 6 * | 6 * |
| 7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
| 9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 public: | 40 public: |
| 41 static PassRefPtrWillBeRawPtr<MouseEvent> create() | 41 static PassRefPtrWillBeRawPtr<MouseEvent> create() |
| 42 { | 42 { |
| 43 return adoptRefWillBeNoop(new MouseEvent); | 43 return adoptRefWillBeNoop(new MouseEvent); |
| 44 } | 44 } |
| 45 | 45 |
| 46 static PassRefPtrWillBeRawPtr<MouseEvent> create(const AtomicString& type, b
ool canBubble, bool cancelable, PassRefPtrWillBeRawPtr<AbstractView>, | 46 static PassRefPtrWillBeRawPtr<MouseEvent> create(const AtomicString& type, b
ool canBubble, bool cancelable, PassRefPtrWillBeRawPtr<AbstractView>, |
| 47 int detail, int screenX, int screenY, int windowX, int windowY, | 47 int detail, int screenX, int screenY, int windowX, int windowY, |
| 48 int movementX, int movementY, | 48 int movementX, int movementY, |
| 49 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, unsigned short b
utton, unsigned short buttons, | 49 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, unsigned short b
utton, unsigned short buttons, |
| 50 PassRefPtrWillBeRawPtr<EventTarget> relatedTarget, PassRefPtrWillBeRawPt
r<DataTransfer>, | 50 PassRefPtrWillBeRawPtr<EventTarget> relatedTarget, DataTransfer*, |
| 51 bool isSimulated = false, PlatformMouseEvent::SyntheticEventType = Platf
ormMouseEvent::RealOrIndistinguishable, | 51 bool isSimulated = false, PlatformMouseEvent::SyntheticEventType = Platf
ormMouseEvent::RealOrIndistinguishable, |
| 52 double uiCreateTime = 0); | 52 double uiCreateTime = 0); |
| 53 | 53 |
| 54 static PassRefPtrWillBeRawPtr<MouseEvent> create(const AtomicString& eventTy
pe, PassRefPtrWillBeRawPtr<AbstractView>, const PlatformMouseEvent&, int detail,
PassRefPtrWillBeRawPtr<Node> relatedTarget); | 54 static PassRefPtrWillBeRawPtr<MouseEvent> create(const AtomicString& eventTy
pe, PassRefPtrWillBeRawPtr<AbstractView>, const PlatformMouseEvent&, int detail,
PassRefPtrWillBeRawPtr<Node> relatedTarget); |
| 55 | 55 |
| 56 static PassRefPtrWillBeRawPtr<MouseEvent> create(ScriptState*, const AtomicS
tring& eventType, const MouseEventInit&); | 56 static PassRefPtrWillBeRawPtr<MouseEvent> create(ScriptState*, const AtomicS
tring& eventType, const MouseEventInit&); |
| 57 | 57 |
| 58 virtual ~MouseEvent(); | 58 virtual ~MouseEvent(); |
| 59 | 59 |
| 60 static unsigned short platformModifiersToButtons(unsigned modifiers); | 60 static unsigned short platformModifiersToButtons(unsigned modifiers); |
| (...skipping 24 matching lines...) Expand all Loading... |
| 85 virtual bool isDragEvent() const override final; | 85 virtual bool isDragEvent() const override final; |
| 86 virtual int which() const override final; | 86 virtual int which() const override final; |
| 87 | 87 |
| 88 DECLARE_VIRTUAL_TRACE(); | 88 DECLARE_VIRTUAL_TRACE(); |
| 89 | 89 |
| 90 protected: | 90 protected: |
| 91 MouseEvent(const AtomicString& type, bool canBubble, bool cancelable, PassRe
fPtrWillBeRawPtr<AbstractView>, | 91 MouseEvent(const AtomicString& type, bool canBubble, bool cancelable, PassRe
fPtrWillBeRawPtr<AbstractView>, |
| 92 int detail, int screenX, int screenY, int windowX, int windowY, | 92 int detail, int screenX, int screenY, int windowX, int windowY, |
| 93 int movementX, int movementY, | 93 int movementX, int movementY, |
| 94 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, unsigned short b
utton, unsigned short buttons, | 94 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, unsigned short b
utton, unsigned short buttons, |
| 95 PassRefPtrWillBeRawPtr<EventTarget> relatedTarget, PassRefPtrWillBeRawPt
r<DataTransfer>, | 95 PassRefPtrWillBeRawPtr<EventTarget> relatedTarget, DataTransfer*, |
| 96 bool isSimulated, PlatformMouseEvent::SyntheticEventType, double uiCreat
eTime = 0); | 96 bool isSimulated, PlatformMouseEvent::SyntheticEventType, double uiCreat
eTime = 0); |
| 97 | 97 |
| 98 MouseEvent(const AtomicString& type, const MouseEventInit&); | 98 MouseEvent(const AtomicString& type, const MouseEventInit&); |
| 99 | 99 |
| 100 MouseEvent(); | 100 MouseEvent(); |
| 101 | 101 |
| 102 private: | 102 private: |
| 103 unsigned short m_button; | 103 unsigned short m_button; |
| 104 unsigned short m_buttons; | 104 unsigned short m_buttons; |
| 105 bool m_buttonDown; | 105 bool m_buttonDown; |
| 106 RefPtrWillBeMember<EventTarget> m_relatedTarget; | 106 RefPtrWillBeMember<EventTarget> m_relatedTarget; |
| 107 RefPtrWillBeMember<DataTransfer> m_dataTransfer; | 107 PersistentWillBeMember<DataTransfer> m_dataTransfer; |
| 108 PlatformMouseEvent::SyntheticEventType m_syntheticEventType; | 108 PlatformMouseEvent::SyntheticEventType m_syntheticEventType; |
| 109 }; | 109 }; |
| 110 | 110 |
| 111 class SimulatedMouseEvent final : public MouseEvent { | 111 class SimulatedMouseEvent final : public MouseEvent { |
| 112 public: | 112 public: |
| 113 static PassRefPtrWillBeRawPtr<SimulatedMouseEvent> create(const AtomicString
& eventType, PassRefPtrWillBeRawPtr<AbstractView>, PassRefPtrWillBeRawPtr<Event>
underlyingEvent); | 113 static PassRefPtrWillBeRawPtr<SimulatedMouseEvent> create(const AtomicString
& eventType, PassRefPtrWillBeRawPtr<AbstractView>, PassRefPtrWillBeRawPtr<Event>
underlyingEvent); |
| 114 virtual ~SimulatedMouseEvent(); | 114 virtual ~SimulatedMouseEvent(); |
| 115 | 115 |
| 116 DECLARE_VIRTUAL_TRACE(); | 116 DECLARE_VIRTUAL_TRACE(); |
| 117 | 117 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 131 virtual bool dispatchEvent(EventDispatcher&) const override; | 131 virtual bool dispatchEvent(EventDispatcher&) const override; |
| 132 bool isSyntheticMouseEvent() const { return m_mouseEventType == SyntheticMou
seEvent; } | 132 bool isSyntheticMouseEvent() const { return m_mouseEventType == SyntheticMou
seEvent; } |
| 133 MouseEventType m_mouseEventType; | 133 MouseEventType m_mouseEventType; |
| 134 }; | 134 }; |
| 135 | 135 |
| 136 DEFINE_EVENT_TYPE_CASTS(MouseEvent); | 136 DEFINE_EVENT_TYPE_CASTS(MouseEvent); |
| 137 | 137 |
| 138 } // namespace blink | 138 } // namespace blink |
| 139 | 139 |
| 140 #endif // MouseEvent_h | 140 #endif // MouseEvent_h |
| OLD | NEW |