From 5fd43eaab3bb98ed249771d961c2dbe132bcf2b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Fri, 24 Jun 2022 00:04:18 +0000 Subject: [PATCH] Bug 1776157 - Don't force chrome frames to be opaque. r=dholbert It causes unnecessary flashes in some cases, like the sidebar which intentionally loads about:blank. Differential Revision: https://phabricator.services.mozilla.com/D150096 --- layout/base/PresShell.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/layout/base/PresShell.cpp b/layout/base/PresShell.cpp index a1e4175de5eaf..8cd1cee03620a 100644 --- a/layout/base/PresShell.cpp +++ b/layout/base/PresShell.cpp @@ -5378,6 +5378,9 @@ void PresShell::AddCanvasBackgroundColorItem( bool PresShell::IsTransparentContainerElement() const { nsPresContext* pc = GetPresContext(); if (!pc->IsRootContentDocumentCrossProcess()) { + if (pc->IsChrome()) { + return true; + } // Frames are transparent except if their embedder color-scheme is // mismatched, in which case we use an opaque background to avoid // black-on-black or white-on-white text, see