This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
In both of these steps, doc can be null: 3.4.3. Remove the top element of doc's fullscreen element stack. 3.5. Let topLevelDoc be doc's top-level browsing context's document. It looks like "and to null otherwise" could be replaced by the equivalent of "break" and then lastDoc can go as well.
This is all gone now due to bug 26440.