Commit adebe396 authored by Justin Cohen's avatar Justin Cohen Committed by Commit Bot

[ios/web] Don't overwrite virtual url in didStartProvisionalNavigation.

When correcting the NavigationItem URL, such as a restore targetURL,
don't reset the visible URL. Doing so breaks navigating back to an NTP
by overwriting the NTP's visible URL.

Change-Id: If220cf65ff5bebae72e7a7e42c5ba94beab3e170
Reviewed-on: https://chromium-review.googlesource.com/c/1490056
Commit-Queue: Justin Cohen <justincohen@chromium.org>
Auto-Submit: Justin Cohen <justincohen@chromium.org>
Reviewed-by: default avatarEugene But <eugenebut@chromium.org>
Cr-Commit-Position: refs/heads/master@{#635880}
parent 0a1ef00e
...@@ -4800,7 +4800,6 @@ GURL URLEscapedForHistory(const GURL& url) { ...@@ -4800,7 +4800,6 @@ GURL URLEscapedForHistory(const GURL& url) {
self.navigationManagerImpl, context->GetNavigationItemUniqueID()); self.navigationManagerImpl, context->GetNavigationItemUniqueID());
if (!web::wk_navigation_util::IsWKInternalUrl(webViewURL)) { if (!web::wk_navigation_util::IsWKInternalUrl(webViewURL)) {
if (item) { if (item) {
item->SetVirtualURL(webViewURL);
item->SetURL(webViewURL); item->SetURL(webViewURL);
} }
context->SetUrl(webViewURL); context->SetUrl(webViewURL);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment