Bug 1855668 - Make ::backdrop inherit from the originating element. r=zrhoffman

This is as a result of a spec change (see link in the test), but it
addresses a very long-standing issue with this pseudo-element, see
https://github.com/whatwg/fullscreen/issues/124.

Differential Revision: https://phabricator.services.mozilla.com/D189484
This commit is contained in:
Emilio Cobos Álvarez
2023-10-02 08:53:54 +00:00
parent e9b5c343c6
commit e7563558ed
12 changed files with 51 additions and 67 deletions

View File

@@ -1078,7 +1078,7 @@ void nsFrameConstructorState::ConstructBackdropFrameFor(nsIContent* aContent,
RefPtr<ComputedStyle> style =
mPresShell->StyleSet()->ResolvePseudoElementStyle(
*aContent->AsElement(), PseudoStyleType::backdrop, nullptr,
/* aParentStyle */ nullptr);
aFrame->Style());
MOZ_ASSERT(style->StyleDisplay()->mTopLayer == StyleTopLayer::Top);
nsContainerFrame* parentFrame =
GetGeometricParent(*style->StyleDisplay(), nullptr);