From 5358043005598da7251ff673493de0017dce2544 Mon Sep 17 00:00:00 2001 From: sotaro Date: Tue, 9 Nov 2021 22:58:10 +0000 Subject: [PATCH] Bug 1739930 - Disable CompositorSession in popup parent widget r=gfx-reviewers,bradwerth From nsDocumentViewer::ShouldAttachToTopLevel(), content rendering of popup is always done by child widget. Differential Revision: https://phabricator.services.mozilla.com/D130714 --- widget/windows/nsWindow.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/widget/windows/nsWindow.cpp b/widget/windows/nsWindow.cpp index 201f519673a1..43221a55dd39 100644 --- a/widget/windows/nsWindow.cpp +++ b/widget/windows/nsWindow.cpp @@ -7361,6 +7361,13 @@ bool nsWindow::ShouldUseOffMainThreadCompositing() { return false; } + // Content rendering of popup is always done by child window. + // See nsDocumentViewer::ShouldAttachToTopLevel(). + if (mWindowType == eWindowType_popup && !mIsChildWindow) { + MOZ_ASSERT(!mParent); + return false; + } + return nsBaseWidget::ShouldUseOffMainThreadCompositing(); }