diff --git a/devtools/server/actors/highlighters/utils/markup.js b/devtools/server/actors/highlighters/utils/markup.js index 13f59895ff69..6c17cbec1db2 100644 --- a/devtools/server/actors/highlighters/utils/markup.js +++ b/devtools/server/actors/highlighters/utils/markup.js @@ -62,6 +62,7 @@ const XUL_HIGHLIGHTER_STYLES_SHEET = `data:text/css;charset=utf-8, width: 100%; height: 100%; z-index: 2; + color-scheme: light; }`; const STYLESHEET_URI = @@ -295,6 +296,11 @@ CanvasFrameAnonymousContentHelper.prototype = { if (!this._iframe) { this._iframe = window.document.createElement("iframe"); + // We need the color-scheme shenanigans to ensure that the iframe is + // transparent, see bug 1773155, bug 1738380, and + // https://github.com/mozilla/wg-decisions/issues/774. + this._iframe.srcdoc = + ""; this._iframe.classList.add("devtools-highlighter-renderer"); // If iframe is used for the first time, add ref count of one to its // numberOfHighlighters data attribute.