| 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 10 matching lines...) Expand all Loading... |
| 21 */ | 21 */ |
| 22 | 22 |
| 23 #include "config.h" | 23 #include "config.h" |
| 24 #include "core/events/UIEvent.h" | 24 #include "core/events/UIEvent.h" |
| 25 | 25 |
| 26 | 26 |
| 27 namespace blink { | 27 namespace blink { |
| 28 | 28 |
| 29 UIEvent::UIEvent() | 29 UIEvent::UIEvent() |
| 30 : m_detail(0) | 30 : m_detail(0) |
| 31 , m_sourceDevice(nullptr) |
| 31 { | 32 { |
| 32 } | 33 } |
| 33 | 34 |
| 34 UIEvent::UIEvent(const AtomicString& eventType, bool canBubbleArg, bool cancelab
leArg, PassRefPtrWillBeRawPtr<AbstractView> viewArg, int detailArg) | 35 UIEvent::UIEvent(const AtomicString& eventType, bool canBubbleArg, bool cancelab
leArg, PassRefPtrWillBeRawPtr<AbstractView> viewArg, int detailArg) |
| 35 : Event(eventType, canBubbleArg, cancelableArg) | 36 : Event(eventType, canBubbleArg, cancelableArg) |
| 36 , m_view(viewArg) | 37 , m_view(viewArg) |
| 37 , m_detail(detailArg) | 38 , m_detail(detailArg) |
| 39 , m_sourceDevice(nullptr) |
| 38 { | 40 { |
| 39 } | 41 } |
| 40 | 42 |
| 41 UIEvent::UIEvent(const AtomicString& eventType, const UIEventInit& initializer) | 43 UIEvent::UIEvent(const AtomicString& eventType, const UIEventInit& initializer) |
| 42 : Event(eventType, initializer) | 44 : Event(eventType, initializer) |
| 43 , m_view(initializer.view()) | 45 , m_view(initializer.view()) |
| 44 , m_detail(initializer.detail()) | 46 , m_detail(initializer.detail()) |
| 47 , m_sourceDevice(initializer.sourceDevice()) |
| 45 { | 48 { |
| 46 } | 49 } |
| 47 | 50 |
| 48 UIEvent::~UIEvent() | 51 UIEvent::~UIEvent() |
| 49 { | 52 { |
| 50 } | 53 } |
| 51 | 54 |
| 52 void UIEvent::initUIEvent(const AtomicString& typeArg, bool canBubbleArg, bool c
ancelableArg, PassRefPtrWillBeRawPtr<AbstractView> viewArg, int detailArg) | 55 void UIEvent::initUIEvent(const AtomicString& typeArg, bool canBubbleArg, bool c
ancelableArg, PassRefPtrWillBeRawPtr<AbstractView> viewArg, int detailArg) |
| 53 { | 56 { |
| 54 if (dispatched()) | 57 if (dispatched()) |
| 55 return; | 58 return; |
| 56 | 59 |
| 57 initEvent(typeArg, canBubbleArg, cancelableArg); | 60 initEvent(typeArg, canBubbleArg, cancelableArg); |
| 58 | 61 |
| 59 m_view = viewArg; | 62 m_view = viewArg; |
| 60 m_detail = detailArg; | 63 m_detail = detailArg; |
| 64 m_sourceDevice = nullptr; |
| 61 } | 65 } |
| 62 | 66 |
| 63 bool UIEvent::isUIEvent() const | 67 bool UIEvent::isUIEvent() const |
| 64 { | 68 { |
| 65 return true; | 69 return true; |
| 66 } | 70 } |
| 67 | 71 |
| 68 const AtomicString& UIEvent::interfaceName() const | 72 const AtomicString& UIEvent::interfaceName() const |
| 69 { | 73 { |
| 70 return EventNames::UIEvent; | 74 return EventNames::UIEvent; |
| (...skipping 30 matching lines...) Expand all Loading... |
| 101 } | 105 } |
| 102 | 106 |
| 103 int UIEvent::which() const | 107 int UIEvent::which() const |
| 104 { | 108 { |
| 105 return 0; | 109 return 0; |
| 106 } | 110 } |
| 107 | 111 |
| 108 DEFINE_TRACE(UIEvent) | 112 DEFINE_TRACE(UIEvent) |
| 109 { | 113 { |
| 110 visitor->trace(m_view); | 114 visitor->trace(m_view); |
| 115 visitor->trace(m_sourceDevice); |
| 111 Event::trace(visitor); | 116 Event::trace(visitor); |
| 112 } | 117 } |
| 113 | 118 |
| 114 } // namespace blink | 119 } // namespace blink |
| OLD | NEW |