summaryrefslogtreecommitdiffstats
path: root/xpfe/appshell/AppWindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'xpfe/appshell/AppWindow.cpp')
-rw-r--r--xpfe/appshell/AppWindow.cpp28
1 files changed, 10 insertions, 18 deletions
diff --git a/xpfe/appshell/AppWindow.cpp b/xpfe/appshell/AppWindow.cpp
index e172f9340e..65c21e9579 100644
--- a/xpfe/appshell/AppWindow.cpp
+++ b/xpfe/appshell/AppWindow.cpp
@@ -1631,30 +1631,33 @@ void AppWindow::SyncAttributesToWidget() {
NS_ENSURE_TRUE_VOID(mWindow);
+ // Only change blank window status once we're loaded, so that a
+ // partially-loaded browser window doesn't start painting early.
+ if (mChromeLoaded) {
+ mWindow->SetIsEarlyBlankWindow(attr.EqualsLiteral("navigator:blank"));
+ NS_ENSURE_TRUE_VOID(mWindow);
+ }
+
// "icon" attribute
windowElement->GetAttribute(u"icon"_ns, attr);
if (!attr.IsEmpty()) {
mWindow->SetIcon(attr);
-
NS_ENSURE_TRUE_VOID(mWindow);
}
// "drawtitle" attribute
windowElement->GetAttribute(u"drawtitle"_ns, attr);
mWindow->SetDrawsTitle(attr.LowerCaseEqualsLiteral("true"));
-
NS_ENSURE_TRUE_VOID(mWindow);
// "toggletoolbar" attribute
windowElement->GetAttribute(u"toggletoolbar"_ns, attr);
mWindow->SetShowsToolbarButton(attr.LowerCaseEqualsLiteral("true"));
-
NS_ENSURE_TRUE_VOID(mWindow);
// "macnativefullscreen" attribute
windowElement->GetAttribute(u"macnativefullscreen"_ns, attr);
mWindow->SetSupportsNativeFullscreen(attr.LowerCaseEqualsLiteral("true"));
-
NS_ENSURE_TRUE_VOID(mWindow);
// "macanimationtype" attribute
@@ -2954,15 +2957,6 @@ void AppWindow::SizeModeChanged(nsSizeMode aSizeMode) {
// then need to be different.
}
-void AppWindow::UIResolutionChanged() {
- nsCOMPtr<nsPIDOMWindowOuter> ourWindow =
- mDocShell ? mDocShell->GetWindow() : nullptr;
- if (ourWindow) {
- ourWindow->DispatchCustomEvent(u"resolutionchange"_ns,
- ChromeOnlyDispatch::eYes);
- }
-}
-
void AppWindow::FullscreenWillChange(bool aInFullscreen) {
if (mDocShell) {
if (nsCOMPtr<nsPIDOMWindowOuter> ourWindow = mDocShell->GetWindow()) {
@@ -3018,6 +3012,9 @@ void AppWindow::FullscreenChanged(bool aInFullscreen) {
void AppWindow::FinishFullscreenChange(bool aInFullscreen) {
mFullscreenChangeState = FullscreenChangeState::NotChanging;
+ if (nsXULPopupManager* pm = nsXULPopupManager::GetInstance()) {
+ pm->Rollup({});
+ }
if (mDocShell) {
if (nsCOMPtr<nsPIDOMWindowOuter> ourWindow = mDocShell->GetWindow()) {
ourWindow->FinishFullscreenChange(aInFullscreen);
@@ -3450,11 +3447,6 @@ void AppWindow::WidgetListenerDelegate::SizeModeChanged(nsSizeMode aSizeMode) {
holder->SizeModeChanged(aSizeMode);
}
-void AppWindow::WidgetListenerDelegate::UIResolutionChanged() {
- RefPtr<AppWindow> holder = mAppWindow;
- holder->UIResolutionChanged();
-}
-
void AppWindow::WidgetListenerDelegate::MacFullscreenMenubarOverlapChanged(
DesktopCoord aOverlapAmount) {
RefPtr<AppWindow> holder = mAppWindow;