| 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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 | 145 |
| 146 MouseEvent::~MouseEvent() | 146 MouseEvent::~MouseEvent() |
| 147 { | 147 { |
| 148 } | 148 } |
| 149 | 149 |
| 150 unsigned short MouseEvent::platformModifiersToButtons(unsigned modifiers) | 150 unsigned short MouseEvent::platformModifiersToButtons(unsigned modifiers) |
| 151 { | 151 { |
| 152 unsigned short buttons = 0; | 152 unsigned short buttons = 0; |
| 153 | 153 |
| 154 if (modifiers & PlatformEvent::LeftButtonDown) | 154 if (modifiers & PlatformEvent::LeftButtonDown) |
| 155 buttons |= static_cast<unsigned short>(Buttons::Left); | 155 buttons |= static_cast<unsigned short>(WebPointerProperties::Buttons::Le
ft); |
| 156 if (modifiers & PlatformEvent::RightButtonDown) | 156 if (modifiers & PlatformEvent::RightButtonDown) |
| 157 buttons |= static_cast<unsigned short>(Buttons::Right); | 157 buttons |= static_cast<unsigned short>(WebPointerProperties::Buttons::Ri
ght); |
| 158 if (modifiers & PlatformEvent::MiddleButtonDown) | 158 if (modifiers & PlatformEvent::MiddleButtonDown) |
| 159 buttons |= static_cast<unsigned short>(Buttons::Middle); | 159 buttons |= static_cast<unsigned short>(WebPointerProperties::Buttons::Mi
ddle); |
| 160 | 160 |
| 161 return buttons; | 161 return buttons; |
| 162 } | 162 } |
| 163 | 163 |
| 164 void MouseEvent::initMouseEvent(ScriptState* scriptState, const AtomicString& ty
pe, bool canBubble, bool cancelable, AbstractView* view, | 164 void MouseEvent::initMouseEvent(ScriptState* scriptState, const AtomicString& ty
pe, bool canBubble, bool cancelable, AbstractView* view, |
| 165 int detail, int screenX, int screenY, int client
X, int clientY, | 165 int detail, int screenX, int screenY, int client
X, int clientY, |
| 166 bool ctrlKey, bool altKey, bool shiftKey, bool m
etaKey, | 166 bool ctrlKey, bool altKey, bool shiftKey, bool m
etaKey, |
| 167 short button, EventTarget* relatedTarget, unsign
ed short buttons) | 167 short button, EventTarget* relatedTarget, unsign
ed short buttons) |
| 168 { | 168 { |
| 169 if (isBeingDispatched()) | 169 if (isBeingDispatched()) |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 290 doubleClickEvent->setTrusted(mouseEvent.isTrusted()); | 290 doubleClickEvent->setTrusted(mouseEvent.isTrusted()); |
| 291 if (mouseEvent.defaultHandled()) | 291 if (mouseEvent.defaultHandled()) |
| 292 doubleClickEvent->setDefaultHandled(); | 292 doubleClickEvent->setDefaultHandled(); |
| 293 DispatchEventResult doubleClickDispatchResult = EventDispatcher::dispatchEve
nt(dispatcher.node(), MouseEventDispatchMediator::create(doubleClickEvent)); | 293 DispatchEventResult doubleClickDispatchResult = EventDispatcher::dispatchEve
nt(dispatcher.node(), MouseEventDispatchMediator::create(doubleClickEvent)); |
| 294 if (doubleClickDispatchResult != DispatchEventResult::NotCanceled) | 294 if (doubleClickDispatchResult != DispatchEventResult::NotCanceled) |
| 295 return doubleClickDispatchResult; | 295 return doubleClickDispatchResult; |
| 296 return dispatchResult; | 296 return dispatchResult; |
| 297 } | 297 } |
| 298 | 298 |
| 299 } // namespace blink | 299 } // namespace blink |
| OLD | NEW |