зеркало из https://github.com/mozilla/pjs.git
Fix 38949 -- setSelectionRange broken by mjudge checking in nsGfxTextControlFrame2 stuff prematurely.
This commit is contained in:
Родитель
0542cc0688
Коммит
877820136a
|
@ -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);
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче