From 42b5777e9f8fc88822e55f5c19755f1c05f90759 Mon Sep 17 00:00:00 2001 From: "jfrancis%netscape.com" Date: Fri, 26 Nov 1999 03:11:12 +0000 Subject: [PATCH] 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 --- .../layout/html/forms/src/nsGfxTextControlFrame.cpp | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/mozilla/layout/html/forms/src/nsGfxTextControlFrame.cpp b/mozilla/layout/html/forms/src/nsGfxTextControlFrame.cpp index afe1e5485d7..08f011290d1 100644 --- a/mozilla/layout/html/forms/src/nsGfxTextControlFrame.cpp +++ b/mozilla/layout/html/forms/src/nsGfxTextControlFrame.cpp @@ -910,20 +910,12 @@ void nsGfxTextControlFrame::SetTextControlFrameState(const nsString& aValue) } if (PR_FALSE==currentValue.Equals(aValue)) // this is necessary to avoid infinite recursion { - nsCOMPtrselection; - result = mEditor->GetSelection(getter_AddRefs(selection)); - if (NS_FAILED(result)) return; - if (!selection) return; - nsCOMPtrdomDoc; result = mEditor->GetDocument(getter_AddRefs(domDoc)); if (NS_FAILED(result)) return; if (!domDoc) return; - nsCOMPtr bodyNode; - nsAutoString bodyTag = "body"; - result = GetFirstNodeOfType(bodyTag, domDoc, getter_AddRefs(bodyNode)); - SelectAllTextContent(bodyNode, selection); + result = mEditor->SelectAll(); nsCOMPtr 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())