Bug 1927255 - More subtly deal with preserveLayers in inactive tabs. r=mconley
PreserveLayers is propagated to child frames, and it'd be nice if it could be used just the same way it's used for the top level tab, to avoid discarding the resources. For the top level, if you call preserveLayers() you also need to have renderLayers = true. It'd be better long-term, perhaps, to have renderLayers and preserveLayers in the parent BC. Happy to work on that refactoring if you agree. Testing wise, I don't think this is easily testable... Differential Revision: https://phabricator.services.mozilla.com/D227000
This commit is contained in:
@@ -2750,6 +2750,9 @@ void BrowsingContext::DidSet(FieldIndex<IDX_ExplicitActive>,
|
||||
|
||||
PreOrderWalk([&](BrowsingContext* aContext) {
|
||||
if (nsCOMPtr<nsIDocShell> ds = aContext->GetDocShell()) {
|
||||
if (auto* bc = BrowserChild::GetFrom(ds)) {
|
||||
bc->UpdateVisibility();
|
||||
}
|
||||
nsDocShell::Cast(ds)->ActivenessMaybeChanged();
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user