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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 detail, event.globalPosition().x(), event.globalPosition().y(), event.po
sition().x(), event.position().y(), | 62 detail, event.globalPosition().x(), event.globalPosition().y(), event.po
sition().x(), event.position().y(), |
63 event.movementDelta().x(), event.movementDelta().y(), | 63 event.movementDelta().x(), event.movementDelta().y(), |
64 event.ctrlKey(), event.altKey(), event.shiftKey(), event.metaKey(), even
t.button(), | 64 event.ctrlKey(), event.altKey(), event.shiftKey(), event.metaKey(), even
t.button(), |
65 relatedTarget, nullptr, false); | 65 relatedTarget, nullptr, false); |
66 } | 66 } |
67 | 67 |
68 PassRefPtr<MouseEvent> MouseEvent::create(const AtomicString& type, bool canBubb
le, bool cancelable, PassRefPtr<AbstractView> view, | 68 PassRefPtr<MouseEvent> MouseEvent::create(const AtomicString& type, bool canBubb
le, bool cancelable, PassRefPtr<AbstractView> view, |
69 int detail, int screenX, int screenY, int pageX, int pageY, | 69 int detail, int screenX, int screenY, int pageX, int pageY, |
70 int movementX, int movementY, | 70 int movementX, int movementY, |
71 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, unsigned short butto
n, | 71 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, unsigned short butto
n, |
72 PassRefPtr<EventTarget> relatedTarget, PassRefPtr<Clipboard> clipboard, bool
isSimulated) | 72 PassRefPtr<EventTarget> relatedTarget, PassRefPtrWillBeRawPtr<Clipboard> cli
pboard, bool isSimulated) |
73 { | 73 { |
74 return adoptRef(new MouseEvent(type, canBubble, cancelable, view, | 74 return adoptRef(new MouseEvent(type, canBubble, cancelable, view, |
75 detail, screenX, screenY, pageX, pageY, | 75 detail, screenX, screenY, pageX, pageY, |
76 movementX, movementY, | 76 movementX, movementY, |
77 ctrlKey, altKey, shiftKey, metaKey, button, relatedTarget, clipboard, is
Simulated)); | 77 ctrlKey, altKey, shiftKey, metaKey, button, relatedTarget, clipboard, is
Simulated)); |
78 } | 78 } |
79 | 79 |
80 MouseEvent::MouseEvent() | 80 MouseEvent::MouseEvent() |
81 : m_button(0) | 81 : m_button(0) |
82 , m_buttonDown(false) | 82 , m_buttonDown(false) |
83 { | 83 { |
84 ScriptWrappable::init(this); | 84 ScriptWrappable::init(this); |
85 } | 85 } |
86 | 86 |
87 MouseEvent::MouseEvent(const AtomicString& eventType, bool canBubble, bool cance
lable, PassRefPtr<AbstractView> view, | 87 MouseEvent::MouseEvent(const AtomicString& eventType, bool canBubble, bool cance
lable, PassRefPtr<AbstractView> view, |
88 int detail, int screenX, int screenY, int pageX, int page
Y, | 88 int detail, int screenX, int screenY, int pageX, int pageY, |
89 int movementX, int movementY, | 89 int movementX, int movementY, |
90 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, | 90 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, |
91 unsigned short button, PassRefPtr<EventTarget> relatedTar
get, | 91 unsigned short button, PassRefPtr<EventTarget> relatedTarget, |
92 PassRefPtr<Clipboard> clipboard, bool isSimulated) | 92 PassRefPtrWillBeRawPtr<Clipboard> clipboard, bool isSimulated) |
93 : MouseRelatedEvent(eventType, canBubble, cancelable, view, detail, IntPoint
(screenX, screenY), | 93 : MouseRelatedEvent(eventType, canBubble, cancelable, view, detail, IntPoint
(screenX, screenY), |
94 IntPoint(pageX, pageY), | 94 IntPoint(pageX, pageY), |
95 IntPoint(movementX, movementY), | 95 IntPoint(movementX, movementY), |
96 ctrlKey, altKey, shiftKey, metaKey, isSimulated) | 96 ctrlKey, altKey, shiftKey, metaKey, isSimulated) |
97 , m_button(button == (unsigned short)-1 ? 0 : button) | 97 , m_button(button == (unsigned short)-1 ? 0 : button) |
98 , m_buttonDown(button != (unsigned short)-1) | 98 , m_buttonDown(button != (unsigned short)-1) |
99 , m_relatedTarget(relatedTarget) | 99 , m_relatedTarget(relatedTarget) |
100 , m_clipboard(clipboard) | 100 , m_clipboard(clipboard) |
101 { | 101 { |
102 ScriptWrappable::init(this); | 102 ScriptWrappable::init(this); |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
268 event()->button(), relatedTarget); | 268 event()->button(), relatedTarget); |
269 if (event()->defaultHandled()) | 269 if (event()->defaultHandled()) |
270 doubleClickEvent->setDefaultHandled(); | 270 doubleClickEvent->setDefaultHandled(); |
271 EventDispatcher::dispatchEvent(dispatcher->node(), MouseEventDispatchMediato
r::create(doubleClickEvent)); | 271 EventDispatcher::dispatchEvent(dispatcher->node(), MouseEventDispatchMediato
r::create(doubleClickEvent)); |
272 if (doubleClickEvent->defaultHandled() || doubleClickEvent->defaultPrevented
()) | 272 if (doubleClickEvent->defaultHandled() || doubleClickEvent->defaultPrevented
()) |
273 return false; | 273 return false; |
274 return !swallowEvent; | 274 return !swallowEvent; |
275 } | 275 } |
276 | 276 |
277 } // namespace WebCore | 277 } // namespace WebCore |
OLD | NEW |