From a03a2dc866777817c1f91311fb83c85adb4ff81e Mon Sep 17 00:00:00 2001 From: Kartikaya Gupta Date: Fri, 19 Jul 2019 16:30:25 +0000 Subject: [PATCH] Bug 1563622 - Check the ftdc flag when hit-testing with WR. r=botond Differential Revision: https://phabricator.services.mozilla.com/D37314 --HG-- extra : moz-landing-system : lando --- gfx/layers/apz/src/APZCTreeManager.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/gfx/layers/apz/src/APZCTreeManager.cpp b/gfx/layers/apz/src/APZCTreeManager.cpp index 558b2e561f0a..83c6b2c8a791 100644 --- a/gfx/layers/apz/src/APZCTreeManager.cpp +++ b/gfx/layers/apz/src/APZCTreeManager.cpp @@ -2597,7 +2597,16 @@ already_AddRefed APZCTreeManager::GetAPZCAtPointWR( if (aOutLayersId) { *aOutLayersId = layersId; } - result = GetTargetAPZC(layersId, scrollId); + ScrollableLayerGuid guid{layersId, 0, scrollId}; + if (RefPtr node = + GetTargetNode(guid, &GuidComparatorIgnoringPresShell)) { + MOZ_ASSERT(node->GetApzc()); // any node returned must have an APZC + result = node->GetApzc(); + EventRegionsOverride flags = node->GetEventRegionsOverride(); + if (flags & EventRegionsOverride::ForceDispatchToContent) { + hitInfo += CompositorHitTestFlags::eApzAwareListeners; + } + } if (!result) { // It falls back to the root MOZ_ASSERT(scrollId == ScrollableLayerGuid::NULL_SCROLL_ID);