зеркало из https://github.com/mozilla/pjs.git
Forgot a 54203 file.
This commit is contained in:
Родитель
b53cda604c
Коммит
f8c519f285
|
@ -79,7 +79,8 @@ static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID);
|
|||
#include "prlock.h"
|
||||
|
||||
#include "nsIDOMXULDocument.h"
|
||||
#include "nsIDOMXULCommandDispatcher.h"
|
||||
|
||||
#include "nsIFocusController.h"
|
||||
|
||||
#include "nsIDocumentViewer.h"
|
||||
#include "nsIDocument.h"
|
||||
|
@ -532,22 +533,19 @@ nsWebShellWindow::HandleEvent(nsGUIEvent *aEvent)
|
|||
nsCOMPtr<nsIDOMDocument> domDocument;
|
||||
nsCOMPtr<nsIDOMWindowInternal> domWindow;
|
||||
((nsWebShellWindow *)data)->ConvertWebShellToDOMWindow(webShell, getter_AddRefs(domWindow));
|
||||
domWindow->GetDocument(getter_AddRefs(domDocument));
|
||||
nsCOMPtr<nsIDOMXULDocument> xulDoc = do_QueryInterface(domDocument);
|
||||
if (xulDoc) {
|
||||
nsCOMPtr<nsIDOMXULCommandDispatcher> commandDispatcher;
|
||||
xulDoc->GetCommandDispatcher(getter_AddRefs(commandDispatcher));
|
||||
if (commandDispatcher) {
|
||||
nsCOMPtr<nsPIDOMWindow> piWin(do_QueryInterface(domWindow));
|
||||
nsCOMPtr<nsIFocusController> focusController;
|
||||
piWin->GetRootFocusController(getter_AddRefs(focusController));
|
||||
if (focusController) {
|
||||
nsCOMPtr<nsIDOMWindowInternal> focusedWindow;
|
||||
commandDispatcher->GetFocusedWindow(getter_AddRefs(focusedWindow));
|
||||
focusController->GetFocusedWindow(getter_AddRefs(focusedWindow));
|
||||
if (focusedWindow) {
|
||||
commandDispatcher->SetSuppressFocus(PR_TRUE);
|
||||
focusController->SetSuppressFocus(PR_TRUE);
|
||||
domWindow->Focus(); // This sets focus, but we'll ignore it.
|
||||
// A subsequent activate will cause us to stop suppressing.
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIWebShell> contentShell;
|
||||
((nsWebShellWindow *)data)->GetContentWebShell(getter_AddRefs(contentShell));
|
||||
|
|
Загрузка…
Ссылка в новой задаче