From c0d331675b8afae34873da3f08a63e861a7b785b Mon Sep 17 00:00:00 2001 From: Botond Ballo Date: Wed, 30 Jul 2014 15:11:20 -0400 Subject: [PATCH] Bug 1046013 - Fix APZ hit testing when root APZC is overscrolled and has siblings. r=kats --HG-- extra : rebase_source : a2a0e143c70b3d8c2188ca281d2372d969d8c06b --- gfx/layers/apz/src/APZCTreeManager.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gfx/layers/apz/src/APZCTreeManager.cpp b/gfx/layers/apz/src/APZCTreeManager.cpp index 82de0f3010b..1d7c84c5d77 100644 --- a/gfx/layers/apz/src/APZCTreeManager.cpp +++ b/gfx/layers/apz/src/APZCTreeManager.cpp @@ -1026,7 +1026,9 @@ APZCTreeManager::GetTargetAPZC(const ScreenPoint& aPoint, bool* aOutInOverscroll bool inOverscrolledApzc = false; for (AsyncPanZoomController* apzc = mRootApzc; apzc; apzc = apzc->GetPrevSibling()) { target = GetAPZCAtPoint(apzc, point, &inOverscrolledApzc); - if (target) { + // If we hit an overscrolled APZC, 'target' will be nullptr but it's still + // a hit so we don't search further siblings. + if (target || inOverscrolledApzc) { break; } }