Fix for bug #18859: [DOGFOOD] URL bar messed up

Replaced all calls to SelectAllText() with calls to
nsIEditor::SelectAll().
r=jfrancis@netscape.com

(kin is the author of these changes - being checked in by reviewer)


git-svn-id: svn://10.0.0.236/trunk@54483 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
jfrancis%netscape.com 1999-11-26 03:11:12 +00:00
parent e46614e6c8
commit 42b5777e9f

View File

@ -910,20 +910,12 @@ void nsGfxTextControlFrame::SetTextControlFrameState(const nsString& aValue)
}
if (PR_FALSE==currentValue.Equals(aValue)) // this is necessary to avoid infinite recursion
{
nsCOMPtr<nsIDOMSelection>selection;
result = mEditor->GetSelection(getter_AddRefs(selection));
if (NS_FAILED(result)) return;
if (!selection) return;
nsCOMPtr<nsIDOMDocument>domDoc;
result = mEditor->GetDocument(getter_AddRefs(domDoc));
if (NS_FAILED(result)) return;
if (!domDoc) return;
nsCOMPtr<nsIDOMNode> bodyNode;
nsAutoString bodyTag = "body";
result = GetFirstNodeOfType(bodyTag, domDoc, getter_AddRefs(bodyNode));
SelectAllTextContent(bodyNode, selection);
result = mEditor->SelectAll();
nsCOMPtr<nsIHTMLEditor> htmlEditor = do_QueryInterface(mEditor);
if (!htmlEditor) return;
@ -2381,7 +2373,7 @@ nsGfxTextControlFrame::InitializeTextControl(nsIPresShell *aPresShell, nsIDOMDoc
result = GetFirstNodeOfType(bodyTag, aDoc, getter_AddRefs(bodyNode));
if (NS_SUCCEEDED(result) && bodyNode)
{
result = SelectAllTextContent(bodyNode, selection);
result = mEditor->SelectAll();
if (NS_SUCCEEDED(result))
{
if (0!=value.Length())