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..275da0fa0448ff13c953bf7bbf7637161362d7e7 100644 |
| --- a/ios/web/navigation/crw_session_controller.mm |
| +++ b/ios/web/navigation/crw_session_controller.mm |
| @@ -202,6 +202,14 @@ initiationType:(web::NavigationInitiationType)initiationType; |
| - (web::NavigationItemList)backwardItems { |
| web::NavigationItemList items; |
| + |
| + // If the current navigation item is a transient item (e.g. SSL interstitial), |
| + // the last committed item should also be considered part of the backward |
| + // history. |
| + if (self.transientItem) { |
| + items.push_back(self.items[_lastCommittedItemIndex].get()); |
|
kkhorimoto
2017/04/26 10:50:37
Optional nit: items.push_back(self.lastCommittedIt
|
| + } |
| + |
| for (size_t index = _lastCommittedItemIndex; index > 0; --index) { |
| if (![self isRedirectTransitionForItemAtIndex:index]) |
| items.push_back(self.items[index - 1].get()); |