diff options
author | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-06 20:43:24 +0000 |
---|---|---|
committer | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-06 20:43:24 +0000 |
commit | 1040cb10711a7a19051576eb96f33fc3632088f3 (patch) | |
tree | 5be594c815a19e21dbb004dcca8469e725e1cc36 /webkit/glue/webinputevent_linux.cc | |
parent | 53939ea429d84e0a380b37ad15c9e4c0030caae3 (diff) | |
download | chromium_src-1040cb10711a7a19051576eb96f33fc3632088f3.zip chromium_src-1040cb10711a7a19051576eb96f33fc3632088f3.tar.gz chromium_src-1040cb10711a7a19051576eb96f33fc3632088f3.tar.bz2 |
Convert from line scrolling to pixel scrolling. Increase pixel scroll amount on Windows.
See also https://bugs.webkit.org/show_bug.cgi?id=24407 .
BUG=6172
Review URL: http://codereview.chromium.org/40241
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11151 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/webinputevent_linux.cc')
-rw-r--r-- | webkit/glue/webinputevent_linux.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/webkit/glue/webinputevent_linux.cc b/webkit/glue/webinputevent_linux.cc index 12fb179..799bbb2 100644 --- a/webkit/glue/webinputevent_linux.cc +++ b/webkit/glue/webinputevent_linux.cc @@ -123,22 +123,22 @@ WebMouseWheelEvent::WebMouseWheelEvent(const GdkEventScroll* event) { // - Gtk makes the scroll amount a function of the size of the scroll bar, // which is not available to us here. // Instead, we pick a number that empirically matches Firefox's behavior. - static const float kWheelDelta = 4; + static const float kScrollbarPixelsPerTick = 160.0f / 3.0f; delta_x = 0; delta_y = 0; switch (event->direction) { case GDK_SCROLL_UP: - delta_y = kWheelDelta; + delta_y = kScrollbarPixelsPerTick; break; case GDK_SCROLL_DOWN: - delta_y = -kWheelDelta; + delta_y = -kScrollbarPixelsPerTick; break; case GDK_SCROLL_LEFT: - delta_x = kWheelDelta; + delta_x = kScrollbarPixelsPerTick; break; case GDK_SCROLL_RIGHT: - delta_x = -kWheelDelta; + delta_x = -kScrollbarPixelsPerTick; break; default: break; |