Label: Use GetPreferredSize(SizeBounds) in /ash/wm
GetPreferredSize() considers the currently available layout space to be unlimited. However, for some views (eg: label), their preferred size is strongly related to the currently available space, which leads us to need to use GetPreferredSize() + GeHeightForWidth(), which results in two layout calculations. It also resulted in some errors that could not be repaired, eg: 41295639. In the end we chose to use GetPreferredSize(SizeBounds) to solve these problems. There is also the concept of constraint space in Blink LayoutNG. This CL was uploaded by git cl split. R=dandersson@chromium.org, minch@chromium.org Bug: 40232718 Change-Id: I9a3b484e03140b27ce2d903557fc59b8068fc3e2 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5427639 Auto-Submit: Weidong Liu <weidongliu@chromium.org> Reviewed-by:Min Chen <minch@chromium.org> Commit-Queue: Min Chen <minch@chromium.org> Cr-Commit-Position: refs/heads/main@{#1283274}
Loading
Please register or sign in to comment