
In some cases the navigation url and virtual url are different and the url is a non HTTP(S) url (e.g. open downloaded PDF in tab, the url is file:// but the virtual url is chrome://downloads), there is a problem that the virtual url is dropped in the cases: 1. The url is forced to be set to virtual url 2. The virtual url is dropped because the url is not the same as the real url read from the native session and the whole navigation item is dropped. This CL removes the restriction of not restoring the url and virtual url for a non HTTP(S) url to fix the issue above. Based on current implementation of session restoration: 1. Construct a new NavigationItem from the native session(WKBackForwardListItem). 2. Restore newly constructed items from restored items if the URL is the same. Otherwise use the newly constructed items as navigation items. So the restored navigation item url has nothing to do with whether the url is HTTP or not, the real navigation item will always be constructed from native session. Bug: 389729375 Change-Id: I40b28679bdd6077845cbc7b4121d6c66fe5d328a Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6171952 Reviewed-by: Sylvain Defresne <sdefresne@chromium.org> Commit-Queue: Zengfeng Ye <zenye@microsoft.com> Cr-Commit-Position: refs/heads/main@{#1407083}
Chromium
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
To check out the source code locally, don't use git clone
! Instead,
follow the instructions on how to get the code.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure.
For historical reasons, there are some small top level directories. Now the guidance is that new top level directories are for product (e.g. Chrome, Android WebView, Ash). Even if these products have multiple executables, the code should be in subdirectories of the product.
If you found a bug, please file it at https://crbug.com/new.