Understand why NavigationManagerImpl::GetPendingItemIndex returns CurrentItemIndex |
||||||||
Issue descriptionLooking at content::NavigationController could explain what GetPendingItemIndex should do.
,
Jan 17 2017
Thanks Olivier! GetPendingItemIndex() is only used in IOSLiveTab and IOSChromeSyncedTabDelegate, but I don't know what will happen if we fix GetPendingItemIndex() to return correct value :(.
,
Mar 21 2017
I'll investigate this one.
,
May 30 2017
,
Jul 10 2017
,
Jul 11 2017
,
Aug 1 2017
I dug into this a bit today because it'll allow me to move GetVisibleItem() implementation from CRWSessionController to NavigationManagerImpl. Based on the history of NavigationManagerImpl and CRWSessionController, it looks like returning current index may be a result of NavigationManagerImpl::GetPendingEntryIndex() predating existence of pendingEntryIndex concept in CRWSessionManager. I don't know how to look up downstream history so I don't know why GetPendingEntryIndex() was introduced. But since it predated pendingEntryIndex in CRWSessionController, returning currentNavigationIndex may have been the most feasible option at the time. Would running through ios-simulator-eg@ tests be sufficient to sanity check the effect of fixing GetPendingItemIndex()?
,
Aug 1 2017
I think we have to audit every call of GetPendingItemIndex() to understand if the change is safe. WFIW, I looked into one call place and |GetPendingEntryIndex| call was not even useful (https://codereview.chromium.org/2762363002/patch/1/10001). Running ios-simulator-eg@ will not guarantee the change safety, because our EG test suite does not have many navigation tests.
,
Oct 5
,
Jan 15
|
||||||||
►
Sign in to add a comment |
||||||||
Comment 1 by olivierrobin@chromium.org
, Jan 16 2017