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 // runtime feature is enabled it returns a DOMHighResTimeStamp using the | 130 // runtime feature is enabled it returns a DOMHighResTimeStamp using the |
131 // platform timestamp (see |m_platformTimeStamp|) otherwise it returns a | 131 // platform timestamp (see |m_platformTimeStamp|) otherwise it returns a |
132 // DOMTimeStamp that represents the current object's construction time (see | 132 // DOMTimeStamp that represents the current object's construction time (see |
133 // |m_createTime|). For more info see http://crbug.com/160524 | 133 // |m_createTime|). For more info see http://crbug.com/160524 |
134 double timeStamp(ScriptState*) const; | 134 double timeStamp(ScriptState*) const; |
135 double platformTimeStamp() const { return m_platformTimeStamp; } | 135 double platformTimeStamp() const { return m_platformTimeStamp; } |
136 DOMTimeStamp createTime() const { return m_createTime; } | 136 DOMTimeStamp createTime() const { return m_createTime; } |
137 | 137 |
138 void stopPropagation() { m_propagationStopped = true; } | 138 void stopPropagation() { m_propagationStopped = true; } |
139 void stopImmediatePropagation() { m_immediatePropagationStopped = true; } | 139 void stopImmediatePropagation() { m_immediatePropagationStopped = true; } |
140 void unsetInitializedFlag() { m_initialized = false; } | |
140 | 141 |
141 // IE Extensions | 142 // IE Extensions |
142 EventTarget* srcElement() const { return target(); } // MSIE extension - "th e object that fired the event" | 143 EventTarget* srcElement() const { return target(); } // MSIE extension - "th e object that fired the event" |
143 | 144 |
144 bool legacyReturnValue(ExecutionContext*) const; | 145 bool legacyReturnValue(ExecutionContext*) const; |
145 void setLegacyReturnValue(ExecutionContext*, bool returnValue); | 146 void setLegacyReturnValue(ExecutionContext*, bool returnValue); |
146 | 147 |
147 virtual const AtomicString& interfaceName() const; | 148 virtual const AtomicString& interfaceName() const; |
148 bool hasInterface(const AtomicString&) const; | 149 bool hasInterface(const AtomicString&) const; |
149 | 150 |
(...skipping 13 matching lines...) Expand all Loading... | |
163 virtual bool isDragEvent() const; | 164 virtual bool isDragEvent() const; |
164 | 165 |
165 // These events lack a DOM interface. | 166 // These events lack a DOM interface. |
166 virtual bool isClipboardEvent() const; | 167 virtual bool isClipboardEvent() const; |
167 virtual bool isBeforeTextInsertedEvent() const; | 168 virtual bool isBeforeTextInsertedEvent() const; |
168 | 169 |
169 virtual bool isBeforeUnloadEvent() const; | 170 virtual bool isBeforeUnloadEvent() const; |
170 | 171 |
171 bool propagationStopped() const { return m_propagationStopped || m_immediate PropagationStopped; } | 172 bool propagationStopped() const { return m_propagationStopped || m_immediate PropagationStopped; } |
172 bool immediatePropagationStopped() const { return m_immediatePropagationStop ped; } | 173 bool immediatePropagationStopped() const { return m_immediatePropagationStop ped; } |
174 bool initialized() { return m_initialized; } | |
tkent
2016/05/02 00:19:27
This function should be named as |wasInitialized()
ramya.v
2016/05/02 05:31:44
Done.
| |
173 | 175 |
174 bool defaultPrevented() const { return m_defaultPrevented; } | 176 bool defaultPrevented() const { return m_defaultPrevented; } |
175 virtual void preventDefault(); | 177 virtual void preventDefault(); |
176 void setDefaultPrevented(bool defaultPrevented) { m_defaultPrevented = defau ltPrevented; } | 178 void setDefaultPrevented(bool defaultPrevented) { m_defaultPrevented = defau ltPrevented; } |
177 | 179 |
178 bool defaultHandled() const { return m_defaultHandled; } | 180 bool defaultHandled() const { return m_defaultHandled; } |
179 void setDefaultHandled() { m_defaultHandled = true; } | 181 void setDefaultHandled() { m_defaultHandled = true; } |
180 | 182 |
181 bool cancelBubble() const { return m_cancelBubble; } | 183 bool cancelBubble() const { return m_cancelBubble; } |
182 void setCancelBubble(bool cancel) { m_cancelBubble = cancel; } | 184 void setCancelBubble(bool cancel) { m_cancelBubble = cancel; } |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
232 unsigned m_canBubble:1; | 234 unsigned m_canBubble:1; |
233 unsigned m_cancelable:1; | 235 unsigned m_cancelable:1; |
234 unsigned m_scoped:1; | 236 unsigned m_scoped:1; |
235 unsigned m_relatedTargetScoped:1; | 237 unsigned m_relatedTargetScoped:1; |
236 | 238 |
237 unsigned m_propagationStopped:1; | 239 unsigned m_propagationStopped:1; |
238 unsigned m_immediatePropagationStopped:1; | 240 unsigned m_immediatePropagationStopped:1; |
239 unsigned m_defaultPrevented:1; | 241 unsigned m_defaultPrevented:1; |
240 unsigned m_defaultHandled:1; | 242 unsigned m_defaultHandled:1; |
241 unsigned m_cancelBubble:1; | 243 unsigned m_cancelBubble:1; |
244 unsigned m_initialized:1; | |
tkent
2016/05/02 00:19:27
This member should be named as |m_wasInitialized|
ramya.v
2016/05/02 05:31:44
Done.
| |
242 unsigned m_isTrusted : 1; | 245 unsigned m_isTrusted : 1; |
243 unsigned m_handlingPassive : 1; | 246 unsigned m_handlingPassive : 1; |
244 | 247 |
245 unsigned short m_eventPhase; | 248 unsigned short m_eventPhase; |
246 Member<EventTarget> m_currentTarget; | 249 Member<EventTarget> m_currentTarget; |
247 Member<EventTarget> m_target; | 250 Member<EventTarget> m_target; |
248 DOMTimeStamp m_createTime; | 251 DOMTimeStamp m_createTime; |
249 Member<Event> m_underlyingEvent; | 252 Member<Event> m_underlyingEvent; |
250 Member<EventPath> m_eventPath; | 253 Member<EventPath> m_eventPath; |
251 // The monotonic platform time in seconds, for input events it is the | 254 // The monotonic platform time in seconds, for input events it is the |
252 // event timestamp provided by the host OS and reported in the original | 255 // event timestamp provided by the host OS and reported in the original |
253 // WebInputEvent instance. | 256 // WebInputEvent instance. |
254 double m_platformTimeStamp; | 257 double m_platformTimeStamp; |
255 }; | 258 }; |
256 | 259 |
257 #define DEFINE_EVENT_TYPE_CASTS(typeName) \ | 260 #define DEFINE_EVENT_TYPE_CASTS(typeName) \ |
258 DEFINE_TYPE_CASTS(typeName, Event, event, event->is##typeName(), event.is##t ypeName()) | 261 DEFINE_TYPE_CASTS(typeName, Event, event, event->is##typeName(), event.is##t ypeName()) |
259 | 262 |
260 } // namespace blink | 263 } // namespace blink |
261 | 264 |
262 #endif // Event_h | 265 #endif // Event_h |
OLD | NEW |