Skip to content

Commit

Permalink
Bug 1776157 - Don't force chrome frames to be opaque. r=dholbert
Browse files Browse the repository at this point in the history
It causes unnecessary flashes in some cases, like the sidebar which
intentionally loads about:blank.

Differential Revision: https://phabricator.services.mozilla.com/D150096
  • Loading branch information
emilio committed Jun 24, 2022
1 parent 231999a commit 5fd43ea
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions layout/base/PresShell.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5fd43ea

Please sign in to comment.