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

Issue 2482983003: Reland: [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
Reviewers:
kkhorimoto
CC:
chromium-reviews, mac-reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Reland: [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 Review-Url: https://codereview.chromium.org/2470913007 Cr-Commit-Position: refs/heads/master@{#430435} (cherry picked from commit 44dc0832429cf6754c254739d4939382e5ee3b71) Committed: https://crrev.com/56ef246026d69de2002f0068c64fb54000207bce Cr-Commit-Position: refs/heads/master@{#430672}

Patch Set 1 : Original CL #

Patch Set 2 : Fix #

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

Messages

Total messages: 8 (3 generated)
Eugene But (OOO till 7-30)
https://codereview.chromium.org/2482983003/diff/20001/ios/web/navigation/crw_session_controller.mm File ios/web/navigation/crw_session_controller.mm (right): https://codereview.chromium.org/2482983003/diff/20001/ios/web/navigation/crw_session_controller.mm#newcode887 ios/web/navigation/crw_session_controller.mm:887: return (transition & ui::PAGE_TRANSITION_IS_REDIRECT_MASK) ? YES : NO; https://google.github.io/styleguide/objcguide.xml#BOOL_Pitfalls
4 years, 1 month ago (2016-11-08 04:03:01 UTC) #2
kkhorimoto
lgtm
4 years, 1 month ago (2016-11-08 18:19:21 UTC) #3
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/2482983003/20001
4 years, 1 month ago (2016-11-08 18:37:40 UTC) #5
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 1 month ago (2016-11-08 18:47:59 UTC) #6
commit-bot: I haz the power
4 years, 1 month ago (2016-11-08 19:08:42 UTC) #8
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/56ef246026d69de2002f0068c64fb54000207bce
Cr-Commit-Position: refs/heads/master@{#430672}

Powered by Google App Engine
This is Rietveld 408576698