Bug 1516056 - Adjust ScrollToRestorePosition() to reflect that the layout scroll offset is clamped to the layout viewport. r=tnikkel

Depends on D20282

Differential Revision: https://phabricator.services.mozilla.com/D20283

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Botond Ballo 2019-04-08 23:35:25 +00:00
Родитель 622ce7af9e
Коммит 6d57b2e7cd
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -4450,7 +4450,7 @@ void ScrollFrameHelper::ScrollToRestoredPosition() {
// Note that we can't do the clamping when initializing mRestorePos in
// RestoreState(), since the scrollable rect (which the clamping depends
// on) can change over the course of the restoration process.
nsPoint layoutRestorePos = GetScrollRange().ClampPoint(mRestorePos);
nsPoint layoutRestorePos = GetLayoutScrollRange().ClampPoint(mRestorePos);
// Continue restoring until both the layout and visual scroll positions
// reach the destination. (Note that the two can only be different for