DescriptionReland: Ntp: restore scroll position.
* The scroll position is stored as extra data on the NavigationEntry.
* The main use case handled is when the user clicks on a suggested
article and then back to view more suggestions. Maintaining scroll position helps maintain context and flow here.
* It is the RecyclerView Adapter position that is stored and restored, so if the device is rotated in the meantime, scroll restore will still present the same content as long as the underlying data has not changed.
* Because the underlying data is subject to change a few times per day, the scroll position is not persisted. It would be confusing the restore to an old position that now shows different content.
BUG=606356
TBR=clamy,bauerb,tedchoc
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation
Committed: https://crrev.com/22b18a9a6d4f421ddb6d4f74280a571bf7dca4f6
Cr-Commit-Position: refs/heads/master@{#420075}
patch from issue 2327083002 at patchset 160001 (http://crrev.com/2327083002#ps160001)
Committed: https://crrev.com/2c78ced6c8ce46eec8c9f7100b14b3414b7cbc07
Committed: https://crrev.com/5b1519e7304f1a6d2f1c3e50c2d8a933e21f2806
Cr-Original-Commit-Position: refs/heads/master@{#420896}
Cr-Commit-Position: refs/heads/master@{#421223}
Patch Set 1 #Patch Set 2 : Avoid storing NO_POSITION #
Total comments: 2
Patch Set 3 : Do not run Java assert, it really just happens sometimes. #Patch Set 4 : Rebase. #Messages
Total messages: 26 (13 generated)
|