DevTools: Generate paths to draw flex lines and items in the flex overlay
The approach taken here is one where we attempt to determine the flex lines without making changes to the flex implementation. The information about flex lines is not kept by the implementation, and one way would be to keep it when devtools need it. However, it seems feasible to determine this from devtools code directly, so this is what we're trying here. The way this works is: - iterate through items in the main direction - if an item's margin box starts before the previous item's margin box ends, then it belongs to a new flex line - we build lines in a way that they are always as big as necessary to contain all of their items in the cross direction, and we make them as big as the container in the main direction. Front-end CL: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2507790 Bug: 1139949 Change-Id: I6a385124f35d503ebae7f31cf36ebbf42beede20 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2514073Reviewed-by:Christian Biesinger <cbiesinger@chromium.org> Reviewed-by:
Andrey Kosyakov <caseq@chromium.org> Commit-Queue: Patrick Brosset <patrick.brosset@microsoft.com> Cr-Commit-Position: refs/heads/master@{#826253}
Showing
Please register or sign in to comment