New issue
Advanced search Search tips

Issue 921097 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jan 17
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: iOS
Pri: 1
Type: Bug



Sign in to add a comment

NavigationContext::HasCommitted returns false for same-document navigations

Project Member Reported by eugene...@chromium.org, Jan 11

Issue description

NavigationContext::HasCommitted suppose to mirror NavigationHandle::HasCommitted, but it's hard to say if NavigationHandle::HasCommitted returns true for same-document navigations. 

The purpose of this bug is to clarify correct behavior in the comments and make sure that NavigationContext::HasCommitted mirrors NavigationHandle::HasCommitted.
 
Cc: clamy@chromium.org
Camille, I think you were initial author of NavigationHandle::HasCommitted. Do you know if NavigationHandle::HasCommitted should return true or false for successful same-document navigations?
Labels: -Pri-2 ReleaseBlock-Stable M-73 Pri-1
This is important to clarify because certain DidFinishNavigation incorrectly assume that HasCommitted returns true for same-document navigations:

 - WebStateTopSitesObserver::DidFinishNavigation (regressed after crrev.com/c/1398442)
 - InfoBarManagerImpl::DidFinishNavigation (regressed in crave.com/c/1396400)
 - VoiceSearchNavigationTabHelper::DidFinishNavigation (regressed after crrev.com/c/1398501)

We should either fix HasCommitted or classes which implement DidFinishNavigation.
It should return true for same-document navigations.
Project Member

Comment 4 by bugdroid1@chromium.org, Jan 16 (6 days ago)

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/07a577facaaef8c190e03e39e9a3606e1eb98574

commit 07a577facaaef8c190e03e39e9a3606e1eb98574
Author: Eugene But <eugenebut@google.com>
Date: Wed Jan 16 21:05:30 2019

Return true from NavigationContext::HasCommitted for same-document navigations.

NavigationHandle::HasCommitted returns true, and NavigationContext should
match API contract of NavigationHandle.

Bug:  921097 
Change-Id: I6c47e196117735c77c7132254db4815ff4c6dc97
Reviewed-on: https://chromium-review.googlesource.com/c/1410179
Reviewed-by: Kurt Horimoto <kkhorimoto@chromium.org>
Commit-Queue: Eugene But <eugenebut@chromium.org>
Cr-Commit-Position: refs/heads/master@{#623361}
[modify] https://crrev.com/07a577facaaef8c190e03e39e9a3606e1eb98574/ios/web/web_state/ui/crw_web_controller.mm
[modify] https://crrev.com/07a577facaaef8c190e03e39e9a3606e1eb98574/ios/web/web_state/web_state_observer_inttest.mm

Project Member

Comment 5 by bugdroid1@chromium.org, Jan 17 (6 days ago)

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8c6ac8bbcd90b65dbaeabb60d97614bb3ef1620f

commit 8c6ac8bbcd90b65dbaeabb60d97614bb3ef1620f
Author: Eugene But <eugenebut@google.com>
Date: Thu Jan 17 00:44:08 2019

Clean up NavigationContext usage in HistoryTabHelper::DidFinishNavigation

Notable changes:
 - Remove IsDownload check, because it's a subset of existing
   HasCommitted check;
 - Update comment related to HasCommitted to mention aborted navigations;
 - Remove IsSameDocument check, because HasCommitted now returns true
   for successful same-document navigations;

Bug:  921097 
Change-Id: I145a24a80f5d853b2ab2da415d822ef64dc94dd3
Reviewed-on: https://chromium-review.googlesource.com/c/1416392
Reviewed-by: Sergio Collazos <sczs@chromium.org>
Commit-Queue: Eugene But <eugenebut@chromium.org>
Cr-Commit-Position: refs/heads/master@{#623463}
[modify] https://crrev.com/8c6ac8bbcd90b65dbaeabb60d97614bb3ef1620f/ios/chrome/browser/history/history_tab_helper.mm

Comment 6 by eugene...@chromium.org, Jan 17 (5 days ago)

Status: Fixed (was: Assigned)

Sign in to add a comment