Bug 257199

Summary: Requesting fullscreen in A/B/A element order doesn't match the spec
Product: WebKit Reporter: Philip Jägenstedt <philip>
Component: Layout and RenderingAssignee: Tim Nguyen (:ntim) <ntim>
Status: RESOLVED FIXED    
Severity: Normal CC: bfulgham, jarhar, marcosc, ntim, simon.fraser, webkit-bug-importer, zalan
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Description Philip Jägenstedt 2023-05-23 07:16:58 PDT
A test for this was added in https://github.com/web-platform-tests/wpt/pull/39828, results at https://wpt.fyi/results/fullscreen/api/fullscreen-reordering.html.

I did some manual testing in https://github.com/whatwg/fullscreen/pull/223#issuecomment-1522928629.

This has long been required by the spec, but got renewed attention with https://github.com/whatwg/fullscreen/pull/223.

The test doesn't work because Safari still has a hierarchy requirement for the Fullscreen API, failing because A and B are siblings in the DOM:
https://github.com/WebKit/WebKit/blob/f462028e09b021b5d2768fee9ea0ffc056565b94/Source/WebCore/dom/FullscreenManager.cpp#L224-L230

Element A should end up fullscreen, by moving it to the top of top layer.
Comment 1 Radar WebKit Bug Importer 2023-05-30 07:17:15 PDT
<rdar://problem/110004138>
Comment 2 Tim Nguyen (:ntim) 2023-06-20 12:20:48 PDT
*** Bug 258035 has been marked as a duplicate of this bug. ***
Comment 3 Tim Nguyen (:ntim) 2023-07-30 13:21:53 PDT
Pull request: https://github.com/WebKit/WebKit/pull/16220
Comment 4 EWS 2023-07-31 10:07:17 PDT
Committed 266426@main (675766f74505): <https://commits.webkit.org/266426@main>

Reviewed commits have been landed. Closing PR #16220 and removing active labels.