FlexLayout: configure how host view insets and interior margins are used
This CL adds two new ways to specify edge case behavior for FlexLayout that will make some use cases much easier. 1. SetTargetArea(LayoutTargetArea) - specifies whether the host view's insets are treated as inviolable (default and older behavior) or whether they're considered part of the internal margins of the host view for layout purposes. The new (optional) behavior allows certain cases where a child view with internal padding cannot currently get close enough to a host view border, inkdrop, or focus ring. 2. Set[Main|Cross]AxisMarginsPolicy(LayoutMarginPolicy) - specifies whether child margins apply when they abut the edge of the host view. The new (optional) behavior allows much simpler code when spacing between views needs to be different than spacing at the edges of the host view. OPEN QUESTIONS: - Should we just make the new behavior for (1) the default? Bug: 898632 Change-Id: I5d336ed19b32a791f944f8ced615a099a0729802 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1676736 Commit-Queue: Dana Fried <dfried@chromium.org> Reviewed-by:Peter Boström <pbos@chromium.org> Cr-Commit-Position: refs/heads/master@{#683293}
Showing
Please register or sign in to comment