Fix a case where a newly open()ed window incorrectly shows its url as about:blank
This case is specific to when window.open() is used, then the opener write()s into the newly opened document and adds a <meta refresh> tag with the refresh url set to the opener's url. When document.write() is called from another document, the targeted document's url is updated to the caller's url. Therefore, the act of writing the <meta> into the newly opened window causes the opener and the opened window to have the same url. Because the <meta refresh>'s url matches the current one, it is flagged as a reload, rather than as a redirect to a new url. However, the browser process has not seen a commit in the newly opened window, so it gets confused and refuses to update the url for a reload when a reload shouldn't be possible. This CL detects that case and ensures that it is treated as a non-reload navigation, which ensures the state sent to the browser process is coherent. Bug: 1112815 Test: http/tests/history/document-write-meta-refresh-in-opened-window.html Change-Id: Ie665bdf40435728bf6bd4fae5ed8ffda99014800 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2359377 Commit-Queue: Nate Chapin <japhet@chromium.org> Reviewed-by:Daniel Cheng <dcheng@chromium.org> Cr-Commit-Position: refs/heads/master@{#800614}
Showing
Please register or sign in to comment