Commit Graph
19 Commits
Author SHA1 Message Date
Jan Varga 272327b326 Bug 1855134 - Move existing MOZ_TRY macros to a dedicated header file; r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D189226
2023-09-28 20:46:07 +00:00
Emilio Cobos Álvarez 5ed1e20d7c Bug 1804657 - Remove dead code related to having native theme in content on Linux. r=stransky
Since the headless work (bug 1129492 and co) we realistically have no
way of rendering native scrollbars in any meaningful way. Remove dead
code that used to support using a different GTK theme on content.

Differential Revision: https://phabricator.services.mozilla.com/D179616
2023-06-01 07:37:33 +00:00
Emilio Cobos Álvarez 591f170d3d Bug 1707957 - Restore two lines in RemoteLookAndFeel which shouldn't have been removed.
MANUAL PUSH: Trivial fixup so that theme password char is honored in content processes a CLOSED TREE.
2021-05-03 02:04:49 +02:00
Emilio Cobos Álvarez a716323708 Bug 1707957 - Extract both light and dark system colors in GTK. r=stransky
And add code to use the appropriate variant like we do in macOS with
respect-system-appearance (but this still needs more work as noted in
StaticPrefList.yaml).

Still, it cleans up a bunch, and allows to not depend on the content
process boundary to provide light system colors.

Depends on D113542

Differential Revision: https://phabricator.services.mozilla.com/D113543
2021-04-30 12:36:50 +00:00
Butkovits Atila 3e66742e25 Backed out 2 changesets (bug 1707872, bug 1707957) for causing valgrind failures. CLOSED TREE
Backed out changeset 0fb0e3d056f8 (bug 1707957)
Backed out changeset 03767acc6135 (bug 1707872)
2021-04-28 07:46:21 +03:00
Emilio Cobos Álvarez 98cff513de Bug 1707957 - Extract both light and dark system colors in GTK. r=stransky
And add code to use the appropriate variant like we do in macOS with
respect-system-appearance (but this still needs more work as noted in
StaticPrefList.yaml).

Still, it cleans up a bunch, and allows to not depend on the content
process boundary to provide light system colors.

Depends on D113542

Differential Revision: https://phabricator.services.mozilla.com/D113543
2021-04-27 22:34:56 +00:00
Emilio Cobos Álvarez 1595093901 Bug 1703205 - Don't query AlertNotificationOrigin from RemoteLookAndFeel. r=cmartin
Since it's not read by child processes and it seems it might be
expensive to get on windows.

Differential Revision: https://phabricator.services.mozilla.com/D110908
2021-04-06 13:44:06 +00:00
Emilio Cobos Álvarez ccd1dcf484 Bug 1702765 - Plumb ColorScheme through nsXPLookAndFeel. r=mstange
After this patch, there are two remaining pieces to fix bug 1700294:

 * macOS nsLookAndFeel needs to return the right colors for light / dark
   appearance.

 * We need to return ColorScheme::Dark for the right documents in
   ColorSchemeForDocument.

Both of those should be straight-forward.

Differential Revision: https://phabricator.services.mozilla.com/D110680
2021-04-02 22:17:55 +00:00
Emilio Cobos Álvarez f56275c02e Bug 1702756 - Move RemoteLookAndFeel::sCachedLookAndFeelData out of the header. r=mstange
No reason it needs to be there. This was just drive-by.

Depends on D110670

Differential Revision: https://phabricator.services.mozilla.com/D110671
2021-04-02 16:34:33 +00:00
Emilio Cobos Álvarez 1b62a36c9c Bug 1701825 - Allow passing some colors from GTK even in dark themes. r=stransky
Selection and accent color should be uncontroversial, since we ensure
the darker variant goes in the background, and the scrollbars were
intended to get passed from the parent theme in bug 1669368, but it was
regressed by the initial RemoteLookAndFeel work.

Differential Revision: https://phabricator.services.mozilla.com/D110175
2021-03-30 08:17:38 +00:00
Emilio Cobos Álvarez a2363c886a Bug 1701825 - Make the mechanism to decide whether ints are taken from the parent or child process in RemoteLookAndFeel more generic. r=stransky
For that, allow inserting out of order into the RemoteLookAndFeel maps.

