From 5e01e6a05b272b1f8fe4c9a3e80d43d7a470ecb2 Mon Sep 17 00:00:00 2001 From: "brade%netscape.com" Date: Thu, 26 Apr 2001 18:37:04 +0000 Subject: [PATCH] scroll after moving caret to top or bottom of editfield; bug #74600; r=mjudge, sr=kin git-svn-id: svn://10.0.0.236/trunk@93156 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/base/nsPresShell.cpp | 5 ++++- mozilla/layout/html/base/src/nsPresShell.cpp | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/mozilla/layout/base/nsPresShell.cpp b/mozilla/layout/base/nsPresShell.cpp index 9f76068ce4e..bb93743fa1b 100644 --- a/mozilla/layout/base/nsPresShell.cpp +++ b/mozilla/layout/base/nsPresShell.cpp @@ -2951,8 +2951,9 @@ PresShell::IntraLineMove(PRBool aForward, PRBool aExtend) NS_IMETHODIMP PresShell::PageMove(PRBool aForward, PRBool aExtend) { +#if 1 return ScrollPage(aForward); -#if 0 +#else nsCOMPtr viewManager; nsresult result = GetViewManager(getter_AddRefs(viewManager)); @@ -3096,6 +3097,8 @@ PresShell::CompleteMove(PRBool aForward, PRBool aExtend) bodyContent->ChildCount(offset); } result = mSelection->HandleClick(bodyContent,offset,offset,aExtend, PR_FALSE,aExtend); + // if we got this far, attempt to scroll no matter what the above result is + CompleteScroll(aForward); } } } diff --git a/mozilla/layout/html/base/src/nsPresShell.cpp b/mozilla/layout/html/base/src/nsPresShell.cpp index 9f76068ce4e..bb93743fa1b 100644 --- a/mozilla/layout/html/base/src/nsPresShell.cpp +++ b/mozilla/layout/html/base/src/nsPresShell.cpp @@ -2951,8 +2951,9 @@ PresShell::IntraLineMove(PRBool aForward, PRBool aExtend) NS_IMETHODIMP PresShell::PageMove(PRBool aForward, PRBool aExtend) { +#if 1 return ScrollPage(aForward); -#if 0 +#else nsCOMPtr viewManager; nsresult result = GetViewManager(getter_AddRefs(viewManager)); @@ -3096,6 +3097,8 @@ PresShell::CompleteMove(PRBool aForward, PRBool aExtend) bodyContent->ChildCount(offset); } result = mSelection->HandleClick(bodyContent,offset,offset,aExtend, PR_FALSE,aExtend); + // if we got this far, attempt to scroll no matter what the above result is + CompleteScroll(aForward); } } }