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 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 // ErrorEvent behaves, can override this method. | 193 // ErrorEvent behaves, can override this method. |
194 virtual bool canBeDispatchedInWorld(const DOMWrapperWorld&) const { return t
rue; } | 194 virtual bool canBeDispatchedInWorld(const DOMWrapperWorld&) const { return t
rue; } |
195 | 195 |
196 virtual PassRefPtrWillBeRawPtr<EventDispatchMediator> createMediator(); | 196 virtual PassRefPtrWillBeRawPtr<EventDispatchMediator> createMediator(); |
197 | 197 |
198 bool isTrusted() const { return m_isTrusted; } | 198 bool isTrusted() const { return m_isTrusted; } |
199 void setTrusted(bool value) { m_isTrusted = value; } | 199 void setTrusted(bool value) { m_isTrusted = value; } |
200 | 200 |
201 void setHandlingPassive(bool value) { m_handlingPassive = value; } | 201 void setHandlingPassive(bool value) { m_handlingPassive = value; } |
202 | 202 |
| 203 EventTarget::DispatchEventResult eventResult() const |
| 204 { |
| 205 if (defaultPrevented()) |
| 206 return EventTarget::DispatchEventResult::HandledApplication; |
| 207 if (defaultHandled()) |
| 208 return EventTarget::DispatchEventResult::HandledSystem; |
| 209 return EventTarget::DispatchEventResult::NotHandled; |
| 210 } |
| 211 |
203 DECLARE_VIRTUAL_TRACE(); | 212 DECLARE_VIRTUAL_TRACE(); |
204 | 213 |
205 protected: | 214 protected: |
206 Event(); | 215 Event(); |
207 Event(const AtomicString& type, bool canBubble, bool cancelable); | 216 Event(const AtomicString& type, bool canBubble, bool cancelable); |
208 Event(const AtomicString& type, bool canBubble, bool cancelable, double plat
formTimeStamp); | 217 Event(const AtomicString& type, bool canBubble, bool cancelable, double plat
formTimeStamp); |
209 Event(const AtomicString& type, bool canBubble, bool cancelable, bool scoped
); | 218 Event(const AtomicString& type, bool canBubble, bool cancelable, bool scoped
); |
210 Event(const AtomicString& type, bool canBubble, bool cancelable, bool scoped
, double platformTimeStamp); | 219 Event(const AtomicString& type, bool canBubble, bool cancelable, bool scoped
, double platformTimeStamp); |
211 Event(const AtomicString& type, const EventInit&); | 220 Event(const AtomicString& type, const EventInit&); |
212 | 221 |
(...skipping 27 matching lines...) Expand all Loading... |
240 // WebInputEvent instance. | 249 // WebInputEvent instance. |
241 double m_platformTimeStamp; | 250 double m_platformTimeStamp; |
242 }; | 251 }; |
243 | 252 |
244 #define DEFINE_EVENT_TYPE_CASTS(typeName) \ | 253 #define DEFINE_EVENT_TYPE_CASTS(typeName) \ |
245 DEFINE_TYPE_CASTS(typeName, Event, event, event->is##typeName(), event.is##t
ypeName()) | 254 DEFINE_TYPE_CASTS(typeName, Event, event, event->is##typeName(), event.is##t
ypeName()) |
246 | 255 |
247 } // namespace blink | 256 } // namespace blink |
248 | 257 |
249 #endif // Event_h | 258 #endif // Event_h |
OLD | NEW |