Revert "[ios] Changes Bookmark cache to use Table row instead of offset"
This reverts commit 7f98222a. Reason for revert: Suspected of causing BookmarksTestCase/testCachePositionIsRecreated to fail. https://ci.chromium.org/p/chromium/builders/luci.chromium.ci/ios-uirefresh-simulator/2187 Original change's description: > [ios] Changes Bookmark cache to use Table row instead of offset > > Bookmarks caches the tableView scroll offset, so whenever > bookmarks is closed and re-opened, we maintain the scroll offset > and the user is in the same position as before dismissal. > > As part of supporting dynamic type on Bookmarks this approach is > no longer valid since: > -The row height might change due to the size of the font. > -The row height is not calculated unless the cell is dequeued, > this means that when the content offset is set to the cached value > (when re-oppening Bookmarks) the position offset is correct, but > the content being displayed are not. This happens because the cells > that weren't displayed when setting the offset manually used the > estimatedRowHeight instead of their real height. This messes up the > cache value. > > In order to support dynamic height/type this CL changes the cache > so it stores the tableView row instead of the tableView scroll > offset. It also updates the pref values so they store an int instead > of a double. > > It also deletes BookmarkHomeSharedState cellHeightPt and updates > the estimatedRowHeight value to 65. > > This CL doesn't introduce dynamic height yet, that will be done in > a follow up CL. > > Bug: 869671 > Cq-Include-Trybots: luci.chromium.try:ios-simulator-cronet;luci.chromium.try:ios-simulator-full-configs > Change-Id: I6cd5f8baa8b385d3045ab5e9d0ff54a9d8202b63 > Reviewed-on: https://chromium-review.googlesource.com/1157684 > Commit-Queue: Sergio Collazos <sczs@chromium.org> > Reviewed-by: Kurt Horimoto <kkhorimoto@chromium.org> > Reviewed-by: Mark Cogan <marq@chromium.org> > Cr-Commit-Position: refs/heads/master@{#587821} TBR=marq@chromium.org,kkhorimoto@chromium.org,sczs@chromium.org Change-Id: I14635c3f977857714a76feefae6535d8df0cf35b No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: 869671 Cq-Include-Trybots: luci.chromium.try:ios-simulator-cronet;luci.chromium.try:ios-simulator-full-configs Reviewed-on: https://chromium-review.googlesource.com/1198647Reviewed-by:calamity <calamity@chromium.org> Commit-Queue: calamity <calamity@chromium.org> Cr-Commit-Position: refs/heads/master@{#587948}
Showing
Please register or sign in to comment