-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Navigate improvements #1352
Comments
This in general integrates navigation with Fetch better, reusing Fetch's infrastructure for network errors and for 401 handling. This also removes the speculative 401 features that seem unlikely to ever materialize. This definitely requires more work to actually talk about responses instead of resources, and to more clearly tie it to the "resource" variable from earlier in the navigate algorithm, but since all those interactions are still somewhat unclear this will have to do. See #1352 for plans in that direction. Fixes #511.
Another thing that needs to be done is to reduce the number of places that allocate a document object and initialize it. #1408 is a first step towards making them more similar. |
While this is true, we also use resource for this. So if we also started using a response this would become somewhat confusing. We might just have to extract the bit starting at "Fragments" into its own algorithm somehow so that directs (anything else?) can invoke that with different arguments later on... |
Below is an attempt at a more general "initialize" algorithm we could share between navigation and browsing context creation. To initialize a browsing context /bc/ and document /document/, given ???:
The problem is really this last step. In the case of initial about:blank (is that a flag on the document btw?) state seems to come from a creator (and not all such state is defined at the moment, e.g., HTTPS state). What about non-initial about:blank? What about blob URLs? What about data URLs? What about |
The initialize setup above is broken. We cannot create a document before we have a global to create one in. I suspect what we need to do is pull out creating an global. Move that up and share it with create a browsing context. Then have something to create a document. Again, try to make that an algorithm that both navigate and create a browsing context can use. Then, hook up the document to the global. Can maybe be combined with previous step. Then, for the navigate case, dispatch to the various algorithms that tell how to parse the HTML / handle the image / display the error / etc. and let those fill in the remaining document details. |
Latest thoughts:
|
#1445 handles the document bit. I guess that leaves turning "resource" into an actual argument for this bug. I should probably attempt once more and see where it breaks down. |
Closing this issue as at this point it's more confusing than helpful to me. Resource is an actual argument now, although I suppose we could further improve the definition of its type at some point. |
Improvements I'd like to make to the navigate algorithm:
Location
header needs to be abstracted and coordinated with Fetch (I might favor a special response that has an additional field to store the parsed result). Other than data URLs it seems Firefox supports no other schemes here either, but my testing has not been exhaustive (mailto, facetime, about). (Navigate doesn't appear to handle redirects properly #461)The text was updated successfully, but these errors were encountered: