Chromium Code Reviews
DescriptionReland: [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
Messages
Total messages: 8 (3 generated)
|
|||||||||||||||||||||||||||||||||||||