Precursor change to akkana and hyatts fix for platform dependent key-bindings. HOME and END will now implement the scroll to top and scroll to bottom for mac. Scroll and Move for pageup/pagedown and CTRL-HOME and CTRL-END on windows will not work until m13. This is ok for now and will hurry up completion of M12. r=akkana. simple fix like 10 lines really.

This commit is contained in:
mjudge%netscape.com 1999-12-16 22:48:02 +00:00
Родитель ed76fb15f1
Коммит fbbf78681f
2 изменённых файлов: 34 добавлений и 4 удалений

Просмотреть файл

@ -1349,6 +1349,9 @@ PresShell::IntraLineMove(PRBool aForward, PRBool aExtend)
NS_IMETHODIMP
PresShell::PageMove(PRBool aForward, PRBool aExtend)
{
return ScrollPage(aForward);
#if 0
nsCOMPtr<nsIViewManager> viewManager;
nsresult result = GetViewManager(getter_AddRefs(viewManager));
if (NS_SUCCEEDED(result) && viewManager)
@ -1361,6 +1364,7 @@ PresShell::PageMove(PRBool aForward, PRBool aExtend)
}
}
return result;
#endif //0
}
NS_IMETHODIMP
@ -1422,13 +1426,24 @@ PresShell::ScrollHorizontal(PRBool aLeft)
NS_IMETHODIMP
PresShell::CompleteScroll(PRBool aForward)
{
return NS_ERROR_NOT_IMPLEMENTED;
nsCOMPtr<nsIViewManager> viewManager;
nsresult result = GetViewManager(getter_AddRefs(viewManager));
if (NS_SUCCEEDED(result) && viewManager)
{
nsIScrollableView *scrollView;
result = viewManager->GetRootScrollableView(&scrollView);
if (NS_SUCCEEDED(result) && scrollView)
{
scrollView->ScrollByWhole(!aForward);//TRUE = top, aForward TRUE=bottom
}
}
return result;
}
NS_IMETHODIMP
PresShell::CompleteMove(PRBool aForward, PRBool aExtend)
{
return NS_ERROR_NOT_IMPLEMENTED;
return CompleteScroll(aForward);
}
NS_IMETHODIMP

Просмотреть файл

@ -1349,6 +1349,9 @@ PresShell::IntraLineMove(PRBool aForward, PRBool aExtend)
NS_IMETHODIMP
PresShell::PageMove(PRBool aForward, PRBool aExtend)
{
return ScrollPage(aForward);
#if 0
nsCOMPtr<nsIViewManager> viewManager;
nsresult result = GetViewManager(getter_AddRefs(viewManager));
if (NS_SUCCEEDED(result) && viewManager)
@ -1361,6 +1364,7 @@ PresShell::PageMove(PRBool aForward, PRBool aExtend)
}
}
return result;
#endif //0
}
NS_IMETHODIMP
@ -1422,13 +1426,24 @@ PresShell::ScrollHorizontal(PRBool aLeft)
NS_IMETHODIMP
PresShell::CompleteScroll(PRBool aForward)
{
return NS_ERROR_NOT_IMPLEMENTED;
nsCOMPtr<nsIViewManager> viewManager;
nsresult result = GetViewManager(getter_AddRefs(viewManager));
if (NS_SUCCEEDED(result) && viewManager)
{
nsIScrollableView *scrollView;
result = viewManager->GetRootScrollableView(&scrollView);
if (NS_SUCCEEDED(result) && scrollView)
{
scrollView->ScrollByWhole(!aForward);//TRUE = top, aForward TRUE=bottom
}
}
return result;
}
NS_IMETHODIMP
PresShell::CompleteMove(PRBool aForward, PRBool aExtend)
{
return NS_ERROR_NOT_IMPLEMENTED;
return CompleteScroll(aForward);
}
NS_IMETHODIMP