Backed out changeset ce62de041fca (bug 1860041) for causing failures on test_focus_display_none_xorigin_iframe.html. CLOSED TREE

This commit is contained in:
Natalia Csoregi 2023-10-25 23:16:00 +03:00
Родитель 78f5ecb34b
Коммит da7a394242
3 изменённых файлов: 27 добавлений и 0 удалений

Просмотреть файл

@ -2452,6 +2452,25 @@ nsresult nsFrameLoader::UpdatePositionAndSize(nsSubDocumentFrame* aIFrame) {
return NS_OK;
}
void nsFrameLoader::PropagateIsUnderHiddenEmbedderElement(
bool aIsUnderHiddenEmbedderElement) {
bool isUnderHiddenEmbedderElement = true;
if (Document* ownerDoc = GetOwnerDoc()) {
if (PresShell* presShell = ownerDoc->GetPresShell()) {
isUnderHiddenEmbedderElement = presShell->IsUnderHiddenEmbedderElement();
}
}
isUnderHiddenEmbedderElement |= aIsUnderHiddenEmbedderElement;
BrowsingContext* browsingContext = GetExtantBrowsingContext();
if (browsingContext && browsingContext->IsUnderHiddenEmbedderElement() !=
isUnderHiddenEmbedderElement) {
Unused << browsingContext->SetIsUnderHiddenEmbedderElement(
isUnderHiddenEmbedderElement);
}
}
void nsFrameLoader::UpdateRemoteStyle(
mozilla::StyleImageRendering aImageRendering) {
MOZ_DIAGNOSTIC_ASSERT(IsRemoteFrame());

Просмотреть файл

@ -154,6 +154,8 @@ class nsFrameLoader final : public nsStubMutationObserver,
return mChildMessageManager;
}
nsresult UpdatePositionAndSize(nsSubDocumentFrame* aIFrame);
void PropagateIsUnderHiddenEmbedderElement(
bool aIsUnderHiddenEmbedderElement);
void UpdateRemoteStyle(mozilla::StyleImageRendering aImageRendering);

Просмотреть файл

@ -220,6 +220,12 @@ void nsFrameLoaderOwner::ChangeFrameLoaderCommon(Element* aOwner,
*aOwner, u"XULFrameLoaderCreated"_ns, mozilla::CanBubble::eYes,
mozilla::ChromeOnlyDispatch::eYes);
}
if (mFrameLoader) {
mFrameLoader->PropagateIsUnderHiddenEmbedderElement(
!aOwner->GetPrimaryFrame() ||
!aOwner->GetPrimaryFrame()->StyleVisibility()->IsVisible());
}
}
void nsFrameLoaderOwner::UpdateFocusAndMouseEnterStateAfterFrameLoaderChange() {