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.
git-svn-id: svn://10.0.0.236/trunk@56105 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user