Skip to content
  • bokan's avatar
    [Reland] Implement overlay scrollbar fade out for non-composited scrollers. · eb757fdb
    bokan authored
    In crrev.com/2442573002 and crrev.com/2453553003 I added fade out for Aura
    overlay scrollbars. In this patch I add a simple instantly disappearing
    fade-out for scrollers that aren't composited.
    
    The changes in this patch are:
    
    -Plumb through the fade out durations into Blink. Any time a ScrollableArea is
    scrolled or resized we show the scrollbars and start a timer to make them
    disappear. The scrollbars are marked as "hidden" and made disabled and invisible
    to hit testing.
    
    -Fixed hit testing for overlay scrollbars so we can't scroll by clicking on the
    track (which isn't painted).
    
    -Fixed two layout tests:
      third_party/WebKit/LayoutTests/fast/scrolling/scrollbar-tickmarks-hittest.html
      overlay-scrollbar-mouse-capture.html
      These tests turn on overlay scrollbars but try to scroll by clicking a
      button/track which I fixed. The tests now drag the thumb instead.
    
    -In crrev.com/2453553003 I added didChangeScrollbarsHidden to disable overlay
    scrollbars so they're invisible to hit testing. It turns out Mac overlay
    scrollbars already have this functionality in
    ScrollableArea::scrollbarVisibilityChanged and
    Scrollbar::shouldParticipateInHitTesting so I removed didChangeScrollbarsHidden
    and used these. I also removed some redundancy in the Mac path so that Mac and
    Aura overlays disable hit testing in the same way.
    
    -Removed the static compile assert about ScrollableArea staying small. There's
    no reason ScrollableArea is particularily special and this encourages
    developers to duplicate functionality in the descendant classes.
    
    BUG=592098, 662402
    CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
    
    Committed: https://crrev.com/4430234f2f5f52efe60ad2b8e6608112352259da
    Committed: https://crrev.com/60d2bbbc8fa4cce01bbd90c97d3e989a47d6dedf
    Review-Url: https://codereview.chromium.org/2467693002
    Cr-Original-Original-Commit-Position: refs/heads/master@{#429616}
    Cr-Original-Commit-Position: refs/heads/master@{#430065}
    Cr-Commit-Position: refs/heads/master@{#431466}
    eb757fdb