Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(126)

Issue 2470913007: [ios] Refactored back-forward navigation in CRWSessionController. (Closed)

Created:
4 years, 1 month ago by Eugene But (OOO till 7-30)
Modified:
4 years, 1 month ago
CC:
chromium-reviews, mac-reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[ios] Refactored back-forward navigation in CRWSessionController. Notable changes: - Added public -[CRWSessionController indexOfEntryForDelta:] which will be used in future BF navigation refactorings (crbug.com/661858). This API will allow to tell the future navigation index w/o making an actual navigation and pass that future entry to |isSameDocumentNavigationBetweenEntry:andEntry:| call. - Made goDelta: no-op if delta is out of bounds. This make CRWSessionController implementation better conform to w3 spec: https://www.w3.org/TR/html5/browsers.html#the-history-interface - Added public canGoDelta: API and use it in canGoBack/canGoForward. - goBack and goForward now implemented by calling goDelta:-1 and goDelta:1. This way the implementation is more efficient (no extra calls of |discardNonCommittedEntries| and |discardTransientEntry|) and cleaner. - Do not change previousNavigationIndex if navigation did not happen. - Added more unit tests. Further cleanups (like reusing indexOfEntryForDelta: and isRedirectTransitionForEntryAtIndex:) will be done in separate CLs. BUG=661820 Committed: https://crrev.com/44dc0832429cf6754c254739d4939382e5ee3b71 Cr-Commit-Position: refs/heads/master@{#430435}

Patch Set 1 #

Patch Set 2 : Self review #

Total comments: 6

Patch Set 3 : Addressed review comments #

Total comments: 2

Patch Set 4 : Use NSNotFound #

Total comments: 5

Patch Set 5 : Fixed typos #

Unified diffs Side-by-side diffs Delta from patch set Stats (+309 lines, -80 lines) Patch
M ios/web/navigation/crw_session_controller.h View 1 2 2 chunks +6 lines, -0 lines 0 comments Download
M ios/web/navigation/crw_session_controller.mm View 1 2 3 4 chunks +79 lines, -79 lines 0 comments Download
M ios/web/navigation/crw_session_controller_unittest.mm View 1 2 3 4 14 chunks +224 lines, -1 line 0 comments Download

Dependent Patchsets:

Messages

Total messages: 28 (16 generated)
Eugene But (OOO till 7-30)
4 years, 1 month ago (2016-11-03 20:23:04 UTC) #5
kkhorimoto
https://codereview.chromium.org/2470913007/diff/20001/ios/web/navigation/crw_session_controller.h File ios/web/navigation/crw_session_controller.h (right): https://codereview.chromium.org/2470913007/diff/20001/ios/web/navigation/crw_session_controller.h#newcode159 ios/web/navigation/crw_session_controller.h:159: // specified |delta| skipping redirect navigation items. The index ...
4 years, 1 month ago (2016-11-03 22:12:19 UTC) #6
Eugene But (OOO till 7-30)
PTAL https://codereview.chromium.org/2470913007/diff/20001/ios/web/navigation/crw_session_controller.h File ios/web/navigation/crw_session_controller.h (right): https://codereview.chromium.org/2470913007/diff/20001/ios/web/navigation/crw_session_controller.h#newcode159 ios/web/navigation/crw_session_controller.h:159: // specified |delta| skipping redirect navigation items. The ...
4 years, 1 month ago (2016-11-03 22:50:21 UTC) #8
kkhorimoto
lgtm https://codereview.chromium.org/2470913007/diff/40001/ios/web/navigation/crw_session_controller.mm File ios/web/navigation/crw_session_controller.mm (right): https://codereview.chromium.org/2470913007/diff/40001/ios/web/navigation/crw_session_controller.mm#newcode826 ios/web/navigation/crw_session_controller.mm:826: return NSIntegerMax; Great, this is much clearer now. ...
4 years, 1 month ago (2016-11-04 00:45:20 UTC) #12
Eugene But (OOO till 7-30)
Thanks, Kurt! Rohit, can you take a look? https://codereview.chromium.org/2470913007/diff/40001/ios/web/navigation/crw_session_controller.mm File ios/web/navigation/crw_session_controller.mm (right): https://codereview.chromium.org/2470913007/diff/40001/ios/web/navigation/crw_session_controller.mm#newcode826 ios/web/navigation/crw_session_controller.mm:826: return ...
4 years, 1 month ago (2016-11-04 01:39:35 UTC) #14
Eugene But (OOO till 7-30)
Rohit?
4 years, 1 month ago (2016-11-07 15:07:25 UTC) #15
rohitrao (ping after 24h)
lgtm Based on the tests, it sounds like there are no functional changes in this ...
4 years, 1 month ago (2016-11-07 21:28:00 UTC) #16
Eugene But (OOO till 7-30)
Thanks! > Based on the tests, it sounds like there are no functional changes in ...
4 years, 1 month ago (2016-11-07 22:01:18 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2470913007/80001
4 years, 1 month ago (2016-11-07 23:30:47 UTC) #23
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 1 month ago (2016-11-08 00:14:26 UTC) #25
commit-bot: I haz the power
Patchset 5 (id:??) landed as https://crrev.com/44dc0832429cf6754c254739d4939382e5ee3b71 Cr-Commit-Position: refs/heads/master@{#430435}
4 years, 1 month ago (2016-11-08 00:33:18 UTC) #27
Eugene But (OOO till 7-30)
4 years, 1 month ago (2016-11-08 03:40:18 UTC) #28
Message was sent while issue was closed.
A revert of this CL (patchset #5 id:80001) has been created in
https://codereview.chromium.org/2488553004/ by eugenebut@chromium.org.

The reason for reverting is: GoDelta test fails on 32-bit platform.

Powered by Google App Engine
This is Rietveld 408576698