| 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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 IntPoint(windowX, windowY), | 90 IntPoint(windowX, windowY), |
| 91 IntPoint(movementX, movementY), | 91 IntPoint(movementX, movementY), |
| 92 ctrlKey, altKey, shiftKey, metaKey, isSimulated) | 92 ctrlKey, altKey, shiftKey, metaKey, isSimulated) |
| 93 , m_button(button) | 93 , m_button(button) |
| 94 , m_buttons(buttons) | 94 , m_buttons(buttons) |
| 95 , m_relatedTarget(relatedTarget) | 95 , m_relatedTarget(relatedTarget) |
| 96 , m_dataTransfer(dataTransfer) | 96 , m_dataTransfer(dataTransfer) |
| 97 , m_syntheticEventType(syntheticEventType) | 97 , m_syntheticEventType(syntheticEventType) |
| 98 { | 98 { |
| 99 setUICreateTime(uiCreateTime); | 99 setUICreateTime(uiCreateTime); |
| 100 if (syntheticEventType == PlatformMouseEvent::FromTouch) |
| 101 setSourceDevice(InputDevice::touchEventInstance()); |
| 102 else |
| 103 setSourceDevice(InputDevice::nonTouchEventInstance()); |
| 100 } | 104 } |
| 101 | 105 |
| 102 MouseEvent::MouseEvent(const AtomicString& eventType, const MouseEventInit& init
ializer) | 106 MouseEvent::MouseEvent(const AtomicString& eventType, const MouseEventInit& init
ializer) |
| 103 : MouseRelatedEvent(eventType, initializer.bubbles(), initializer.cancelable
(), initializer.view(), initializer.detail(), IntPoint(initializer.screenX(), in
itializer.screenY()), | 107 : MouseRelatedEvent(eventType, initializer.bubbles(), initializer.cancelable
(), initializer.view(), initializer.detail(), IntPoint(initializer.screenX(), in
itializer.screenY()), |
| 104 IntPoint(0 /* pageX */, 0 /* pageY */), | 108 IntPoint(0 /* pageX */, 0 /* pageY */), |
| 105 IntPoint(initializer.movementX(), initializer.movementY()), | 109 IntPoint(initializer.movementX(), initializer.movementY()), |
| 106 initializer.ctrlKey(), initializer.altKey(), initializer.shiftKey(), ini
tializer.metaKey(), false /* isSimulated */) | 110 initializer.ctrlKey(), initializer.altKey(), initializer.shiftKey(), ini
tializer.metaKey(), false /* isSimulated */) |
| 107 , m_button(initializer.button()) | 111 , m_button(initializer.button()) |
| 108 , m_buttons(initializer.buttons()) | 112 , m_buttons(initializer.buttons()) |
| 109 , m_relatedTarget(initializer.relatedTarget()) | 113 , m_relatedTarget(initializer.relatedTarget()) |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 292 event().button(), relatedTarget, event().buttons()); | 296 event().button(), relatedTarget, event().buttons()); |
| 293 if (event().defaultHandled()) | 297 if (event().defaultHandled()) |
| 294 doubleClickEvent->setDefaultHandled(); | 298 doubleClickEvent->setDefaultHandled(); |
| 295 EventDispatcher::dispatchEvent(dispatcher.node(), MouseEventDispatchMediator
::create(doubleClickEvent)); | 299 EventDispatcher::dispatchEvent(dispatcher.node(), MouseEventDispatchMediator
::create(doubleClickEvent)); |
| 296 if (doubleClickEvent->defaultHandled() || doubleClickEvent->defaultPrevented
()) | 300 if (doubleClickEvent->defaultHandled() || doubleClickEvent->defaultPrevented
()) |
| 297 return false; | 301 return false; |
| 298 return !swallowEvent; | 302 return !swallowEvent; |
| 299 } | 303 } |
| 300 | 304 |
| 301 } // namespace blink | 305 } // namespace blink |
| OLD | NEW |