• Peter Kasting's avatar
    Ensure |is_upper| is initialized when painting scrollbar tracks. · a52c1959
    Peter Kasting authored
    This variable was never written, so we were always reading an uninitialized
    value.  However, the only effect was to toggle between the UPPER and LOWER track
    parts, which AFAIK always look the same.  So I don't think this could have a
    user-visible effect.  Still, it was technically UB.
    
    Fix it the right way by making ScrollBarViews paint the track in upper and lower
    pieces and set the bit correctly for each one.  Thus, if the appearance actually
    differs for any theme out there, this should get it right.
    
    This also copies the parallel-meaning WebThemeEngine |is_back| member, so
    scrollbars painted from that source have the bit set too.
    
    Bug: 374410
    Change-Id: Ib37f54e369f08dd6439d9edb969af13cc02ddf3b
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1790474Reviewed-by: default avatarRobert Liao <robliao@chromium.org>
    Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
    Commit-Queue: Peter Kasting <pkasting@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#694540}
    a52c1959
webthemeengine_impl_default.cc 12.3 KB