Backed out 2 changesets (bug 1572798) for multiple failures. CLOSED TREE

Backed out changeset cfdebb863454 (bug 1572798)
Backed out changeset f2d3a6800638 (bug 1572798)
This commit is contained in:
Dorel Luca 2021-01-20 00:15:48 +02:00
parent 43d39a406f
commit f3c332c453
6 changed files with 9 additions and 46 deletions

View File

@ -1970,7 +1970,6 @@
uriIsAboutBlank,
userContextId,
skipLoad,
initiallyActive,
} = {}) {
let b = document.createXULElement("browser");
// Use the JSM global to create the permanentKey, so that if the
@ -2003,10 +2002,6 @@
b.setAttribute(attribute, defaultBrowserAttributes[attribute]);
}
if (!initiallyActive) {
b.setAttribute("initiallyactive", "false");
}
if (userContextId) {
b.setAttribute("usercontextid", userContextId);
}

View File

@ -344,19 +344,8 @@ already_AddRefed<BrowsingContext> BrowsingContext::CreateDetached(
}
nsContentUtils::GenerateUUIDInPlace(fields.mHistoryID);
fields.mExplicitActive = [&] {
if (parentBC) {
// Non-root browsing-contexts inherit their status from its parent.
return ExplicitActiveStatus::None;
}
if (aType == Type::Content) {
// Content gets managed by the chrome front-end / embedder element and
// starts as inactive.
return ExplicitActiveStatus::Inactive;
}
// Chrome starts as active.
return ExplicitActiveStatus::Active;
}();
fields.mExplicitActive =
parentBC ? ExplicitActiveStatus::None : ExplicitActiveStatus::Active;
fields.mFullZoom = parentBC ? parentBC->FullZoom() : 1.0f;
fields.mTextZoom = parentBC ? parentBC->TextZoom() : 1.0f;
@ -587,14 +576,6 @@ bool BrowsingContext::IsActive() const {
return false;
}
void BrowsingContext::SetInitiallyActive() {
MOZ_DIAGNOSTIC_ASSERT(!EverAttached());
MOZ_DIAGNOSTIC_ASSERT(IsContent());
MOZ_DIAGNOSTIC_ASSERT(IsTop());
mFields.SetWithoutSyncing<IDX_ExplicitActive>(ExplicitActiveStatus::Active);
}
bool BrowsingContext::GetIsActiveBrowserWindow() {
if (!XRE_IsParentProcess()) {
return Top()->GetIsActiveBrowserWindowInternal();
@ -652,7 +633,8 @@ void BrowsingContext::SetEmbedderElement(Element* aEmbedder) {
if (XRE_IsParentProcess() && IsTopContent()) {
nsAutoString messageManagerGroup;
if (aEmbedder->IsXULElement()) {
aEmbedder->GetAttr(nsGkAtoms::messagemanagergroup, messageManagerGroup);
aEmbedder->GetAttr(kNameSpaceID_None, nsGkAtoms::messagemanagergroup,
messageManagerGroup);
}
txn.SetMessageManagerGroup(messageManagerGroup);

View File

@ -498,8 +498,6 @@ class BrowsingContext : public nsILoadContext, public nsWrapperCache {
aRv);
}
void SetInitiallyActive();
bool AuthorStyleDisabledDefault() const {
return GetAuthorStyleDisabledDefault();
}

View File

@ -3745,16 +3745,14 @@ bool nsFrameLoader::EnsureBrowsingContextAttached() {
// Inherit the `use` flags from our parent BrowsingContext.
bool usePrivateBrowsing = parentContext->UsePrivateBrowsing();
const bool useRemoteSubframes = parentContext->UseRemoteSubframes();
const bool useRemoteTabs = parentContext->UseRemoteTabs();
const bool isContent = mPendingBrowsingContext->IsContent();
bool useRemoteSubframes = parentContext->UseRemoteSubframes();
bool useRemoteTabs = parentContext->UseRemoteTabs();
// Determine the exact OriginAttributes which should be used for our
// BrowsingContext. This will be used to initialize OriginAttributes if the
// BrowsingContext has not already been created.
OriginAttributes attrs;
if (isContent) {
if (mPendingBrowsingContext->IsContent()) {
if (mPendingBrowsingContext->GetParent()) {
MOZ_ASSERT(mPendingBrowsingContext->GetParent() == parentContext);
parentContext->GetOriginAttributes(attrs);
@ -3786,7 +3784,8 @@ bool nsFrameLoader::EnsureBrowsingContextAttached() {
// <iframe mozbrowser> is allowed to set `mozprivatebrowsing` to
// force-enable private browsing.
if (OwnerIsMozBrowserFrame()) {
if (mOwnerContent->HasAttr(nsGkAtoms::mozprivatebrowsing)) {
if (mOwnerContent->HasAttr(kNameSpaceID_None,
nsGkAtoms::mozprivatebrowsing)) {
attrs.SyncAttributesWithPrivateBrowsing(true);
usePrivateBrowsing = true;
}
@ -3816,15 +3815,6 @@ bool nsFrameLoader::EnsureBrowsingContextAttached() {
rv = mPendingBrowsingContext->SetRemoteSubframes(useRemoteSubframes);
NS_ENSURE_SUCCESS(rv, false);
if (isContent && mPendingBrowsingContext->IsTop() &&
mOwnerContent->IsXULElement() &&
!mOwnerContent->AttrValueIs(kNameSpaceID_None, nsGkAtoms::initiallyactive,
nsGkAtoms::_false, eIgnoreCase)) {
// Content <browser> elements are active, unless told otherwise by the
// initiallyactive attribute.
mPendingBrowsingContext->SetInitiallyActive();
}
// Finish attaching.
mPendingBrowsingContext->EnsureAttached();
return true;

View File

@ -156,7 +156,6 @@ var PrintUtils = {
userContextId: browsingContext.originAttributes.userContextId,
initialBrowsingContextGroupId: browsingContext.group.id,
skipLoad: true,
initiallyActive: true,
});
browser.addEventListener("DOMWindowClose", function(e) {
// Ignore close events from printing, see the code creating browsers in

View File

@ -2217,7 +2217,6 @@ STATIC_ATOMS = [
Atom("forcemessagemanager", "forcemessagemanager"),
Atom("preloadedState", "preloadedState"),
Atom("initialBrowsingContextGroupId", "initialBrowsingContextGroupId"),
Atom("initiallyactive", "initiallyactive"),
# windows media query names
Atom("windows_win7", "windows-win7"),
Atom("windows_win8", "windows-win8"),