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

Unified Diff: webkit/glue/webinputevent_linux.cc

Issue 40241: Convert from line scrolling to pixel scrolling. Increase pixel scroll amount... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' 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
« no previous file with comments | « webkit/glue/event_conversion.cc ('k') | webkit/glue/webinputevent_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/webinputevent_linux.cc
===================================================================
--- webkit/glue/webinputevent_linux.cc (revision 11127)
+++ webkit/glue/webinputevent_linux.cc (working copy)
@@ -123,22 +123,22 @@
// - 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;
« no previous file with comments | « webkit/glue/event_conversion.cc ('k') | webkit/glue/webinputevent_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698