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 29 matching lines...) Expand all Loading... |
40 | 40 |
41 Event::Event(const AtomicString& eventType, bool canBubbleArg, bool cancelableAr
g) | 41 Event::Event(const AtomicString& eventType, bool canBubbleArg, bool cancelableAr
g) |
42 : m_type(eventType) | 42 : m_type(eventType) |
43 , m_canBubble(canBubbleArg) | 43 , m_canBubble(canBubbleArg) |
44 , m_cancelable(cancelableArg) | 44 , m_cancelable(cancelableArg) |
45 , m_propagationStopped(false) | 45 , m_propagationStopped(false) |
46 , m_immediatePropagationStopped(false) | 46 , m_immediatePropagationStopped(false) |
47 , m_defaultPrevented(false) | 47 , m_defaultPrevented(false) |
48 , m_defaultHandled(false) | 48 , m_defaultHandled(false) |
49 , m_cancelBubble(false) | 49 , m_cancelBubble(false) |
| 50 , m_isTrusted(false) |
50 , m_eventPhase(0) | 51 , m_eventPhase(0) |
51 , m_currentTarget(nullptr) | 52 , m_currentTarget(nullptr) |
52 , m_createTime(convertSecondsToDOMTimeStamp(currentTime())) | 53 , m_createTime(convertSecondsToDOMTimeStamp(currentTime())) |
53 , m_uiCreateTime(0) | 54 , m_uiCreateTime(0) |
54 { | 55 { |
55 } | 56 } |
56 | 57 |
57 Event::Event(const AtomicString& eventType, const EventInit& initializer) | 58 Event::Event(const AtomicString& eventType, const EventInit& initializer) |
58 : Event(eventType, initializer.bubbles(), initializer.cancelable()) | 59 : Event(eventType, initializer.bubbles(), initializer.cancelable()) |
59 { | 60 { |
60 } | 61 } |
61 | 62 |
62 Event::~Event() | 63 Event::~Event() |
63 { | 64 { |
64 } | 65 } |
65 | 66 |
66 void Event::initEvent(const AtomicString& eventTypeArg, bool canBubbleArg, bool
cancelableArg) | 67 void Event::initEvent(const AtomicString& eventTypeArg, bool canBubbleArg, bool
cancelableArg) |
67 { | 68 { |
68 if (dispatched()) | 69 if (dispatched()) |
69 return; | 70 return; |
70 | 71 |
71 m_propagationStopped = false; | 72 m_propagationStopped = false; |
72 m_immediatePropagationStopped = false; | 73 m_immediatePropagationStopped = false; |
73 m_defaultPrevented = false; | 74 m_defaultPrevented = false; |
| 75 m_isTrusted = false; |
74 | 76 |
75 m_type = eventTypeArg; | 77 m_type = eventTypeArg; |
76 m_canBubble = canBubbleArg; | 78 m_canBubble = canBubbleArg; |
77 m_cancelable = cancelableArg; | 79 m_cancelable = cancelableArg; |
78 } | 80 } |
79 | 81 |
80 bool Event::legacyReturnValue(ExecutionContext* executionContext) const | 82 bool Event::legacyReturnValue(ExecutionContext* executionContext) const |
81 { | 83 { |
82 bool returnValue = !defaultPrevented(); | 84 bool returnValue = !defaultPrevented(); |
83 if (returnValue) | 85 if (returnValue) |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
257 | 259 |
258 DEFINE_TRACE(Event) | 260 DEFINE_TRACE(Event) |
259 { | 261 { |
260 visitor->trace(m_currentTarget); | 262 visitor->trace(m_currentTarget); |
261 visitor->trace(m_target); | 263 visitor->trace(m_target); |
262 visitor->trace(m_underlyingEvent); | 264 visitor->trace(m_underlyingEvent); |
263 visitor->trace(m_eventPath); | 265 visitor->trace(m_eventPath); |
264 } | 266 } |
265 | 267 |
266 } // namespace blink | 268 } // namespace blink |
OLD | NEW |