Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(60)

Side by Side Diff: third_party/WebKit/Source/core/events/MouseEvent.cpp

Issue 2314093002: Revert of Make a pen in eraser mode visible thru PointerEvent.buttons (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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>(WebPointerProperties::Buttons::Le ft); 155 buttons |= static_cast<unsigned short>(Buttons::Left);
156 if (modifiers & PlatformEvent::RightButtonDown) 156 if (modifiers & PlatformEvent::RightButtonDown)
157 buttons |= static_cast<unsigned short>(WebPointerProperties::Buttons::Ri ght); 157 buttons |= static_cast<unsigned short>(Buttons::Right);
158 if (modifiers & PlatformEvent::MiddleButtonDown) 158 if (modifiers & PlatformEvent::MiddleButtonDown)
159 buttons |= static_cast<unsigned short>(WebPointerProperties::Buttons::Mi ddle); 159 buttons |= static_cast<unsigned short>(Buttons::Middle);
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
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
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/events/MouseEvent.h ('k') | third_party/WebKit/Source/core/events/PointerEventFactory.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698