Open Bug 1457592 Opened 6 years ago Updated 2 years ago

Create scrollbar buttons based on LookAndFeel values

Categories

(Core :: Layout, enhancement, P3)

enhancement

Tracking

()

People

(Reporter: timdream, Unassigned)

References

(Depends on 1 open bug)

Details

With bug 1431246 the scrollbar nodes are now created by nsScrollbarFrame. It still creates all the elements regardless of the platform need, and we still rely on CSS to hide them in

https://searchfox.org/mozilla-central/rev/68fdb6cf4f40bea1a1f6c07531ebf58fb8ab060b/toolkit/content/minimal-xul.css#151-173

It would be a good clean up to hook up LookAndFeel directly to nsScrollbarFrame instead of going though the detour of creating the NACs, read the LookAndFeel props from CSS system metrics, expose them via media queries, and hide the NACs.
That would mean that you need to handle recreating them if the LookAndFeel values change, so beware :)
AFAIK the LookAndFeel values related scrollbar bottom is hardcoded in the platform widget code. There are other values that depend on the pref but not this one.
Priority: -- → P3

Emilio, will non-native theming make this scrollbar bug obsolete?

Flags: needinfo?(emilio)

Not particularly. GTK won't generate scrollbar buttons by default but we could indeed avoid generating the nac to begin with. I had a patch for this but it did require reconstructing frames in some cases.

Flags: needinfo?(emilio)
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.