diff options
Diffstat (limited to 'xpfe/appshell')
-rw-r--r-- | xpfe/appshell/AppWindow.cpp | 28 | ||||
-rw-r--r-- | xpfe/appshell/AppWindow.h | 3 |
2 files changed, 10 insertions, 21 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; diff --git a/xpfe/appshell/AppWindow.h b/xpfe/appshell/AppWindow.h index 4acee5dbfe..d51c2c6aba 100644 --- a/xpfe/appshell/AppWindow.h +++ b/xpfe/appshell/AppWindow.h @@ -98,8 +98,6 @@ class AppWindow final : public nsIBaseWindow, MOZ_CAN_RUN_SCRIPT_BOUNDARY virtual void SizeModeChanged(nsSizeMode sizeMode) override; MOZ_CAN_RUN_SCRIPT_BOUNDARY - virtual void UIResolutionChanged() override; - MOZ_CAN_RUN_SCRIPT_BOUNDARY virtual void MacFullscreenMenubarOverlapChanged( mozilla::DesktopCoord aOverlapAmount) override; MOZ_CAN_RUN_SCRIPT_BOUNDARY @@ -158,7 +156,6 @@ class AppWindow final : public nsIBaseWindow, bool WindowResized(nsIWidget* aWidget, int32_t aWidth, int32_t aHeight); MOZ_CAN_RUN_SCRIPT bool RequestWindowClose(nsIWidget* aWidget); MOZ_CAN_RUN_SCRIPT void SizeModeChanged(nsSizeMode aSizeMode); - MOZ_CAN_RUN_SCRIPT void UIResolutionChanged(); MOZ_CAN_RUN_SCRIPT void FullscreenWillChange(bool aInFullscreen); MOZ_CAN_RUN_SCRIPT void FullscreenChanged(bool aInFullscreen); MOZ_CAN_RUN_SCRIPT void MacFullscreenMenubarOverlapChanged( |