• Philip Rogers's avatar
    Paint non-fast scrollable regions for plugins with wheel handlers · 741f20e9
    Philip Rogers authored
    Non-fast scrollable regions are regions on a cc::Layer where the
    compositor should not handle scroll events. These are primarily for non-
    composited scrollers but are also used for resize controls and plugins.
    This patch paints non-fast scrollable regions for plugins that have
    blocking wheel event handlers. A design doc for this approach of
    painting non-fast scrollable regions is at:
    https://docs.google.com/document/d/1IyYJ6bVF7KZq96b_s5NrAzGtVoBXn_LQnya9y4yT3iw/view#heading=h.rrlzkp4v3huj
    
    This patch shares the pattern used by non-composited scrollers of
    emitting ScrollHitTestDisplayItems. ScrollHitTestDisplayItem has a field
    for supporting both scrolling (kScrollHitTest) and non-scrolling
    (kPluginScrollHitTest) usecases. This field was required because it will
    be possible to have two ScrollHitTestDisplayItems for one scroller: one
    for non-composited scrolling, and a second for a resizer.
    
    ScrollingCoordinatorTest::NonFastScrollableRegionsForPlugins is the
    interesting new test. It shows that PaintNonFastScrollableRegions
    matches the current behavior for non-fixed plugins, and shows that fixed
    plugin non-fast regions are now painted in a different layer. Painting
    the fixed non-fast region into the fixed layer fixes a bug where the
    non-fast regions would not be updated after compositor changes such as
    scrolling.
    
    Bug: 864567
    Change-Id: If72e084241d1684e54d4c02e5d1efc04d91cc858
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1729551Reviewed-by: default avatarDavid Bokan <bokan@chromium.org>
    Commit-Queue: Philip Rogers <pdr@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#683165}
    741f20e9
TestExpectations 588 KB