Bug 1597448 - Fix uses nsIDocShellTreeItem of mozilla::dom::BrowserChild::ApplyParentShowInfo(). r=kmag

This remove a code path for `<iframe mozbrowser>` from its function.

Differential Revision: https://phabricator.services.mozilla.com/D61343

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Tetsuharu OHZEKI 2020-01-31 14:33:21 +00:00
parent 57110a989d
commit a20db1d5a5

View File

@ -1135,15 +1135,6 @@ void BrowserChild::ApplyParentShowInfo(const ParentShowInfo& aInfo) {
nsCOMPtr<nsIDocShell> docShell = do_GetInterface(WebNavigation());
if (docShell) {
nsCOMPtr<nsIDocShellTreeItem> item = do_GetInterface(docShell);
if (IsMozBrowser()) {
// B2G allows window.name to be set by changing the name attribute on the
// <iframe mozbrowser> element. window.open calls cause this attribute to
// be set to the correct value. A normal <xul:browser> element has no such
// attribute. The data we get here comes from reading the attribute, so we
// shouldn't trust it for <xul:browser> elements.
item->SetName(aInfo.name());
}
docShell->SetFullscreenAllowed(aInfo.fullscreenAllowed());
if (aInfo.isPrivate()) {
nsCOMPtr<nsILoadContext> context = do_GetInterface(docShell);