Fix 38949 -- setSelectionRange broken by mjudge checking in nsGfxTextControlFrame2 stuff prematurely.

This commit is contained in:
sfraser%netscape.com 2000-05-11 22:47:19 +00:00
Родитель 8f6430e1b6
Коммит ea15ca6fcd
2 изменённых файлов: 10 добавлений и 10 удалений

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

@ -1132,7 +1132,7 @@ nsHTMLInputElement::GetTextLength(PRInt32* aTextLength)
nsresult rv = nsGenericHTMLElement::GetPrimaryFrame(this, formControlFrame); nsresult rv = nsGenericHTMLElement::GetPrimaryFrame(this, formControlFrame);
if (NS_SUCCEEDED(rv) && formControlFrame) if (NS_SUCCEEDED(rv) && formControlFrame)
{ {
nsCOMPtr<nsIGfxTextControlFrame2> textControlFrame(do_QueryInterface(formControlFrame)); nsCOMPtr<nsIGfxTextControlFrame> textControlFrame(do_QueryInterface(formControlFrame));
if (textControlFrame) if (textControlFrame)
textControlFrame->GetTextLength(aTextLength); textControlFrame->GetTextLength(aTextLength);
@ -1148,7 +1148,7 @@ nsHTMLInputElement::SetSelectionRange(PRInt32 aSelectionStart, PRInt32 aSelectio
nsresult rv = nsGenericHTMLElement::GetPrimaryFrame(this, formControlFrame); nsresult rv = nsGenericHTMLElement::GetPrimaryFrame(this, formControlFrame);
if (NS_SUCCEEDED(rv) && formControlFrame) if (NS_SUCCEEDED(rv) && formControlFrame)
{ {
nsCOMPtr<nsIGfxTextControlFrame2> textControlFrame(do_QueryInterface(formControlFrame)); nsCOMPtr<nsIGfxTextControlFrame> textControlFrame(do_QueryInterface(formControlFrame));
if (textControlFrame) if (textControlFrame)
textControlFrame->SetSelectionRange(aSelectionStart, aSelectionEnd); textControlFrame->SetSelectionRange(aSelectionStart, aSelectionEnd);
@ -1173,7 +1173,7 @@ nsHTMLInputElement::SetSelectionStart(PRInt32 aSelectionStart)
nsresult rv = nsGenericHTMLElement::GetPrimaryFrame(this, formControlFrame); nsresult rv = nsGenericHTMLElement::GetPrimaryFrame(this, formControlFrame);
if (NS_SUCCEEDED(rv) && formControlFrame) if (NS_SUCCEEDED(rv) && formControlFrame)
{ {
nsCOMPtr<nsIGfxTextControlFrame2> textControlFrame(do_QueryInterface(formControlFrame)); nsCOMPtr<nsIGfxTextControlFrame> textControlFrame(do_QueryInterface(formControlFrame));
if (textControlFrame) if (textControlFrame)
textControlFrame->SetSelectionStart(aSelectionStart); textControlFrame->SetSelectionStart(aSelectionStart);
@ -1199,7 +1199,7 @@ nsHTMLInputElement::SetSelectionEnd(PRInt32 aSelectionEnd)
nsresult rv = nsGenericHTMLElement::GetPrimaryFrame(this, formControlFrame); nsresult rv = nsGenericHTMLElement::GetPrimaryFrame(this, formControlFrame);
if (NS_SUCCEEDED(rv) && formControlFrame) if (NS_SUCCEEDED(rv) && formControlFrame)
{ {
nsCOMPtr<nsIGfxTextControlFrame2> textControlFrame(do_QueryInterface(formControlFrame)); nsCOMPtr<nsIGfxTextControlFrame> textControlFrame(do_QueryInterface(formControlFrame));
if (textControlFrame) if (textControlFrame)
textControlFrame->SetSelectionEnd(aSelectionEnd); textControlFrame->SetSelectionEnd(aSelectionEnd);
@ -1215,7 +1215,7 @@ nsHTMLInputElement::GetSelectionRange(PRInt32* aSelectionStart, PRInt32* aSelect
nsresult rv = nsGenericHTMLElement::GetPrimaryFrame(this, formControlFrame); nsresult rv = nsGenericHTMLElement::GetPrimaryFrame(this, formControlFrame);
if (NS_SUCCEEDED(rv) && formControlFrame) if (NS_SUCCEEDED(rv) && formControlFrame)
{ {
nsCOMPtr<nsIGfxTextControlFrame2> textControlFrame(do_QueryInterface(formControlFrame)); nsCOMPtr<nsIGfxTextControlFrame> textControlFrame(do_QueryInterface(formControlFrame));
if (textControlFrame) if (textControlFrame)
textControlFrame->GetSelectionRange(aSelectionStart, aSelectionEnd); textControlFrame->GetSelectionRange(aSelectionStart, aSelectionEnd);

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

@ -1132,7 +1132,7 @@ nsHTMLInputElement::GetTextLength(PRInt32* aTextLength)
nsresult rv = nsGenericHTMLElement::GetPrimaryFrame(this, formControlFrame); nsresult rv = nsGenericHTMLElement::GetPrimaryFrame(this, formControlFrame);
if (NS_SUCCEEDED(rv) && formControlFrame) if (NS_SUCCEEDED(rv) && formControlFrame)
{ {
nsCOMPtr<nsIGfxTextControlFrame2> textControlFrame(do_QueryInterface(formControlFrame)); nsCOMPtr<nsIGfxTextControlFrame> textControlFrame(do_QueryInterface(formControlFrame));
if (textControlFrame) if (textControlFrame)
textControlFrame->GetTextLength(aTextLength); textControlFrame->GetTextLength(aTextLength);
@ -1148,7 +1148,7 @@ nsHTMLInputElement::SetSelectionRange(PRInt32 aSelectionStart, PRInt32 aSelectio
nsresult rv = nsGenericHTMLElement::GetPrimaryFrame(this, formControlFrame); nsresult rv = nsGenericHTMLElement::GetPrimaryFrame(this, formControlFrame);
if (NS_SUCCEEDED(rv) && formControlFrame) if (NS_SUCCEEDED(rv) && formControlFrame)
{ {
nsCOMPtr<nsIGfxTextControlFrame2> textControlFrame(do_QueryInterface(formControlFrame)); nsCOMPtr<nsIGfxTextControlFrame> textControlFrame(do_QueryInterface(formControlFrame));
if (textControlFrame) if (textControlFrame)
textControlFrame->SetSelectionRange(aSelectionStart, aSelectionEnd); textControlFrame->SetSelectionRange(aSelectionStart, aSelectionEnd);
@ -1173,7 +1173,7 @@ nsHTMLInputElement::SetSelectionStart(PRInt32 aSelectionStart)
nsresult rv = nsGenericHTMLElement::GetPrimaryFrame(this, formControlFrame); nsresult rv = nsGenericHTMLElement::GetPrimaryFrame(this, formControlFrame);
if (NS_SUCCEEDED(rv) && formControlFrame) if (NS_SUCCEEDED(rv) && formControlFrame)
{ {
nsCOMPtr<nsIGfxTextControlFrame2> textControlFrame(do_QueryInterface(formControlFrame)); nsCOMPtr<nsIGfxTextControlFrame> textControlFrame(do_QueryInterface(formControlFrame));
if (textControlFrame) if (textControlFrame)
textControlFrame->SetSelectionStart(aSelectionStart); textControlFrame->SetSelectionStart(aSelectionStart);
@ -1199,7 +1199,7 @@ nsHTMLInputElement::SetSelectionEnd(PRInt32 aSelectionEnd)
nsresult rv = nsGenericHTMLElement::GetPrimaryFrame(this, formControlFrame); nsresult rv = nsGenericHTMLElement::GetPrimaryFrame(this, formControlFrame);
if (NS_SUCCEEDED(rv) && formControlFrame) if (NS_SUCCEEDED(rv) && formControlFrame)
{ {
nsCOMPtr<nsIGfxTextControlFrame2> textControlFrame(do_QueryInterface(formControlFrame)); nsCOMPtr<nsIGfxTextControlFrame> textControlFrame(do_QueryInterface(formControlFrame));
if (textControlFrame) if (textControlFrame)
textControlFrame->SetSelectionEnd(aSelectionEnd); textControlFrame->SetSelectionEnd(aSelectionEnd);
@ -1215,7 +1215,7 @@ nsHTMLInputElement::GetSelectionRange(PRInt32* aSelectionStart, PRInt32* aSelect
nsresult rv = nsGenericHTMLElement::GetPrimaryFrame(this, formControlFrame); nsresult rv = nsGenericHTMLElement::GetPrimaryFrame(this, formControlFrame);
if (NS_SUCCEEDED(rv) && formControlFrame) if (NS_SUCCEEDED(rv) && formControlFrame)
{ {
nsCOMPtr<nsIGfxTextControlFrame2> textControlFrame(do_QueryInterface(formControlFrame)); nsCOMPtr<nsIGfxTextControlFrame> textControlFrame(do_QueryInterface(formControlFrame));
if (textControlFrame) if (textControlFrame)
textControlFrame->GetSelectionRange(aSelectionStart, aSelectionEnd); textControlFrame->GetSelectionRange(aSelectionStart, aSelectionEnd);