gecko-dev/widget/gtk
Martin Stransky e0e56320e5 Bug 1527048 - [Linux/GTK] Fallback to Adwaita light GTK theme for content when system theme has no light variant, r=karlt
We previously disabled system dark themes for Firefox chrome and content by gtk-application-prefer-dark-theme settings.
That option is no longer preferred by gnome project and was removed from tweaks tools. Theme makers are encouraged to use
a different name for the dark theme variants, like Adwaita-dark, Yaru-dark and so on. This option also does not
work when the GTK theme is missing the light variant completely.

To address that, this patch implements heuristics based on https://www.w3.org/TR/AERT/#color-contrast
to check if the system GTK theme has good contrast/visibility with default HTML colors
(white background and black text).

If widget.content.gtk-theme-override is empty and the system theme fails the test with gtk-application-prefer-dark-theme set to false, then Adwaita:light theme is used.

This patch was tested with some distro default light themes (Ambiance, Radiance, Yaru - Ubuntu, Arc - KDE, Menta - MATE)
and dark/light themes are recognized correctly.

Differential Revision: https://phabricator.services.mozilla.com/D29823

--HG--
extra : moz-landing-system : lando
2019-05-28 06:51:36 +00:00
..
compat Bug 1547143 - Format the tree: Be prescriptive with the pointer style (left) r=Ehsan 2019-05-01 08:47:10 +00:00
compat-gtk3
crashtests
mozgtk Bug 1532103 - Implement nsWidgetInitData::mAlwaysOnTop. r=stransky 2019-03-05 15:40:33 +00:00
mozwayland Bug 1547143 - Format the tree: Be prescriptive with the pointer style (left) r=Ehsan 2019-05-01 08:47:10 +00:00
wayland
CompositorWidgetChild.cpp Bug 1514156 - Add RenderCompositorEGL for wayland r=nical 2019-02-12 16:33:31 +09:00
CompositorWidgetChild.h Bug 1514156 - Add RenderCompositorEGL for wayland r=nical 2019-02-12 16:33:31 +09:00
CompositorWidgetParent.cpp Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan 2019-02-15 08:15:57 +00:00
CompositorWidgetParent.h Bug 1514156 - Add RenderCompositorEGL for wayland r=nical 2019-02-12 16:33:31 +09:00
GtkCompositorWidget.cpp Bug 1534557 - Implement GtkCompositorWidget::GetEGLNativeWindow() for GET_NATIVE_WINDOW_FROM_COMPOSITOR_WIDGET r=jgilbert 2019-03-13 00:18:49 +00:00
GtkCompositorWidget.h Bug 1534557 - Implement GtkCompositorWidget::GetEGLNativeWindow() for GET_NATIVE_WINDOW_FROM_COMPOSITOR_WIDGET r=jgilbert 2019-03-13 00:18:49 +00:00
IMContextWrapper.cpp Bug 1554433 - Move system colors to values::specified::color. r=xidorn 2019-05-26 13:10:00 +00:00
IMContextWrapper.h
InProcessGtkCompositorWidget.cpp Bug 1523969 part 26 - Move method definition inline comments to new line in 'widget/'. r=mstange 2019-02-25 16:13:48 -06:00
InProcessGtkCompositorWidget.h
NativeKeyBindings.cpp Bug 1546839 - part 1: Change `enum Command` to `enum class Command` and drop "Command" prefix from each item r=smaug 2019-04-30 04:23:24 +00:00
NativeKeyBindings.h
PCompositorWidget.ipdl Bug 1514156 - Add RenderCompositorEGL for wayland r=nical 2019-02-12 16:33:31 +09:00
PlatformWidgetTypes.ipdlh
ProcInfo.cpp Bug 1502917 - Adding ChromeUtils.RequestProcInfo() - r=Ehsan,mstange,kershaw,mhowell 2019-02-23 18:07:59 +00:00
ScreenHelperGTK.cpp Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan 2019-03-31 15:12:55 +00:00
ScreenHelperGTK.h
TaskbarProgress.cpp
TaskbarProgress.h
WakeLockListener.cpp Bug 1523969 part 26 - Move method definition inline comments to new line in 'widget/'. r=mstange 2019-02-25 16:13:48 -06:00
WakeLockListener.h
WidgetStyleCache.cpp Bug 1546658 - Clean up MOZ_GTK_DROPDOWN_ENTRY at widget style cache, r=dao 2019-04-30 08:25:24 +00:00
WidgetStyleCache.h Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan 2019-04-28 09:30:05 +00:00
WidgetTraceEvent.cpp
WidgetUtilsGtk.cpp
WidgetUtilsGtk.h
WindowSurfaceProvider.cpp
WindowSurfaceProvider.h
WindowSurfaceWayland.cpp Bug 1467127 - Post wl_display_dispatch_queue_pending tasks from ProcessNextNativeEvent. r=stransky 2019-04-30 09:37:37 +00:00
WindowSurfaceWayland.h Bug 1508378 - Fix round error when damage rect size/position is odd number and scale factor is used, r=lsalzman 2019-04-10 14:17:28 +00:00
WindowSurfaceX11.cpp
WindowSurfaceX11.h
WindowSurfaceX11Image.cpp
WindowSurfaceX11Image.h
WindowSurfaceXRender.cpp
WindowSurfaceXRender.h
components.conf Bug 1539029 - pt 1 - give RDD its own process selector. r=froydnj 2019-04-09 21:13:16 +00:00
gtk3drawing.cpp Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan 2019-04-28 09:30:05 +00:00
gtkdrawing.h
maiRedundantObjectFactory.c Bug 1547143 - Format the tree: Be prescriptive with the pointer style (left) r=Ehsan 2019-05-01 08:47:10 +00:00
maiRedundantObjectFactory.h Bug 1547143 - Format the tree: Be prescriptive with the pointer style (left) r=Ehsan 2019-05-01 08:47:10 +00:00
moz.build Bug 1467127 - Post wl_display_dispatch_queue_pending tasks from ProcessNextNativeEvent. r=stransky 2019-04-30 09:37:37 +00:00
mozcontainer.cpp Bug 1547143 - Format the tree: Be prescriptive with the pointer style (left) r=Ehsan 2019-05-01 08:47:10 +00:00
mozcontainer.h Bug 1547143 - Format the tree: Be prescriptive with the pointer style (left) r=Ehsan 2019-05-01 08:47:10 +00:00
nsAppShell.cpp Bug 1467127 - Post wl_display_dispatch_queue_pending tasks from ProcessNextNativeEvent. r=stransky 2019-04-30 09:37:37 +00:00
nsAppShell.h Bug 1547143 - Format the tree: Be prescriptive with the pointer style (left) r=Ehsan 2019-05-01 08:47:10 +00:00
nsApplicationChooser.cpp Bug 1523969 part 26 - Move method definition inline comments to new line in 'widget/'. r=mstange 2019-02-25 16:13:48 -06:00
nsApplicationChooser.h
nsBidiKeyboard.cpp Bug 1547143 - Format the tree: Be prescriptive with the pointer style (left) r=Ehsan 2019-05-01 08:47:10 +00:00
nsBidiKeyboard.h
nsCUPSShim.cpp Bug 1547143 - Format the tree: Be prescriptive with the pointer style (left) r=Ehsan 2019-05-01 08:47:10 +00:00
nsCUPSShim.h Bug 1547143 - Format the tree: Be prescriptive with the pointer style (left) r=Ehsan 2019-05-01 08:47:10 +00:00
nsClipboard.cpp Bug 1547143 - Format the tree: Be prescriptive with the pointer style (left) r=Ehsan 2019-05-01 08:47:10 +00:00
nsClipboard.h
nsClipboardWayland.cpp Bug 1547143 - Format the tree: Be prescriptive with the pointer style (left) r=Ehsan 2019-05-01 08:47:10 +00:00
nsClipboardWayland.h
nsClipboardX11.cpp Bug 1547143 - Format the tree: Be prescriptive with the pointer style (left) r=Ehsan 2019-05-01 08:47:10 +00:00
nsClipboardX11.h
nsColorPicker.cpp Bug 1523969 part 26 - Move method definition inline comments to new line in 'widget/'. r=mstange 2019-02-25 16:13:48 -06:00
nsColorPicker.h
nsDeviceContextSpecG.cpp
nsDeviceContextSpecG.h
nsDragService.cpp Bug 1547143 - Format the tree: Be prescriptive with the pointer style (left) r=Ehsan 2019-05-01 08:47:10 +00:00
nsDragService.h Bug 1543315 - part 17: Mark PresShell::HandleDOMEventWithTarget() as MOZ_CAN_RUN_SCRIPT r=smaug 2019-05-09 20:21:28 +00:00
nsFilePicker.cpp Bug 1547143 - Format the tree: Be prescriptive with the pointer style (left) r=Ehsan 2019-05-01 08:47:10 +00:00
nsFilePicker.h Bug 1547143 - Format the tree: Be prescriptive with the pointer style (left) r=Ehsan 2019-05-01 08:47:10 +00:00
nsGTKToolkit.h
nsGtkCursors.h Bug 1547143 - Format the tree: Be prescriptive with the pointer style (left) r=Ehsan 2019-05-01 08:47:10 +00:00
nsGtkKeyUtils.cpp Bug 1259660 - Moved mozilla::WidgetMosueEventBase::buttonType in MouseEvents.h to mozilla::MouseButton in EventForwards.h, and mozilla::WidgetMouseEventBase::buttonsFlag to mozilla::MouseButtonsFlag r=masayuki 2019-04-21 20:13:34 +00:00
nsGtkKeyUtils.h
nsGtkUtils.h
nsIImageToPixbuf.h
nsIdleServiceGTK.cpp
nsIdleServiceGTK.h
nsImageToPixbuf.cpp
nsImageToPixbuf.h
nsLookAndFeel.cpp Bug 1527048 - [Linux/GTK] Fallback to Adwaita light GTK theme for content when system theme has no light variant, r=karlt 2019-05-28 06:51:36 +00:00
nsLookAndFeel.h Bug 1531338 - [Linux/Gtk] Get and use Gtk theme text color for active/pressed button, r=dao,emilio 2019-05-24 08:51:48 +00:00
nsNativeThemeGTK.cpp Bug 1546343 - Enable hi-res widget rendering for X11 r=stransky 2019-05-24 06:10:42 +00:00
nsNativeThemeGTK.h
nsPSPrinters.cpp Bug 1547143 - Format the tree: Be prescriptive with the pointer style (left) r=Ehsan 2019-05-01 08:47:10 +00:00
nsPSPrinters.h
nsPrintDialogGTK.cpp
nsPrintDialogGTK.h Bug 1547143 - Format the tree: Be prescriptive with the pointer style (left) r=Ehsan 2019-05-01 08:47:10 +00:00
nsPrintSettingsGTK.cpp
nsPrintSettingsGTK.h Bug 1547143 - Format the tree: Be prescriptive with the pointer style (left) r=Ehsan 2019-05-01 08:47:10 +00:00
nsPrintSettingsServiceGTK.cpp
nsPrintSettingsServiceGTK.h
nsSound.cpp Bug 1547143 - Format the tree: Be prescriptive with the pointer style (left) r=Ehsan 2019-05-01 08:47:10 +00:00
nsSound.h
nsToolkit.cpp
nsWaylandDisplay.cpp Bug 1547143 - Format the tree: Be prescriptive with the pointer style (left) r=Ehsan 2019-05-01 08:47:10 +00:00
nsWaylandDisplay.h Bug 1467127 - Post wl_display_dispatch_queue_pending tasks from ProcessNextNativeEvent. r=stransky 2019-04-30 09:37:37 +00:00
nsWaylandDisplayShutdown.h Bug 1467127 - Post wl_display_dispatch_queue_pending tasks from ProcessNextNativeEvent. r=stransky 2019-04-30 09:37:37 +00:00
nsWidgetFactory.cpp Bug 1524687: Part 9 - Convert gtk widget module to static registration. r=erahm 2019-01-24 17:27:24 -08:00
nsWidgetFactory.h Bug 1547143 - Format the tree: Be prescriptive with the pointer style (left) r=Ehsan 2019-05-01 08:47:10 +00:00
nsWindow.cpp Backed out changeset f9699ae30f4d (bug 1213601) on jrmuizel's request. 2019-05-26 18:12:56 +03:00
nsWindow.h Backed out changeset f9699ae30f4d (bug 1213601) on jrmuizel's request. 2019-05-26 18:12:56 +03:00