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

Unified Diff: third_party/WebKit/Source/core/events/WheelEvent.h

Issue 2227803003: Plumb phase/momentum for WheelEvent. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Non-Mac compile. Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/events/WheelEvent.h
diff --git a/third_party/WebKit/Source/core/events/WheelEvent.h b/third_party/WebKit/Source/core/events/WheelEvent.h
index 522073ccc75a7010843d84a04a4f91bd43f728cf..568ea24765b0044f473ed66e12e235513185f256 100644
--- a/third_party/WebKit/Source/core/events/WheelEvent.h
+++ b/third_party/WebKit/Source/core/events/WheelEvent.h
@@ -34,6 +34,18 @@ namespace blink {
class PlatformWheelEvent;
+#if OS(MACOSX)
+enum WheelEventPhase {
+ WheelEventPhaseNone = 0,
+ WheelEventPhaseBegan = 1 << 0,
+ WheelEventPhaseStationary = 1 << 1,
+ WheelEventPhaseChanged = 1 << 2,
+ WheelEventPhaseEnded = 1 << 3,
+ WheelEventPhaseCancelled = 1 << 4,
+ WheelEventPhaseMayBegin = 1 << 5,
+};
+#endif
+
class CORE_EXPORT WheelEvent final : public MouseEvent {
DEFINE_WRAPPERTYPEINFO();
public:
@@ -61,11 +73,19 @@ public:
const FloatPoint& rawDelta, unsigned deltaMode, AbstractView* view,
const IntPoint& screenLocation, const IntPoint& windowLocation,
PlatformEvent::Modifiers modifiers, unsigned short buttons, double platformTimeStamp,
- int resendingPluginId, bool hasPreciseScrollingDeltas, RailsMode railsMode, bool cancelable)
+ int resendingPluginId, bool hasPreciseScrollingDeltas, RailsMode railsMode, bool cancelable
+#if OS(MACOSX)
+ , WheelEventPhase phase, WheelEventPhase momentumPhase
+#endif
+ )
{
return new WheelEvent(wheelTicks, rawDelta, deltaMode, view,
screenLocation, windowLocation, modifiers, buttons, platformTimeStamp,
- resendingPluginId, hasPreciseScrollingDeltas, railsMode, cancelable);
+ resendingPluginId, hasPreciseScrollingDeltas, railsMode, cancelable
+#if OS(MACOSX)
+ , phase, momentumPhase
+#endif
+ );
}
double deltaX() const { return m_deltaX; } // Positive when scrolling right.
@@ -87,6 +107,11 @@ public:
EventDispatchMediator* createMediator() override;
+#if OS(MACOSX)
+ WheelEventPhase phase() const { return m_phase; }
+ WheelEventPhase momentumPhase() const { return m_momentumPhase; }
+#endif
+
DECLARE_VIRTUAL_TRACE();
private:
@@ -96,6 +121,14 @@ private:
unsigned, AbstractView*, const IntPoint& screenLocation, const IntPoint& windowLocation,
PlatformEvent::Modifiers, unsigned short buttons, double platformTimeStamp,
int resendingPluginId, bool hasPreciseScrollingDeltas, RailsMode, bool cancelable);
+#if OS(MACOSX)
+ WheelEvent(const FloatPoint& wheelTicks, const FloatPoint& rawDelta,
+ unsigned, AbstractView*, const IntPoint& screenLocation, const IntPoint& windowLocation,
+ PlatformEvent::Modifiers, unsigned short buttons, double platformTimeStamp,
+ int resendingPluginId, bool hasPreciseScrollingDeltas, RailsMode, bool cancelable,
+ WheelEventPhase phase, WheelEventPhase momentumPhase
+ );
+#endif
IntPoint m_wheelDelta;
double m_deltaX;
@@ -105,6 +138,10 @@ private:
int m_resendingPluginId;
bool m_hasPreciseScrollingDeltas;
RailsMode m_railsMode;
+#if OS(MACOSX)
+ WheelEventPhase m_phase;
+ WheelEventPhase m_momentumPhase;
+#endif
};
DEFINE_EVENT_TYPE_CASTS(WheelEvent);
« no previous file with comments | « content/public/browser/render_widget_host_view_mac_delegate.h ('k') | third_party/WebKit/Source/core/events/WheelEvent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698