зеркало из https://github.com/mozilla/pjs.git
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:
Родитель
052b60e96a
Коммит
92cc79d021
|
@ -1349,6 +1349,9 @@ PresShell::IntraLineMove(PRBool aForward, PRBool aExtend)
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
PresShell::PageMove(PRBool aForward, PRBool aExtend)
|
PresShell::PageMove(PRBool aForward, PRBool aExtend)
|
||||||
{
|
{
|
||||||
|
return ScrollPage(aForward);
|
||||||
|
#if 0
|
||||||
|
|
||||||
nsCOMPtr<nsIViewManager> viewManager;
|
nsCOMPtr<nsIViewManager> viewManager;
|
||||||
nsresult result = GetViewManager(getter_AddRefs(viewManager));
|
nsresult result = GetViewManager(getter_AddRefs(viewManager));
|
||||||
if (NS_SUCCEEDED(result) && viewManager)
|
if (NS_SUCCEEDED(result) && viewManager)
|
||||||
|
@ -1361,6 +1364,7 @@ PresShell::PageMove(PRBool aForward, PRBool aExtend)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
|
#endif //0
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
|
@ -1422,13 +1426,24 @@ PresShell::ScrollHorizontal(PRBool aLeft)
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
PresShell::CompleteScroll(PRBool aForward)
|
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
|
NS_IMETHODIMP
|
||||||
PresShell::CompleteMove(PRBool aForward, PRBool aExtend)
|
PresShell::CompleteMove(PRBool aForward, PRBool aExtend)
|
||||||
{
|
{
|
||||||
return NS_ERROR_NOT_IMPLEMENTED;
|
return CompleteScroll(aForward);
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
|
|
|
@ -1349,6 +1349,9 @@ PresShell::IntraLineMove(PRBool aForward, PRBool aExtend)
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
PresShell::PageMove(PRBool aForward, PRBool aExtend)
|
PresShell::PageMove(PRBool aForward, PRBool aExtend)
|
||||||
{
|
{
|
||||||
|
return ScrollPage(aForward);
|
||||||
|
#if 0
|
||||||
|
|
||||||
nsCOMPtr<nsIViewManager> viewManager;
|
nsCOMPtr<nsIViewManager> viewManager;
|
||||||
nsresult result = GetViewManager(getter_AddRefs(viewManager));
|
nsresult result = GetViewManager(getter_AddRefs(viewManager));
|
||||||
if (NS_SUCCEEDED(result) && viewManager)
|
if (NS_SUCCEEDED(result) && viewManager)
|
||||||
|
@ -1361,6 +1364,7 @@ PresShell::PageMove(PRBool aForward, PRBool aExtend)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
|
#endif //0
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
|
@ -1422,13 +1426,24 @@ PresShell::ScrollHorizontal(PRBool aLeft)
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
PresShell::CompleteScroll(PRBool aForward)
|
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
|
NS_IMETHODIMP
|
||||||
PresShell::CompleteMove(PRBool aForward, PRBool aExtend)
|
PresShell::CompleteMove(PRBool aForward, PRBool aExtend)
|
||||||
{
|
{
|
||||||
return NS_ERROR_NOT_IMPLEMENTED;
|
return CompleteScroll(aForward);
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
|
|
Загрузка…
Ссылка в новой задаче