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

Side by Side Diff: Source/platform/PlatformWheelEvent.h

Issue 415773008: Remove dead code backing WheelEvent.webkitDirectionInvertedFromDevice (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/events/WheelEvent.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2005, 2006, 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2004, 2005, 2006, 2009 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 58
59 class PlatformWheelEvent : public PlatformEvent { 59 class PlatformWheelEvent : public PlatformEvent {
60 public: 60 public:
61 PlatformWheelEvent() 61 PlatformWheelEvent()
62 : PlatformEvent(PlatformEvent::Wheel) 62 : PlatformEvent(PlatformEvent::Wheel)
63 , m_deltaX(0) 63 , m_deltaX(0)
64 , m_deltaY(0) 64 , m_deltaY(0)
65 , m_wheelTicksX(0) 65 , m_wheelTicksX(0)
66 , m_wheelTicksY(0) 66 , m_wheelTicksY(0)
67 , m_granularity(ScrollByPixelWheelEvent) 67 , m_granularity(ScrollByPixelWheelEvent)
68 , m_directionInvertedFromDevice(false)
69 , m_hasPreciseScrollingDeltas(false) 68 , m_hasPreciseScrollingDeltas(false)
70 #if OS(MACOSX) 69 #if OS(MACOSX)
71 , m_phase(PlatformWheelEventPhaseNone) 70 , m_phase(PlatformWheelEventPhaseNone)
72 , m_momentumPhase(PlatformWheelEventPhaseNone) 71 , m_momentumPhase(PlatformWheelEventPhaseNone)
73 , m_scrollCount(0) 72 , m_scrollCount(0)
74 , m_unacceleratedScrollingDeltaX(0) 73 , m_unacceleratedScrollingDeltaX(0)
75 , m_unacceleratedScrollingDeltaY(0) 74 , m_unacceleratedScrollingDeltaY(0)
76 , m_canRubberbandLeft(true) 75 , m_canRubberbandLeft(true)
77 , m_canRubberbandRight(true) 76 , m_canRubberbandRight(true)
78 #endif 77 #endif
79 { 78 {
80 } 79 }
81 80
82 PlatformWheelEvent(IntPoint position, IntPoint globalPosition, float deltaX, float deltaY, float wheelTicksX, float wheelTicksY, PlatformWheelEventGranulari ty granularity, bool shiftKey, bool ctrlKey, bool altKey, bool metaKey) 81 PlatformWheelEvent(IntPoint position, IntPoint globalPosition, float deltaX, float deltaY, float wheelTicksX, float wheelTicksY, PlatformWheelEventGranulari ty granularity, bool shiftKey, bool ctrlKey, bool altKey, bool metaKey)
83 : PlatformEvent(PlatformEvent::Wheel, shiftKey, ctrlKey, altKey, metaKey , 0) 82 : PlatformEvent(PlatformEvent::Wheel, shiftKey, ctrlKey, altKey, metaKey , 0)
84 , m_position(position) 83 , m_position(position)
85 , m_globalPosition(globalPosition) 84 , m_globalPosition(globalPosition)
86 , m_deltaX(deltaX) 85 , m_deltaX(deltaX)
87 , m_deltaY(deltaY) 86 , m_deltaY(deltaY)
88 , m_wheelTicksX(wheelTicksX) 87 , m_wheelTicksX(wheelTicksX)
89 , m_wheelTicksY(wheelTicksY) 88 , m_wheelTicksY(wheelTicksY)
90 , m_granularity(granularity) 89 , m_granularity(granularity)
91 , m_directionInvertedFromDevice(false)
92 , m_hasPreciseScrollingDeltas(false) 90 , m_hasPreciseScrollingDeltas(false)
93 #if OS(MACOSX) 91 #if OS(MACOSX)
94 , m_phase(PlatformWheelEventPhaseNone) 92 , m_phase(PlatformWheelEventPhaseNone)
95 , m_momentumPhase(PlatformWheelEventPhaseNone) 93 , m_momentumPhase(PlatformWheelEventPhaseNone)
96 , m_scrollCount(0) 94 , m_scrollCount(0)
97 , m_unacceleratedScrollingDeltaX(0) 95 , m_unacceleratedScrollingDeltaX(0)
98 , m_unacceleratedScrollingDeltaY(0) 96 , m_unacceleratedScrollingDeltaY(0)
99 , m_canRubberbandLeft(true) 97 , m_canRubberbandLeft(true)
100 , m_canRubberbandRight(true) 98 , m_canRubberbandRight(true)
101 #endif 99 #endif
102 { 100 {
103 } 101 }
104 102
105 const IntPoint& position() const { return m_position; } // PlatformWindow co ordinates. 103 const IntPoint& position() const { return m_position; } // PlatformWindow co ordinates.
106 const IntPoint& globalPosition() const { return m_globalPosition; } // Scree n coordinates. 104 const IntPoint& globalPosition() const { return m_globalPosition; } // Scree n coordinates.
107 105
108 float deltaX() const { return m_deltaX; } 106 float deltaX() const { return m_deltaX; }
109 float deltaY() const { return m_deltaY; } 107 float deltaY() const { return m_deltaY; }
110 108
111 float wheelTicksX() const { return m_wheelTicksX; } 109 float wheelTicksX() const { return m_wheelTicksX; }
112 float wheelTicksY() const { return m_wheelTicksY; } 110 float wheelTicksY() const { return m_wheelTicksY; }
113 111
114 PlatformWheelEventGranularity granularity() const { return m_granularity; } 112 PlatformWheelEventGranularity granularity() const { return m_granularity; }
115 113
116 bool directionInvertedFromDevice() const { return m_directionInvertedFromDev ice; }
117
118 bool hasPreciseScrollingDeltas() const { return m_hasPreciseScrollingDeltas; } 114 bool hasPreciseScrollingDeltas() const { return m_hasPreciseScrollingDeltas; }
119 void setHasPreciseScrollingDeltas(bool b) { m_hasPreciseScrollingDeltas = b; } 115 void setHasPreciseScrollingDeltas(bool b) { m_hasPreciseScrollingDeltas = b; }
120 #if OS(MACOSX) 116 #if OS(MACOSX)
121 PlatformWheelEventPhase phase() const { return m_phase; } 117 PlatformWheelEventPhase phase() const { return m_phase; }
122 PlatformWheelEventPhase momentumPhase() const { return m_momentumPhase; } 118 PlatformWheelEventPhase momentumPhase() const { return m_momentumPhase; }
123 unsigned scrollCount() const { return m_scrollCount; } 119 unsigned scrollCount() const { return m_scrollCount; }
124 float unacceleratedScrollingDeltaX() const { return m_unacceleratedScrolling DeltaX; } 120 float unacceleratedScrollingDeltaX() const { return m_unacceleratedScrolling DeltaX; }
125 float unacceleratedScrollingDeltaY() const { return m_unacceleratedScrolling DeltaY; } 121 float unacceleratedScrollingDeltaY() const { return m_unacceleratedScrolling DeltaY; }
126 bool useLatchedEventNode() const { return m_momentumPhase == PlatformWheelEv entPhaseBegan || m_momentumPhase == PlatformWheelEventPhaseChanged; } 122 bool useLatchedEventNode() const { return m_momentumPhase == PlatformWheelEv entPhaseBegan || m_momentumPhase == PlatformWheelEventPhaseChanged; }
127 bool canRubberbandLeft() const { return m_canRubberbandLeft; } 123 bool canRubberbandLeft() const { return m_canRubberbandLeft; }
128 bool canRubberbandRight() const { return m_canRubberbandRight; } 124 bool canRubberbandRight() const { return m_canRubberbandRight; }
129 #else 125 #else
130 bool useLatchedEventNode() const { return false; } 126 bool useLatchedEventNode() const { return false; }
131 #endif 127 #endif
132 128
133 protected: 129 protected:
134 IntPoint m_position; 130 IntPoint m_position;
135 IntPoint m_globalPosition; 131 IntPoint m_globalPosition;
136 float m_deltaX; 132 float m_deltaX;
137 float m_deltaY; 133 float m_deltaY;
138 float m_wheelTicksX; 134 float m_wheelTicksX;
139 float m_wheelTicksY; 135 float m_wheelTicksY;
140 PlatformWheelEventGranularity m_granularity; 136 PlatformWheelEventGranularity m_granularity;
141 bool m_directionInvertedFromDevice;
142 bool m_hasPreciseScrollingDeltas; 137 bool m_hasPreciseScrollingDeltas;
143 #if OS(MACOSX) 138 #if OS(MACOSX)
144 PlatformWheelEventPhase m_phase; 139 PlatformWheelEventPhase m_phase;
145 PlatformWheelEventPhase m_momentumPhase; 140 PlatformWheelEventPhase m_momentumPhase;
146 unsigned m_scrollCount; 141 unsigned m_scrollCount;
147 float m_unacceleratedScrollingDeltaX; 142 float m_unacceleratedScrollingDeltaX;
148 float m_unacceleratedScrollingDeltaY; 143 float m_unacceleratedScrollingDeltaY;
149 bool m_canRubberbandLeft; 144 bool m_canRubberbandLeft;
150 bool m_canRubberbandRight; 145 bool m_canRubberbandRight;
151 #endif 146 #endif
152 }; 147 };
153 148
154 } // namespace blink 149 } // namespace blink
155 150
156 #endif // PlatformWheelEvent_h 151 #endif // PlatformWheelEvent_h
OLDNEW
« no previous file with comments | « Source/core/events/WheelEvent.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698