• Morten Stenshorne's avatar
    [LayoutNG] Update scrollbar sizes after layout. · eefd9868
    Morten Stenshorne authored
    At least when using mock scrollbars from web tests (and maybe there are
    real use cases too?), NeedsScrollbarReconstruction() will return true
    after layout, which will make us remove the current scrollbars. Legacy
    layout will re-lay out and eventually end up with updating the scrollbar
    rectangles. NG cannot re-lay out from
    PaintLayerScrollableArea::UpdateAfterLayout() like legacy does, but we
    do need to update the scrollbar rectangles anyway. NG has its own
    scrollbar size change detection mechanism, but in this particular case,
    the scrollbars would have the exact same size with the default skin and
    with the mock scrollbars, so no change would be detected, and there'd be
    no re-layout, and no call to UpdateScrollDimensions().
    
    Without this fix, scrollbars/rtl/overflow-scroll-rtl.html
    would fail with
    https://chromium-review.googlesource.com/c/chromium/src/+/1297367
    
    Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng
    Change-Id: I15e159e0c26ab9fe8469ae8ad2c0af0dabe7417b
    Reviewed-on: https://chromium-review.googlesource.com/c/1309741Reviewed-by: default avatarStefan Zager <szager@chromium.org>
    Reviewed-by: default avatarAleks Totic <atotic@chromium.org>
    Reviewed-by: default avatarChristian Biesinger <cbiesinger@chromium.org>
    Commit-Queue: Morten Stenshorne <mstensho@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#605116}
    eefd9868
mock-scrollbars-expected.html 465 Bytes