• bokan's avatar
    Fix viewport scroll bubbling of wheel events in CC. · 74efa339
    bokan authored
    The "LocalDelta" version of ScrollLayer in LTHI takes a scroll delta in
    viewport space and scrolls a layer in its local space. This means that
    the delta is scaled so that the scroll appears to be the same distance
    on the user's screen, regardless of the page scale factor (pinch-zoom).
    This method returns the amount consumed so that the caller can determine
    how much of the original scroll delta remains to bubble. However, the
    returned consumed delta is in local space, meaning we were subtracting a
    layer space delta from the viewport space delta.
    
    The practical effect of this was that when the page was scaled up the
    bubbling logic in the viewport would inappropriately bubble up scrolls to
    the inner (visual) viewport since the local delta is divided by the page
    scale factor. This caused position:fixed elements to "paralax" scroll
    with the page, cool looking but incorrect.
    
    BUG=488549
    
    Review URL: https://codereview.chromium.org/1143233003
    
    Cr-Commit-Position: refs/heads/master@{#330786}
    74efa339
layer_tree_host_impl.cc 125 KB