Chromium Code Reviews| 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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 115 void setTarget(PassRefPtrWillBeRawPtr<EventTarget>); | 115 void setTarget(PassRefPtrWillBeRawPtr<EventTarget>); |
| 116 | 116 |
| 117 EventTarget* currentTarget() const; | 117 EventTarget* currentTarget() const; |
| 118 void setCurrentTarget(EventTarget* currentTarget) { m_currentTarget = curren tTarget; } | 118 void setCurrentTarget(EventTarget* currentTarget) { m_currentTarget = curren tTarget; } |
| 119 | 119 |
| 120 unsigned short eventPhase() const { return m_eventPhase; } | 120 unsigned short eventPhase() const { return m_eventPhase; } |
| 121 void setEventPhase(unsigned short eventPhase) { m_eventPhase = eventPhase; } | 121 void setEventPhase(unsigned short eventPhase) { m_eventPhase = eventPhase; } |
| 122 | 122 |
| 123 bool bubbles() const { return m_canBubble; } | 123 bool bubbles() const { return m_canBubble; } |
| 124 bool cancelable() const { return m_cancelable; } | 124 bool cancelable() const { return m_cancelable; } |
| 125 DOMTimeStamp timeStamp() const { return m_createTime; } | 125 |
| 126 // Event creation timestamp in milliseconds | |
| 127 double timeStamp() const; | |
|
dtapuska
2015/09/18 16:04:42
I think there should be a specific call for gettin
majidvp
2015/09/18 17:43:33
Agreed. I like to keep timeStamp() to be the metho
| |
| 128 double timeStampForPlatformInSeconds() const; | |
|
Rick Byers
2015/09/18 15:56:32
nit: add comment for the new method (i.e. what "fo
majidvp
2015/09/18 17:43:34
Acknowledged.
| |
| 126 | 129 |
| 127 void stopPropagation() { m_propagationStopped = true; } | 130 void stopPropagation() { m_propagationStopped = true; } |
| 128 void stopImmediatePropagation() { m_immediatePropagationStopped = true; } | 131 void stopImmediatePropagation() { m_immediatePropagationStopped = true; } |
| 129 | 132 |
| 130 // IE Extensions | 133 // IE Extensions |
| 131 EventTarget* srcElement() const { return target(); } // MSIE extension - "th e object that fired the event" | 134 EventTarget* srcElement() const { return target(); } // MSIE extension - "th e object that fired the event" |
| 132 | 135 |
| 133 bool legacyReturnValue(ExecutionContext*) const; | 136 bool legacyReturnValue(ExecutionContext*) const; |
| 134 void setLegacyReturnValue(ExecutionContext*, bool returnValue); | 137 void setLegacyReturnValue(ExecutionContext*, bool returnValue); |
| 135 | 138 |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 218 unsigned m_defaultHandled:1; | 221 unsigned m_defaultHandled:1; |
| 219 unsigned m_cancelBubble:1; | 222 unsigned m_cancelBubble:1; |
| 220 unsigned m_isTrusted : 1; | 223 unsigned m_isTrusted : 1; |
| 221 | 224 |
| 222 unsigned short m_eventPhase; | 225 unsigned short m_eventPhase; |
| 223 RefPtrWillBeMember<EventTarget> m_currentTarget; | 226 RefPtrWillBeMember<EventTarget> m_currentTarget; |
| 224 RefPtrWillBeMember<EventTarget> m_target; | 227 RefPtrWillBeMember<EventTarget> m_target; |
| 225 DOMTimeStamp m_createTime; | 228 DOMTimeStamp m_createTime; |
| 226 RefPtrWillBeMember<Event> m_underlyingEvent; | 229 RefPtrWillBeMember<Event> m_underlyingEvent; |
| 227 OwnPtrWillBeMember<EventPath> m_eventPath; | 230 OwnPtrWillBeMember<EventPath> m_eventPath; |
| 228 double m_uiCreateTime; // For input events, the time the event was recorded by the UI. | 231 double m_uiCreateTime; // For input events, the time the event was recorded by the UI in seconds. |
|
dtapuska
2015/09/18 16:04:42
When indicating time; be sure to reference what cl
majidvp
2015/09/18 17:43:34
Acknowledged.
| |
| 229 }; | 232 }; |
| 230 | 233 |
| 231 #define DEFINE_EVENT_TYPE_CASTS(typeName) \ | 234 #define DEFINE_EVENT_TYPE_CASTS(typeName) \ |
| 232 DEFINE_TYPE_CASTS(typeName, Event, event, event->is##typeName(), event.is##t ypeName()) | 235 DEFINE_TYPE_CASTS(typeName, Event, event, event->is##typeName(), event.is##t ypeName()) |
| 233 | 236 |
| 234 } // namespace blink | 237 } // namespace blink |
| 235 | 238 |
| 236 #endif // Event_h | 239 #endif // Event_h |
| OLD | NEW |