Poor contrast in extension popup with color-scheme dark meta tag
Categories
(Firefox :: Theme, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox95 | --- | unaffected |
| firefox96 | --- | verified |
| firefox97 | --- | verified |
People
(Reporter: wofwca, Assigned: emilio)
Details
Attachments
(6 files)
|
26.24 KB,
image/png
|
Details | |
|
652 bytes,
application/x-zip-compressed
|
Details | |
|
48 bytes,
text/x-phabricator-request
|
diannaS
:
approval-mozilla-beta+
|
Details | Review |
|
48 bytes,
text/x-phabricator-request
|
diannaS
:
approval-mozilla-beta+
|
Details | Review |
|
48 bytes,
text/x-phabricator-request
|
diannaS
:
approval-mozilla-beta+
|
Details | Review |
|
48 bytes,
text/x-phabricator-request
|
diannaS
:
approval-mozilla-beta+
|
Details | Review |
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.45 Safari/537.36
Steps to reproduce:
- Set the browser theme to a dark one (
about:addons). - Make an extension with a popup with no CSS and with
<meta name="color-scheme" content="dark light"> - Install the extension
- Open the popup
Actual results:
The background of the popup is light, but the text is also light.
Expected results:
The background is dark and the text is light.
May be a regression caused by https://bugzilla.mozilla.org/show_bug.cgi?id=1525107 (or related stuff, like https://bugzilla.mozilla.org/show_bug.cgi?id=1738616). Prior to these changes (e.g. see 95.0) popups used to be always fully light-themed, regardless of the browser theme.
Similar bugs:
https://bugzilla.mozilla.org/show_bug.cgi?id=1701792
https://bugzilla.mozilla.org/show_bug.cgi?id=1739042
Comment 3•4 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Firefox::Theme' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.
Comment 4•4 years ago
|
||
Managed to reproduce this issue on macOS 11.6, Windows 10 x64 and on Ubuntu 20.04 x64 on Firefox Nightly 97.0a1 and on Firefox 96.0b2.
| Assignee | ||
Updated•4 years ago
|
| Assignee | ||
Updated•4 years ago
|
| Assignee | ||
Comment 5•4 years ago
|
||
No behavior change (you can't have an in-process frame container and a
BrowserChild at the same time), but avoids some needless refcounting
overhead and makes it simpler to follow.
| Assignee | ||
Comment 6•4 years ago
|
||
Extensions are using getComputedStyle(body).backgroundColor, which is
wrong at multiple levels.
The one that matters for this bug is that it is not color-scheme aware.
Depends on D133770
| Assignee | ||
Comment 7•4 years ago
|
||
This is drive-by but I hit this assert consistently when running
browser/components/extensions/test/browser/browser_ext_popup_background.js
locally.
The assert was wrong when we're recreating the widget, it is expected that
we've already constructed frames for its contents.
Depends on D133771
| Assignee | ||
Comment 8•4 years ago
|
||
Make popup browsers non-transparent so that we can get a meaningful
canvas background-color from layout. I don't think it matters since
popups are not meaningfully transparent since bug 1449933.
Depends on D133772
| Assignee | ||
Updated•4 years ago
|
Updated•4 years ago
|
Comment 10•4 years ago
|
||
Comment 11•3 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/126d38bfcf30
https://hg.mozilla.org/mozilla-central/rev/ce9483d8d18f
https://hg.mozilla.org/mozilla-central/rev/f02163d0a5e8
https://hg.mozilla.org/mozilla-central/rev/b015d5dbcd90
Comment 12•3 years ago
|
||
The patch landed in nightly and beta is affected.
:emilio, is this bug important enough to require an uplift?
If not please set status_beta to wontfix.
For more information, please visit auto_nag documentation.
| Assignee | ||
Comment 13•3 years ago
|
||
Comment on attachment 9255306 [details]
Bug 1744749 - Use windowUtils.canvasBackgroundColor to get the web extension background. r=#extension-reviewers
Beta/Release Uplift Approval Request
- User impact if declined: Low contrast in some webextension popups, see comment 0
- Is this code covered by automated tests?: Yes
- Has the fix been verified in Nightly?: Yes
- Needs manual test from QE?: Yes
- If yes, steps to reproduce: Install the extension in comment 1.
- List of other uplifts needed: none
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): It changes the way we use to get the popup background in a way that shouldn't effectively change behavior. The only place that would change behavior is if the popup has mismatched backgrounds set on both the
<body>and the<html>element (in which case, before the patch, we chose the former, and now the later).
But in that (unlikely) case the worst case scenario is that the popup background is the root color, which shouldn't cause contrast issue (cosmetic issue at most).
- String changes made/needed: none
| Assignee | ||
Updated•3 years ago
|
Comment 14•3 years ago
|
||
Comment on attachment 9255303 [details]
Bug 1744749 - Clean-up IsTransparentContainerElement. r=#layout-reviewers
Given that we passed the early stage of beta, i'm going to let this ride in 97 instead of taking it as an uplift right now. Feel free to NI me if you feel strongly opposed.
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
| Assignee | ||
Comment 15•3 years ago
|
||
(In reply to Dianna Smith [:diannaS] from comment #14)
Given that we passed the early stage of beta, i'm going to let this ride in 97 instead of taking it as an uplift right now. Feel free to NI me if you feel strongly opposed.
Given the feature that causes the regression was enabled in 96 I think it'd be worth fixing it in beta. I think "Medium" might have been an overstatement for the amount of risk this poses, in practice any issue that the patch could cause would at the very best be purely cosmetic and way less severe than the result without the patch.
Comment 16•3 years ago
|
||
Verified as fixed on Firefox Nightly 97.0a1 (2021-12-20) on Windows 10 x64, macOS 11.6 and on Ubuntu 20.04 x64.
Comment 17•3 years ago
|
||
Comment on attachment 9255303 [details]
Bug 1744749 - Clean-up IsTransparentContainerElement. r=#layout-reviewers
:emilio ok thank you for the explanation. I see that QA verified it as well.
Approved for 96.0b8
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Comment 18•3 years ago
|
||
| bugherder uplift | ||
https://hg.mozilla.org/releases/mozilla-beta/rev/e93ab853c264
https://hg.mozilla.org/releases/mozilla-beta/rev/82ed4d9f0a5c
https://hg.mozilla.org/releases/mozilla-beta/rev/c78e4c21d841
https://hg.mozilla.org/releases/mozilla-beta/rev/85010d5acf5a
Comment 19•3 years ago
|
||
Verified as fixed on Firefox 96.0b8 on Windows 10 x64, macOS 11.6 and on Ubuntu 20.04 x64.
Description
•