Chromium Code Reviews| 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 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 208 | 208 |
| 209 virtual EventDispatchMediator* createMediator(); | 209 virtual EventDispatchMediator* createMediator(); |
| 210 | 210 |
| 211 bool isTrusted() const { return m_isTrusted; } | 211 bool isTrusted() const { return m_isTrusted; } |
| 212 void setTrusted(bool value) { m_isTrusted = value; } | 212 void setTrusted(bool value) { m_isTrusted = value; } |
| 213 | 213 |
| 214 void setHandlingPassive(bool value); | 214 void setHandlingPassive(bool value); |
| 215 | 215 |
| 216 bool preventDefaultCalledDuringPassive() const { return m_preventDefaultCall edDuringPassive; } | 216 bool preventDefaultCalledDuringPassive() const { return m_preventDefaultCall edDuringPassive; } |
| 217 | 217 |
| 218 bool preventDefaultCalledOnUncancelableEvent() const { return m_preventDefau ltCalledOnUncancelableEvent; } | |
| 219 | |
| 218 DECLARE_VIRTUAL_TRACE(); | 220 DECLARE_VIRTUAL_TRACE(); |
| 219 | 221 |
| 220 protected: | 222 protected: |
| 221 Event(); | 223 Event(); |
| 222 Event(const AtomicString& type, bool canBubble, bool cancelable, ComposedMod e, double platformTimeStamp); | 224 Event(const AtomicString& type, bool canBubble, bool cancelable, ComposedMod e, double platformTimeStamp); |
| 223 Event(const AtomicString& type, bool canBubble, bool cancelable, double plat formTimeStamp); | 225 Event(const AtomicString& type, bool canBubble, bool cancelable, double plat formTimeStamp); |
| 224 Event(const AtomicString& type, bool canBubble, bool cancelable, ComposedMod e = ComposedMode::Scoped); | 226 Event(const AtomicString& type, bool canBubble, bool cancelable, ComposedMod e = ComposedMode::Scoped); |
| 225 Event(const AtomicString& type, const EventInit&); | 227 Event(const AtomicString& type, const EventInit&); |
| 226 | 228 |
| 227 virtual void receivedTarget(); | 229 virtual void receivedTarget(); |
| (...skipping 20 matching lines...) Expand all Loading... | |
| 248 unsigned m_defaultPrevented:1; | 250 unsigned m_defaultPrevented:1; |
| 249 unsigned m_defaultHandled:1; | 251 unsigned m_defaultHandled:1; |
| 250 unsigned m_cancelBubble:1; | 252 unsigned m_cancelBubble:1; |
| 251 unsigned m_wasInitialized:1; | 253 unsigned m_wasInitialized:1; |
| 252 unsigned m_isTrusted : 1; | 254 unsigned m_isTrusted : 1; |
| 253 unsigned m_handlingPassive : 1; | 255 unsigned m_handlingPassive : 1; |
| 254 | 256 |
| 255 // Whether preventDefault was called when |m_handlingPassive| is | 257 // Whether preventDefault was called when |m_handlingPassive| is |
| 256 // true. This field is reset on each call to setHandlingPassive. | 258 // true. This field is reset on each call to setHandlingPassive. |
| 257 unsigned m_preventDefaultCalledDuringPassive : 1; | 259 unsigned m_preventDefaultCalledDuringPassive : 1; |
| 260 // Whether preventDefault was called on uncancelable event. | |
| 261 unsigned m_preventDefaultCalledOnUncancelableEvent : 1; | |
|
tdresser
2016/08/17 14:32:28
This is a bit confusing. Are these events passive,
dtapuska
2016/08/17 18:54:59
These events aren't really passive. They are force
lanwei
2016/08/18 12:31:47
Delete passive or use uncancellable, non-blocking.
| |
| 258 | 262 |
| 259 unsigned short m_eventPhase; | 263 unsigned short m_eventPhase; |
| 260 Member<EventTarget> m_currentTarget; | 264 Member<EventTarget> m_currentTarget; |
| 261 Member<EventTarget> m_target; | 265 Member<EventTarget> m_target; |
| 262 Member<Event> m_underlyingEvent; | 266 Member<Event> m_underlyingEvent; |
| 263 Member<EventPath> m_eventPath; | 267 Member<EventPath> m_eventPath; |
| 264 // 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 |
| 265 // 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 |
| 266 // WebInputEvent instance. | 270 // WebInputEvent instance. |
| 267 double m_platformTimeStamp; | 271 double m_platformTimeStamp; |
| 268 }; | 272 }; |
| 269 | 273 |
| 270 #define DEFINE_EVENT_TYPE_CASTS(typeName) \ | 274 #define DEFINE_EVENT_TYPE_CASTS(typeName) \ |
| 271 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()) |
| 272 | 276 |
| 273 } // namespace blink | 277 } // namespace blink |
| 274 | 278 |
| 275 #endif // Event_h | 279 #endif // Event_h |
| OLD | NEW |