From 890ca4634972f7a0e0d3b6b8a315855ae23bc81f Mon Sep 17 00:00:00 2001 From: "bzbarsky%mit.edu" Date: Tue, 14 Aug 2007 18:42:10 +0000 Subject: [PATCH] When a file has already been selected, correctly prefill the filepicker with that file. Bug 374013, r+sr=sicking, a=dbaron git-svn-id: svn://10.0.0.236/trunk@232058 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/forms/nsFileControlFrame.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mozilla/layout/forms/nsFileControlFrame.cpp b/mozilla/layout/forms/nsFileControlFrame.cpp index 6600f9e5355..f402badd2cd 100644 --- a/mozilla/layout/forms/nsFileControlFrame.cpp +++ b/mozilla/layout/forms/nsFileControlFrame.cpp @@ -554,8 +554,9 @@ nsFileControlFrame::GetFormProperty(nsIAtom* aName, nsAString& aValue) const "If we have a cached state, we better have no mTextFrame"); if (mCachedState) { aValue.Assign(*mCachedState); - } else if (mTextContent) { - nsCOMPtr fileControl = do_QueryInterface(mTextContent); + } else { + nsCOMPtr fileControl = + do_QueryInterface(mContent); if (fileControl) { fileControl->GetFileName(aValue); }