зеркало из https://github.com/mozilla/gecko-dev.git
Bug 951793 - Obey overscroll-behavior for immediate scroll handoff. r=kats
MozReview-Commit-ID: JPJOK8A1PQ
This commit is contained in:
Родитель
df8a5f5637
Коммит
0f12d12993
|
@ -2893,8 +2893,25 @@ void AsyncPanZoomController::CallDispatchScroll(ParentLayerPoint& aStartPoint,
|
|||
if (!treeManagerLocal) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Obey overscroll-behavior.
|
||||
ParentLayerPoint endPoint = aEndPoint;
|
||||
if (aOverscrollHandoffState.mChainIndex > 0) {
|
||||
RecursiveMutexAutoLock lock(mRecursiveMutex);
|
||||
if (!mX.OverscrollBehaviorAllowsHandoff()) {
|
||||
endPoint.x = aStartPoint.x;
|
||||
}
|
||||
if (!mY.OverscrollBehaviorAllowsHandoff()) {
|
||||
endPoint.y = aStartPoint.y;
|
||||
}
|
||||
if (aStartPoint == endPoint) {
|
||||
// Handoff not allowed in either direction - don't even bother.
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
treeManagerLocal->DispatchScroll(this,
|
||||
aStartPoint, aEndPoint,
|
||||
aStartPoint, endPoint,
|
||||
aOverscrollHandoffState);
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче