| 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, 2007, 2008 Apple Inc. All rights reserv
ed. | 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserv
ed. |
| 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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 void setTarget(PassRefPtrWillBeRawPtr<EventTarget>); | 116 void setTarget(PassRefPtrWillBeRawPtr<EventTarget>); |
| 117 | 117 |
| 118 EventTarget* currentTarget() const; | 118 EventTarget* currentTarget() const; |
| 119 void setCurrentTarget(EventTarget* currentTarget) { m_currentTarget = curren
tTarget; } | 119 void setCurrentTarget(EventTarget* currentTarget) { m_currentTarget = curren
tTarget; } |
| 120 | 120 |
| 121 unsigned short eventPhase() const { return m_eventPhase; } | 121 unsigned short eventPhase() const { return m_eventPhase; } |
| 122 void setEventPhase(unsigned short eventPhase) { m_eventPhase = eventPhase; } | 122 void setEventPhase(unsigned short eventPhase) { m_eventPhase = eventPhase; } |
| 123 | 123 |
| 124 bool bubbles() const { return m_canBubble; } | 124 bool bubbles() const { return m_canBubble; } |
| 125 bool cancelable() const { return m_cancelable; } | 125 bool cancelable() const { return m_cancelable; } |
| 126 bool scoped() const { return m_scoped; } |
| 126 | 127 |
| 127 // Event creation timestamp in milliseconds. If |HiResEventTimeStamp| | 128 // Event creation timestamp in milliseconds. If |HiResEventTimeStamp| |
| 128 // runtime feature is enabled it returns a DOMHighResTimeStamp using the | 129 // runtime feature is enabled it returns a DOMHighResTimeStamp using the |
| 129 // platform timestamp (see |m_platformTimeStamp|) otherwise it returns a | 130 // platform timestamp (see |m_platformTimeStamp|) otherwise it returns a |
| 130 // DOMTimeStamp that represents the current object's construction time (see | 131 // DOMTimeStamp that represents the current object's construction time (see |
| 131 // |m_createTime|). For more info see http://crbug.com/160524 | 132 // |m_createTime|). For more info see http://crbug.com/160524 |
| 132 double timeStamp(ScriptState*) const; | 133 double timeStamp(ScriptState*) const; |
| 133 double platformTimeStamp() const { return m_platformTimeStamp; } | 134 double platformTimeStamp() const { return m_platformTimeStamp; } |
| 134 DOMTimeStamp createTime() const { return m_createTime; } | 135 DOMTimeStamp createTime() const { return m_createTime; } |
| 135 | 136 |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 void setTrusted(bool value) { m_isTrusted = value; } | 199 void setTrusted(bool value) { m_isTrusted = value; } |
| 199 | 200 |
| 200 void setHandlingPassive(bool value) { m_handlingPassive = value; } | 201 void setHandlingPassive(bool value) { m_handlingPassive = value; } |
| 201 | 202 |
| 202 DECLARE_VIRTUAL_TRACE(); | 203 DECLARE_VIRTUAL_TRACE(); |
| 203 | 204 |
| 204 protected: | 205 protected: |
| 205 Event(); | 206 Event(); |
| 206 Event(const AtomicString& type, bool canBubble, bool cancelable); | 207 Event(const AtomicString& type, bool canBubble, bool cancelable); |
| 207 Event(const AtomicString& type, bool canBubble, bool cancelable, double plat
formTimeStamp); | 208 Event(const AtomicString& type, bool canBubble, bool cancelable, double plat
formTimeStamp); |
| 209 Event(const AtomicString& type, bool canBubble, bool cancelable, bool scoped
); |
| 210 Event(const AtomicString& type, bool canBubble, bool cancelable, bool scoped
, double platformTimeStamp); |
| 208 Event(const AtomicString& type, const EventInit&); | 211 Event(const AtomicString& type, const EventInit&); |
| 209 | 212 |
| 210 virtual void receivedTarget(); | 213 virtual void receivedTarget(); |
| 211 bool dispatched() const { return m_target; } | 214 bool dispatched() const { return m_target; } |
| 212 | 215 |
| 213 void setCanBubble(bool bubble) { m_canBubble = bubble; } | 216 void setCanBubble(bool bubble) { m_canBubble = bubble; } |
| 214 | 217 |
| 215 private: | 218 private: |
| 216 AtomicString m_type; | 219 AtomicString m_type; |
| 217 unsigned m_canBubble:1; | 220 unsigned m_canBubble:1; |
| 218 unsigned m_cancelable:1; | 221 unsigned m_cancelable:1; |
| 222 unsigned m_scoped:1; |
| 219 | 223 |
| 220 unsigned m_propagationStopped:1; | 224 unsigned m_propagationStopped:1; |
| 221 unsigned m_immediatePropagationStopped:1; | 225 unsigned m_immediatePropagationStopped:1; |
| 222 unsigned m_defaultPrevented:1; | 226 unsigned m_defaultPrevented:1; |
| 223 unsigned m_defaultHandled:1; | 227 unsigned m_defaultHandled:1; |
| 224 unsigned m_cancelBubble:1; | 228 unsigned m_cancelBubble:1; |
| 225 unsigned m_isTrusted : 1; | 229 unsigned m_isTrusted : 1; |
| 226 unsigned m_handlingPassive : 1; | 230 unsigned m_handlingPassive : 1; |
| 227 | 231 |
| 228 unsigned short m_eventPhase; | 232 unsigned short m_eventPhase; |
| 229 RefPtrWillBeMember<EventTarget> m_currentTarget; | 233 RefPtrWillBeMember<EventTarget> m_currentTarget; |
| 230 RefPtrWillBeMember<EventTarget> m_target; | 234 RefPtrWillBeMember<EventTarget> m_target; |
| 231 DOMTimeStamp m_createTime; | 235 DOMTimeStamp m_createTime; |
| 232 RefPtrWillBeMember<Event> m_underlyingEvent; | 236 RefPtrWillBeMember<Event> m_underlyingEvent; |
| 233 OwnPtrWillBeMember<EventPath> m_eventPath; | 237 OwnPtrWillBeMember<EventPath> m_eventPath; |
| 234 // The monotonic platform time in seconds, for input events it is the | 238 // The monotonic platform time in seconds, for input events it is the |
| 235 // event timestamp provided by the host OS and reported in the original | 239 // event timestamp provided by the host OS and reported in the original |
| 236 // WebInputEvent instance. | 240 // WebInputEvent instance. |
| 237 double m_platformTimeStamp; | 241 double m_platformTimeStamp; |
| 238 }; | 242 }; |
| 239 | 243 |
| 240 #define DEFINE_EVENT_TYPE_CASTS(typeName) \ | 244 #define DEFINE_EVENT_TYPE_CASTS(typeName) \ |
| 241 DEFINE_TYPE_CASTS(typeName, Event, event, event->is##typeName(), event.is##t
ypeName()) | 245 DEFINE_TYPE_CASTS(typeName, Event, event, event->is##typeName(), event.is##t
ypeName()) |
| 242 | 246 |
| 243 } // namespace blink | 247 } // namespace blink |
| 244 | 248 |
| 245 #endif // Event_h | 249 #endif // Event_h |
| OLD | NEW |