Bug 1156659 - Added set offline per tab to BrowsingContext. r=valentin,nika,necko-reviewers,kershaw

Differential Revision: https://phabricator.services.mozilla.com/D187704
This commit is contained in:
dylan
2023-10-02 04:13:43 +00:00
parent 210bafc1e5
commit b37b5aaba2
8 changed files with 84 additions and 4 deletions

View File

@@ -3529,6 +3529,11 @@ bool BrowsingContext::CanSet(FieldIndex<IDX_IsUnderHiddenEmbedderElement>,
return true;
}
bool BrowsingContext::CanSet(FieldIndex<IDX_ForceOffline>, bool aNewValue,
ContentParent* aSource) {
return XRE_IsParentProcess() && !aSource;
}
void BrowsingContext::DidSet(FieldIndex<IDX_IsUnderHiddenEmbedderElement>,
bool aOldValue) {
nsIDocShell* shell = GetDocShell();