mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 06:11:37 +00:00
Bug 635645. Increase the amount of scrolling performed by using the arrow keys from 1 line to 2 lines. r=roc
This improves scrolling speed and is more inline with what other browsers do.
This commit is contained in:
parent
8df09d9afc
commit
0a399ab049
@ -2422,12 +2422,8 @@ PresShell::ScrollLine(PRBool aForward)
|
||||
nsIScrollableFrame* scrollFrame =
|
||||
GetFrameToScrollAsScrollable(nsIPresShell::eVertical);
|
||||
if (scrollFrame) {
|
||||
PRInt32 lineCount = 1;
|
||||
#ifdef MOZ_WIDGET_COCOA
|
||||
// Emulate the Mac IE behavior of scrolling a minimum of 2 lines
|
||||
// rather than 1. This vastly improves scrolling speed.
|
||||
lineCount = 2;
|
||||
#endif
|
||||
// Scroll 2 lines at a time to improve scrolling speed.
|
||||
PRInt32 lineCount = 2;
|
||||
scrollFrame->ScrollBy(nsIntPoint(0, aForward ? lineCount : -lineCount),
|
||||
nsIScrollableFrame::LINES,
|
||||
nsIScrollableFrame::SMOOTH);
|
||||
|
Loading…
Reference in New Issue
Block a user