Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Browsing context hierarchy needs to go through the embedding document #5020

Open
annevk opened this issue Oct 18, 2019 · 1 comment
Open

Browsing context hierarchy needs to go through the embedding document #5020

annevk opened this issue Oct 18, 2019 · 1 comment

Comments

@annevk
Copy link
Member

@annevk annevk commented Oct 18, 2019

Grabbing the parent browsing context or top-level browsing context is rather problematic. In particular when then their active document or some such is consulted.

@bzbarsky has raised this many times.

To prevent these kind of issues we should make browsing contexts explicitly point to their embedding element and make all traversal go through that and then define convenient short hands for top-level document, parent document, and such.

This would also help with defining new concepts such as top-level origin, without having to explicitly forward such state downward.

@annevk

This comment has been minimized.

Copy link
Member Author

@annevk annevk commented Oct 21, 2019

Example: if you navigate a popup from A to A' and A embeds B and A' does not, when you arrive at A' and look at B's window.parent and window.top they are null in all browsers, but it's not necessarily true that B doesn't have an associated browsing context (depends on bfcache).

This issue is related to browsing context's "sleepy state" not being defined. In particular if you go back from A' to A and A was in the bfcache, the browsing context from B is still there and cannot have been discarded, but this is not really defined either way. In part I suppose whether we need to resolve this depends on how bfcache ends up being designed, but I suspect we will need to solve it given what existing user agents are iterating towards.

annevk added a commit to web-platform-tests/wpt that referenced this issue Oct 21, 2019
annevk added a commit that referenced this issue Nov 15, 2019
This is the first step for #5020.
annevk added a commit that referenced this issue Nov 21, 2019
annevk added a commit that referenced this issue Nov 22, 2019
This generally sets out the infrastructure for a more secure model for working with browsing contexts, as outlined in #5020.

* Adds browsing context's container
* Adds browsing context's container document
* Makes "update the rendering" account for browsing contexts in shadow trees
* Removes nested through; closes #4409.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
1 participant
You can’t perform that action at this time.