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

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

Issue 2227803003: Plumb phase/momentum for WheelEvent. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 unified diff | Download patch
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 24 matching lines...) Expand all
35 // The ScrollByPixelWheelEvent is a fine-grained event that specifies the precis e number of pixels to scroll. It is sent directly by MacBook touchpads on OS X, 35 // The ScrollByPixelWheelEvent is a fine-grained event that specifies the precis e number of pixels to scroll. It is sent directly by MacBook touchpads on OS X,
36 // and synthesized in other cases where platforms generate line-by-line scrollin g events. 36 // and synthesized in other cases where platforms generate line-by-line scrollin g events.
37 // The ScrollByPageWheelEvent indicates that the wheel event should scroll an en tire page. In this case WebCore's built in paging behavior is used to page 37 // The ScrollByPageWheelEvent indicates that the wheel event should scroll an en tire page. In this case WebCore's built in paging behavior is used to page
38 // up and down (you get the same behavior as if the user was clicking in a scrol lbar track to page up or page down). 38 // up and down (you get the same behavior as if the user was clicking in a scrol lbar track to page up or page down).
39 enum PlatformWheelEventGranularity { 39 enum PlatformWheelEventGranularity {
40 ScrollByPageWheelEvent, 40 ScrollByPageWheelEvent,
41 ScrollByPixelWheelEvent, 41 ScrollByPixelWheelEvent,
42 }; 42 };
43 43
44 #if OS(MACOSX) 44 #if OS(MACOSX)
45 // Note: do to the use of static_casts to convert this type to WheelEventPhase,
46 // and WheelEventPhase to WebMouseWheelEvent::Phase, the definition that follows
47 // must be kept in sync with that used for the corresponding types.
45 enum PlatformWheelEventPhase { 48 enum PlatformWheelEventPhase {
46 PlatformWheelEventPhaseNone = 0, 49 PlatformWheelEventPhaseNone = 0,
47 PlatformWheelEventPhaseBegan = 1 << 0, 50 PlatformWheelEventPhaseBegan = 1 << 0,
48 PlatformWheelEventPhaseStationary = 1 << 1, 51 PlatformWheelEventPhaseStationary = 1 << 1,
49 PlatformWheelEventPhaseChanged = 1 << 2, 52 PlatformWheelEventPhaseChanged = 1 << 2,
50 PlatformWheelEventPhaseEnded = 1 << 3, 53 PlatformWheelEventPhaseEnded = 1 << 3,
51 PlatformWheelEventPhaseCancelled = 1 << 4, 54 PlatformWheelEventPhaseCancelled = 1 << 4,
52 PlatformWheelEventPhaseMayBegin = 1 << 5, 55 PlatformWheelEventPhaseMayBegin = 1 << 5,
53 }; 56 };
54 #endif 57 #endif
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 PlatformWheelEventPhase m_phase; 118 PlatformWheelEventPhase m_phase;
116 PlatformWheelEventPhase m_momentumPhase; 119 PlatformWheelEventPhase m_momentumPhase;
117 bool m_canRubberbandLeft; 120 bool m_canRubberbandLeft;
118 bool m_canRubberbandRight; 121 bool m_canRubberbandRight;
119 #endif 122 #endif
120 }; 123 };
121 124
122 } // namespace blink 125 } // namespace blink
123 126
124 #endif // PlatformWheelEvent_h 127 #endif // PlatformWheelEvent_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698