Improve snapshot/content tracking in enter/exit tab switcher transitions |
||||||||
Issue descriptionCurrently, the transition between content snapshots and the in-memory content view doesn't match up nicely and creates a very abrupt finish to the enter/exit tab switcher animations. This happens both for NTPs and tabs with content. (See attached video.) This should be a smooth transition (in both orientations, as much as possible), just like in Safari (minus the flickers seen at 9s and 12s). (See attached video.)
,
Jun 13 2018
,
Jun 13 2018
,
Jun 26 2018
,
Jun 27 2018
,
Jul 2
Issue 841495 has been merged into this issue.
,
Jul 4
,
Jul 10
,
Jul 17
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/602d2720f0c353b05c3f6615b3e78ea1bd5d7255 commit 602d2720f0c353b05c3f6615b3e78ea1bd5d7255 Author: Mark Cogan <marq@google.com> Date: Tue Jul 17 09:19:11 2018 [iOS] Merge tab grid transitions with tab views. This CL updates the tab grid transitions to cleanly match the presented tab views. The basic abstraction for this transition is the GridToTabTransitionView protocol which defines a set of 'cell' and 'tab' views, and methods to lay them out. The general idea is that a view conforming to this protocol can either be in 'cell' mode (where it exactly matches a tab grid cell), or in 'tab' mode (where it exactly matches an open tab). Most of the work is done by the GridTransitionCell subclass of GridCell, which positions and scales the "tab" and "cell" views it is supplied with so they animate smoothly. All of this positioning/scaling logic is internal to that class and nothing else depends on it. Providing the transition cell with the tab views is handled in the transition animator, mostly leveraging the content area layout guide. This doesn't require any direct integration with the tab view (that is, the BVC) beyond that layout guide. Approaches I abandoned: - letting -layoutSubviews position the tab/grid views. The problem with this approach (which is much cleaner from an API perspective) is that the timing of the layout passes is unpredictable, it it resulted in changes being made that weren't fully animated (for example, subviews would be scaled and positioned without animation, and then the superview would scale with an animation). - using layout constraints for GridTransitionCell's tab views. This is probably the correct thing to do long-term; mostly this was a decision made under time constraints, but since ultimately animating constraint changes depends on -layoutSubviews being called at the right times, I did have some concerns given the difficulties described above. It's unfortunate that grid_cell.mm is mixing constraint- and frame-based layout, but it is confined to that single file. Bug: 851460 , 850507 , 862343 Cq-Include-Trybots: luci.chromium.try:ios-simulator-full-configs;master.tryserver.chromium.mac:ios-simulator-cronet Change-Id: If6d55f14aa05e705143547b61773fdb34796ad2d Reviewed-on: https://chromium-review.googlesource.com/1136647 Commit-Queue: Mark Cogan <marq@chromium.org> Reviewed-by: Gauthier Ambard <gambard@chromium.org> Cr-Commit-Position: refs/heads/master@{#575590} [modify] https://crrev.com/602d2720f0c353b05c3f6615b3e78ea1bd5d7255/ios/chrome/browser/ui/tab_grid/grid/grid_cell.mm [modify] https://crrev.com/602d2720f0c353b05c3f6615b3e78ea1bd5d7255/ios/chrome/browser/ui/tab_grid/tab_grid_view_controller.mm [modify] https://crrev.com/602d2720f0c353b05c3f6615b3e78ea1bd5d7255/ios/chrome/browser/ui/tab_grid/transitions/grid_to_tab_transition_view.h [modify] https://crrev.com/602d2720f0c353b05c3f6615b3e78ea1bd5d7255/ios/chrome/browser/ui/tab_grid/transitions/grid_to_visible_tab_animator.mm [modify] https://crrev.com/602d2720f0c353b05c3f6615b3e78ea1bd5d7255/ios/chrome/browser/ui/tab_grid/transitions/grid_transition_animation.mm [modify] https://crrev.com/602d2720f0c353b05c3f6615b3e78ea1bd5d7255/ios/chrome/browser/ui/tab_grid/transitions/grid_transition_layout.h [modify] https://crrev.com/602d2720f0c353b05c3f6615b3e78ea1bd5d7255/ios/chrome/browser/ui/tab_grid/transitions/grid_transition_layout.mm [modify] https://crrev.com/602d2720f0c353b05c3f6615b3e78ea1bd5d7255/ios/chrome/browser/ui/tab_grid/transitions/tab_to_grid_animator.mm
,
Jul 17
,
Jul 17
|
||||||||
►
Sign in to add a comment |
||||||||
Comment 1 by marq@chromium.org
, Jun 12 2018