[iOS] Fix toolbar container progress logic.
The previous implementation of ToolbarContainer scaled each toolbar's interpolation progress at the same rate, resulting in accordion-like behavior where all toolbars were expanded and collapsed at the same time. The desired effect is to have telescopic behavior, where the toolbars are extended one at a time. This is needed on iPad, where a scroll event should first reduce the height of the tab strip to 0.0 before reducing the height of the primary toolbar. This CL adds logic to convert the [0.0, 1.0] fullscreen progress range for the overall stack to individual progress values for each toolbar, such that the last toolbar is expanded first, and the previous toolbars don't start expanding until all subsequent ones are fully expanded. The range of stack-level progress values corresponding to a particular toolbar is proportional to that toolbar's height delta relative to the height delta of the overall stack. In addition, this CL also introduces HeightRange, a simple container object that can be used to hold max and min heights and perform interpolation calculations. Bug: 880672, 895766 Cq-Include-Trybots: luci.chromium.try:ios-simulator-cronet;luci.chromium.try:ios-simulator-full-configs Change-Id: I1205ec75ac3e9a0e57dc19d1ebcc1f1740f8aeac Reviewed-on: https://chromium-review.googlesource.com/c/1231933 Commit-Queue: Kurt Horimoto <kkhorimoto@chromium.org> Reviewed-by:Gauthier Ambard <gambard@chromium.org> Cr-Commit-Position: refs/heads/master@{#600903}
Showing
This diff is collapsed.
This diff is collapsed.
Please register or sign in to comment