| Index: ios/web/web_state/ui/crw_web_controller.mm
|
| diff --git a/ios/web/web_state/ui/crw_web_controller.mm b/ios/web/web_state/ui/crw_web_controller.mm
|
| index 22cf74091cb87c39d1f71c1955b0a191eea77c05..b08853eabb5849c1b0d164fb126dd5db04d28b66 100644
|
| --- a/ios/web/web_state/ui/crw_web_controller.mm
|
| +++ b/ios/web/web_state/ui/crw_web_controller.mm
|
| @@ -1520,18 +1520,11 @@
|
| // Typically on PAGE_TRANSITION_CLIENT_REDIRECT.
|
| [[self sessionController] updatePendingItem:requestURL];
|
| } else {
|
| - // If this is a reload then there no need to create a new pending item,
|
| - // instead update the pending item to the last committed item.
|
| - if (PageTransitionCoreTypeIs(transition, ui::PAGE_TRANSITION_RELOAD)) {
|
| - self.sessionController.pendingItemIndex =
|
| - self.sessionController.lastCommittedItemIndex;
|
| - } else {
|
| - // A new session history entry needs to be created.
|
| - self.navigationManagerImpl->AddPendingItem(
|
| - requestURL, referrer, transition,
|
| - web::NavigationInitiationType::RENDERER_INITIATED,
|
| - web::NavigationManager::UserAgentOverrideOption::INHERIT);
|
| - }
|
| + // A new session history entry needs to be created.
|
| + self.navigationManagerImpl->AddPendingItem(
|
| + requestURL, referrer, transition,
|
| + web::NavigationInitiationType::RENDERER_INITIATED,
|
| + web::NavigationManager::UserAgentOverrideOption::INHERIT);
|
| }
|
| std::unique_ptr<web::NavigationContextImpl> context =
|
| web::NavigationContextImpl::CreateNavigationContext(
|
| @@ -1986,11 +1979,6 @@
|
| BOOL isChromeScheme =
|
| web::GetWebClient()->IsAppSpecificURL(currentNavigationURL);
|
|
|
| - // Since this is implicit reload, no new pending item should be created, set
|
| - // the pending item index to the last committed item.
|
| - self.sessionController.pendingItemIndex =
|
| - self.sessionController.lastCommittedItemIndex;
|
| -
|
| // Don't immediately load the web page if in overlay mode. Always load if
|
| // native.
|
| if (isChromeScheme || !_overlayPreviewMode) {
|
| @@ -2032,10 +2020,6 @@
|
| _lastUserInteraction.reset();
|
| base::RecordAction(UserMetricsAction("Reload"));
|
| GURL url = self.currentNavItem->GetURL();
|
| - // Reloading shouldn't create create a new pending item, instead set the
|
| - // pending item index to the last committed item.
|
| - self.sessionController.pendingItemIndex =
|
| - self.sessionController.lastCommittedItemIndex;
|
| if ([self shouldLoadURLInNativeView:url]) {
|
| std::unique_ptr<web::NavigationContextImpl> navigationContext = [self
|
| registerLoadRequestForURL:url
|
|
|