mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-11 12:25:53 +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 =
|
nsIScrollableFrame* scrollFrame =
|
||||||
GetFrameToScrollAsScrollable(nsIPresShell::eVertical);
|
GetFrameToScrollAsScrollable(nsIPresShell::eVertical);
|
||||||
if (scrollFrame) {
|
if (scrollFrame) {
|
||||||
PRInt32 lineCount = 1;
|
// Scroll 2 lines at a time to improve scrolling speed.
|
||||||
#ifdef MOZ_WIDGET_COCOA
|
PRInt32 lineCount = 2;
|
||||||
// Emulate the Mac IE behavior of scrolling a minimum of 2 lines
|
|
||||||
// rather than 1. This vastly improves scrolling speed.
|
|
||||||
lineCount = 2;
|
|
||||||
#endif
|
|
||||||
scrollFrame->ScrollBy(nsIntPoint(0, aForward ? lineCount : -lineCount),
|
scrollFrame->ScrollBy(nsIntPoint(0, aForward ? lineCount : -lineCount),
|
||||||
nsIScrollableFrame::LINES,
|
nsIScrollableFrame::LINES,
|
||||||
nsIScrollableFrame::SMOOTH);
|
nsIScrollableFrame::SMOOTH);
|
||||||
|
Loading…
Reference in New Issue
Block a user