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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 , m_syntheticEventType(PlatformMouseEvent::RealOrIndistinguishable) | 113 , m_syntheticEventType(PlatformMouseEvent::RealOrIndistinguishable) |
114 { | 114 { |
115 } | 115 } |
116 | 116 |
117 MouseEvent::MouseEvent(const AtomicString& eventType, bool canBubble, bool cance
lable, PassRefPtrWillBeRawPtr<AbstractView> view, | 117 MouseEvent::MouseEvent(const AtomicString& eventType, bool canBubble, bool cance
lable, PassRefPtrWillBeRawPtr<AbstractView> view, |
118 int detail, int screenX, int screenY, int windowX, int windowY, | 118 int detail, int screenX, int screenY, int windowX, int windowY, |
119 int movementX, int movementY, | 119 int movementX, int movementY, |
120 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, | 120 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, |
121 short button, unsigned short buttons, PassRefPtrWillBeRawPtr<EventTarget> re
latedTarget, | 121 short button, unsigned short buttons, PassRefPtrWillBeRawPtr<EventTarget> re
latedTarget, |
122 PlatformMouseEvent::SyntheticEventType syntheticEventType, | 122 PlatformMouseEvent::SyntheticEventType syntheticEventType, |
123 double uiCreateTime) | 123 double timestamp) |
124 : MouseRelatedEvent(eventType, canBubble, cancelable, view, detail, IntPoint
(screenX, screenY), | 124 : MouseRelatedEvent(eventType, canBubble, cancelable, view, detail, IntPoint
(screenX, screenY), |
125 IntPoint(windowX, windowY), | 125 IntPoint(windowX, windowY), |
126 IntPoint(movementX, movementY), | 126 IntPoint(movementX, movementY), |
127 ctrlKey, altKey, shiftKey, metaKey, | 127 ctrlKey, altKey, shiftKey, metaKey, |
128 syntheticEventType == PlatformMouseEvent::Positionless ? PositionType::P
ositionless : PositionType::Position, | 128 syntheticEventType == PlatformMouseEvent::Positionless ? PositionType::P
ositionless : PositionType::Position, |
129 syntheticEventType == PlatformMouseEvent::FromTouch ? InputDeviceCapabil
ities::firesTouchEventsSourceCapabilities() : InputDeviceCapabilities::doesntFir
eTouchEventsSourceCapabilities()) | 129 syntheticEventType == PlatformMouseEvent::FromTouch ? InputDeviceCapabil
ities::firesTouchEventsSourceCapabilities() : InputDeviceCapabilities::doesntFir
eTouchEventsSourceCapabilities()) |
130 , m_button(button) | 130 , m_button(button) |
131 , m_buttons(buttons) | 131 , m_buttons(buttons) |
132 , m_relatedTarget(relatedTarget) | 132 , m_relatedTarget(relatedTarget) |
133 , m_syntheticEventType(syntheticEventType) | 133 , m_syntheticEventType(syntheticEventType) |
134 { | 134 { |
135 setUICreateTime(uiCreateTime); | 135 setPlatformTimeStamp(timestamp); |
136 } | 136 } |
137 | 137 |
138 MouseEvent::MouseEvent(const AtomicString& eventType, const MouseEventInit& init
ializer) | 138 MouseEvent::MouseEvent(const AtomicString& eventType, const MouseEventInit& init
ializer) |
139 : MouseRelatedEvent(eventType, initializer.bubbles(), initializer.cancelable
(), initializer.view(), initializer.detail(), IntPoint(initializer.screenX(), in
itializer.screenY()), | 139 : MouseRelatedEvent(eventType, initializer.bubbles(), initializer.cancelable
(), initializer.view(), initializer.detail(), IntPoint(initializer.screenX(), in
itializer.screenY()), |
140 IntPoint(0 /* pageX */, 0 /* pageY */), | 140 IntPoint(0 /* pageX */, 0 /* pageY */), |
141 IntPoint(initializer.movementX(), initializer.movementY()), | 141 IntPoint(initializer.movementX(), initializer.movementY()), |
142 initializer.ctrlKey(), initializer.altKey(), initializer.shiftKey(), ini
tializer.metaKey(), PositionType::Position, initializer.sourceCapabilities()) | 142 initializer.ctrlKey(), initializer.altKey(), initializer.shiftKey(), ini
tializer.metaKey(), PositionType::Position, initializer.sourceCapabilities()) |
143 , m_button(initializer.button()) | 143 , m_button(initializer.button()) |
144 , m_buttons(initializer.buttons()) | 144 , m_buttons(initializer.buttons()) |
145 , m_relatedTarget(initializer.relatedTarget()) | 145 , m_relatedTarget(initializer.relatedTarget()) |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
299 doubleClickEvent->setTrusted(event().isTrusted()); | 299 doubleClickEvent->setTrusted(event().isTrusted()); |
300 if (event().defaultHandled()) | 300 if (event().defaultHandled()) |
301 doubleClickEvent->setDefaultHandled(); | 301 doubleClickEvent->setDefaultHandled(); |
302 EventDispatcher::dispatchEvent(dispatcher.node(), MouseEventDispatchMediator
::create(doubleClickEvent)); | 302 EventDispatcher::dispatchEvent(dispatcher.node(), MouseEventDispatchMediator
::create(doubleClickEvent)); |
303 if (doubleClickEvent->defaultHandled() || doubleClickEvent->defaultPrevented
()) | 303 if (doubleClickEvent->defaultHandled() || doubleClickEvent->defaultPrevented
()) |
304 return false; | 304 return false; |
305 return !swallowEvent; | 305 return !swallowEvent; |
306 } | 306 } |
307 | 307 |
308 } // namespace blink | 308 } // namespace blink |
OLD | NEW |