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 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 | 207 |
208 // Events that must not leak across isolated world, similar to how | 208 // Events that must not leak across isolated world, similar to how |
209 // ErrorEvent behaves, can override this method. | 209 // ErrorEvent behaves, can override this method. |
210 virtual bool canBeDispatchedInWorld(const DOMWrapperWorld&) const { return t
rue; } | 210 virtual bool canBeDispatchedInWorld(const DOMWrapperWorld&) const { return t
rue; } |
211 | 211 |
212 virtual EventDispatchMediator* createMediator(); | 212 virtual EventDispatchMediator* createMediator(); |
213 | 213 |
214 bool isTrusted() const { return m_isTrusted; } | 214 bool isTrusted() const { return m_isTrusted; } |
215 void setTrusted(bool value) { m_isTrusted = value; } | 215 void setTrusted(bool value) { m_isTrusted = value; } |
216 | 216 |
217 void setHandlingPassive(bool value) { m_handlingPassive = value; } | 217 void setHandlingPassive(bool value); |
| 218 |
| 219 bool preventDefaultCalledDuringPassive() const { return m_preventDefaultCall
edDuringPassive; } |
218 | 220 |
219 DECLARE_VIRTUAL_TRACE(); | 221 DECLARE_VIRTUAL_TRACE(); |
220 | 222 |
221 protected: | 223 protected: |
222 Event(); | 224 Event(); |
223 Event(const AtomicString& type, bool canBubble, bool cancelable, ComposedMod
e, double platformTimeStamp); | 225 Event(const AtomicString& type, bool canBubble, bool cancelable, ComposedMod
e, double platformTimeStamp); |
224 Event(const AtomicString& type, bool canBubble, bool cancelable, double plat
formTimeStamp); | 226 Event(const AtomicString& type, bool canBubble, bool cancelable, double plat
formTimeStamp); |
225 Event(const AtomicString& type, bool canBubble, bool cancelable, ComposedMod
e = ComposedMode::Scoped); | 227 Event(const AtomicString& type, bool canBubble, bool cancelable, ComposedMod
e = ComposedMode::Scoped); |
226 Event(const AtomicString& type, const EventInit&); | 228 Event(const AtomicString& type, const EventInit&); |
227 | 229 |
(...skipping 18 matching lines...) Expand all Loading... |
246 | 248 |
247 unsigned m_propagationStopped:1; | 249 unsigned m_propagationStopped:1; |
248 unsigned m_immediatePropagationStopped:1; | 250 unsigned m_immediatePropagationStopped:1; |
249 unsigned m_defaultPrevented:1; | 251 unsigned m_defaultPrevented:1; |
250 unsigned m_defaultHandled:1; | 252 unsigned m_defaultHandled:1; |
251 unsigned m_cancelBubble:1; | 253 unsigned m_cancelBubble:1; |
252 unsigned m_wasInitialized:1; | 254 unsigned m_wasInitialized:1; |
253 unsigned m_isTrusted : 1; | 255 unsigned m_isTrusted : 1; |
254 unsigned m_handlingPassive : 1; | 256 unsigned m_handlingPassive : 1; |
255 | 257 |
| 258 // Whether preventDefault was called when |m_handlingPassive| is |
| 259 // true. This field is reset on each call to setHandlingPassive. |
| 260 unsigned m_preventDefaultCalledDuringPassive : 1; |
| 261 |
256 unsigned short m_eventPhase; | 262 unsigned short m_eventPhase; |
257 Member<EventTarget> m_currentTarget; | 263 Member<EventTarget> m_currentTarget; |
258 Member<EventTarget> m_target; | 264 Member<EventTarget> m_target; |
259 DOMTimeStamp m_createTime; | 265 DOMTimeStamp m_createTime; |
260 Member<Event> m_underlyingEvent; | 266 Member<Event> m_underlyingEvent; |
261 Member<EventPath> m_eventPath; | 267 Member<EventPath> m_eventPath; |
262 // The monotonic platform time in seconds, for input events it is the | 268 // The monotonic platform time in seconds, for input events it is the |
263 // event timestamp provided by the host OS and reported in the original | 269 // event timestamp provided by the host OS and reported in the original |
264 // WebInputEvent instance. | 270 // WebInputEvent instance. |
265 double m_platformTimeStamp; | 271 double m_platformTimeStamp; |
266 }; | 272 }; |
267 | 273 |
268 #define DEFINE_EVENT_TYPE_CASTS(typeName) \ | 274 #define DEFINE_EVENT_TYPE_CASTS(typeName) \ |
269 DEFINE_TYPE_CASTS(typeName, Event, event, event->is##typeName(), event.is##t
ypeName()) | 275 DEFINE_TYPE_CASTS(typeName, Event, event, event->is##typeName(), event.is##t
ypeName()) |
270 | 276 |
271 } // namespace blink | 277 } // namespace blink |
272 | 278 |
273 #endif // Event_h | 279 #endif // Event_h |
OLD | NEW |