Closed Bug 1706852 Opened 4 years ago Closed 2 years ago

zoom changes should make us reclamp the visual scroll offset

Categories

(Core :: Panning and Zooming, defect, P3)

defect

Tracking

()

RESOLVED DUPLICATE of bug 1805601

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.

https://searchfox.org/mozilla-central/rev/08013752b4638f01d41d2a38ca7bd741bc572c86/gfx/layers/apz/src/AsyncPanZoomController.cpp#5035

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.

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.

Severity: -- → S3
Priority: -- → P3

Forward-duping to bug 1805601 where we ran into this exact issue. Guess we should have fixed it sooner!

Status: NEW → RESOLVED
Closed: 2 years ago
Duplicate of bug: 1805601
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.