Bug 1931798. Only check for apz listeners when building compositor hit test info. r=gfx-reviewers,nical

The info that we get from the check is only used for compositor hit test info and it takes a decent amount of time to check.

Differential Revision: https://phabricator.services.mozilla.com/D229290
This commit is contained in:
Timothy Nikkel
2024-11-20 08:18:42 +00:00
parent b31e9afd29
commit fe0adb47d6

View File

@@ -467,12 +467,16 @@ void nsSubDocumentFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
visible, dirty);
if (subdocRootFrame) {
bool hasDocumentLevelListenersForApzAwareEvents =
gfxPlatform::AsyncPanZoomEnabled() &&
nsLayoutUtils::HasDocumentLevelListenersForApzAwareEvents(presShell);
if (aBuilder->BuildCompositorHitTestInfo()) {
bool hasDocumentLevelListenersForApzAwareEvents =
gfxPlatform::AsyncPanZoomEnabled() &&
nsLayoutUtils::HasDocumentLevelListenersForApzAwareEvents(
presShell);
aBuilder->SetAncestorHasApzAwareEventHandler(
hasDocumentLevelListenersForApzAwareEvents);
}
aBuilder->SetAncestorHasApzAwareEventHandler(
hasDocumentLevelListenersForApzAwareEvents);
subdocRootFrame->BuildDisplayListForStackingContext(aBuilder,
&childItems);
if (!aBuilder->IsForEventDelivery()) {