Make FlexLayout inherit LayoutManagerBase.
As a proof of concept for the separation of layout generation and application, this CL reimplements FlexLayout using GetProposedLayout(), with significant code savings. The new layout has almost the same programming interface, and passes all existing unit tests. (Note that this also removes some of the explicit caching in FlexLayout but it can always be added back in later if we determine it's needed.) For more information on the separation, see this upstream CL: https://chromium-review.googlesource.com/c/chromium/src/+/1653898 And this design doc (internal only for now): https://docs.google.com/document/d/1fZOg120fswUdaV7tfZh8cXIlcvAL1Gg70GVrsQVXl3g/edit Next steps: - (optional) Expand FlexLayout with some features that make it friendlier to use, especially in interpolating layouts. - Implement AnimatingLayout (extending LayoutManager) with basic layout animations, analogous to those supported by Cocoa's Core Animation library. - Move toolbar, bookmarks, and tab handles to an animating layout. Follow-ups: - Combine LayoutManager and LayoutManagerBase - Update Box, Grid, and Fill layouts - Ensure other one-off layouts work with the new framework Change-Id: I1bbd739e1b2f5e45d92c8d3a38473319c4b6806f Bug: 898632 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1656249 Commit-Queue: Dana Fried <dfried@chromium.org> Reviewed-by:Scott Violet <sky@chromium.org> Cr-Commit-Position: refs/heads/master@{#676086}
Showing
This diff is collapsed.
Please register or sign in to comment