mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 862918 - Only create nsGlobalModalWindow for the primary content shell. r=bz
This commit is contained in:
parent
f84ce86cc0
commit
7171c4b7f7
@ -11418,6 +11418,15 @@ nsDocShell::EnsureScriptEnvironment()
|
||||
|
||||
bool isModalContentWindow = (mItemType == typeContent) &&
|
||||
(chromeFlags & nsIWebBrowserChrome::CHROME_MODAL);
|
||||
// There can be various other content docshells associated with the
|
||||
// top-level window, like sidebars. Make sure that we only create an
|
||||
// nsGlobalModalWindow for the primary content shell.
|
||||
if (isModalContentWindow) {
|
||||
nsCOMPtr<nsIDocShellTreeItem> primaryItem;
|
||||
nsresult rv = mTreeOwner->GetPrimaryContentShell(getter_AddRefs(primaryItem));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
isModalContentWindow = (primaryItem == this);
|
||||
}
|
||||
|
||||
// If our window is modal and we're not opened as chrome, make
|
||||
// this window a modal content window.
|
||||
|
Loading…
Reference in New Issue
Block a user