You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[flex] Avoid overflow of flexbox with non-zero flex-factors.
Lets say we have three-items with flex-factors of A, B, C.
Previously in flexbox we divided up the free-space within LineFlexer
(effectively) by performing:
- A/(A+B+C)
- B/(A+B+C)
- C/(A+B+C)
This approach can lead to overflow/underflow of the flexing which isn't
ideal.
Instead we can iteratively reduce the free-space within the loop, and
multiply by the what share each item should receive of the *remaining*
free-space. E.g.
- C/(A+B+C)
- B/(A+B)
- A/(A)
This means that there isn't any overflow/underflow of the free-space.
Fixed: 40804774
Change-Id: I1c8e311c6e80deebd3735eae439a71e720877545
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7139011
Auto-Submit: Ian Kilpatrick <[email protected]>
Reviewed-by: Ian Kilpatrick <[email protected]>
Reviewed-by: David Grogan <[email protected]>
Commit-Queue: Ian Kilpatrick <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1543117}
0 commit comments