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

Only use sourceOrigin for all about:-schemed Documents #9465

Merged
merged 5 commits into from
Jul 4, 2023

Conversation

domfarolino
Copy link
Member

@domfarolino domfarolino commented Jun 28, 2023

Before this PR, determine the origin took in two origins: sourceOrigin (returned for about:blank URLs) and containerOrigin (returned for about:srcdoc). But I don't think there's a reason for these two be different, so this CL combines them.

When navigating a srcdoc iframe via the srcdoc attribute, the parent is always used as the sourceDocument passed into the #navigate algorithm, which means that the container origin used here and here for srcdoc iframe navigations, is the initiator/source origin. That, coupled with the fact that there's no instance where we pass in sourceOrigin and containerOrigin together (for the algorithm to decide between), means they are exclusive, but both used for about:-schemed documents, and generally feel redundant IMO.


/browsing-the-web.html ( diff )
/document-sequences.html ( diff )

@domfarolino domfarolino changed the title Only use initiatorOrigin for all about:-schemed Documents Only use sourceOrigin for all about:-schemed Documents Jun 30, 2023
@domfarolino domfarolino marked this pull request as ready for review June 30, 2023 14:17
@domfarolino domfarolino requested a review from domenic June 30, 2023 14:17
@domfarolino
Copy link
Member Author

@domenic LMK what you think about this. I personally kind of get confused with the two exclusive origin parameters for this algorithm, even though they basically represent the same thing, since the "initiator"/"source" for about:srcdoc navigations is always the parent, and we have no intention of changing that.

Copy link
Member

@domenic domenic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great idea. I wonder how long this kind of simplification has been possible.

See also #8739 for the future.

@domenic domenic merged commit 0ee80a2 into main Jul 4, 2023
@domenic domenic deleted the domfarolino/srcdoc-initiator-origin branch July 4, 2023 02:38
@domenic domenic added clarification Standard could be clearer topic: navigation labels Jul 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clarification Standard could be clearer topic: navigation
Development

Successfully merging this pull request may close these issues.

2 participants