Issue #2472 - Part 3: Refactor Fullscreen stack to Top Layer stack

Fullscreen stack isn't part of the spec anymore; it's been changed to a more
generic version called Top Layer stack, which is being used by both full-screen
APIs and dialog elements.

This patch refactors it to Top Layer stack so that it can be reused for dialog
elements.

Top Layer stack spec: https://fullscreen.spec.whatwg.org/#new-stacking-layer
This commit is contained in:
Moonchild 2024-03-07 12:24:06 +01:00 committed by roytam1
commit 79c7489bb0
5 changed files with 161 additions and 98 deletions

View file

@ -169,7 +169,7 @@ DocumentOrShadowRoot::GetFullscreenElement()
return nullptr;
}
Element* element = AsNode().OwnerDoc()->FullScreenStackTop();
Element* element = AsNode().OwnerDoc()->GetUnretargetedFullScreenElement();
NS_ASSERTION(!element ||
element->State().HasState(NS_EVENT_STATE_FULL_SCREEN),
"Fullscreen element should have fullscreen styles applied");