tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit fe7d827d99aa45e5ef4d81b35331e58be4a1a5c0
parent 4b9ab67d81cc608a8029323433f5d1374ae8d319
Author: Emilio Cobos Álvarez <emilio@crisal.io>
Date:   Tue,  4 Nov 2025 17:43:08 +0000

Bug 1998218 - Don't go through the view manager to paint in BrowserChild. r=jwatt

This should not be a behavior change because puppet widgets paint
as transparent anyways (see bug 1994908), so if there's no root frame
it's effectively the same as not painting.

Differential Revision: https://phabricator.services.mozilla.com/D271257

Diffstat:
Mdom/ipc/BrowserChild.cpp | 11+++--------
1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/dom/ipc/BrowserChild.cpp b/dom/ipc/BrowserChild.cpp @@ -118,7 +118,6 @@ #include "nsThreadManager.h" #include "nsThreadUtils.h" #include "nsVariant.h" -#include "nsViewManager.h" #include "nsWebBrowser.h" #include "nsWindowWatcher.h" @@ -3064,13 +3063,9 @@ mozilla::ipc::IPCResult BrowserChild::RecvRenderLayers(const bool& aEnabled) { presShell->SuppressDisplayport(true); if (nsContentUtils::IsSafeToRunScript()) { WebWidget()->PaintNowIfNeeded(); - } else { - RefPtr<nsViewManager> vm = presShell->GetViewManager(); - if (nsView* view = vm->GetRootView()) { - presShell->PaintAndRequestComposite( - view->GetFrame(), view->GetWidget()->GetWindowRenderer(), - PaintFlags::None); - } + } else if (nsIFrame* root = presShell->GetRootFrame()) { + presShell->PaintAndRequestComposite( + root, mPuppetWidget->GetWindowRenderer(), PaintFlags::None); } presShell->SuppressDisplayport(false); return IPC_OK();