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

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

Issue 727593003: Implement MouseEvent buttons attribute. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 1 month 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, 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 , m_deltaY(initializer.deltaY ? initializer.deltaY : -initializer.wheelDelta Y) 55 , m_deltaY(initializer.deltaY ? initializer.deltaY : -initializer.wheelDelta Y)
56 , m_deltaZ(initializer.deltaZ) 56 , m_deltaZ(initializer.deltaZ)
57 , m_deltaMode(initializer.deltaMode) 57 , m_deltaMode(initializer.deltaMode)
58 { 58 {
59 } 59 }
60 60
61 WheelEvent::WheelEvent(const FloatPoint& wheelTicks, const FloatPoint& rawDelta, unsigned deltaMode, 61 WheelEvent::WheelEvent(const FloatPoint& wheelTicks, const FloatPoint& rawDelta, unsigned deltaMode,
62 PassRefPtrWillBeRawPtr<AbstractView> view, const IntPoint& screenLocation, c onst IntPoint& pageLocation, 62 PassRefPtrWillBeRawPtr<AbstractView> view, const IntPoint& screenLocation, c onst IntPoint& pageLocation,
63 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey) 63 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey)
64 : MouseEvent(EventTypeNames::wheel, true, true, view, 0, screenLocation.x(), screenLocation.y(), 64 : MouseEvent(EventTypeNames::wheel, true, true, view, 0, screenLocation.x(), screenLocation.y(),
65 pageLocation.x(), pageLocation.y(), 0, 0, ctrlKey, altKey, shiftKey, met aKey, 0, nullptr, 65 pageLocation.x(), pageLocation.y(), 0, 0, ctrlKey, altKey, shiftKey, met aKey, 0, 0,
Rick Byers 2014/11/14 19:48:09 WheelEvent is a MouseEvent too, so I think you'll
zino 2014/11/18 14:19:35 Done.
66 nullptr, false, PlatformMouseEvent::RealOrIndistinguishable) 66 nullptr, nullptr, false, PlatformMouseEvent::RealOrIndistinguishable)
67 , m_wheelDelta(wheelTicks.x() * TickMultiplier, wheelTicks.y() * TickMultipl ier) 67 , m_wheelDelta(wheelTicks.x() * TickMultiplier, wheelTicks.y() * TickMultipl ier)
68 , m_deltaX(-rawDelta.x()) 68 , m_deltaX(-rawDelta.x())
69 , m_deltaY(-rawDelta.y()) 69 , m_deltaY(-rawDelta.y())
70 , m_deltaZ(0) 70 , m_deltaZ(0)
71 , m_deltaMode(deltaMode) 71 , m_deltaMode(deltaMode)
72 { 72 {
73 } 73 }
74 74
75 const AtomicString& WheelEvent::interfaceName() const 75 const AtomicString& WheelEvent::interfaceName() const
76 { 76 {
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 return toWheelEvent(EventDispatchMediator::event()); 117 return toWheelEvent(EventDispatchMediator::event());
118 } 118 }
119 119
120 bool WheelEventDispatchMediator::dispatchEvent(EventDispatcher* dispatcher) cons t 120 bool WheelEventDispatchMediator::dispatchEvent(EventDispatcher* dispatcher) cons t
121 { 121 {
122 ASSERT(event()); 122 ASSERT(event());
123 return EventDispatchMediator::dispatchEvent(dispatcher) && !event()->default Handled(); 123 return EventDispatchMediator::dispatchEvent(dispatcher) && !event()->default Handled();
124 } 124 }
125 125
126 } // namespace blink 126 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698