• Dana Fried's avatar
    Multiline label minimum size should respect min line height. · 88494df3
    Dana Fried authored
    Currently, a multiline label will in many cases report a minimum size
    that can be smaller than the appropriate line-height for the text style,
    causing vertical layouts to short the size of the text by a few pixels.
    
    This results in, for example, a visual up-and-down wobble in the
    domain label in a hover card as it animates between tabs, due to the
    changing hover card size. This CL fixes this issue.
    
    Note that except in vertical flex (and possibly box) layouts minimum
    size tends to not be factored in, so this should only affect a handlful
    of situations (and likely produce a better visual result).
    
    Change-Id: Icdc6006b8f51588009b0709773f1854ecf5a6a2e
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1910807
    Commit-Queue: Dana Fried <dfried@chromium.org>
    Reviewed-by: default avatarPeter Kasting <pkasting@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#714548}
    88494df3
label_unittest.cc 51.8 KB