Closed Bug 1771047 Opened 3 years ago Closed 3 years ago

Page becomes white when uBlock Origin element zapper is engaged

Categories

(Core :: Layout, defect)

Firefox 102
x86_64
Linux
defect

Tracking

()

RESOLVED MOVED
Tracking Status
firefox-esr91 --- unaffected
firefox100 --- unaffected
firefox101 --- unaffected
firefox102 --- affected

People

(Reporter: gregp, Unassigned)

References

(Regression, )

Details

(Keywords: regression)

Attachments

(4 files)

Attached video zapper.webm

Steps to reproduce:

  1. Navigate to about:preferences > Website appearance
  2. Set "Website appearance" to "Dark"
  3. Navigate to https://addons.mozilla.org/firefox/addon/ublock-origin/
  4. Install "uBlock Origin"
  5. Navigate to https://bugzilla.mozilla.org/home
  6. Open uBlock Origin browserAction
  7. Enter element zapper mode

Actual results:
Page becomes white

Expected result:
There is a slight tint over the page

Set release status flags based on info from the regressing bug 1738380

:emilio, since you are the author of the regressor, bug 1738380, could you take a look?
For more information, please visit auto_nag documentation.

Flags: needinfo?(emilio)

Testing on macOS with dark mode on, uBlock origin seems to inject an iframe with this style: color-scheme: initial, and the document in the iframe:

  • doesn't have a color-scheme meta tag or CSS property;
  • uses a dark theme, with class names on the root element looking like desktop hidpi zap dark.

Testing in Chrome, it looks like the uBlock Origin extension for Chrome uses the same code and generates an iframe with the same properties, but in Chrome the generated iframe is transparent.

Here's a reduced test case that shows a transparent iframe in Chrome (101.0.4951.64) and an opaque one in Firefox Nightly (2022-05-24):

<html>
<head>
  <meta name="color-scheme" content="dark">
</head>
<body style="background-color: purple">
  White text with purple background
  <iframe
    src="data:text/html,%3Cbody%20style%3D%22background-color%3A%23ff04%22%3EBlack%20text%20with%2050%20percent%20opacity%20yellow%20background%3C%2Fbody%3E"
    style="position: fixed; inset: 10%; width: 80%; height: 80%; border: none; color-scheme: initial;"
  ></iframe>  
</body>
</html>

Behavior in Chrome Canary is the same as Firefox's. I believe this is a Chrome / uBlock issue. I'll send a patch to the extension.

Status: NEW → RESOLVED
Closed: 3 years ago
Flags: needinfo?(emilio)
Resolution: --- → INVALID
Resolution: INVALID → MOVED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: