| 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 | 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights |
| 6 * reserved. | 6 * reserved. |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 #ifndef Event_h | 25 #ifndef Event_h |
| 26 #define Event_h | 26 #define Event_h |
| 27 | 27 |
| 28 #include "bindings/core/v8/ScriptWrappable.h" | 28 #include "bindings/core/v8/ScriptWrappable.h" |
| 29 #include "core/CoreExport.h" | 29 #include "core/CoreExport.h" |
| 30 #include "core/dom/DOMHighResTimeStamp.h" | 30 #include "core/dom/DOMHighResTimeStamp.h" |
| 31 #include "core/dom/DOMTimeStamp.h" | 31 #include "core/dom/DOMTimeStamp.h" |
| 32 #include "core/events/EventInit.h" | 32 #include "core/events/EventInit.h" |
| 33 #include "core/events/EventPath.h" | 33 #include "core/events/EventPath.h" |
| 34 #include "platform/heap/Handle.h" | 34 #include "platform/heap/Handle.h" |
| 35 #include "wtf/Time.h" |
| 35 #include "wtf/text/AtomicString.h" | 36 #include "wtf/text/AtomicString.h" |
| 36 | 37 |
| 37 namespace blink { | 38 namespace blink { |
| 38 | 39 |
| 39 class DOMWrapperWorld; | 40 class DOMWrapperWorld; |
| 40 class EventDispatchMediator; | 41 class EventDispatchMediator; |
| 41 class EventTarget; | 42 class EventTarget; |
| 42 class ExecutionContext; | 43 class ExecutionContext; |
| 43 | 44 |
| 44 class CORE_EXPORT Event : public GarbageCollectedFinalized<Event>, | 45 class CORE_EXPORT Event : public GarbageCollectedFinalized<Event>, |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 | 150 |
| 150 bool bubbles() const { return m_canBubble; } | 151 bool bubbles() const { return m_canBubble; } |
| 151 bool cancelable() const { return m_cancelable; } | 152 bool cancelable() const { return m_cancelable; } |
| 152 bool composed() const { return m_composed; } | 153 bool composed() const { return m_composed; } |
| 153 bool isScopedInV0() const; | 154 bool isScopedInV0() const; |
| 154 | 155 |
| 155 // Event creation timestamp in milliseconds. It returns a DOMHighResTimeStamp | 156 // Event creation timestamp in milliseconds. It returns a DOMHighResTimeStamp |
| 156 // using the platform timestamp (see |m_platformTimeStamp|). | 157 // using the platform timestamp (see |m_platformTimeStamp|). |
| 157 // For more info see http://crbug.com/160524 | 158 // For more info see http://crbug.com/160524 |
| 158 double timeStamp(ScriptState*) const; | 159 double timeStamp(ScriptState*) const; |
| 159 double platformTimeStamp() const { return m_platformTimeStamp; } | 160 TimeTicks platformTimeStamp() const { return m_platformTimeStamp; } |
| 160 | 161 |
| 161 void stopPropagation() { m_propagationStopped = true; } | 162 void stopPropagation() { m_propagationStopped = true; } |
| 162 void setStopPropagation(bool stopPropagation) { | 163 void setStopPropagation(bool stopPropagation) { |
| 163 m_propagationStopped = stopPropagation; | 164 m_propagationStopped = stopPropagation; |
| 164 } | 165 } |
| 165 void stopImmediatePropagation() { m_immediatePropagationStopped = true; } | 166 void stopImmediatePropagation() { m_immediatePropagationStopped = true; } |
| 166 void setStopImmediatePropagation(bool stopImmediatePropagation) { | 167 void setStopImmediatePropagation(bool stopImmediatePropagation) { |
| 167 m_immediatePropagationStopped = stopImmediatePropagation; | 168 m_immediatePropagationStopped = stopImmediatePropagation; |
| 168 } | 169 } |
| 169 | 170 |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 263 } | 264 } |
| 264 | 265 |
| 265 DECLARE_VIRTUAL_TRACE(); | 266 DECLARE_VIRTUAL_TRACE(); |
| 266 | 267 |
| 267 protected: | 268 protected: |
| 268 Event(); | 269 Event(); |
| 269 Event(const AtomicString& type, | 270 Event(const AtomicString& type, |
| 270 bool canBubble, | 271 bool canBubble, |
| 271 bool cancelable, | 272 bool cancelable, |
| 272 ComposedMode, | 273 ComposedMode, |
| 273 double platformTimeStamp); | 274 TimeTicks platformTimeStamp); |
| 274 Event(const AtomicString& type, | 275 Event(const AtomicString& type, |
| 275 bool canBubble, | 276 bool canBubble, |
| 276 bool cancelable, | 277 bool cancelable, |
| 277 double platformTimeStamp); | 278 TimeTicks platformTimeStamp); |
| 278 Event(const AtomicString& type, | 279 Event(const AtomicString& type, |
| 279 bool canBubble, | 280 bool canBubble, |
| 280 bool cancelable, | 281 bool cancelable, |
| 281 ComposedMode = ComposedMode::Scoped); | 282 ComposedMode = ComposedMode::Scoped); |
| 282 Event(const AtomicString& type, const EventInit&); | 283 Event(const AtomicString& type, const EventInit&); |
| 283 | 284 |
| 284 virtual void receivedTarget(); | 285 virtual void receivedTarget(); |
| 285 | 286 |
| 286 void setCanBubble(bool bubble) { m_canBubble = bubble; } | 287 void setCanBubble(bool bubble) { m_canBubble = bubble; } |
| 287 | 288 |
| (...skipping 27 matching lines...) Expand all Loading... |
| 315 | 316 |
| 316 PassiveMode m_handlingPassive; | 317 PassiveMode m_handlingPassive; |
| 317 unsigned short m_eventPhase; | 318 unsigned short m_eventPhase; |
| 318 Member<EventTarget> m_currentTarget; | 319 Member<EventTarget> m_currentTarget; |
| 319 Member<EventTarget> m_target; | 320 Member<EventTarget> m_target; |
| 320 Member<Event> m_underlyingEvent; | 321 Member<Event> m_underlyingEvent; |
| 321 Member<EventPath> m_eventPath; | 322 Member<EventPath> m_eventPath; |
| 322 // The monotonic platform time in seconds, for input events it is the | 323 // The monotonic platform time in seconds, for input events it is the |
| 323 // event timestamp provided by the host OS and reported in the original | 324 // event timestamp provided by the host OS and reported in the original |
| 324 // WebInputEvent instance. | 325 // WebInputEvent instance. |
| 325 double m_platformTimeStamp; | 326 TimeTicks m_platformTimeStamp; |
| 326 }; | 327 }; |
| 327 | 328 |
| 328 #define DEFINE_EVENT_TYPE_CASTS(typeName) \ | 329 #define DEFINE_EVENT_TYPE_CASTS(typeName) \ |
| 329 DEFINE_TYPE_CASTS(typeName, Event, event, event->is##typeName(), \ | 330 DEFINE_TYPE_CASTS(typeName, Event, event, event->is##typeName(), \ |
| 330 event.is##typeName()) | 331 event.is##typeName()) |
| 331 | 332 |
| 332 } // namespace blink | 333 } // namespace blink |
| 333 | 334 |
| 334 #endif // Event_h | 335 #endif // Event_h |
| OLD | NEW |