| 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 , m_cancelable(false) | 44 , m_cancelable(false) |
| 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_eventPhase(0) | 50 , m_eventPhase(0) |
| 51 , m_currentTarget(nullptr) | 51 , m_currentTarget(nullptr) |
| 52 , m_createTime(convertSecondsToDOMTimeStamp(currentTime())) | 52 , m_createTime(convertSecondsToDOMTimeStamp(currentTime())) |
| 53 { | 53 { |
| 54 ScriptWrappable::init(this); | |
| 55 } | 54 } |
| 56 | 55 |
| 57 Event::Event(const AtomicString& eventType, bool canBubbleArg, bool cancelableAr
g) | 56 Event::Event(const AtomicString& eventType, bool canBubbleArg, bool cancelableAr
g) |
| 58 : m_type(eventType) | 57 : m_type(eventType) |
| 59 , m_canBubble(canBubbleArg) | 58 , m_canBubble(canBubbleArg) |
| 60 , m_cancelable(cancelableArg) | 59 , m_cancelable(cancelableArg) |
| 61 , m_propagationStopped(false) | 60 , m_propagationStopped(false) |
| 62 , m_immediatePropagationStopped(false) | 61 , m_immediatePropagationStopped(false) |
| 63 , m_defaultPrevented(false) | 62 , m_defaultPrevented(false) |
| 64 , m_defaultHandled(false) | 63 , m_defaultHandled(false) |
| 65 , m_cancelBubble(false) | 64 , m_cancelBubble(false) |
| 66 , m_eventPhase(0) | 65 , m_eventPhase(0) |
| 67 , m_currentTarget(nullptr) | 66 , m_currentTarget(nullptr) |
| 68 , m_createTime(convertSecondsToDOMTimeStamp(currentTime())) | 67 , m_createTime(convertSecondsToDOMTimeStamp(currentTime())) |
| 69 { | 68 { |
| 70 ScriptWrappable::init(this); | |
| 71 } | 69 } |
| 72 | 70 |
| 73 Event::Event(const AtomicString& eventType, const EventInit& initializer) | 71 Event::Event(const AtomicString& eventType, const EventInit& initializer) |
| 74 : m_type(eventType) | 72 : m_type(eventType) |
| 75 , m_canBubble(initializer.bubbles) | 73 , m_canBubble(initializer.bubbles) |
| 76 , m_cancelable(initializer.cancelable) | 74 , m_cancelable(initializer.cancelable) |
| 77 , m_propagationStopped(false) | 75 , m_propagationStopped(false) |
| 78 , m_immediatePropagationStopped(false) | 76 , m_immediatePropagationStopped(false) |
| 79 , m_defaultPrevented(false) | 77 , m_defaultPrevented(false) |
| 80 , m_defaultHandled(false) | 78 , m_defaultHandled(false) |
| 81 , m_cancelBubble(false) | 79 , m_cancelBubble(false) |
| 82 , m_eventPhase(0) | 80 , m_eventPhase(0) |
| 83 , m_currentTarget(nullptr) | 81 , m_currentTarget(nullptr) |
| 84 , m_createTime(convertSecondsToDOMTimeStamp(currentTime())) | 82 , m_createTime(convertSecondsToDOMTimeStamp(currentTime())) |
| 85 { | 83 { |
| 86 ScriptWrappable::init(this); | |
| 87 } | 84 } |
| 88 | 85 |
| 89 Event::~Event() | 86 Event::~Event() |
| 90 { | 87 { |
| 91 } | 88 } |
| 92 | 89 |
| 93 void Event::initEvent(const AtomicString& eventTypeArg, bool canBubbleArg, bool
cancelableArg) | 90 void Event::initEvent(const AtomicString& eventTypeArg, bool canBubbleArg, bool
cancelableArg) |
| 94 { | 91 { |
| 95 if (dispatched()) | 92 if (dispatched()) |
| 96 return; | 93 return; |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 244 | 241 |
| 245 void Event::trace(Visitor* visitor) | 242 void Event::trace(Visitor* visitor) |
| 246 { | 243 { |
| 247 visitor->trace(m_currentTarget); | 244 visitor->trace(m_currentTarget); |
| 248 visitor->trace(m_target); | 245 visitor->trace(m_target); |
| 249 visitor->trace(m_underlyingEvent); | 246 visitor->trace(m_underlyingEvent); |
| 250 visitor->trace(m_eventPath); | 247 visitor->trace(m_eventPath); |
| 251 } | 248 } |
| 252 | 249 |
| 253 } // namespace blink | 250 } // namespace blink |
| OLD | NEW |