| 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 , m_cancelable(false) | 46 , m_cancelable(false) |
| 47 , m_propagationStopped(false) | 47 , m_propagationStopped(false) |
| 48 , m_immediatePropagationStopped(false) | 48 , m_immediatePropagationStopped(false) |
| 49 , m_defaultPrevented(false) | 49 , m_defaultPrevented(false) |
| 50 , m_defaultHandled(false) | 50 , m_defaultHandled(false) |
| 51 , m_cancelBubble(false) | 51 , m_cancelBubble(false) |
| 52 , m_eventPhase(0) | 52 , m_eventPhase(0) |
| 53 , m_currentTarget(nullptr) | 53 , m_currentTarget(nullptr) |
| 54 , m_createTime(convertSecondsToDOMTimeStamp(currentTime())) | 54 , m_createTime(convertSecondsToDOMTimeStamp(currentTime())) |
| 55 { | 55 { |
| 56 ScriptWrappable::init(this); | |
| 57 } | 56 } |
| 58 | 57 |
| 59 Event::Event(const AtomicString& eventType, bool canBubbleArg, bool cancelableAr
g) | 58 Event::Event(const AtomicString& eventType, bool canBubbleArg, bool cancelableAr
g) |
| 60 : m_type(eventType) | 59 : m_type(eventType) |
| 61 , m_canBubble(canBubbleArg) | 60 , m_canBubble(canBubbleArg) |
| 62 , m_cancelable(cancelableArg) | 61 , m_cancelable(cancelableArg) |
| 63 , m_propagationStopped(false) | 62 , m_propagationStopped(false) |
| 64 , m_immediatePropagationStopped(false) | 63 , m_immediatePropagationStopped(false) |
| 65 , m_defaultPrevented(false) | 64 , m_defaultPrevented(false) |
| 66 , m_defaultHandled(false) | 65 , m_defaultHandled(false) |
| 67 , m_cancelBubble(false) | 66 , m_cancelBubble(false) |
| 68 , m_eventPhase(0) | 67 , m_eventPhase(0) |
| 69 , m_currentTarget(nullptr) | 68 , m_currentTarget(nullptr) |
| 70 , m_createTime(convertSecondsToDOMTimeStamp(currentTime())) | 69 , m_createTime(convertSecondsToDOMTimeStamp(currentTime())) |
| 71 { | 70 { |
| 72 ScriptWrappable::init(this); | |
| 73 } | 71 } |
| 74 | 72 |
| 75 Event::Event(const AtomicString& eventType, const EventInit& initializer) | 73 Event::Event(const AtomicString& eventType, const EventInit& initializer) |
| 76 : m_type(eventType) | 74 : m_type(eventType) |
| 77 , m_canBubble(initializer.bubbles) | 75 , m_canBubble(initializer.bubbles) |
| 78 , m_cancelable(initializer.cancelable) | 76 , m_cancelable(initializer.cancelable) |
| 79 , m_propagationStopped(false) | 77 , m_propagationStopped(false) |
| 80 , m_immediatePropagationStopped(false) | 78 , m_immediatePropagationStopped(false) |
| 81 , m_defaultPrevented(false) | 79 , m_defaultPrevented(false) |
| 82 , m_defaultHandled(false) | 80 , m_defaultHandled(false) |
| 83 , m_cancelBubble(false) | 81 , m_cancelBubble(false) |
| 84 , m_eventPhase(0) | 82 , m_eventPhase(0) |
| 85 , m_currentTarget(nullptr) | 83 , m_currentTarget(nullptr) |
| 86 , m_createTime(convertSecondsToDOMTimeStamp(currentTime())) | 84 , m_createTime(convertSecondsToDOMTimeStamp(currentTime())) |
| 87 { | 85 { |
| 88 ScriptWrappable::init(this); | |
| 89 } | 86 } |
| 90 | 87 |
| 91 Event::~Event() | 88 Event::~Event() |
| 92 { | 89 { |
| 93 } | 90 } |
| 94 | 91 |
| 95 void Event::initEvent(const AtomicString& eventTypeArg, bool canBubbleArg, bool
cancelableArg) | 92 void Event::initEvent(const AtomicString& eventTypeArg, bool canBubbleArg, bool
cancelableArg) |
| 96 { | 93 { |
| 97 if (dispatched()) | 94 if (dispatched()) |
| 98 return; | 95 return; |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 263 | 260 |
| 264 void Event::trace(Visitor* visitor) | 261 void Event::trace(Visitor* visitor) |
| 265 { | 262 { |
| 266 visitor->trace(m_currentTarget); | 263 visitor->trace(m_currentTarget); |
| 267 visitor->trace(m_target); | 264 visitor->trace(m_target); |
| 268 visitor->trace(m_underlyingEvent); | 265 visitor->trace(m_underlyingEvent); |
| 269 visitor->trace(m_eventPath); | 266 visitor->trace(m_eventPath); |
| 270 } | 267 } |
| 271 | 268 |
| 272 } // namespace blink | 269 } // namespace blink |
| OLD | NEW |