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

Unified Diff: third_party/WebKit/WebCore/platform/PlatformWheelEvent.h

Issue 39293: WebKit merge 41447:41498 [third_party/WebKit] (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: remove CRLF Created 11 years, 10 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/WebCore/platform/PlatformWheelEvent.h
===================================================================
--- third_party/WebKit/WebCore/platform/PlatformWheelEvent.h (revision 11154)
+++ third_party/WebKit/WebCore/platform/PlatformWheelEvent.h (working copy)
@@ -59,23 +59,13 @@
namespace WebCore {
- // Wheel events come in three flavors:
- // The ScrollByPixelWheelEvent is a fine-grained event that specifies the precise number of pixels to scroll. It is sent by MacBook touchpads on OS X.
- // For ScrollByPixelWheelEvents, the delta values contain the precise number of pixels to scroll.
- // The ScrollByLineWheelEvent (the normal wheel event) sends a delta that can be corrected by a line multiplier to determine how many lines to scroll.
- // If the platform has configurable line sensitivity (Windows), then the number of lines to scroll is used in order to behave like the platform.
- // If the platform does not have configurable line sensitivity, then WebCore's default behavior is used (which scrolls 3 * the wheel line delta).
- // For ScrollByLineWheelEvents, the delta values represent the number of lines to scroll.
- // The ScrollByPageWheelEvent indicates that the wheel event should scroll an entire page instead. In this case WebCore's built in paging behavior is used to page
+ // Wheel events come in two flavors:
+ // The ScrollByPixelWheelEvent is a fine-grained event that specifies the precise number of pixels to scroll. It is sent directly by MacBook touchpads on OS X,
+ // and synthesized in other cases where platforms generate line-by-line scrolling events.
+ // The ScrollByPageWheelEvent indicates that the wheel event should scroll an entire page. In this case WebCore's built in paging behavior is used to page
// up and down (you get the same behavior as if the user was clicking in a scrollbar track to page up or page down). Page scrolling only works in the vertical direction.
- enum PlatformWheelEventGranularity { ScrollByLineWheelEvent, ScrollByPageWheelEvent, ScrollByPixelWheelEvent };
+ enum PlatformWheelEventGranularity { ScrollByPageWheelEvent, ScrollByPixelWheelEvent };
- // WebCore uses a line multiple of ~3 (40px per line step) when doing arrowing with a scrollbar or line stepping via the arrow keys. The delta for wheeling is expressed
- // as a # of actual lines (40 / 3 = 1 wheel line). We use the horizontalLineMultiplier and verticalLineMultiplier methods to incorporate the line multiplier into the deltas. On
- // platforms that do not support wheel sensitivity, we use this hardcoded constant value of 3 to ensure that wheeling by default matches the WebCore multiplier you
- // get when doing other kinds of line stepping.
- const int cLineMultiplier = 3;
-
class PlatformWheelEvent {
public:
const IntPoint& pos() const { return m_position; } // PlatformWindow coordinates.
@@ -117,14 +107,6 @@
#endif
protected:
-#if !PLATFORM(WIN)
- int horizontalLineMultiplier() const { return cLineMultiplier; }
- int verticalLineMultiplier() const { return cLineMultiplier; }
-#else
- int horizontalLineMultiplier() const;
- int verticalLineMultiplier() const;
-#endif
-
IntPoint m_position;
IntPoint m_globalPosition;
float m_deltaX;
« no previous file with comments | « third_party/WebKit/WebCore/platform/ContextMenu.cpp ('k') | third_party/WebKit/WebCore/platform/ScrollView.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698