Bug 1785227 - Consider all browsing context as non-synthetic when we don't want to hide image document for <object> and <embed> r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D154997
This commit is contained in:
@@ -122,7 +122,8 @@ void WindowContext::AppendChildBrowsingContext(
|
||||
MOZ_DIAGNOSTIC_ASSERT(!mChildren.Contains(aBrowsingContext));
|
||||
|
||||
mChildren.AppendElement(aBrowsingContext);
|
||||
if (!aBrowsingContext->IsEmbedderTypeObjectOrEmbed()) {
|
||||
if (!nsContentUtils::ShouldHideObjectOrEmbedImageDocument() ||
|
||||
!aBrowsingContext->IsEmbedderTypeObjectOrEmbed()) {
|
||||
mNonSyntheticChildren.AppendElement(aBrowsingContext);
|
||||
}
|
||||
|
||||
@@ -150,6 +151,7 @@ void WindowContext::RemoveChildBrowsingContext(
|
||||
|
||||
void WindowContext::UpdateChildSynthetic(BrowsingContext* aBrowsingContext,
|
||||
bool aIsSynthetic) {
|
||||
MOZ_ASSERT(nsContentUtils::ShouldHideObjectOrEmbedImageDocument());
|
||||
if (aIsSynthetic) {
|
||||
mNonSyntheticChildren.RemoveElement(aBrowsingContext);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user