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 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 | 194 |
195 // Events that must not leak across isolated world, similar to how | 195 // Events that must not leak across isolated world, similar to how |
196 // ErrorEvent behaves, can override this method. | 196 // ErrorEvent behaves, can override this method. |
197 virtual bool canBeDispatchedInWorld(const DOMWrapperWorld&) const { return t
rue; } | 197 virtual bool canBeDispatchedInWorld(const DOMWrapperWorld&) const { return t
rue; } |
198 | 198 |
199 virtual PassRefPtrWillBeRawPtr<EventDispatchMediator> createMediator(); | 199 virtual PassRefPtrWillBeRawPtr<EventDispatchMediator> createMediator(); |
200 | 200 |
201 bool isTrusted() const { return m_isTrusted; } | 201 bool isTrusted() const { return m_isTrusted; } |
202 void setTrusted(bool value) { m_isTrusted = value; } | 202 void setTrusted(bool value) { m_isTrusted = value; } |
203 | 203 |
| 204 WebInputEventResult eventResult() const |
| 205 { |
| 206 if (defaultPrevented()) |
| 207 return WebInputEventResult::HandledApplication; |
| 208 if (defaultHandled()) |
| 209 return WebInputEventResult::HandledSystem; |
| 210 return WebInputEventResult::NotHandled; |
| 211 } |
| 212 |
204 DECLARE_VIRTUAL_TRACE(); | 213 DECLARE_VIRTUAL_TRACE(); |
205 | 214 |
206 protected: | 215 protected: |
207 Event(); | 216 Event(); |
208 Event(const AtomicString& type, bool canBubble, bool cancelable); | 217 Event(const AtomicString& type, bool canBubble, bool cancelable); |
209 Event(const AtomicString& type, bool canBubble, bool cancelable, double plat
formTimeStamp); | 218 Event(const AtomicString& type, bool canBubble, bool cancelable, double plat
formTimeStamp); |
210 Event(const AtomicString& type, const EventInit&); | 219 Event(const AtomicString& type, const EventInit&); |
211 | 220 |
212 virtual void receivedTarget(); | 221 virtual void receivedTarget(); |
213 bool dispatched() const { return m_target; } | 222 bool dispatched() const { return m_target; } |
(...skipping 23 matching lines...) Expand all Loading... |
237 // WebInputEvent instance. | 246 // WebInputEvent instance. |
238 double m_platformTimeStamp; | 247 double m_platformTimeStamp; |
239 }; | 248 }; |
240 | 249 |
241 #define DEFINE_EVENT_TYPE_CASTS(typeName) \ | 250 #define DEFINE_EVENT_TYPE_CASTS(typeName) \ |
242 DEFINE_TYPE_CASTS(typeName, Event, event, event->is##typeName(), event.is##t
ypeName()) | 251 DEFINE_TYPE_CASTS(typeName, Event, event, event->is##typeName(), event.is##t
ypeName()) |
243 | 252 |
244 } // namespace blink | 253 } // namespace blink |
245 | 254 |
246 #endif // Event_h | 255 #endif // Event_h |
OLD | NEW |