Closed Bug 1690910 Opened 6 months ago Closed 6 months ago

Scrollbars are impossible to see if the page background is a certain shade of gray (with non-native theme)

Categories

(Core :: Widget: Gtk, defect)

defect

Tracking

()

RESOLVED DUPLICATE of bug 1687183

People

(Reporter: dholbert, Unassigned)

References

Details

Attachments

(2 files)

Attached file testcase 1

STR:

  1. Ensure you have about:config pref widget.disable-native-theme-for-content set to true (the default in Nightly on linux)

  2. View attached testcase.

  3. See if you can see the scrollbar inside of the scroll track.

EXPECTED RESULTS:
Should be able to see scrollbar.

ACTUAL RESULTS:
The scrollbar is impossible to see, since it's pretty much the same color as the scroll track.

If you hover/click the scrollbar, or if Firefox loses focus, then the scrollbar color changes and it becomes visible. But when you're just looking at the page & the window is focused, the scrollbar is impossible to see. (It's also still impossible to see as it moves, if you scroll with your mousewheel or keyboard or touchpad.)

I suspect we're doing some sort of "invert-lightness-and-convert-to-gray" trick, to get a scrollbar that we expect to be visible over the page-background; but for sufficiently-neutral shades of gray, this seems to not produce any contrast at all.

Attached image screenshot

I ran into this in the wild at a real website -- https://www.sfcu.org/ -- where the logged-in version of the website has its html element styled with background-color: #4e5255. This is rgb(78, 82, 85), which is approximately the same shade of gray that I've used in the testcase here.

Also importantly, the scrollbar thumb does not change color when it moves; so e.g. if you scroll the page with the mousewheel/keyboard/touchpad, you still can't see where the scroll thumb is.

(This is in contrast to overlay scrollbars, where the scrollbar thumb intentionally fades out of view, but reappears whenever you actually scroll.)

fwiw I can't reproduce on Windows.

I believe this is specific to the Linux non-native scrollbar implementation. We have dedicated implementations for scrollbars on each platform.

Component: Widget → Widget: Gtk

Daniel, what's your GTK theme?

I can't reproduce this on Linux either. Can you reproduce on the latest nightly? I just landed a couple fixes to the dark scrollbar detection so I don't know if this is a regression from those changes or maybe it was fixed by those changes.

Flags: needinfo?(dholbert)

Hmm, my nightly doesn't seem to have those fixes yet, was this with a local build with bug 1690700?

Also, guess from the screenshot that theme is the Yaru theme

I can't repro with those patches either. I wonder what's going on, there should be no fancy scrollbar effects before that bug. Daniel, can you run mozregression on your machine and see if this was caused by bug 1690043? Maybe your gtk theme is reporting semi-transparent values and we started honoring them.

And I expect bug 1690700 to have fixed this kind of test-case.

Indeed, this is fixed in today's nightly! Thanks. :)

Flags: needinfo?(dholbert)

(In reply to Emilio Cobos Álvarez (:emilio) from comment #8)

Also, guess from the screenshot that theme is the Yaru theme

(I believe that's correct, yeah.)

(In reply to Emilio Cobos Álvarez (:emilio) from comment #10)

And I expect bug 1690700 to have fixed this kind of test-case.

mozregression --find-fix says bug 1687183 is actually what fixed this.

Status: NEW → RESOLVED
Closed: 6 months ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1687183
You need to log in before you can comment on or make changes to this bug.