[fullscreen] The "fully exit fullscreen" algorithm and nested fullscreen document (#3)

It seems to be unclear what should happen when we fully exit fullscreen on a document which includes nested fullscreen document.

Consider the following case:
* div id=a
  * div id=b
    * iframe
      * div id=c

If we do:
1. request fullscreen on #a 
2. request fullscreen on #b 
3. request fullscreen on #c 
4. fully exit fullscreen

According to the algorithm, it seems to me that #b as well as the iframe inside will be directly removed from the fullscreen stack before performing `exitFullscreen()`. It is clear that the outer document will exit fullscreen and get a fullscreenchange event, but it is not clear what happens to the inner document.

It seems to me that the algorithm of `exitFullscreen()` could handle this properly, as it collects "descendant browsing contexts' documents with a non-empty fullscreen element stack", and the iframe removed from the fullscreen stack still have a non-empty fullscreen element stack, hence will also exit fullscreen state and get the fullscreenchange event.

But I think it is worth a note in the section of "fully exit fullscreen" which mentions that even if a nested document is removed from the stack in step 3, it still keeps its fullscreen element stack, and consequently could be handled by `exitFullscreen()`.

---
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fullscreen/issues/3

Received on Thursday, 2 July 2015 10:50:38 UTC