Chromium Code Reviews| Index: ios/web/navigation/crw_session_controller.mm |
| diff --git a/ios/web/navigation/crw_session_controller.mm b/ios/web/navigation/crw_session_controller.mm |
| index 58d095a83c8377d39736ad1162c309865a44a407..06491e1c7f1f56a2e1ef89fdd7befb7a88b68e2e 100644 |
| --- a/ios/web/navigation/crw_session_controller.mm |
| +++ b/ios/web/navigation/crw_session_controller.mm |
| @@ -202,6 +202,16 @@ initiationType:(web::NavigationInitiationType)initiationType; |
| - (web::NavigationItemList)backwardItems { |
| web::NavigationItemList items; |
| + |
| + // Under normal circumstances, |visibleItem| is |lastCommittedItem| so |
| + // backward history consists of all entries that precede |lastCommittedItem|. |
| + // However, if the visible navigation item is a transient or uncommitted |
|
Eugene But (OOO till 7-30)
2017/04/25 05:49:01
Do we need to include pending item into backwardIt
danyao
2017/04/25 16:31:20
I don't think pendingItem should be included in th
Eugene But (OOO till 7-30)
2017/04/25 20:44:40
Sorry, I incorrectly phrased my question, I meant
Eugene But (OOO till 7-30)
2017/04/25 21:23:10
I think this code would be correct, unless I'm mis
|
| + // pending item, an example being safe browsing warning interstitials, all |
|
Eugene But (OOO till 7-30)
2017/04/25 05:49:01
s/safe browsing warning/SSL
Unlike other platform
danyao
2017/04/25 16:31:20
Done.
|
| + // committed items should be considered part of the backward history. |
| + if (self.visibleItem != self.lastCommittedItem) { |
| + items.push_back(self.items[_lastCommittedItemIndex].get()); |
|
Eugene But (OOO till 7-30)
2017/04/25 05:49:01
We probably should not include redirect item. Woul
danyao
2017/04/25 16:31:20
The current behavior (starting line 215) is to inc
Eugene But (OOO till 7-30)
2017/04/25 20:44:40
You are right. Please ignore me.
|
| + } |
| + |
| for (size_t index = _lastCommittedItemIndex; index > 0; --index) { |
| if (![self isRedirectTransitionForItemAtIndex:index]) |
| items.push_back(self.items[index - 1].get()); |