8000 Spec Bug in `exitFullscreen()` · Issue #248 · whatwg/fullscreen · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Spec Bug in exitFullscreen() #248
Open
Open
@theIDinside

Description

@theIDinside

What is the issue with the Fullscreen API Standard?

Step 5 & 6 says the following

  1. Let topLevelDoc be doc’s node navigable’s top-level traversable’s active document.

  2. If topLevelDoc is in docs, and it is a simple fullscreen document, then set doc to topLevelDoc and resize to true.

However, topLevelDoc may indeed be simple (or non simple), but in the case where it's simple, and some doc between this and topLevelDoc is non-simple, resize should be false, not true. Resize should only be true if the entire tree is simple. We can corroborate/verify this by reading the algorithm for "collecting documents to unfullscreen" which does the following:

To collect documents to unfullscreen given doc, run these steps:

  1. Let docs be an ordered set consisting of doc.
  2. While true:
    2.1 Let lastDoc be docs’s last document.
    2.2 Assert: lastDoc’s fullscreen element is not null.
    2.3. If lastDoc is not a simple fullscreen document, break <- NOTE THIS
    2.4 Let container be lastDoc’s node navigable’s container.
    2.5 If container is null, then break.
    2.6 If container’s iframe fullscreen flag is set, break.
    2.7 Append container’s node document to docs.
  3. Return docs.

Here we can see that the algorithm terminates if a non simple fullscreen document is encountered. This is also the behaviors of browsers Chrome and Firefox.

I propose a change to step 5 and 6 of the algorithm, because it seems that none of the browsers actually does step 5 & 6 like they're written in the spec (because it doesn't make sense).

What needs to happen is not set doc to topLevelDoc, but instead run the "collect" steps to find the first document which is non-simple or the top-level doc if all of them are simple and in that case, set resize to true.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0