<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>257199</bug_id>
          
          <creation_ts>2023-05-23 07:16:58 -0700</creation_ts>
          <short_desc>Requesting fullscreen in A/B/A element order doesn&apos;t match the spec</short_desc>
          <delta_ts>2023-07-31 10:07:23 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Layout and Rendering</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Philip Jägenstedt">philip</reporter>
          <assigned_to name="Tim Nguyen (:ntim)">ntim</assigned_to>
          <cc>bfulgham</cc>
    
    <cc>jarhar</cc>
    
    <cc>marcosc</cc>
    
    <cc>ntim</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>zalan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1957311</commentid>
    <comment_count>0</comment_count>
    <who name="Philip Jägenstedt">philip</who>
    <bug_when>2023-05-23 07:16:58 -0700</bug_when>
    <thetext>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&apos;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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1958737</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2023-05-30 07:17:15 -0700</bug_when>
    <thetext>&lt;rdar://problem/110004138&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1962615</commentid>
    <comment_count>2</comment_count>
    <who name="Tim Nguyen (:ntim)">ntim</who>
    <bug_when>2023-06-20 12:20:48 -0700</bug_when>
    <thetext>*** Bug 258035 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1968797</commentid>
    <comment_count>3</comment_count>
    <who name="Tim Nguyen (:ntim)">ntim</who>
    <bug_when>2023-07-30 13:21:53 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/16220</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1968868</commentid>
    <comment_count>4</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2023-07-31 10:07:17 -0700</bug_when>
    <thetext>Committed 266426@main (675766f74505): &lt;https://commits.webkit.org/266426@main&gt;

Reviewed commits have been landed. Closing PR #16220 and removing active labels.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>