| 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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 virtual void doneDispatchingEventAtCurrentTarget() {} | 130 virtual void doneDispatchingEventAtCurrentTarget() {} |
| 131 | 131 |
| 132 unsigned short eventPhase() const { return m_eventPhase; } | 132 unsigned short eventPhase() const { return m_eventPhase; } |
| 133 void setEventPhase(unsigned short eventPhase) { m_eventPhase = eventPhase; } | 133 void setEventPhase(unsigned short eventPhase) { m_eventPhase = eventPhase; } |
| 134 | 134 |
| 135 bool bubbles() const { return m_canBubble; } | 135 bool bubbles() const { return m_canBubble; } |
| 136 bool cancelable() const { return m_cancelable; } | 136 bool cancelable() const { return m_cancelable; } |
| 137 bool composed() const { return m_composed; } | 137 bool composed() const { return m_composed; } |
| 138 bool isScopedInV0() const; | 138 bool isScopedInV0() const; |
| 139 | 139 |
| 140 // Event creation timestamp in milliseconds. If |HiResEventTimeStamp| | 140 // Event creation timestamp in milliseconds. It returns a DOMHighResTimeStam
p |
| 141 // runtime feature is enabled it returns a DOMHighResTimeStamp using the | 141 // using the platform timestamp (see |m_platformTimeStamp|). |
| 142 // platform timestamp (see |m_platformTimeStamp|) otherwise it returns a | 142 // For more info see http://crbug.com/160524 |
| 143 // DOMTimeStamp that represents the current object's construction time (see | |
| 144 // |m_createTime|). For more info see http://crbug.com/160524 | |
| 145 double timeStamp(ScriptState*) const; | 143 double timeStamp(ScriptState*) const; |
| 146 double platformTimeStamp() const { return m_platformTimeStamp; } | 144 double platformTimeStamp() const { return m_platformTimeStamp; } |
| 147 DOMTimeStamp createTime() const { return m_createTime; } | |
| 148 | 145 |
| 149 void stopPropagation() { m_propagationStopped = true; } | 146 void stopPropagation() { m_propagationStopped = true; } |
| 150 void stopImmediatePropagation() { m_immediatePropagationStopped = true; } | 147 void stopImmediatePropagation() { m_immediatePropagationStopped = true; } |
| 151 | 148 |
| 152 // IE Extensions | 149 // IE Extensions |
| 153 EventTarget* srcElement() const { return target(); } // MSIE extension - "th
e object that fired the event" | 150 EventTarget* srcElement() const { return target(); } // MSIE extension - "th
e object that fired the event" |
| 154 | 151 |
| 155 bool legacyReturnValue(ExecutionContext*) const; | 152 bool legacyReturnValue(ExecutionContext*) const; |
| 156 void setLegacyReturnValue(ExecutionContext*, bool returnValue); | 153 void setLegacyReturnValue(ExecutionContext*, bool returnValue); |
| 157 | 154 |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 255 unsigned m_isTrusted : 1; | 252 unsigned m_isTrusted : 1; |
| 256 unsigned m_handlingPassive : 1; | 253 unsigned m_handlingPassive : 1; |
| 257 | 254 |
| 258 // Whether preventDefault was called when |m_handlingPassive| is | 255 // Whether preventDefault was called when |m_handlingPassive| is |
| 259 // true. This field is reset on each call to setHandlingPassive. | 256 // true. This field is reset on each call to setHandlingPassive. |
| 260 unsigned m_preventDefaultCalledDuringPassive : 1; | 257 unsigned m_preventDefaultCalledDuringPassive : 1; |
| 261 | 258 |
| 262 unsigned short m_eventPhase; | 259 unsigned short m_eventPhase; |
| 263 Member<EventTarget> m_currentTarget; | 260 Member<EventTarget> m_currentTarget; |
| 264 Member<EventTarget> m_target; | 261 Member<EventTarget> m_target; |
| 265 DOMTimeStamp m_createTime; | |
| 266 Member<Event> m_underlyingEvent; | 262 Member<Event> m_underlyingEvent; |
| 267 Member<EventPath> m_eventPath; | 263 Member<EventPath> m_eventPath; |
| 268 // The monotonic platform time in seconds, for input events it is the | 264 // The monotonic platform time in seconds, for input events it is the |
| 269 // event timestamp provided by the host OS and reported in the original | 265 // event timestamp provided by the host OS and reported in the original |
| 270 // WebInputEvent instance. | 266 // WebInputEvent instance. |
| 271 double m_platformTimeStamp; | 267 double m_platformTimeStamp; |
| 272 }; | 268 }; |
| 273 | 269 |
| 274 #define DEFINE_EVENT_TYPE_CASTS(typeName) \ | 270 #define DEFINE_EVENT_TYPE_CASTS(typeName) \ |
| 275 DEFINE_TYPE_CASTS(typeName, Event, event, event->is##typeName(), event.is##t
ypeName()) | 271 DEFINE_TYPE_CASTS(typeName, Event, event, event->is##typeName(), event.is##t
ypeName()) |
| 276 | 272 |
| 277 } // namespace blink | 273 } // namespace blink |
| 278 | 274 |
| 279 #endif // Event_h | 275 #endif // Event_h |
| OLD | NEW |