Commit 01191ed1 authored by Mark Cogan's avatar Mark Cogan Committed by Commit Bot

[iOS] Fix white flicker in iPad tab grid transitions.

Exiting the tab grid on iPad, especially for tabs close to the top of the screen, shows a white flicker in the toolbar area of the tab.

This is due to the fade in/fade out of the grid cell header and the toolbar snapshot, which transitions through a state where the header is totally white. The timing is such that this can happen right when the top of the tab is in position, making for a distinct flash in the toolbar.

This CL fixes this by using a crossfade instead of the fade in/ fade out. The transition is fast enough that the crossfade doesn't look muddy, and it remove the abrupt flash.

Bug: 865440
Cq-Include-Trybots: luci.chromium.try:ios-simulator-full-configs;master.tryserver.chromium.mac:ios-simulator-cronet
Change-Id: Ifbceef6a79cbde4ea08c76b6f7e6a35bd8225330
Reviewed-on: https://chromium-review.googlesource.com/1158832
Commit-Queue: edchin <edchin@chromium.org>
Reviewed-by: default avataredchin <edchin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#579888}
parent 6d378be6
...@@ -284,10 +284,12 @@ CGFloat DeviceCornerRadius() { ...@@ -284,10 +284,12 @@ CGFloat DeviceCornerRadius() {
// B: Crossfade the top views. // B: Crossfade the top views.
auto fadeOutAuxilliaryAnimation = auto fadeOutAuxilliaryAnimation =
[self keyframeAnimationFadingView:activeCell.topCellView [self keyframeAnimationWithRelativeStart:0
throughToView:activeCell.topTabView relativeDuration:briefDuration
relativeStart:0 animations:^{
relativeDuration:briefDuration]; activeCell.topCellView.alpha = 0;
activeCell.topTabView.alpha = 1.0;
}];
UIViewPropertyAnimator* fadeOutAuxilliary = [[UIViewPropertyAnimator alloc] UIViewPropertyAnimator* fadeOutAuxilliary = [[UIViewPropertyAnimator alloc]
initWithDuration:self.duration initWithDuration:self.duration
curve:UIViewAnimationCurveEaseInOut curve:UIViewAnimationCurveEaseInOut
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment