Closed Bug 1844346 Opened 2 years ago Closed 2 years ago

about:profiles modal challenging to read in private mode

Categories

(Firefox :: Theme, defect)

defect

Tracking

()

VERIFIED FIXED
118 Branch
Tracking Status
firefox-esr102 --- wontfix
firefox-esr115 --- wontfix
firefox115 --- wontfix
firefox116 --- wontfix
firefox117 --- wontfix
firefox118 --- fixed

People

(Reporter: topotropic, Assigned: emz)

References

(Regression)

Details

(Keywords: regression)

Attachments

(2 files)

Attached image image.png

When I'm in private mode and go to about:profiles and then want to create a new, the modal is in dark theme but the text color too, so it's challenging to read, see screenshot

Flags: needinfo?(pbz)

Most likely a regression of Bug 1749375. For Bug 1749377 we had to apply a fix for the pageInfo window that had similar issues.

Component: Private Browsing → Theme
Flags: needinfo?(pbz)
Keywords: regression
Regressed by: 1749375

Emilio, do you know why the code we added in https://phabricator.services.mozilla.com/D136933 doesn't work here?

Flags: needinfo?(emilio)

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

Oh sorry, this isn't actually an issue with widget code, but we need to set the colorscheme override in the profile wizard dialog too. I'll submit a patch.

Flags: needinfo?(emilio)

This is similar to the fix we did for Bug 1749377 where Page Info windows opened from PBM windows didn't apply the dark theme correctly.

Assignee: nobody → pbz
Status: NEW → ASSIGNED
See Also: → 1749377

Paul does something like this work? Seems a bit nicer and more general:

diff --git a/docshell/base/BrowsingContext.cpp b/docshell/base/BrowsingContext.cpp
index 39192c1ae834c..b5efebe02882d 100644
--- a/docshell/base/BrowsingContext.cpp
+++ b/docshell/base/BrowsingContext.cpp
@@ -413,6 +413,11 @@ already_AddRefed<BrowsingContext> BrowsingContext::CreateDetached(
         nsILoadInfo::OPENER_POLICY_SAME_ORIGIN_EMBEDDER_POLICY_REQUIRE_CORP;
   }
 
+  if (aOpener && !aParent) {
+    fields.Get<IDX_PrefersColorSchemeOverride>() =
+        aOpener->Top()->GetPrefersColorSchemeOverride();
+  }
+
   fields.Get<IDX_HistoryID>() = nsID::GenerateUUID();
   fields.Get<IDX_ExplicitActive>() = [&] {
     if (parentBC) {
Flags: needinfo?(pbz)

Thanks, good idea! However it seems for both cert viewer and pageinfo window at that point aOpener isn't set. Not sure why.
It would probably also make sense to add a chrome check: aType == Type::Chrome

Flags: needinfo?(pbz)
See Also: → 1846500

I'm landing the frontend fix for now but I've filed Bug 1846500 to look into inheriting this flag in the BrowsingContext directly has discussed above.

Pushed by pzuhlcke@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/a15bc4ab46fe Use prefersColorSchemeOverride to inherit dark PBM theme for profile creation wizard dialog. r=desktop-theme-reviewers,dao

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

Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 118 Branch

Clearing NI since I currently don't have time to investigate further. But it seems like a good change, especially if we run into more of these chrome window opener cases.

Flags: needinfo?(pbz)

Is more S4-ish so not worth uplifting. Also about:profiles likely has quite low usage.

Flags: qe-verify+

Reproduced the issue with Firefox 117.0a1 (2023-07-19) on MacOS 12 ARM. Indeed when using private mode to create a new profile from about:profiles, the modal and the text have no contrast between each other, both being displayed with dark colours.
The issue is verified fixed with Firefox 119.0a1 (20230830212731) and Firefox 118.0b2 (20230829180158) on MacOS 12 ARM. When using private mode to create a new profile from about:profiles, the modal and the text have contrast between each other making the text readable.

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: