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

Side by Side Diff: Source/core/events/WheelEvent.cpp

Issue 26429003: Cleanup: Add toDeviceMotionEvent and toDeviceOrientationEvent. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Updated to ToT Created 7 years, 2 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
« no previous file with comments | « Source/core/events/WheelEvent.h ('k') | Source/core/html/shadow/SpinButtonElement.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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, 2010 Apple Inc. All rights reserved. 5 * Copyright (C) 2003, 2005, 2006, 2008, 2010 Apple Inc. All rights reserved.
6 * Copyright (C) 2013 Samsung Electronics. All rights reserved. 6 * Copyright (C) 2013 Samsung Electronics. All rights reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 if (!(event.deltaX() || event.deltaY())) 141 if (!(event.deltaX() || event.deltaY()))
142 return; 142 return;
143 143
144 setEvent(WheelEvent::create(FloatPoint(event.wheelTicksX(), event.wheelTicks Y()), FloatPoint(event.deltaX(), event.deltaY()), 144 setEvent(WheelEvent::create(FloatPoint(event.wheelTicksX(), event.wheelTicks Y()), FloatPoint(event.deltaX(), event.deltaY()),
145 deltaMode(event), view, event.globalPosition(), event.position(), 145 deltaMode(event), view, event.globalPosition(), event.position(),
146 event.ctrlKey(), event.altKey(), event.shiftKey(), event.metaKey(), even t.directionInvertedFromDevice())); 146 event.ctrlKey(), event.altKey(), event.shiftKey(), event.metaKey(), even t.directionInvertedFromDevice()));
147 } 147 }
148 148
149 WheelEvent* WheelEventDispatchMediator::event() const 149 WheelEvent* WheelEventDispatchMediator::event() const
150 { 150 {
151 return static_cast<WheelEvent*>(EventDispatchMediator::event()); 151 return toWheelEvent(EventDispatchMediator::event());
152 } 152 }
153 153
154 bool WheelEventDispatchMediator::dispatchEvent(EventDispatcher* dispatcher) cons t 154 bool WheelEventDispatchMediator::dispatchEvent(EventDispatcher* dispatcher) cons t
155 { 155 {
156 ASSERT(event()); 156 ASSERT(event());
157 return EventDispatchMediator::dispatchEvent(dispatcher) && !event()->default Handled(); 157 return EventDispatchMediator::dispatchEvent(dispatcher) && !event()->default Handled();
158 } 158 }
159 159
160 } // namespace WebCore 160 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/events/WheelEvent.h ('k') | Source/core/html/shadow/SpinButtonElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698