zoom changes should make us reclamp the visual scroll offset
Categories
(Core :: Panning and Zooming, defect, P3)
Tracking
()
People
(Reporter: tnikkel, Unassigned)
Details
In AsyncPanZoomController::NotifyLayersUpdated we set needToReclampScroll = true if the scrollable rect changes or the composition size changes because either of those changing may mean the scroll offset we have may no longer be in bounds.
Our scroll offset being valid means that it is within the scroll range. The scroll range is |scrollableRect - CalculateCompositedSizeInCssPixels()| = |scrollableRect - mCompositionBounds.Size() / GetZoom()|. So zoom changing could also change whether our scroll offset is valid, so we should reclamp if it changes. Unless I'm missing something.
I just noticed this while working on something else, so I don't know if it causes any problems, just filing so it is on the record and known.
Comment 1•4 years ago
|
||
Agreed. This is likely an oversight that's hard to notice because typically things that change the zoom level (zoom animation, pinch-zooming) change the scroll offset as well, but not necessarily.
Comment 2•2 years ago
|
||
Forward-duping to bug 1805601 where we ran into this exact issue. Guess we should have fixed it sooner!
Description
•