Bug 575294. part=1/4 r=enndeakin

This commit is contained in:
Mats Palmgren 2012-06-02 01:41:54 +02:00
parent 3dad511e1e
commit 96e7be1055

View File

@ -927,15 +927,20 @@ nsFocusManager::WindowHidden(nsIDOMWindow* aWindow)
nsIContent* oldFocusedContent = mFocusedContent;
mFocusedContent = nsnull;
nsCOMPtr<nsIDocShell> focusedDocShell = mFocusedWindow->GetDocShell();
nsCOMPtr<nsIPresShell> presShell;
focusedDocShell->GetPresShell(getter_AddRefs(presShell));
if (oldFocusedContent && oldFocusedContent->IsInDoc()) {
NotifyFocusStateChange(oldFocusedContent,
mFocusedWindow->ShouldShowFocusRing(),
false);
}
window->UpdateCommands(NS_LITERAL_STRING("focus"));
nsCOMPtr<nsIDocShell> focusedDocShell = mFocusedWindow->GetDocShell();
nsCOMPtr<nsIPresShell> presShell;
focusedDocShell->GetPresShell(getter_AddRefs(presShell));
SendFocusOrBlurEvent(NS_BLUR_CONTENT, presShell,
oldFocusedContent->GetCurrentDoc(),
oldFocusedContent, 1, false);
}
nsIMEStateManager::OnTextStateBlur(nsnull, nsnull);
if (presShell) {