Closed Bug 1996361 Opened 10 months ago Closed 10 months ago

theme.getCurrent() returns wrong values for themes utilizing dark_theme manifest key

Categories

(WebExtensions :: Themes, defect)

Firefox 145
defect

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1435216

People

(Reporter: faridzelli, Unassigned)

Details

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:145.0) Gecko/20100101 Firefox/145.0

Steps to reproduce:

  1. Enable the firefox-alpenglow theme.
  2. Examine the output of theme.getCurrent().
    Below is an extension for reference:
async function getCurrentThemeInfo() {
    const themeInfo = await browser.theme.getCurrent();
    console.log("Full theme info:", themeInfo);
    if (themeInfo.colors) {
      console.log(`Toolbar color: ${themeInfo.colors.toolbar}`);
      console.log(`Icons color: ${themeInfo.colors.icons}`);
    }
}
getCurrentThemeInfo();

Actual results:

  • theme.getCurrent().colors.icons returns null for firefox-alpenglow
  • theme.getCurrent().colors.icons returns correct values for firefox-compact-light and firefox-compact-dark

Expected results:

Alpenglow’s manifest defines both a "theme" and a "dark_theme". When the dark theme is active, theme.getCurrent().colors.icons should return the value defined in the "dark_theme" object of the manifest, rather than null. The "dark_theme" key is poorly documented and has not been referenced in the MDN docs despite its use in a default theme.

The Bugbug bot thinks this bug should belong to the 'Core::Widget: Gtk' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Widget: Gtk
Product: Firefox → Core

(In reply to Farid Zellipour from comment #0)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:145.0) Gecko/20100101 Firefox/145.0

Steps to reproduce:

  1. Enable the firefox-alpenglow theme.

Important note: System theme must be set to dark, otherwise the light theme is used and returned values will be correct.

Component: Widget: Gtk → Themes
Product: Core → WebExtensions
Status: UNCONFIRMED → RESOLVED
Closed: 10 months ago
Duplicate of bug: 1435216
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.