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

Side by Side Diff: Source/platform/mac/ScrollElasticityController.h

Issue 197213011: Selectively disable rubber banding on mac. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Moved can_rubberband parameters into WheelEvent. Created 6 years, 9 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) 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2011 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 67
68 bool handleWheelEvent(const PlatformWheelEvent&); 68 bool handleWheelEvent(const PlatformWheelEvent&);
69 void snapRubberBandTimerFired(); 69 void snapRubberBandTimerFired();
70 70
71 bool isRubberBandInProgress() const; 71 bool isRubberBandInProgress() const;
72 72
73 private: 73 private:
74 void stopSnapRubberbandTimer(); 74 void stopSnapRubberbandTimer();
75 void snapRubberBand(); 75 void snapRubberBand();
76 76
77 bool shouldRubberBandInHorizontalDirection(const PlatformWheelEvent&); 77 // This method controls whether a given event can trigger rubber banding.
78 bool shouldStartRubberBanding(const PlatformWheelEvent&);
78 79
79 ScrollElasticityControllerClient* m_client; 80 ScrollElasticityControllerClient* m_client;
80 81
81 bool m_inScrollGesture; 82 bool m_inScrollGesture;
82 bool m_momentumScrollInProgress; 83 bool m_momentumScrollInProgress;
83 bool m_ignoreMomentumScrolls; 84 bool m_ignoreMomentumScrolls;
84 85
85 CFTimeInterval m_lastMomentumScrollTimestamp; 86 CFTimeInterval m_lastMomentumScrollTimestamp;
86 FloatSize m_overflowScrollDelta; 87 FloatSize m_overflowScrollDelta;
87 FloatSize m_stretchScrollForce; 88 FloatSize m_stretchScrollForce;
88 FloatSize m_momentumVelocity; 89 FloatSize m_momentumVelocity;
89 90
90 // Rubber band state. 91 // Rubber band state.
91 CFTimeInterval m_startTime; 92 CFTimeInterval m_startTime;
92 FloatSize m_startStretch; 93 FloatSize m_startStretch;
93 FloatPoint m_origOrigin; 94 FloatPoint m_origOrigin;
94 FloatSize m_origVelocity; 95 FloatSize m_origVelocity;
95 96
96 bool m_snapRubberbandTimerIsActive; 97 bool m_snapRubberbandTimerIsActive;
97 }; 98 };
98 99
99 } // namespace WebCore 100 } // namespace WebCore
100 101
101 #endif // USE(RUBBER_BANDING) 102 #endif // USE(RUBBER_BANDING)
102 103
103 #endif // ScrollElasticityController_h 104 #endif // ScrollElasticityController_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698