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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 SELECT = 16384, | 67 SELECT = 16384, |
68 CHANGE = 32768 | 68 CHANGE = 32768 |
69 }; | 69 }; |
70 | 70 |
71 enum RailsMode { | 71 enum RailsMode { |
72 RailsModeFree = 0, | 72 RailsModeFree = 0, |
73 RailsModeHorizontal = 1, | 73 RailsModeHorizontal = 1, |
74 RailsModeVertical = 2 | 74 RailsModeVertical = 2 |
75 }; | 75 }; |
76 | 76 |
| 77 enum class ComposedMode { |
| 78 Composed, |
| 79 Scoped, |
| 80 }; |
| 81 |
77 static Event* create() | 82 static Event* create() |
78 { | 83 { |
79 return new Event; | 84 return new Event; |
80 } | 85 } |
81 | 86 |
82 // A factory for a simple event. The event doesn't bubble, and isn't | 87 // A factory for a simple event. The event doesn't bubble, and isn't |
83 // cancelable. | 88 // cancelable. |
84 // http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.ht
ml#fire-a-simple-event | 89 // http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.ht
ml#fire-a-simple-event |
85 static Event* create(const AtomicString& type) | 90 static Event* create(const AtomicString& type) |
86 { | 91 { |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
208 | 213 |
209 bool isTrusted() const { return m_isTrusted; } | 214 bool isTrusted() const { return m_isTrusted; } |
210 void setTrusted(bool value) { m_isTrusted = value; } | 215 void setTrusted(bool value) { m_isTrusted = value; } |
211 | 216 |
212 void setHandlingPassive(bool value) { m_handlingPassive = value; } | 217 void setHandlingPassive(bool value) { m_handlingPassive = value; } |
213 | 218 |
214 DECLARE_VIRTUAL_TRACE(); | 219 DECLARE_VIRTUAL_TRACE(); |
215 | 220 |
216 protected: | 221 protected: |
217 Event(); | 222 Event(); |
| 223 Event(const AtomicString& type, bool canBubble, bool cancelable, ComposedMod
e, double platformTimeStamp); |
218 Event(const AtomicString& type, bool canBubble, bool cancelable, double plat
formTimeStamp); | 224 Event(const AtomicString& type, bool canBubble, bool cancelable, double plat
formTimeStamp); |
219 Event(const AtomicString& type, bool canBubble, bool cancelable); | 225 Event(const AtomicString& type, bool canBubble, bool cancelable, ComposedMod
e = ComposedMode::Scoped); |
220 Event(const AtomicString& type, const EventInit&); | 226 Event(const AtomicString& type, const EventInit&); |
221 | 227 |
222 virtual void receivedTarget(); | 228 virtual void receivedTarget(); |
223 | 229 |
224 void setCanBubble(bool bubble) { m_canBubble = bubble; } | 230 void setCanBubble(bool bubble) { m_canBubble = bubble; } |
225 | 231 |
226 private: | 232 private: |
227 Event(const AtomicString& type, bool canBubble, bool cancelable, bool compos
ed, double platformTimeStamp); | |
228 | 233 |
229 enum EventPathMode { | 234 enum EventPathMode { |
230 EmptyAfterDispatch, | 235 EmptyAfterDispatch, |
231 NonEmptyAfterDispatch | 236 NonEmptyAfterDispatch |
232 }; | 237 }; |
233 | 238 |
234 HeapVector<Member<EventTarget>> pathInternal(ScriptState*, EventPathMode) co
nst; | 239 HeapVector<Member<EventTarget>> pathInternal(ScriptState*, EventPathMode) co
nst; |
235 | 240 |
236 AtomicString m_type; | 241 AtomicString m_type; |
237 unsigned m_canBubble:1; | 242 unsigned m_canBubble:1; |
(...skipping 20 matching lines...) Expand all Loading... |
258 // WebInputEvent instance. | 263 // WebInputEvent instance. |
259 double m_platformTimeStamp; | 264 double m_platformTimeStamp; |
260 }; | 265 }; |
261 | 266 |
262 #define DEFINE_EVENT_TYPE_CASTS(typeName) \ | 267 #define DEFINE_EVENT_TYPE_CASTS(typeName) \ |
263 DEFINE_TYPE_CASTS(typeName, Event, event, event->is##typeName(), event.is##t
ypeName()) | 268 DEFINE_TYPE_CASTS(typeName, Event, event, event->is##typeName(), event.is##t
ypeName()) |
264 | 269 |
265 } // namespace blink | 270 } // namespace blink |
266 | 271 |
267 #endif // Event_h | 272 #endif // Event_h |
OLD | NEW |