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

Side by Side Diff: third_party/WebKit/Source/core/events/WheelEvent.h

Issue 1894363004: Articulate the cancel behavior in WebMouseWheelEvent. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master_all_passive
Patch Set: Rebase Created 4 years, 8 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
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, 2004, 2005, 2006, 2008, 2010 Apple Inc. All rights reserv ed. 5 * Copyright (C) 2003, 2004, 2005, 2006, 2008, 2010 Apple Inc. All rights reserv ed.
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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 54
55 static WheelEvent* create(const AtomicString& type, const WheelEventInit& in itializer) 55 static WheelEvent* create(const AtomicString& type, const WheelEventInit& in itializer)
56 { 56 {
57 return new WheelEvent(type, initializer); 57 return new WheelEvent(type, initializer);
58 } 58 }
59 59
60 static WheelEvent* create(const FloatPoint& wheelTicks, 60 static WheelEvent* create(const FloatPoint& wheelTicks,
61 const FloatPoint& rawDelta, unsigned deltaMode, AbstractView* view, 61 const FloatPoint& rawDelta, unsigned deltaMode, AbstractView* view,
62 const IntPoint& screenLocation, const IntPoint& windowLocation, 62 const IntPoint& screenLocation, const IntPoint& windowLocation,
63 PlatformEvent::Modifiers modifiers, unsigned short buttons, double platf ormTimeStamp, 63 PlatformEvent::Modifiers modifiers, unsigned short buttons, double platf ormTimeStamp,
64 bool canScroll, int resendingPluginId, bool hasPreciseScrollingDeltas, R ailsMode railsMode) 64 bool canScroll, int resendingPluginId, bool hasPreciseScrollingDeltas, R ailsMode railsMode, bool cancelable)
65 { 65 {
66 return new WheelEvent(wheelTicks, rawDelta, deltaMode, view, 66 return new WheelEvent(wheelTicks, rawDelta, deltaMode, view,
67 screenLocation, windowLocation, modifiers, buttons, platformTimeStam p, 67 screenLocation, windowLocation, modifiers, buttons, platformTimeStam p,
68 canScroll, resendingPluginId, hasPreciseScrollingDeltas, railsMode) ; 68 canScroll, resendingPluginId, hasPreciseScrollingDeltas, railsMode, cancelable);
69 } 69 }
70 70
71 double deltaX() const { return m_deltaX; } // Positive when scrolling right. 71 double deltaX() const { return m_deltaX; } // Positive when scrolling right.
72 double deltaY() const { return m_deltaY; } // Positive when scrolling down. 72 double deltaY() const { return m_deltaY; } // Positive when scrolling down.
73 double deltaZ() const { return m_deltaZ; } 73 double deltaZ() const { return m_deltaZ; }
74 int wheelDelta() const { return wheelDeltaY() ? wheelDeltaY() : wheelDeltaX( ); } // Deprecated. 74 int wheelDelta() const { return wheelDeltaY() ? wheelDeltaY() : wheelDeltaX( ); } // Deprecated.
75 int wheelDeltaX() const { return m_wheelDelta.x(); } // Deprecated, negative when scrolling right. 75 int wheelDeltaX() const { return m_wheelDelta.x(); } // Deprecated, negative when scrolling right.
76 int wheelDeltaY() const { return m_wheelDelta.y(); } // Deprecated, negative when scrolling down. 76 int wheelDeltaY() const { return m_wheelDelta.y(); } // Deprecated, negative when scrolling down.
77 unsigned deltaMode() const { return m_deltaMode; } 77 unsigned deltaMode() const { return m_deltaMode; }
78 float ticksX() const { return static_cast<float>(m_wheelDelta.x()) / TickMul tiplier; } 78 float ticksX() const { return static_cast<float>(m_wheelDelta.x()) / TickMul tiplier; }
(...skipping 10 matching lines...) Expand all
89 EventDispatchMediator* createMediator() override; 89 EventDispatchMediator* createMediator() override;
90 90
91 DECLARE_VIRTUAL_TRACE(); 91 DECLARE_VIRTUAL_TRACE();
92 92
93 private: 93 private:
94 WheelEvent(); 94 WheelEvent();
95 WheelEvent(const AtomicString&, const WheelEventInit&); 95 WheelEvent(const AtomicString&, const WheelEventInit&);
96 WheelEvent(const FloatPoint& wheelTicks, const FloatPoint& rawDelta, 96 WheelEvent(const FloatPoint& wheelTicks, const FloatPoint& rawDelta,
97 unsigned, AbstractView*, const IntPoint& screenLocation, const IntPoint& windowLocation, 97 unsigned, AbstractView*, const IntPoint& screenLocation, const IntPoint& windowLocation,
98 PlatformEvent::Modifiers, unsigned short buttons, double platformTimeSta mp, 98 PlatformEvent::Modifiers, unsigned short buttons, double platformTimeSta mp,
99 bool canScroll, int resendingPluginId, bool hasPreciseScrollingDeltas, R ailsMode); 99 bool canScroll, int resendingPluginId, bool hasPreciseScrollingDeltas, R ailsMode, bool cancelable);
100 100
101 IntPoint m_wheelDelta; 101 IntPoint m_wheelDelta;
102 double m_deltaX; 102 double m_deltaX;
103 double m_deltaY; 103 double m_deltaY;
104 double m_deltaZ; 104 double m_deltaZ;
105 unsigned m_deltaMode; 105 unsigned m_deltaMode;
106 bool m_canScroll; 106 bool m_canScroll;
107 int m_resendingPluginId; 107 int m_resendingPluginId;
108 bool m_hasPreciseScrollingDeltas; 108 bool m_hasPreciseScrollingDeltas;
109 RailsMode m_railsMode; 109 RailsMode m_railsMode;
110 }; 110 };
111 111
112 DEFINE_EVENT_TYPE_CASTS(WheelEvent); 112 DEFINE_EVENT_TYPE_CASTS(WheelEvent);
113 113
114 } // namespace blink 114 } // namespace blink
115 115
116 #endif // WheelEvent_h 116 #endif // WheelEvent_h
OLDNEW
« no previous file with comments | « content/renderer/input/render_widget_input_handler.cc ('k') | third_party/WebKit/Source/core/events/WheelEvent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698