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

@ -123,8 +123,8 @@ ViewportFrame::BuildDisplayListForTopLayer(nsDisplayListBuilder* aBuilder,
nsDisplayList* aList)
{
nsIDocument* doc = PresContext()->Document();
nsTArray<Element*> fullscreenStack = doc->GetFullscreenStack();
for (Element* elem : fullscreenStack) {
nsTArray<Element*> toplayer = doc->GetTopLayer();
for (Element* elem : toplayer) {
if (nsIFrame* frame = elem->GetPrimaryFrame()) {
// There are two cases where an element in fullscreen is not in
// the top layer: