[LayoutNG] Only create a constraint space for margins when necessary.
Before creating the constraint space for child layout, we need to calculate the line-left offset for the child. This requires us to calculate the inline margins. If there are no auto inline margins and no special alignment involved, we have everything we need, and can defer fully resolving the margins until right after child layout (when we actually do know the inline size of the child). Only create a temporary constraint space for margin resolution if we need to calculate the inline size of the fragment before layout to calculate the line-left offset. Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng Change-Id: If84e4d6360c537a8c3a662c2617bef9dece7a644 Reviewed-on: https://chromium-review.googlesource.com/c/1286425Reviewed-by:Christian Biesinger <cbiesinger@chromium.org> Reviewed-by:
Ian Kilpatrick <ikilpatrick@chromium.org> Commit-Queue: Morten Stenshorne <mstensho@chromium.org> Cr-Commit-Position: refs/heads/master@{#601868}
Showing
This diff is collapsed.
Please register or sign in to comment