Backed out 5 changesets (bug 1765313, bug 1770403) for causing lint failure in tools/lint/rejected-words.yml CLOSED TREE

Backed out changeset c76671d99573 (bug 1765313)
Backed out changeset f0895e88c27e (bug 1765313)
Backed out changeset 81a0f8c40381 (bug 1765313)
Backed out changeset a11f5453e441 (bug 1770403)
Backed out changeset df452028881c (bug 1770403)
This commit is contained in:
Molnar Sandor
2022-06-08 15:48:57 +03:00
parent 18b8999d5a
commit cb1c2d7987
33 changed files with 915 additions and 774 deletions

View File

@@ -2743,9 +2743,29 @@ nsresult nsDocShell::SetDocLoaderParent(nsDocLoader* aParent) {
mContentListener->SetParentContentListener(parentURIListener);
}
// Inform windows when they're being removed from their parent.
if (!aParent) {
MaybeClearStorageAccessFlag();
}
return NS_OK;
}
void nsDocShell::MaybeClearStorageAccessFlag() {
if (mScriptGlobal) {
// Tell our window that the parent has now changed.
mScriptGlobal->ParentWindowChanged();
// Tell all of our children about the change recursively as well.
for (auto* childDocLoader : mChildList.ForwardRange()) {
nsCOMPtr<nsIDocShell> child = do_QueryObject(childDocLoader);
if (child) {
static_cast<nsDocShell*>(child.get())->MaybeClearStorageAccessFlag();
}
}
}
}
void nsDocShell::MaybeRestoreWindowName() {
if (!StaticPrefs::privacy_window_name_update_enabled()) {
return;