Side Swipe animation is broken for New Download Manager |
|||||
Issue descriptionApp Version (from "Chrome Settings > About Chrome"): ToT iOS Version: All Device: iPhone Steps to reproduce: 1.) Enable New Download Manager in chrome://flags 2.) Load https://www.barebones.com/products/bbedit/download.html 3.) Tap Download 4.) Open a new Tab 5.) Side swipe toolbar to switch to the previous tab Observed behavior: Download Manager UI displayed before swipe animation is finished. Expected behavior: Download Manager UI should be displayed after the animation is finished.
,
Mar 7 2018
,
Mar 7 2018
Maybe Sylvain can suggest WebStateList API which I could use for side swipe (see comment #1).
,
Mar 7 2018
Can we pass destinationTab to sideSwipeViewDismissAnimationDidEnd and call setCurrentTab at the end of the animation?
,
Mar 7 2018
Maybe the code can listen to the following event from WebStateListObserver:
void WebStateActivatedAt(WebStateList* web_state_list,
web::WebState* old_web_state,
web::WebState* new_web_state,
int active_index,
int reason);
This is called when switching tabs. Code can use this to know which tab will become hidden/visible. Note that the visibility is probably changed in one of the observer of this method, so should probably not be relied on by the animation code.
Also important, but either old_web_state or new_web_state may be null (when first tab created / last tab closed respectively).
Would this work for you?
,
Mar 7 2018
WebStateActivatedAt is called too early. I guess the solution is hiding WebState before animation is started and showing after the animation is completed. I moved setCurrentTab to animation completion callback. Doing so delays WebStateObserver::WasHidden call, which is not correct, so I added WebState::WasHidden call to compensate that. crrev.com/c/953075
,
Mar 7 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/991b0c246baf4713d4c1d91696d15fdb29658c53 commit 991b0c246baf4713d4c1d91696d15fdb29658c53 Author: Eugene But <eugenebut@google.com> Date: Wed Mar 07 19:44:41 2018 Fix Download Manager UI presentation during side swipe tab switching. crbug.com/819416 was happening, because WebStateObserver::WasShown was called before the animation was completed. This CL moves actual tab switch operation to animation completion block to fix WasShown timing. However it is necessary to send WebStateObserver::WasHidden before animation is started, so this cl adds WebState::WasHidden call if the tab was actually changed. Bug: 819416 Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs Change-Id: Ic45ad02e76674a4bd861fe2626f7d3c32aea3a11 Reviewed-on: https://chromium-review.googlesource.com/953075 Reviewed-by: Justin Cohen <justincohen@chromium.org> Commit-Queue: Eugene But <eugenebut@chromium.org> Cr-Commit-Position: refs/heads/master@{#541533} [modify] https://crrev.com/991b0c246baf4713d4c1d91696d15fdb29658c53/ios/chrome/browser/ui/side_swipe/card_side_swipe_view.mm
,
Mar 7 2018
|
|||||
►
Sign in to add a comment |
|||||
Comment 1 by eugene...@chromium.org
, Mar 7 2018