Closed Bug 1687183 Opened 5 years ago Closed 5 years ago

[Win] The scrollbar in plain text documents is not dark mode flavoured, with dark mode enabled

Categories

(Core :: Layout: Scrolling and Overflow, defect, P3)

Unspecified
Windows 10
defect

Tracking

()

VERIFIED FIXED
87 Branch
Tracking Status
firefox87 --- verified

People

(Reporter: itiel_yn8, Assigned: emilio)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

Attached image Screenshot

STR:

  1. Set ui.systemUsesDarkTheme to 1
  2. With bug 1551040 fixed, open any plain text document, e.g. https://firefox-source-docs.mozilla.org/_sources/build/buildsystem/locales.rst.txt
  3. Observe the scrollbar

AR:
Normal scrollbar

ER:
Dark mode flavoured scrollbar

Component: Layout → Layout: Scrolling and Overflow

To clarify: does anything else in Firefox get a special dark-mode-scrollbar, with this configuration?

(You mentioned plain text documents having this problem - did you mean that they're specifically affected, or is everything affected?)

I tried the STR, and I see the same sort of scrollbar for the plain text doc that you linked as well as for an HTML document like data:text/html,<div style="height:9999px">, so it's not clear to me that there's anything specially-broken for plain text here.

Flags: needinfo?(itiel_yn8)

(In reply to Daniel Holbert [:dholbert] from comment #1)

To clarify: does anything else in Firefox get a special dark-mode-scrollbar, with this configuration?

Yes- see all scrollable about: pages when in dark mode.

(You mentioned plain text documents having this problem - did you mean that they're specifically affected, or is everything affected?)

Plain text documents specifically.

I tried the STR, and I see the same sort of scrollbar for the plain text doc that you linked as well as for an HTML document like data:text/html,<div style="height:9999px">, so it's not clear to me that there's anything specially-broken for plain text here.

Your testcase has a white background (I guess bug 1551040 fixed actual documents, and not data:text-based ones?), so it's not the same as my STR above.

My assumption is that everything that comes from the Firefox UI itself (about:config, about:support etc.) that is styled to have dark mode support, should also have dark scrollbars.
Plain text documents are not originating from the Firefox UI, but after bug 1551040 their style is originating from within Firefox.

If my base assumption is wrong this can be closed a INVALID I guess, but having an incomplete dark-mode'd plain text support is unfortunate, I think.

Flags: needinfo?(itiel_yn8)

Thanks for clarifying that.

I can confirm the bug, on Windows 10. about:support and about:newtab both have dark scrollbars if I set that pref, whereas https://firefox-source-docs.mozilla.org/_sources/build/buildsystem/locales.rst.txt does not.

I get different results on other platforms, though:

  • on MacOS, I get "expected results" (with the pref, I get dark scrollbars in the about: pages and also in the plaintext file).
  • on Linux (Ubuntu 20.10), I don't get any dark scrollbars at all (neither on about: pages nor plaintext files). Maybe we don't have dark scrollbars available there, for some reason? Not sure.

So: this seems to be windows-specific.

OS: Unspecified → Windows 10
Summary: The scrollbar in plain text documents is not dark mode flavoured, with dark mode enabled → [Win] The scrollbar in plain text documents is not dark mode flavoured, with dark mode enabled

This is done in about: pages by importing common.inc.css, which has the following line:
https://searchfox.org/mozilla-central/rev/bd92b9b4a3c2ff022e830c1358968a84e6e69c95/toolkit/themes/shared/in-content/common.inc.css#151

Perhaps we can just add the same line in plaintext.css...

Severity: -- → S3
Priority: -- → P3

Why is the usual windows scrollbar darkening not working in this case?

I implemented scrollbar darkening on GTK, and this does in fact reproduce.

If we hit the canvas frame, and the root has a background but the body
doesn't, previously we were using the body style. Then
FindNonTransparentBackgroundFrame would return the document element
frame (with the right background), but FindBackgroundFor that failed.

Assignee: nobody → emilio
Status: NEW → ASSIGNED
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/55ca84da624c Fix dark background detection in nsNativeTheme when only root has a background. r=mstange
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → 87 Branch

Works great now, thanks!

Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: