diff options
Diffstat (limited to 'dom/base/nsFocusManager.cpp')
-rw-r--r-- | dom/base/nsFocusManager.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/dom/base/nsFocusManager.cpp b/dom/base/nsFocusManager.cpp index 0c12103fba..6cc5bbd36f 100644 --- a/dom/base/nsFocusManager.cpp +++ b/dom/base/nsFocusManager.cpp @@ -64,7 +64,9 @@ #include "nsAccessibilityService.h" #endif +#ifndef XP_MACOSX #include "nsIScriptError.h" +#endif using namespace mozilla; using namespace mozilla::dom; @@ -1264,10 +1266,12 @@ nsFocusManager::SetFocusInner(nsIContent* aNewContent, int32_t aFlags, } } - // 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. + // 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 if (contentToFocus && nsContentUtils:: GetRootDocument(contentToFocus->OwnerDoc())->GetFullscreenElement() && @@ -1279,6 +1283,7 @@ 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 |