Bug 350495, Crashes [@ nsFormFillController::SetPopupOpen], r=jst

This commit is contained in:
Olli.Pettay%helsinki.fi 2006-08-29 16:11:08 +00:00
parent e09105ffab
commit a5be8b14c8

View File

@ -220,8 +220,10 @@ nsFormFillController::SetPopupOpen(PRBool aPopupOpen)
// make sure input field is visible before showing popup (bug 320938)
nsCOMPtr<nsIContent> content = do_QueryInterface(mFocusedInput);
nsCOMPtr<nsIDocShell> docShell = GetDocShellForInput(mFocusedInput);
NS_ENSURE_STATE(docShell);
nsCOMPtr<nsIPresShell> presShell;
docShell->GetPresShell(getter_AddRefs(presShell));
NS_ENSURE_STATE(presShell);
nsIFrame *frame = presShell->GetPrimaryFrameFor(content.get());
if (frame)
presShell->ScrollFrameIntoView(frame,