mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-23 02:05:42 +00:00
Bug 1211506 - Respect the APZ lock ordering in AsyncPanZoomController::OnScrollWheel(). r=mstange
--HG-- extra : source : af0360acd0fa65d7bd526339212a909884afa40c
This commit is contained in:
parent
f948623c75
commit
e235e119a9
@ -1667,12 +1667,9 @@ nsEventStatus AsyncPanZoomController::OnScrollWheel(const ScrollWheelInput& aEve
|
||||
|
||||
switch (aEvent.mScrollMode) {
|
||||
case ScrollWheelInput::SCROLLMODE_INSTANT: {
|
||||
// Call ToScreenCoordinates outside the lock because it grabs the tree lock.
|
||||
ScreenPoint distance = ToScreenCoordinates(
|
||||
ParentLayerPoint(fabs(delta.x), fabs(delta.y)), aEvent.mLocalOrigin);
|
||||
|
||||
ReentrantMonitorAutoEnter lock(mMonitor);
|
||||
|
||||
CancelAnimation();
|
||||
SetState(WHEEL_SCROLL);
|
||||
|
||||
@ -1685,6 +1682,10 @@ nsEventStatus AsyncPanZoomController::OnScrollWheel(const ScrollWheelInput& aEve
|
||||
CallDispatchScroll(startPoint, endPoint, handoffState);
|
||||
|
||||
SetState(NOTHING);
|
||||
|
||||
// The calls above handle their own locking; moreover,
|
||||
// ToScreenCoordinates() and CallDispatchScroll() can grab the tree lock.
|
||||
ReentrantMonitorAutoEnter lock(mMonitor);
|
||||
RequestContentRepaint();
|
||||
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user