-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Specify browser UI-initiated navigations better #11250
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
base: main
Are you sure you want to change the base?
Conversation
In particular, they have a null sourceDocument. We need to handle that in various places in the specification. Closes #9133.
cc @trflynn89 @shannonbooth :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. This puts some pressure on Fetch getting its null client act together.
I will hold off on merging this until we have agreement that whatwg/fetch#1820 is the right way to fix the request's window. (For example, we might instead prefer callers to set it.) |
Implementation musings: Implementing this in LadybirdBrowser/ladybird#4515 caused one of my tests for the state of
Though navigating to about:blank causing all previous state to go kaput seems odd, it's not like anyone who isn't trying to stress test the browser would do that during normal operation, right? ... |
I think that's correct too. In theory, web platform tests are meant to be run as if you've started the browser from scratch for every test. If you want to test a series of documents, you need to use iframes or popup windows. In practice, most browser/test runner combos do not do this. (This leads to annoying changes like web-platform-tests/wpt@0a5ef44 ; see also web-platform-tests/wpt#33590.) But the closer we can get to that ideal, the better. |
In whatwg/html#11250 we are working to specify browser UI-initiated navigations better. Without this change, it is unclear what to set their request's window to. They will have null clients, so "client" is not appropriate. They will show prompts, so "no-window" is not appropriate. And setting it to whatever's shown currently in the being-navigated window is not correct. This introduces a new value, "from-browser-ui", which indicates that browser UI is initiating the request, and so any prompts should still be shown, but on a neutral backdrop, not associated with a specific Window object.
Marking "do not merge yet" until we get whatwg/fetch#1821 landed and revise this to use it. |
In particular, they have a null sourceDocument. We need to handle that in various places in the specification.
Closes #9133.
In addition to @domfarolino and @noamr, review from @ADKaster or other Ladybird folks who might have run into this would be much appreciated.
(See WHATWG Working Mode: Changes for more details.)
/browsing-the-web.html ( diff )
/infrastructure.html ( diff )