mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 05:41:12 +00:00
Bug 1250213 - Ensure the scroll offset does not go outside the page bounds when going full screen r=kats
This commit is contained in:
parent
ec65f12dd8
commit
565a35d4d5
@ -2684,7 +2684,10 @@ void AsyncPanZoomController::AdjustScrollForSurfaceShift(const ScreenPoint& aShi
|
||||
/ mFrameMetrics.GetZoom();
|
||||
APZC_LOG("%p adjusting scroll position by %s for surface shift\n",
|
||||
this, Stringify(adjustment).c_str());
|
||||
mFrameMetrics.ScrollBy(adjustment);
|
||||
CSSPoint scrollOffset = mFrameMetrics.GetScrollOffset();
|
||||
scrollOffset.y = mY.ClampOriginToScrollableRect(scrollOffset.y + adjustment.y);
|
||||
scrollOffset.x = mX.ClampOriginToScrollableRect(scrollOffset.x + adjustment.x);
|
||||
mFrameMetrics.SetScrollOffset(scrollOffset);
|
||||
ScheduleCompositeAndMaybeRepaint();
|
||||
UpdateSharedCompositorFrameMetrics();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user