зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1893918 - A not-yet-loaded browser window shouldn't stop being an early blank window. r=win-reviewers,rkraesig
Otherwise we start painting the window too early, which after bug 1891063 causes the non-client area to be filled, but we don't paint anything on top. Differential Revision: https://phabricator.services.mozilla.com/D208898
This commit is contained in:
Родитель
7f1b3a12f3
Коммит
687211c219
|
@ -1397,6 +1397,8 @@ class nsIWidget : public nsISupports {
|
|||
const nsAString& xulWinClass,
|
||||
const nsAString& xulWinName) = 0;
|
||||
|
||||
virtual void SetIsEarlyBlankWindow(bool) {}
|
||||
|
||||
/**
|
||||
* Enables/Disables system capture of any and all events that would cause a
|
||||
* popup to be rolled up. aListener should be set to a non-null value for
|
||||
|
|
|
@ -3951,10 +3951,8 @@ uint32_t nsWindow::GetMaxTouchPoints() const {
|
|||
return WinUtils::GetMaxTouchPoints();
|
||||
}
|
||||
|
||||
void nsWindow::SetWindowClass(const nsAString& xulWinType,
|
||||
const nsAString& xulWinClass,
|
||||
const nsAString& xulWinName) {
|
||||
mIsEarlyBlankWindow = xulWinType.EqualsLiteral("navigator:blank");
|
||||
void nsWindow::SetIsEarlyBlankWindow(bool aIsEarlyBlankWindow) {
|
||||
mIsEarlyBlankWindow = aIsEarlyBlankWindow;
|
||||
}
|
||||
|
||||
/**************************************************************
|
||||
|
|
|
@ -261,8 +261,7 @@ class nsWindow final : public nsBaseWidget {
|
|||
const LayoutDeviceIntRegion& aRegion) override;
|
||||
|
||||
uint32_t GetMaxTouchPoints() const override;
|
||||
void SetWindowClass(const nsAString& xulWinType, const nsAString& xulWinClass,
|
||||
const nsAString& xulWinName) override;
|
||||
void SetIsEarlyBlankWindow(bool) override;
|
||||
|
||||
/**
|
||||
* Event helpers
|
||||
|
|
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче