зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1266154 - Don't start a scroll snap animation if we're already at the destination. r=kats
MozReview-Commit-ID: EP7s414NQ4K --HG-- extra : rebase_source : 3f57b46f1e23c69f1efd7039fada2b8c60cd7f4b extra : amend_source : 580e1a95597e6c9fe56e3b655f52c7817e391df2
This commit is contained in:
Родитель
7944d5a17f
Коммит
188c04fbd0
|
@ -3966,7 +3966,9 @@ Maybe<CSSPoint> AsyncPanZoomController::FindSnapPointNear(
|
|||
void AsyncPanZoomController::ScrollSnapNear(const CSSPoint& aDestination) {
|
||||
if (Maybe<CSSPoint> snapPoint =
|
||||
FindSnapPointNear(aDestination, nsIScrollableFrame::DEVICE_PIXELS)) {
|
||||
SmoothScrollTo(*snapPoint);
|
||||
if (*snapPoint != mFrameMetrics.GetScrollOffset()) {
|
||||
SmoothScrollTo(*snapPoint);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче