Closed Bug 2058525 Opened 3 months ago Closed 3 months ago

Inconsistent color scheme between context menu and its submenu

Categories

(Firefox :: Theme, defect, P1)

Firefox 154
defect

Tracking

()

RESOLVED FIXED
155 Branch
Tracking Status
firefox-esr140 --- unaffected
firefox-esr153 --- unaffected
firefox153 --- unaffected
firefox154 --- fixed
firefox155 --- fixed

People

(Reporter: 6k64x4ma, Assigned: dao)

References

(Regression)

Details

(Keywords: regression)

Attachments

(2 files, 2 external files)

Attached image image.webp —

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:154.0) Gecko/20100101 Firefox/154.0

Steps to reproduce:

  1. Go to about:preferences#appearance and select the Light color scheme.
  2. Go to about:addons and select the "System theme — auto".
  3. Open a new private window.
  4. Right-click the content area and hover the cursor over "Ask an AI Chatbot".

Actual results:

The context menu uses the light color scheme, but its submenu uses the dark color scheme.

Expected results:

Context menu and its submenu should use the same color scheme.

Regression window:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=a10b5deeb37991bb1ffe41f88949283a13fcc3f8&tochange=d9a81773f05eff9310475ba28c594bc976547165

Regressed by bug 2048186.

Component: Untriaged → Theme
Keywords: regression
Regressed by: 2048186

:dao, since you are the author of the regressor, bug 2048186, could you take a look? Also, could you set the severity field?

For more information, please visit BugBot documentation.

Flags: needinfo?(dao+bmo)

The same thing happens with a combination of a dark color scheme and a non-private window.

Summary: Inconsistent color scheme between context menu and its submenu in Private Window → Inconsistent color scheme between context menu and its submenu

Can confirm, I use the firefox-compact-dark@mozilla.org color theme to keep the UI of the browser dark, but set the "Website appearance" preference in about:preferences#appearance to light to keep all websites in light mode. I think the context menu is part of the "browser UI" so it should be consistent with the color theme, instead of the appearance of websites. This is a regression and I think it should be reverted.

Assignee: nobody → dao+bmo
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Flags: needinfo?(dao+bmo)

The generic popup rule sets color-scheme on every popup, submenus included, so
a popup that narrows its scheme couldn't pass that on: the content context
menu follows content's preferred color scheme, but its submenus fell back to
the chrome scheme, which can be the opposite one.

Popups whose parent doesn't narrow the scheme are unaffected, since inheriting
there resolves to the same light dark.

:dao what is the severity on this? wondering if worth tracking for 154 or not

Flags: needinfo?(dao+bmo)

Would be nice to fix in 154 but not critical imho.

Severity: -- → S3
Flags: needinfo?(dao+bmo)
Priority: -- → P1

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

Pushed by dgottwald@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/d5678f682f3a https://hg.mozilla.org/integration/autoland/rev/8ef10be6afe3 Make submenus inherit the color scheme of their parent popup. r=emilio,desktop-theme-reviewers

May I ask which way the color of the context menu is aligning to? Is it that after the fix the context menu and its sub-menus will all be controlled by the value of about:preferences#appearance (aka. layout.css.prefers-color-scheme.content-override), or controlled by the color theme of the browser (old behavior before version 154)?

(In reply to Mike Lei from comment #9)

May I ask which way the color of the context menu is aligning to? Is it that after the fix the context menu and its sub-menus will all be controlled by the value of about:preferences#appearance (aka. layout.css.prefers-color-scheme.content-override), or controlled by the color theme of the browser (old behavior before version 154)?

It's controlled by the content color scheme from about:preferences.

Status: ASSIGNED → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → 155 Branch

The patch landed in nightly and beta is affected.
:dao, is this bug important enough to require an uplift?

For more information, please visit BugBot documentation.

Flags: needinfo?(dao+bmo)

The generic popup rule sets color-scheme on every popup, submenus included, so
a popup that narrows its scheme couldn't pass that on: the content context
menu follows content's preferred color scheme, but its submenus fell back to
the chrome scheme, which can be the opposite one.

Popups whose parent doesn't narrow the scheme are unaffected, since inheriting
there resolves to the same light dark.

Original Revision: https://phabricator.services.mozilla.com/D316919

Attachment #9624342 - Flags: approval-mozilla-beta?

firefox-beta Uplift Approval Request

  • User impact if declined/Reason for urgency: see https://bugzilla.mozilla.org/show_bug.cgi?id=2058525#c0
  • Code covered by automated testing?: yes
  • Fix verified in Nightly?: no
  • Needs manual QE testing?: no
  • Steps to reproduce for manual QE testing:
  • Risk associated with taking this patch: low
  • Explanation of risk level: Trivial CSS-only fix with automated test
  • String changes made/needed?: none
  • Is Android affected?: no
Attachment #9624342 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Flags: needinfo?(dao+bmo)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: