-
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
Always replace the initial about:blank Document #6595
Conversation
660dcaf
to
6147a1d
Compare
I've asked @hsivonen to take a look. Editorially, it seems we now ignore windowType in |
This should be reassed after #6714 makes it in... |
7537d5d
to
19f0fb1
Compare
19f0fb1
to
52b2b0b
Compare
8058c67
to
8b0c261
Compare
Previously, the caller of the navigate algorithm would (usually) check for the browsing context still being on the initial about:blank Document, and if so, switch its history handling to "replace". However, a few call sites missed this: e.g., following hyperlinks or window.open() when they were targeted at an existing browsing context. This change instead centralizes the the conversion of "default" navigations into "replace" navigations for the initial about:blank Document.
8b0c261
to
3f18633
Compare
OK, this is now rebased on top of #6869, which means we I got rid of the long note explaining non-initial about:blank stuff. Yay! We should get web-platform-tests/wpt#29745 (i.e. the tests for #6869) merged. Then I think this should be relatively ready. However it looks like per the tests for this PR, i.e. web-platform-tests/wpt#28541, no browser implements this right now. My understanding from @rakina is that Chrome wants to do so, and Rakina is actively working to make Chrome pass all those tests. Is that correct? |
I guess the tests in web-platform-tests/wpt#28541 probably need updating, post-#6869. That might improve their pass rate. |
I've updated the tests in web-platform-tests/wpt#28541 now that all iframe variants will stay in the initial empty document, and the iframe cases now looks good except for the pushState/replaceState case due to differences in security checks #6836
For the iframe cases, yes. Although maybe we shouldn't block on #6836. For the main frame case, it's still blocked on ongoing discussions for the refactoring effort for now, hopefully we'll reach a conclusion that's easy to spec, somewhat compatible with other browsers, and not break existing sites :) |
OK, great. Let's put this on hold until those discussions conclude as to what the best path forward is for the window open cases. I think we should have some tentative resolution on #6836 before finalizing this, but we don't have to have it fixed in all browsers. |
OK, so per #6491 (comment) I think it's time to resurrect this, as Chrome has figured out the last remaining blockers and is proceeding with implementing this. Contrary to some of my earlier claims, per the tests Firefox and Safari do not always replace the initial about:blank document today. (They pass 46/88 and 65/88 of the tests, respectively.) So this would be a requested behavior change for them too. @annevk @hsivonen, does this seem like a reasonable path? I'm pretty excited about it, as it cleans up a tricky area of poor interop, by going with a very simple and elegant solution. |
Sorry about deferring the review for so long; this issue turned out to be about something substantially different from what I expected it to be about. I don't have an informed opinion on how the history should behave here. Perhaps @smaug---- does. (How history behaves at least used to be incidentally sensitive to a large number of Gecko-only tests, so having WPTs that test a specific proven-Web-compatible behavior would be great for the purpose of sorting out that incidental test expectations outside WPT. My problem when I looked at this a decade ago was that I didn't know what was incidental and what was essential about the Gecko-only tests.) My views about
|
Thanks and sorry for the late reply also!
|
That seems kind of bad, as that's important coverage... do you have any more insight into why they're timing out? Is it a wpt.fyi-specific problem? |
Oh, sorry - what I said was kinda ambiguous. What I meant was not the tests that opens With removing the Firefox passes 49/85. The failing tests are:
Safari passes 69/85. The failing tests are:
So Safari's behavior is pretty much similar to Chrome except with some cases with specific navigation methods, while Firefox failures looks like things that should be fixed anyways? |
It still seems like the But yeah, removing those (since it's probably a separate bug) was helpful for the analysis of how close everyone is to the spec. So thanks for doing that. IMO we should proceed with this! @annevk, care to give us the green checkmark? |
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.
I asked @smaug---- to take a look as well, but I think it is okay if Chrome ships this.
There's a "the the" in the commit message you want to fix before landing.
Previously, the caller of the navigate algorithm would (usually) check for the browsing context still being on the initial about:blank Document, and if so, switch its history handling to "replace". However, a few call sites missed this: e.g., following hyperlinks or window.open() when they were targeted at an existing browsing context.
This change instead centralizes the the conversion of "default" navigations into "replace" navigations for the initial about:blank Document.
This also fixes a minor bug where the conversion of "default" into "replace" navigations for same-URL fragment navigations was not taking place correctly, due to the check being located after the fragment navigation step.
Closes #6491.
(See WHATWG Working Mode: Changes for more details.)
/browsers.html ( diff )
/browsing-the-web.html ( diff )
/form-control-infrastructure.html ( diff )
/history.html ( diff )
/iframe-embed-object.html ( diff )
/links.html ( diff )
/window-object.html ( diff )