Animating layout manager can animate bounds in a constrained layout.
Previously, when animating layout manager was set to "animate bounds" mode (see SetShouldAnimateBounds()), it assumed it would always be given enough space for its preferred size at any point in the animation. This CL makes it so that an animation can stop short if the containing view stops granting the animating view more space. This allows a view with an AnimatingLayoutManager to be more easily embedded in a view that has, for example, a FlexLayout layout manager. The primary use case will be capping the size of the account icon container so the account name text is elided when the browser window is too narrow to show the entire text without making the Omnibox too small to effectively use. The current behavior is that when space runs out, the kebab/wrench icon slides off the right side of the window (see attached bug). A follow-up will actually engage this new functionality to fix the problem. Bug: 1012681 Change-Id: Ia8e41bb15776a72a8d0869a3c387703e5e443c83 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1875107 Commit-Queue: Dana Fried <dfried@chromium.org> Reviewed-by:Peter Boström <pbos@chromium.org> Cr-Commit-Position: refs/heads/master@{#709182}
Showing
Please register or sign in to comment