Fix APZ not starting and updating wheel animations within an APZC lock. (bug 1152011 part 1, r=botond)

This commit is contained in:
David Anderson 2015-04-12 17:46:59 -07:00
Родитель 005127ebbf
Коммит bbc6241cc7
1 изменённых файлов: 5 добавлений и 0 удалений

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

@ -1538,6 +1538,11 @@ nsEventStatus AsyncPanZoomController::OnScrollWheel(const ScrollWheelInput& aEve
}
case ScrollWheelInput::SCROLLMODE_SMOOTH: {
// The lock must be held across the entire update operation, so the
// compositor doesn't end the animation before we get a chance to
// update it.
ReentrantMonitorAutoEnter lock(mMonitor);
if (mState != WHEEL_SCROLL) {
CancelAnimation();
SetState(WHEEL_SCROLL);