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

Unified Diff: Source/core/events/WheelEvent.cpp

Issue 759073002: Add canScroll bit to WebMouseWheelEvent (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase 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/platform/PlatformWheelEvent.h » ('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 3a1ca399ec9ee33f7c799c9c9a50b91438d713f0..d8067c847516ca51e008a8a232a2a80200cabe45 100644
--- a/Source/core/events/WheelEvent.cpp
+++ b/Source/core/events/WheelEvent.cpp
@@ -45,6 +45,7 @@ WheelEvent::WheelEvent()
, m_deltaY(0)
, m_deltaZ(0)
, m_deltaMode(DOM_DELTA_PIXEL)
+ , m_canScroll(true)
{
}
@@ -55,12 +56,13 @@ WheelEvent::WheelEvent(const AtomicString& type, const WheelEventInit& initializ
, m_deltaY(initializer.deltaY ? initializer.deltaY : -initializer.wheelDeltaY)
, m_deltaZ(initializer.deltaZ)
, m_deltaMode(initializer.deltaMode)
+ , m_canScroll(true)
{
}
WheelEvent::WheelEvent(const FloatPoint& wheelTicks, const FloatPoint& rawDelta, unsigned deltaMode,
PassRefPtrWillBeRawPtr<AbstractView> view, const IntPoint& screenLocation, const IntPoint& windowLocation,
- bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, unsigned short buttons)
+ bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, unsigned short buttons, bool canScroll)
: MouseEvent(EventTypeNames::wheel, true, true, view, 0, screenLocation.x(), screenLocation.y(),
windowLocation.x(), windowLocation.y(), 0, 0, ctrlKey, altKey, shiftKey, metaKey, 0, buttons,
nullptr, nullptr, false, PlatformMouseEvent::RealOrIndistinguishable)
@@ -69,6 +71,7 @@ WheelEvent::WheelEvent(const FloatPoint& wheelTicks, const FloatPoint& rawDelta,
, m_deltaY(-rawDelta.y())
, m_deltaZ(0)
, m_deltaMode(deltaMode)
+ , m_canScroll(canScroll)
{
}
@@ -107,7 +110,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(),
- MouseEvent::platformModifiersToButtons(event.modifiers())));
+ MouseEvent::platformModifiersToButtons(event.modifiers()),
+ event.canScroll()));
}
WheelEvent& WheelEventDispatchMediator::event() const
« no previous file with comments | « Source/core/events/WheelEvent.h ('k') | Source/platform/PlatformWheelEvent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698