Differential Revision: https://phabricator.services.mozilla.com/D110174
2021-03-30 08:17:38 +00:00
Emilio Cobos Álvarez acf555fa6c Bug 1699088 - Cache fonts / floats / ints in nsXPLookAndFeel. r=cmartin
And make FontID's indexing setup more similar to FloatID / IntID / ColorID. The
values no longer need to match the style constants since Stylo. We could also
cache whether the lookup succeeded for floats / ints, but it might not be worth
it, your call though.

Differential Revision: https://phabricator.services.mozilla.com/D108765
2021-03-24 22:57:36 +00:00
Emilio Cobos Álvarez 9df949a2cc Bug 1697607 - Enable widget.remote-look-and-feel everywhere. r=cmartin,geckoview-reviewers,agi
(And add a missing include while at it)

The biggest concern here is potential startup time penalty (and it
shouldn't be much anyways, if at all). In exchange, we avoid doing a lot
of this work in content processes.

Let's keep an eye on for regressions, but this sticking allows us to
simplify a lot of the lookandfeel code in follow-ups.

Differential Revision: https://phabricator.services.mozilla.com/D107926
2021-03-11 21:20:54 +00:00
Emilio Cobos Álvarez e45db704e2 Bug 1694059 - Rename various nnt prefs. r=spohl,mstange
As per feedback in D105931.

Differential Revision: https://phabricator.services.mozilla.com/D105991
2021-02-22 20:05:35 +00:00
Cameron McCormack 7ecd491d82 Bug 1683204 - Include content theme configuration details in FullLookAndFeel. r=spohl
And re-enable the RemoteLookAndFeel by default with Gtk.

When the RemoteLookAndFeel is enabled and the non-native theme is not
enabled, we still need to configure the Gtk theme in content processes,
since we're still using Gtk to paint widget backgrounds etc. Without
this, we can end up using LookAndFeel colors from a light theme but
painting widget backgrounds from a dark theme.

Other platforms don't configure themes for content processes
differently, so on those platforms LookAndFeelTheme is an empty struct
and we skip the ConfigureTheme call.

Differential Revision: https://phabricator.services.mozilla.com/D100223
2020-12-22 19:26:41 +00:00
Cameron McCormack 22b74354b3 Bug 1683026 - Don't use content configured theme values for SystemUsesDarkTheme and UseAccessibilityTheme. r=spohl
Differential Revision: https://phabricator.services.mozilla.com/D99971
2020-12-17 21:25:19 +00:00
Cameron McCormack d23e8966e3 Bug 1672097 - Part 2: Cache FullLookAndFeel data. r=karlt
This avoids us doing the full work of ExtractData every time a new content
process is created.  That work is probably not super expensive, but without
this caching it does trip up
browser/base/content/test/performance/browser_preferences_usage.js due to
looking up a non-mirrored pref.

Differential Revision: https://phabricator.services.mozilla.com/D98990
2020-12-16 04:41:46 +00:00
Cameron McCormack e83d3a890a Bug 1672097 - Part 1: Make Gtk theme overrides work with the RemoteLookAndFeel. r=spohl,karlt
When the RemoteLookAndFeel is not in use, content processes override the
Gtk theme in some circumstances (e.g. if the theme is a dark variant, we
try choosing the light one, since that works better with Web content).

When the RemoteLookAndFeel is in use, the parent process needs to handle
this.  So we temporarily set the parent process to the overridden theme,
extract the FullLookAndFeel data, then restore the original theme.  We
make sure to avoid throwing away any cached data and restyling every
document as a result of the temporary theme change.

Differential Revision: https://phabricator.services.mozilla.com/D98418
2020-12-16 04:41:05 +00:00
Jed DavisandCameron McCormack 1b8abec1d6 Bug 1470983 - Remote all LookAndFeel values for the Gtk backend. r=spohl,jld
This adds a new LookAndFeel implementation, RemoteLookAndFeel, which can
be used in content processes and is supplied with all of its values by the
parent process.

Co-authored-by: Cameron McCormack <[email protected]>

Differential Revision: https://phabricator.services.mozilla.com/D97977
2020-12-16 04:17:36 +00:00