Bug 1316673 - Respect the scroll destination when doing asynchronous scrollIntoView. r=kats

MozReview-Commit-ID: 6sLjxUc9Df1

--HG--
extra : rebase_source : d884f2766379dfc3e2d4152f75c61b4bbc40fd72
extra : histedit_source : c374a841635442801c5403644c3db5c6bd164cb0
This commit is contained in:
Markus Stange 2016-11-10 14:32:12 -05:00
Родитель 3994547b42
Коммит b5d327f9be
1 изменённых файлов: 1 добавлений и 1 удалений

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

@ -3563,7 +3563,7 @@ PresShell::ScrollFrameRectIntoView(nsIFrame* aFrame,
}
ScrollToShowRect(sf, targetRect - sf->GetScrolledFrame()->GetPosition(),
aVertical, aHorizontal, aFlags);
nsPoint newPosition = sf->GetScrollPosition();
nsPoint newPosition = sf->LastScrollDestination();
// If the scroll position increased, that means our content moved up,
// so our rect's offset should decrease
rect += oldPosition - newPosition;