Closed Bug 2057938 Opened 1 month ago Closed 25 days ago

browser_ext_themes_toolbar_fields_focus.js fails when browser.nova.enabled is true

Categories

(WebExtensions :: General, defect, P1)

defect

Tracking

(firefox155 verified)

VERIFIED FIXED
155 Branch
Tracking Status
firefox155 --- verified

People

(Reporter: aryx, Assigned: adw)

References

(Blocks 3 open bugs)

Details

(Whiteboard: [sng])

Attachments

(1 file)

Skip rules added:

  "os == 'linux' && os_version == '24.04' && arch == 'x86_64' && opt && nova",
  "os == 'win' && os_version == '11.26200' && arch == 'x86_64' && opt && nova",

Skipping test in general.

Summary: browser_ext_themes_toolbar_fields_focus.js fails on Linux 24.04 and Windows when browser.nova.enabled is true → browser_ext_themes_toolbar_fields_focus.js fails when browser.nova.enabled is true

I can reproduce this locally, and it seems the same as one of the issues previously highlighted in Bug 2054492:

The following tweaks applied to the urlbar-searchbar.css does prevent the failure (and the test passes on Nova and non-Nova builds):

diff --git a/browser/themes/shared/urlbar-searchbar.css b/browser/themes/shared/urlbar-searchbar.css
index 44c3dfe31747..d38e254c062e 100644
--- a/browser/themes/shared/urlbar-searchbar.css
+++ b/browser/themes/shared/urlbar-searchbar.css
@@ -86,7 +86,7 @@
   --urlbar-background-box-shadow-breakout-compact: none;
   --urlbar-background-inset-breakout: calc(var(--urlbar-min-height) / 2 - var(--urlbarview-border-radius));
   --urlbar-background-inset-breakout-compact: 0;
-  --urlbar-background-outline-focused: none;
+  --urlbar-background-outline-focused: var(--focus-outline-width) solid var(--toolbar-field-border-color-focus);
   --urlbar-input-container-border: var(--urlbar-input-container-border-width) solid var(--toolbar-field-border-color);
   --urlbar-input-container-outline-breakout: var(--urlbar-input-container-border-width-breakout) solid var(--toolbar-field-border-color);
   --urlbar-input-container-outline-breakout-focused: var(--urlbar-input-container-border-width-breakout) solid var(--focus-outline-color);
@@ -105,7 +105,6 @@
     /* We want the focus outline with the theme's border-color when focused.
        --toolbar-field-border-color-focus is set equal to --focus-outline-color
        on :root, but LWT themes can override this value. */
-    --urlbar-background-outline-focused: var(--focus-outline-width) solid var(--toolbar-field-border-color-focus);
     --urlbar-input-container-border: var(--urlbar-input-container-border-width) solid transparent;
     --urlbar-input-container-outline-breakout: none;
     --urlbar-input-container-outline-breakout-focused: none;

(which is part of what https://phabricator.services.mozilla.com/D305352 draft originally attached to Bug 2054492 was also pointing to).

Hi :adw, would you mind to take a look into this and what was left from Bug 2054492 to prevent this failure and be able to re-enable this test?

Flags: needinfo?(adw)
See Also: → 2054492

This does seem to be a problem in the implementation rather than the test needing to be updated.

Assignee: nobody → adw
Status: NEW → ASSIGNED
Flags: needinfo?(adw)
Whiteboard: [sng]
Depends on: 2053381
  • Replace uses of --focus-outline-color with --toolbar-field-border-color-focus,
    including the legacy search bar's outline (browser.search.widget.new = false)

  • Update the test so it checks the border rather than the outline when Nova is
    enabled, since bug 2053381 changed the focus ring from an outline to a border
    in Nova when the view is closed

No longer blocks: nova-urlbar-input

Actually let's leave this blocking nova-urlbar-input too since it's a real problem in the implementation.

Pushed by dgottwald@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/46cc84554fb4 https://hg.mozilla.org/integration/autoland/rev/53a4664f032d [Nova] Fix urlbar and legacy search bar focus ring color. r=dao,extension-reviewers,desktop-theme-reviewers,urlbar-reviewers,rpl
Severity: -- → S4
Priority: -- → P1
Status: ASSIGNED → RESOLVED
Closed: 25 days ago
Resolution: --- → FIXED
Target Milestone: --- → 155 Branch
Flags: qe-verify+
Flags: in-testsuite+

Verified as Fixed. Tested on the latest Nightly (155.0a1/20260804212919) under Windows 11 and Ubuntu 25.10.

I’ve manually inspected the elements with the following results:

  • --urlbar-background-border-focused and --urlbar-input-container-outline-breakout-focused both successfully evaluate to var(--toolbar-field-border-color-focus)
  • outline-color maps to var(--toolbar-field-border-color-focus)
Status: RESOLVED → VERIFIED
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: