Closed Bug 1503054 Opened 6 years ago Closed 3 years ago

Implement nsXPLookAndFeel::SetIntCacheImpl and GetIntCacheImpl for GTK

Categories

(Core :: Widget: Gtk, enhancement)

Unspecified
Linux
enhancement
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: jld, Unassigned)

References

Details

We have infrastructure for sending (some of?) the widget toolkit's LookAndFeel info over IPC, in the lookAndFeelIntCache parameter of the PContent::SetXPCOMProcessAttributes message, instead of needing the content process to ask the platform directly.

This is implemented on Windows and Mac and Android, but not for GTK.  Remoting this could help with with isolating content processes from the X server, and/or restricting filesystem access, but I don't know enough about GTK's internals to know how helpful it would be.

I did add the function in bug 1560660. Are there still something we need to do specifically?

Flags: needinfo?(jld)

It looks like that only remotes the dark theme info?

We probably need all the look and feel data from the parent to color things correctly in the children:
https://searchfox.org/mozilla-central/source/widget/gtk/nsLookAndFeel.h#45

On the other hand Bug 1381938 does away with native theming altogether (not enabled by default yet on Linux), so there question may be how much of the "native" theme styling we're still going to try to emulate past that point.

Flags: needinfo?(jld)
See Also: → 1470983

@ Cameron, do we still need this GTK LookAndFeel IntCache bug now that you moved the LookAndFeel data to the parent process in bug 1470983?

Flags: needinfo?(cam)

Setting Fission Milestone = ? until we determine whether we need to fix this bug to remove all X11 from the content process (bug 1129492) for Fission MVP.

Fission Milestone: --- → ?

Jed, do we still need this GTK LookAndFeel IntCache bug now that heycam moved the LookAndFeel data to the parent process in bug 1470983?

Flags: needinfo?(jld)

Has this code been rewritten since this bug was filed two years ago? The only reference I see to any SetIntCache or GetIntCache functions in mozilla-central are some old macOS comments about LookAndFeel::SetIntCache:

https://searchfox.org/mozilla-central/search?q=etIntCache

Yes, this code was rewritten a bit in bug 1657401, and I think that plus bug 1470983 covered all of the work that was going to happen here.

Status: NEW → RESOLVED
Closed: 3 years ago
Flags: needinfo?(jld)
Flags: needinfo?(cam)
Resolution: --- → FIXED

As comment 1 indicates, the task described in the bug summary was done in late 2019 as part of bug 1560660 (for non-sandbox-related reasons). When I filed this bug I didn't know much about nsLookAndFeel or the extent of the cache mechanism; after I started investigating for bug 1470983 I eventually decided on a different approach.

Fission Milestone: ? → ---
You need to log in before you can comment on or make changes to this bug.