• Peter Kasting's avatar
    Clean up computations of line height. · 53a34fdb
    Peter Kasting authored
    Returning the font's height is a saner default for TypographyProvider.
    
    Having Label track the user-set line height separately from the computed
    result simplifies GetLineHeight() callers and fixes at least one bug
    where the caller (reasonably) assumed GetLineHeight() would always be
    large enough for the font height.
    
    StyledLabel gets similar changes, but more simplifications since what
    used to be GetDefaultLineHeight() is now moved into GetLineHeight(), and
    GetDefaultFontList()/GetFontListForRange() have been combined into a
    sindly GetFontList().  These changes fix the layout of the
    DownloadItemViews, which also assumed that GetLineHeight() was large
    enough for the font height.
    
    Bug: 1109611
    TBR: antrim
    Change-Id: I635a4bba3813a872b66123a5ed701bc4aebbedf9
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2324496Reviewed-by: default avatarPeter Kasting <pkasting@chromium.org>
    Reviewed-by: default avatarScott Violet <sky@chromium.org>
    Commit-Queue: Peter Kasting <pkasting@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#792765}
    53a34fdb
label.h 18.1 KB