Backed out changeset 78073667ddc6 (bug 1397426)

--HG--
extra : rebase_source : 59c9f343a81c1ba1b65c25548c569f48e81d236c
This commit is contained in:
Mike Conley 2017-12-06 15:52:40 -05:00
Родитель 7721deb74e
Коммит 2fe4ae7e28
1 изменённых файлов: 8 добавлений и 14 удалений

Просмотреть файл

@ -3062,21 +3062,15 @@ TabChild::MakeHidden()
ClearCachedResources();
}
nsCOMPtr<nsIDocShell> docShell = do_GetInterface(WebNavigation());
if (docShell) {
// Hide all plugins in this tab. We don't use TabChildBase::GetPresShell()
// here because that would create a content viewer if one doesn't exist yet.
// Creating a content viewer can cause JS to run, which we want to avoid.
// nsIDocShell::GetPresShell returns null if no content viewer exists yet.
if (nsCOMPtr<nsIPresShell> presShell = docShell->GetPresShell()) {
if (nsPresContext* presContext = presShell->GetPresContext()) {
// Hide all plugins in this tab.
if (nsCOMPtr<nsIPresShell> shell = GetPresShell()) {
if (nsPresContext* presContext = shell->GetPresContext()) {
nsRootPresContext* rootPresContext = presContext->GetRootPresContext();
nsIFrame* rootFrame = presShell->FrameConstructor()->GetRootFrame();
nsIFrame* rootFrame = shell->FrameConstructor()->GetRootFrame();
rootPresContext->ComputePluginGeometryUpdates(rootFrame, nullptr, nullptr);
rootPresContext->ApplyPluginGeometryUpdates();
}
presShell->SetIsActive(false);
}
shell->SetIsActive(false);
}
if (mPuppetWidget) {