Specify browser UI-initiated navigations better#11250
Conversation
In particular, they have a null sourceDocument. We need to handle that in various places in the specification. Closes #9133.
cc @trflynn89 @shannonbooth :) |
annevk
left a comment
There was a problem hiding this comment.
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. |
After much discussion in #1820 and #1821, this seems to be more correct. Closes #1820. Closes #1821. Helps whatwg/html#11250 specify browser-initiated navigations better.
After much discussion in #1820 and #1821, this seems to be more correct. Closes #1820. Closes #1821. Helps whatwg/html#11250 specify browser-initiated navigations better.
|
I've updated this to use the latest from Fetch, hooray! If someone wants to give this an extra review, I'd appreciate it, but if not I'll plan on landing this next Monday. |
|
(Thanks for the review! After writing up something along the lines of what you're suggesting, I think it's a good bit better, so I appreciate the push.) |
That bit is much more readable, thanks! |
After much discussion in whatwg#1820 and whatwg#1821, this seems to be more correct. Closes whatwg#1820. Closes whatwg#1821. Helps whatwg/html#11250 specify browser-initiated navigations better.
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 )