aboutsummaryrefslogtreecommitdiff
path: root/deb_patches/silence-gtk-style-assertions.patch
diff options
context:
space:
mode:
authorohfp <1813007-ohfp@users.noreply.gitlab.com>2020-10-29 02:18:46 +0100
committerohfp <1813007-ohfp@users.noreply.gitlab.com>2020-10-29 02:18:46 +0100
commitfcb0d9bed3e6bf80fe17a38631c6fb1434cdbff0 (patch)
tree2ce2be8bd3a496827be74678b6ef39223e9bba45 /deb_patches/silence-gtk-style-assertions.patch
parentv81.0.2-1 (diff)
downloadlibrewolf-linux-fcb0d9bed3e6bf80fe17a38631c6fb1434cdbff0.tar.gz
librewolf-linux-fcb0d9bed3e6bf80fe17a38631c6fb1434cdbff0.tar.bz2
librewolf-linux-fcb0d9bed3e6bf80fe17a38631c6fb1434cdbff0.zip
v82.0.2-1
Diffstat (limited to 'deb_patches/silence-gtk-style-assertions.patch')
-rw-r--r--deb_patches/silence-gtk-style-assertions.patch34
1 files changed, 34 insertions, 0 deletions
diff --git a/deb_patches/silence-gtk-style-assertions.patch b/deb_patches/silence-gtk-style-assertions.patch
new file mode 100644
index 0000000..bfad1cc
--- /dev/null
+++ b/deb_patches/silence-gtk-style-assertions.patch
@@ -0,0 +1,34 @@
+Description: silence GTK style-related assertions caused by the lack of a "selection" CSS node on GtkTextView in the version of gtk3 in xenial.
+ These assertions were caused by the fix for https://bugzilla.mozilla.org/1654323.
+Author: Olivier Tilloy <olivier.tilloy@canonical.com>
+
+--- a/widget/gtk/nsLookAndFeel.cpp
++++ b/widget/gtk/nsLookAndFeel.cpp
+@@ -1142,7 +1142,7 @@ void nsLookAndFeel::EnsureInit() {
+ &color);
+ mTextSelectedText = GDK_RGBA_TO_NS_RGBA(color);
+ };
+- GrabSelectionColors(selectionStyle);
++ GrabSelectionColors(selectionStyle ? selectionStyle : style);
+ if (mTextSelectedBackground == mTextSelectedText) {
+ // Some old distros/themes don't properly use the .selection style, so
+ // fall back to the regular text view style.
+--- a/widget/gtk/WidgetStyleCache.cpp
++++ b/widget/gtk/WidgetStyleCache.cpp
+@@ -933,7 +933,7 @@ static GtkStyleContext* GetWidgetRootSty
+ default:
+ GtkWidget* widget = GetWidget(aNodeType);
+ MOZ_ASSERT(widget);
+- return gtk_widget_get_style_context(widget);
++ return (widget ? gtk_widget_get_style_context(widget) : nullptr);
+ }
+
+ MOZ_ASSERT(style);
+@@ -1356,6 +1356,7 @@ GtkStyleContext* GetStyleContext(WidgetN
+ style = GetCssNodeStyleInternal(aNodeType);
+ StyleContextSetScale(style, aScale);
+ }
++ if (!style) return nullptr;
+ bool stateChanged = false;
+ bool stateHasDirection = gtk_get_minor_version() >= 8;
+ GtkStateFlags oldState = gtk_style_context_get_state(style);
bgstack15