зеркало из https://github.com/mozilla/gecko-dev.git
Bug 51124: Tabbing into text control now again scrolls it into view if offscreen, also adding additional bulletproofing per code review; r=jst@netscape.com
This commit is contained in:
Родитель
1179ca4df8
Коммит
27c144a3b2
|
@ -501,9 +501,10 @@ nsComboboxControlFrame::ScrollIntoView(nsIPresContext* aPresContext)
|
|||
if (aPresContext) {
|
||||
nsCOMPtr<nsIPresShell> presShell;
|
||||
aPresContext->GetShell(getter_AddRefs(presShell));
|
||||
|
||||
presShell->ScrollFrameIntoView(this,
|
||||
if (presShell) {
|
||||
presShell->ScrollFrameIntoView(this,
|
||||
NS_PRESSHELL_SCROLL_IF_NOT_VISIBLE,NS_PRESSHELL_SCROLL_IF_NOT_VISIBLE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -225,9 +225,10 @@ nsFileControlFrame::ScrollIntoView(nsIPresContext* aPresContext)
|
|||
if (aPresContext) {
|
||||
nsCOMPtr<nsIPresShell> presShell;
|
||||
aPresContext->GetShell(getter_AddRefs(presShell));
|
||||
presShell->ScrollFrameIntoView(this,
|
||||
if (presShell) {
|
||||
presShell->ScrollFrameIntoView(this,
|
||||
NS_PRESSHELL_SCROLL_IF_NOT_VISIBLE,NS_PRESSHELL_SCROLL_IF_NOT_VISIBLE);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -638,9 +638,10 @@ nsFormControlFrame::ScrollIntoView(nsIPresContext* aPresContext)
|
|||
if (aPresContext) {
|
||||
nsCOMPtr<nsIPresShell> presShell;
|
||||
aPresContext->GetShell(getter_AddRefs(presShell));
|
||||
presShell->ScrollFrameIntoView(this,
|
||||
if (presShell) {
|
||||
presShell->ScrollFrameIntoView(this,
|
||||
NS_PRESSHELL_SCROLL_IF_NOT_VISIBLE,NS_PRESSHELL_SCROLL_IF_NOT_VISIBLE);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -361,9 +361,11 @@ nsHTMLButtonControlFrame::ScrollIntoView(nsIPresContext* aPresContext)
|
|||
if (aPresContext) {
|
||||
nsCOMPtr<nsIPresShell> presShell;
|
||||
aPresContext->GetShell(getter_AddRefs(presShell));
|
||||
presShell->ScrollFrameIntoView(this,
|
||||
if (presShell) {
|
||||
presShell->ScrollFrameIntoView(this,
|
||||
NS_PRESSHELL_SCROLL_IF_NOT_VISIBLE,NS_PRESSHELL_SCROLL_IF_NOT_VISIBLE);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -327,9 +327,10 @@ nsImageControlFrame::ScrollIntoView(nsIPresContext* aPresContext)
|
|||
if (aPresContext) {
|
||||
nsCOMPtr<nsIPresShell> presShell;
|
||||
aPresContext->GetShell(getter_AddRefs(presShell));
|
||||
presShell->ScrollFrameIntoView(this,
|
||||
if (presShell) {
|
||||
presShell->ScrollFrameIntoView(this,
|
||||
NS_PRESSHELL_SCROLL_IF_NOT_VISIBLE,NS_PRESSHELL_SCROLL_IF_NOT_VISIBLE);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -276,9 +276,10 @@ nsIsIndexFrame::ScrollIntoView(nsIPresContext* aPresContext)
|
|||
if (aPresContext) {
|
||||
nsCOMPtr<nsIPresShell> presShell;
|
||||
aPresContext->GetShell(getter_AddRefs(presShell));
|
||||
presShell->ScrollFrameIntoView(this,
|
||||
if (presShell) {
|
||||
presShell->ScrollFrameIntoView(this,
|
||||
NS_PRESSHELL_SCROLL_IF_NOT_VISIBLE,NS_PRESSHELL_SCROLL_IF_NOT_VISIBLE);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2034,9 +2034,10 @@ nsListControlFrame::ScrollIntoView(nsIPresContext* aPresContext)
|
|||
if (aPresContext) {
|
||||
nsCOMPtr<nsIPresShell> presShell;
|
||||
aPresContext->GetShell(getter_AddRefs(presShell));
|
||||
presShell->ScrollFrameIntoView(this,
|
||||
if (presShell) {
|
||||
presShell->ScrollFrameIntoView(this,
|
||||
NS_PRESSHELL_SCROLL_IF_NOT_VISIBLE,NS_PRESSHELL_SCROLL_IF_NOT_VISIBLE);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -501,9 +501,10 @@ nsComboboxControlFrame::ScrollIntoView(nsIPresContext* aPresContext)
|
|||
if (aPresContext) {
|
||||
nsCOMPtr<nsIPresShell> presShell;
|
||||
aPresContext->GetShell(getter_AddRefs(presShell));
|
||||
|
||||
presShell->ScrollFrameIntoView(this,
|
||||
if (presShell) {
|
||||
presShell->ScrollFrameIntoView(this,
|
||||
NS_PRESSHELL_SCROLL_IF_NOT_VISIBLE,NS_PRESSHELL_SCROLL_IF_NOT_VISIBLE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -225,9 +225,10 @@ nsFileControlFrame::ScrollIntoView(nsIPresContext* aPresContext)
|
|||
if (aPresContext) {
|
||||
nsCOMPtr<nsIPresShell> presShell;
|
||||
aPresContext->GetShell(getter_AddRefs(presShell));
|
||||
presShell->ScrollFrameIntoView(this,
|
||||
if (presShell) {
|
||||
presShell->ScrollFrameIntoView(this,
|
||||
NS_PRESSHELL_SCROLL_IF_NOT_VISIBLE,NS_PRESSHELL_SCROLL_IF_NOT_VISIBLE);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -638,9 +638,10 @@ nsFormControlFrame::ScrollIntoView(nsIPresContext* aPresContext)
|
|||
if (aPresContext) {
|
||||
nsCOMPtr<nsIPresShell> presShell;
|
||||
aPresContext->GetShell(getter_AddRefs(presShell));
|
||||
presShell->ScrollFrameIntoView(this,
|
||||
if (presShell) {
|
||||
presShell->ScrollFrameIntoView(this,
|
||||
NS_PRESSHELL_SCROLL_IF_NOT_VISIBLE,NS_PRESSHELL_SCROLL_IF_NOT_VISIBLE);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2215,9 +2215,10 @@ nsGfxListControlFrame::ScrollIntoView(nsIPresContext* aPresContext)
|
|||
if (aPresContext) {
|
||||
nsCOMPtr<nsIPresShell> presShell;
|
||||
aPresContext->GetShell(getter_AddRefs(presShell));
|
||||
presShell->ScrollFrameIntoView(this,
|
||||
if (presShell) {
|
||||
presShell->ScrollFrameIntoView(this,
|
||||
NS_PRESSHELL_SCROLL_IF_NOT_VISIBLE,NS_PRESSHELL_SCROLL_IF_NOT_VISIBLE);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2195,7 +2195,19 @@ nsGfxTextControlFrame2::GetSizeFromContent(PRInt32* aSize) const
|
|||
}
|
||||
|
||||
void nsGfxTextControlFrame2::SetFocus(PRBool aOn , PRBool aRepaint){}
|
||||
void nsGfxTextControlFrame2::ScrollIntoView(nsIPresContext* aPresContext){}
|
||||
|
||||
void nsGfxTextControlFrame2::ScrollIntoView(nsIPresContext* aPresContext)
|
||||
{
|
||||
if (aPresContext) {
|
||||
nsCOMPtr<nsIPresShell> presShell;
|
||||
aPresContext->GetShell(getter_AddRefs(presShell));
|
||||
if (presShell) {
|
||||
presShell->ScrollFrameIntoView(this,
|
||||
NS_PRESSHELL_SCROLL_IF_NOT_VISIBLE,NS_PRESSHELL_SCROLL_IF_NOT_VISIBLE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void nsGfxTextControlFrame2::MouseClicked(nsIPresContext* aPresContext){}
|
||||
|
||||
void nsGfxTextControlFrame2::Reset(nsIPresContext* aPresContext)
|
||||
|
|
|
@ -361,9 +361,11 @@ nsHTMLButtonControlFrame::ScrollIntoView(nsIPresContext* aPresContext)
|
|||
if (aPresContext) {
|
||||
nsCOMPtr<nsIPresShell> presShell;
|
||||
aPresContext->GetShell(getter_AddRefs(presShell));
|
||||
presShell->ScrollFrameIntoView(this,
|
||||
if (presShell) {
|
||||
presShell->ScrollFrameIntoView(this,
|
||||
NS_PRESSHELL_SCROLL_IF_NOT_VISIBLE,NS_PRESSHELL_SCROLL_IF_NOT_VISIBLE);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -327,9 +327,10 @@ nsImageControlFrame::ScrollIntoView(nsIPresContext* aPresContext)
|
|||
if (aPresContext) {
|
||||
nsCOMPtr<nsIPresShell> presShell;
|
||||
aPresContext->GetShell(getter_AddRefs(presShell));
|
||||
presShell->ScrollFrameIntoView(this,
|
||||
if (presShell) {
|
||||
presShell->ScrollFrameIntoView(this,
|
||||
NS_PRESSHELL_SCROLL_IF_NOT_VISIBLE,NS_PRESSHELL_SCROLL_IF_NOT_VISIBLE);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -276,9 +276,10 @@ nsIsIndexFrame::ScrollIntoView(nsIPresContext* aPresContext)
|
|||
if (aPresContext) {
|
||||
nsCOMPtr<nsIPresShell> presShell;
|
||||
aPresContext->GetShell(getter_AddRefs(presShell));
|
||||
presShell->ScrollFrameIntoView(this,
|
||||
if (presShell) {
|
||||
presShell->ScrollFrameIntoView(this,
|
||||
NS_PRESSHELL_SCROLL_IF_NOT_VISIBLE,NS_PRESSHELL_SCROLL_IF_NOT_VISIBLE);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2034,9 +2034,10 @@ nsListControlFrame::ScrollIntoView(nsIPresContext* aPresContext)
|
|||
if (aPresContext) {
|
||||
nsCOMPtr<nsIPresShell> presShell;
|
||||
aPresContext->GetShell(getter_AddRefs(presShell));
|
||||
presShell->ScrollFrameIntoView(this,
|
||||
if (presShell) {
|
||||
presShell->ScrollFrameIntoView(this,
|
||||
NS_PRESSHELL_SCROLL_IF_NOT_VISIBLE,NS_PRESSHELL_SCROLL_IF_NOT_VISIBLE);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче