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, 2005, 2006, 2008 Apple Inc. All rights reserved. | 5 * Copyright (C) 2003, 2005, 2006, 2008 Apple Inc. All rights reserved. |
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 14 matching lines...) Expand all Loading... |
25 | 25 |
26 #include "core/dom/StaticNodeList.h" | 26 #include "core/dom/StaticNodeList.h" |
27 #include "core/events/EventTarget.h" | 27 #include "core/events/EventTarget.h" |
28 #include "core/frame/OriginsUsingFeatures.h" | 28 #include "core/frame/OriginsUsingFeatures.h" |
29 #include "core/frame/UseCounter.h" | 29 #include "core/frame/UseCounter.h" |
30 #include "core/svg/SVGElement.h" | 30 #include "core/svg/SVGElement.h" |
31 #include "wtf/CurrentTime.h" | 31 #include "wtf/CurrentTime.h" |
32 | 32 |
33 namespace blink { | 33 namespace blink { |
34 | 34 |
35 EventInit::EventInit() | |
36 : bubbles(false) | |
37 , cancelable(false) | |
38 { | |
39 } | |
40 | |
41 Event::Event() | 35 Event::Event() |
42 : Event("", false, false) | 36 : Event("", false, false) |
43 { | 37 { |
44 } | 38 } |
45 | 39 |
46 Event::Event(const AtomicString& eventType, bool canBubbleArg, bool cancelableAr
g) | 40 Event::Event(const AtomicString& eventType, bool canBubbleArg, bool cancelableAr
g) |
47 : m_type(eventType) | 41 : m_type(eventType) |
48 , m_canBubble(canBubbleArg) | 42 , m_canBubble(canBubbleArg) |
49 , m_cancelable(cancelableArg) | 43 , m_cancelable(cancelableArg) |
50 , m_propagationStopped(false) | 44 , m_propagationStopped(false) |
51 , m_immediatePropagationStopped(false) | 45 , m_immediatePropagationStopped(false) |
52 , m_defaultPrevented(false) | 46 , m_defaultPrevented(false) |
53 , m_defaultHandled(false) | 47 , m_defaultHandled(false) |
54 , m_cancelBubble(false) | 48 , m_cancelBubble(false) |
55 , m_eventPhase(0) | 49 , m_eventPhase(0) |
56 , m_currentTarget(nullptr) | 50 , m_currentTarget(nullptr) |
57 , m_createTime(convertSecondsToDOMTimeStamp(currentTime())) | 51 , m_createTime(convertSecondsToDOMTimeStamp(currentTime())) |
58 , m_uiCreateTime(0) | 52 , m_uiCreateTime(0) |
59 { | 53 { |
60 } | 54 } |
61 | 55 |
62 Event::Event(const AtomicString& eventType, const EventInit& initializer) | 56 Event::Event(const AtomicString& eventType, const EventInit& initializer) |
63 : Event(eventType, initializer.bubbles, initializer.cancelable) | |
64 { | |
65 } | |
66 | |
67 Event::Event(const AtomicString& eventType, const EventInitDictionary& initializ
er) | |
68 : Event(eventType, initializer.bubbles(), initializer.cancelable()) | 57 : Event(eventType, initializer.bubbles(), initializer.cancelable()) |
69 { | 58 { |
70 } | 59 } |
71 | 60 |
72 Event::~Event() | 61 Event::~Event() |
73 { | 62 { |
74 } | 63 } |
75 | 64 |
76 void Event::initEvent(const AtomicString& eventTypeArg, bool canBubbleArg, bool
cancelableArg) | 65 void Event::initEvent(const AtomicString& eventTypeArg, bool canBubbleArg, bool
cancelableArg) |
77 { | 66 { |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
262 | 251 |
263 DEFINE_TRACE(Event) | 252 DEFINE_TRACE(Event) |
264 { | 253 { |
265 visitor->trace(m_currentTarget); | 254 visitor->trace(m_currentTarget); |
266 visitor->trace(m_target); | 255 visitor->trace(m_target); |
267 visitor->trace(m_underlyingEvent); | 256 visitor->trace(m_underlyingEvent); |
268 visitor->trace(m_eventPath); | 257 visitor->trace(m_eventPath); |
269 } | 258 } |
270 | 259 |
271 } // namespace blink | 260 } // namespace blink |
OLD | NEW |