summaryrefslogtreecommitdiff
path: root/dom/base/nsFocusManager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'dom/base/nsFocusManager.cpp')
-rw-r--r--dom/base/nsFocusManager.cpp13
1 files changed, 4 insertions, 9 deletions
diff --git a/dom/base/nsFocusManager.cpp b/dom/base/nsFocusManager.cpp
index 637e3954e1..bfd2e334ea 100644
--- a/dom/base/nsFocusManager.cpp
+++ b/dom/base/nsFocusManager.cpp
@@ -66,9 +66,7 @@
#include "nsAccessibilityService.h"
#endif
-#ifndef XP_MACOSX
#include "nsIScriptError.h"
-#endif
using namespace mozilla;
using namespace mozilla::dom;
@@ -1270,12 +1268,10 @@ nsFocusManager::SetFocusInner(nsIContent* aNewContent, int32_t aFlags,
}
}
- // Exit fullscreen if we're focusing a windowed plugin on a non-MacOSX
- // system. We don't control event dispatch to windowed plugins on non-MacOSX,
- // so we can't display the "Press ESC to leave fullscreen mode" warning on
- // key input if a windowed plugin is focused, so just exit fullscreen
- // to guard against phishing.
-#ifndef XP_MACOSX
+ // Exit fullscreen if we're focusing a windowed plugin. We don't control
+ // event dispatch to windowed plugins, so we can't display the <Press ESC
+ // to leave fullscreen mode> warning on key input if a windowed plugin is
+ // focused, so just exit fullscreen to guard against phishing.
if (contentToFocus &&
nsContentUtils::
GetRootDocument(contentToFocus->OwnerDoc())->GetFullscreenElement() &&
@@ -1287,7 +1283,6 @@ nsFocusManager::SetFocusInner(nsIContent* aNewContent, int32_t aFlags,
"FocusedWindowedPluginWhileFullscreen");
nsIDocument::AsyncExitFullscreen(contentToFocus->OwnerDoc());
}
-#endif
// if the FLAG_NOSWITCHFRAME flag is used, only allow the focus to be
// shifted away from the current element if the new shell to focus is