Bug 1954956 - Tweak a debug-only assert.

No behavior change because <xul:browser> used to take the following
early-return.

MANUAL PUSH: Trivial change CLOSED TREE
This commit is contained in:
Emilio Cobos Álvarez
2025-03-20 22:26:10 +01:00
parent a83a40db37
commit 350a1a6916

View File

@@ -81,12 +81,11 @@ void ViewportFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
}
#ifdef DEBUG
/**
* Returns whether we are going to put an element in the top layer for
* fullscreen. This function should matches the CSS rule in ua.css.
*/
// Returns whether we are going to put an element in the top layer for
// fullscreen. This function should matches the CSS rules in ua.css and xul.css.
static bool ShouldInTopLayerForFullscreen(dom::Element* aElement) {
return !!aElement->GetParent();
return !aElement->IsRootElement() &&
!aElement->IsXULElement(nsGkAtoms::browser);
}
#endif // DEBUG