diff --git a/gfx/layers/apz/src/APZCTreeManager.cpp b/gfx/layers/apz/src/APZCTreeManager.cpp index 7983162f0ed7..a58b6ccb8055 100644 --- a/gfx/layers/apz/src/APZCTreeManager.cpp +++ b/gfx/layers/apz/src/APZCTreeManager.cpp @@ -2588,8 +2588,7 @@ already_AddRefed APZCTreeManager::GetTargetAPZC( if (gfx::gfxVars::UseWebRender()) { target = GetAPZCAtPointWR(aPoint, &hitResult, aOutLayersId, &scrollbarNode); } else { - target = GetAPZCAtPoint(mRootNode, aPoint, &hitResult, aOutLayersId, - &scrollbarNode); + target = GetAPZCAtPoint(aPoint, &hitResult, aOutLayersId, &scrollbarNode); } if (aOutHitResult) { @@ -2778,15 +2777,14 @@ AsyncPanZoomController* APZCTreeManager::GetTargetApzcForNode( } AsyncPanZoomController* APZCTreeManager::GetAPZCAtPoint( - HitTestingTreeNode* aNode, const ScreenPoint& aHitTestPoint, - CompositorHitTestInfo* aOutHitResult, LayersId* aOutLayersId, - HitTestingTreeNode** aOutScrollbarNode) { + const ScreenPoint& aHitTestPoint, CompositorHitTestInfo* aOutHitResult, + LayersId* aOutLayersId, HitTestingTreeNode** aOutScrollbarNode) { mTreeLock.AssertCurrentThreadIn(); // This walks the tree in depth-first, reverse order, so that it encounters // APZCs front-to-back on the screen. HitTestingTreeNode* resultNode; - HitTestingTreeNode* root = aNode; + HitTestingTreeNode* root = mRootNode; std::stack hitTestPoints; ParentLayerPoint point = ViewAs( aHitTestPoint, PixelCastJustification::ScreenIsParentLayerForRoot); diff --git a/gfx/layers/apz/src/APZCTreeManager.h b/gfx/layers/apz/src/APZCTreeManager.h index a0d27af0bdc5..7debefc4addd 100644 --- a/gfx/layers/apz/src/APZCTreeManager.h +++ b/gfx/layers/apz/src/APZCTreeManager.h @@ -615,7 +615,7 @@ class APZCTreeManager : public IAPZCTreeManager, public APZInputBridge { GuidComparator aComparator); AsyncPanZoomController* GetTargetApzcForNode(HitTestingTreeNode* aNode); AsyncPanZoomController* GetAPZCAtPoint( - HitTestingTreeNode* aNode, const ScreenPoint& aHitTestPoint, + const ScreenPoint& aHitTestPoint, gfx::CompositorHitTestInfo* aOutHitResult, LayersId* aOutLayersId, HitTestingTreeNode** aOutScrollbarNode); already_AddRefed GetAPZCAtPointWR(