DescriptionFix viewport scroll bubbling of wheel events in CC.
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
Committed: https://crrev.com/74efa3390f03912d5e734550d50601e096b9480e
Cr-Commit-Position: refs/heads/master@{#330786}
Patch Set 1 #
Messages
Total messages: 10 (4 generated)
|