This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 26813 - Removing parent of element that's full screen
Summary: Removing parent of element that's full screen
Status: RESOLVED MOVED
Alias: None
Product: WHATWG
Classification: Unclassified
Component: HTML (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: Unsorted
Assignee: Ian 'Hixie' Hickson
QA Contact: contributor
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 26584
  Show dependency treegraph
 
Reported: 2014-09-15 23:21 UTC by Ian 'Hixie' Hickson
Modified: 2015-10-06 08:01 UTC (History)
5 users (show)

See Also:


Attachments

Description Ian 'Hixie' Hickson 2014-09-15 23:21:16 UTC
https://fullscreen.spec.whatwg.org/#model

What happens when:
* you remove an ancestor of an element that's fullscreen?
* you remove the iframe browsing context container of the browsing context of an element that's fullscreen?
* you navigate an ancestor browsing context of the browsing context of an element's that fullscreen?

Should I be speccing some of these?
Comment 1 Ian 'Hixie' Hickson 2014-09-15 23:25:48 UTC
* the document that the fullscreen element is in has its document.open() method invoked, causing the Document to be recycled but the element to go away?
* window.close() is called?
Comment 2 Anne 2014-09-20 17:19:15 UTC
> you remove an ancestor of an element that's fullscreen?

https://github.com/whatwg/fullscreen/commit/b9f36a4db4f298004463062f19f903a3117629bb

> you remove the iframe browsing context container of the browsing context of an element that's fullscreen?

That's also covered by the above. An iframe would itself be on a stack.

> you navigate an ancestor browsing context of the browsing context of an element's that fullscreen?

This one is up to HTML to define I think.

> the document that the fullscreen element is in has its document.open() method invoked, causing the Document to be recycled but the element to go away?

I hate document.open() and have no good suggestions at the moment. I suspect we'd want this to exit fullscreen.

> window.close() is called?

Seems the same as if you hit (x) in the browser, probably exits fullscreen?
Comment 3 Ian 'Hixie' Hickson 2014-09-24 17:41:48 UTC
Any idea how I should phrase this in the HTML spec?
Comment 4 Anne 2014-09-25 08:07:28 UTC
Just invoke the fully exit fullscreen algorithm from those places? Perhaps Philip can help out. He's been fixing Fullscreen bugs since forever.
Comment 5 Ian 'Hixie' Hickson 2014-09-25 22:28:42 UTC
Won't calling "fully exit" cause it to exit even if the condition isn't exactly met? I mean, for example, if document.open() is called on the Doc of an iframe descendant of the element that's full screen, you wouldn't want to leave full-screen, surely.
Comment 6 Anne 2014-09-26 08:45:30 UTC
Yeah, I guess you could first check if document's fullscreen element stack is non-empty.
Comment 7 Ian 'Hixie' Hickson 2014-09-26 18:10:47 UTC
Would it be possible for you to provide a hook that does this? Something where I hand you a Document that I know is going away, and you take care of determining if that is a problem and exiting full-screen if it is?

Note that this would be called from such deep and ugly algorithms as "discard a browsing context" and the "unload" steps, so you don't want to be firing events or queueing tasks or anything if you can help it.
Comment 8 Anne 2014-09-26 18:22:40 UTC
Can we do it the other way around? Document lifetime hooks seem like a good idea to have in general. I might need them for a revamp to notifications as well.
Comment 9 Ian 'Hixie' Hickson 2014-09-29 16:52:21 UTC
Sure. There are "unloading document cleanup steps" and "unloading document visibility change steps" already; I'm happy to also add a hook to the history traversal and document discard algorithms, if that would help.
Comment 10 Ian 'Hixie' Hickson 2014-09-29 16:52:33 UTC
(Reassign to me if you want me to add something.)
Comment 11 Anne 2014-09-30 13:26:47 UTC
Thanks. I'll wait for Philip to get back to work on this so we can figure out the appropriate model and then assign as appropriate.
Comment 12 Philip Jägenstedt 2015-02-16 11:34:34 UTC
Consider me back at work, at least as far as reading and replying to fullscreen bug mail is concerned.

These three seem to be unresolved:

> * you navigate an ancestor browsing context of the browsing context of an
> element's that fullscreen?

That ancestor must then have an iframe which is the fullscreen element, so there shouldn't be anything special about this. Is the standard case of navigating a document with a fullscreen element handled well, spec-wise?

> * the document that the fullscreen element is in has its document.open()
> method invoked, causing the Document to be recycled but the element to go
> away?

Does this not indirectly invoke the "Whenever the removing steps run with an oldNode, run these steps" bit in the Fullscreen spec?

> * window.close() is called?

Uh... "fully exit fullscreen" seems appropriate.