summaryrefslogtreecommitdiffstats
path: root/embedding/components/windowwatcher
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@wolfbeast.com>2020-03-18 21:15:10 +0100
committerwolfbeast <mcwerewolf@wolfbeast.com>2020-03-18 21:15:10 +0100
commit9550c68d7a2f369b0b8800359142abd620b4c74e (patch)
treed4470e0f34bd720e506b5ed2bbcea52bda25452a /embedding/components/windowwatcher
parent54f44bb628df675f9359b588a0ef628b7c783f6a (diff)
downloadUXP-9550c68d7a2f369b0b8800359142abd620b4c74e.tar
UXP-9550c68d7a2f369b0b8800359142abd620b4c74e.tar.gz
UXP-9550c68d7a2f369b0b8800359142abd620b4c74e.tar.lz
UXP-9550c68d7a2f369b0b8800359142abd620b4c74e.tar.xz
UXP-9550c68d7a2f369b0b8800359142abd620b4c74e.zip
[DOM] Make sure to exit fullscreen mode if popups are opened or focused.
Diffstat (limited to 'embedding/components/windowwatcher')
-rw-r--r--embedding/components/windowwatcher/nsWindowWatcher.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/embedding/components/windowwatcher/nsWindowWatcher.cpp b/embedding/components/windowwatcher/nsWindowWatcher.cpp
index 3732ea66d..fa23e285b 100644
--- a/embedding/components/windowwatcher/nsWindowWatcher.cpp
+++ b/embedding/components/windowwatcher/nsWindowWatcher.cpp
@@ -1297,6 +1297,12 @@ nsWindowWatcher::OpenWindowInternal(mozIDOMWindowProxy* aParent,
}
}
+ // If a website opens a popup exit DOM fullscreen
+ if (windowIsNew && aCalledFromJS && !hasChromeParent && !isCallerChrome &&
+ parentWindow) {
+ nsIDocument::AsyncExitFullscreen(parentWindow->GetDoc());
+ }
+
if (aForceNoOpener && windowIsNew) {
NS_RELEASE(*aResult);
}