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

Unified 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: nits Created 6 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/events/WheelEvent.h ('k') | Source/core/page/EventHandler.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/events/WheelEvent.cpp
diff --git a/Source/core/events/WheelEvent.cpp b/Source/core/events/WheelEvent.cpp
index 63256852c4dcfa2174ddaecff9d2ed3efb81e85d..a5d2594acff48d5f8befea1a73e0ab9a76f5c87b 100644
--- a/Source/core/events/WheelEvent.cpp
+++ b/Source/core/events/WheelEvent.cpp
@@ -60,10 +60,10 @@ WheelEvent::WheelEvent(const AtomicString& type, const WheelEventInit& initializ
WheelEvent::WheelEvent(const FloatPoint& wheelTicks, const FloatPoint& rawDelta, unsigned deltaMode,
PassRefPtrWillBeRawPtr<AbstractView> view, const IntPoint& screenLocation, const IntPoint& pageLocation,
- bool ctrlKey, bool altKey, bool shiftKey, bool metaKey)
+ bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, unsigned short buttons)
: MouseEvent(EventTypeNames::wheel, true, true, view, 0, screenLocation.x(), screenLocation.y(),
- pageLocation.x(), pageLocation.y(), 0, 0, ctrlKey, altKey, shiftKey, metaKey, 0, nullptr,
- nullptr, false, PlatformMouseEvent::RealOrIndistinguishable)
+ pageLocation.x(), pageLocation.y(), 0, 0, ctrlKey, altKey, shiftKey, metaKey, 0, buttons,
+ nullptr, nullptr, false, PlatformMouseEvent::RealOrIndistinguishable)
, m_wheelDelta(wheelTicks.x() * TickMultiplier, wheelTicks.y() * TickMultiplier)
, m_deltaX(-rawDelta.x())
, m_deltaY(-rawDelta.y())
@@ -106,7 +106,8 @@ WheelEventDispatchMediator::WheelEventDispatchMediator(const PlatformWheelEvent&
{
setEvent(WheelEvent::create(FloatPoint(event.wheelTicksX(), event.wheelTicksY()), FloatPoint(event.deltaX(), event.deltaY()),
deltaMode(event), view, event.globalPosition(), event.position(),
- event.ctrlKey(), event.altKey(), event.shiftKey(), event.metaKey()));
+ event.ctrlKey(), event.altKey(), event.shiftKey(), event.metaKey(),
+ MouseEvent::platformModifiersToButtons(event.modifiers())));
}
WheelEvent& WheelEventDispatchMediator::event() const
« no previous file with comments | « Source/core/events/WheelEvent.h ('k') | Source/core/page/EventHandler.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698