When scrolling with a mouse wheel the page scrolls by 4800 pixels which scrolls to either the very top of the page or the very bottom in most cases. This step needs to be smaller.
A look at WheelEventGdk.cpp and comparing it with WheelEventQt.cpp shows that deltaX and deltaY for the PlatformWheelEvent are being hard coded to 120 in the GTK port and are being set to some multiple or fraction of 15 degrees in the Qt port (Qt reports the wheel scroll event as the number of degrees the mouse wheel has rotated through, in eighths of a degree, and WheelEventQt.cpp divides this value by 120 - http://doc.trolltech.com/4.3/qwheelevent.html#delta). When calling scrollBy(), this delta is multiplied by LINE_STEP which is hardcoded at 40 to give 4800 in the case of GTK. Therefore I propose we hardcode deltaX/deltaY to something more sane in GTK like 0.25 instead of 120.
Created attachment 16746 [details] Change scroll delta from 120 to 0.25 I've also moved the delta into a static const float at the start of the function.
Comment on attachment 16746 [details] Change scroll delta from 120 to 0.25 r=me
Landed in r26835.