Re: [whatwg/fullscreen] Remove nodes from top layer as part of the removing steps (#102)

foolip commented on this pull request.



>  
  <li><p>Let <var>exitDocs</var> be the result of
  <a lt="collect documents to unfullscreen">collecting documents to unfullscreen</a> given
- <var>doc</var>.
+ <var>pendingDoc</var>.

Because `pending` is never null, any case where the fullscreen element is now null (or indeed different at all) is taken care or, and we "terminate these steps" above. The assert in "collect documents to unfullscreen" is in place in my changes to match these changes and isn't hit for this reason.

But why does it make sense to only fire an event for this document and not the ancestors in this case, one wonders? Because if the `resize` is true, then `pendingDoc` is the top-level document. And if we hit the above condition for that case, then it was an iframe that was removed and all the descendant documents have already been disposed of. At least I've been unable to come up with a case that's going to be broken, although that doesn't mean there isn't.  https://github.com/whatwg/fullscreen/issues/63 is a potential concern, but there I really think the fix should be that we make those kinds of combinations/races impossible, since I don't think there will always be a "reasonable" thing to do when we end up in those situations.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fullscreen/pull/102#discussion_r165259069

Received on Thursday, 1 February 2018 04:47:11 UTC