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:
pollmann%netscape.com 2000-09-08 05:53:28 +00:00
Родитель 1179ca4df8
Коммит 27c144a3b2
16 изменённых файлов: 58 добавлений и 29 удалений

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

@ -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);
}
}
}