Bug 1423981 - In the WebRender hit test, fall back to the root APZC if WebRender isn't running. r=kats

MozReview-Commit-ID: CB6yafVfFbG

--HG--
extra : rebase_source : cbde0665fcb2e38e527c150b8d4aa27d3076997c
This commit is contained in:
Botond Ballo 2018-01-09 18:07:54 -05:00
Родитель 0aee939183
Коммит 17ea0e44ec
1 изменённых файлов: 7 добавлений и 0 удалений

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

@ -2258,6 +2258,13 @@ APZCTreeManager::GetAPZCAtPointWR(const ScreenPoint& aHitTestPoint,
RefPtr<AsyncPanZoomController> result;
RefPtr<wr::WebRenderAPI> wr = GetWebRenderAPI();
if (!wr) {
// If WebRender isn't running, fall back to the root APZC.
// This is mostly for the benefit of GTests which do not
// run a WebRender instance, but gracefully falling back
// here allows those tests which are not specifically
// testing the hit-test algorithm to still work.
result = FindRootApzcForLayersId(mRootLayersId);
*aOutHitResult = CompositorHitTestInfo::eVisibleToHitTest;
return result.forget();
}