Added fix for mozbz#1250704 - tooltips text color

This commit is contained in:
Martin Stransky 2016-07-29 08:48:20 +02:00
parent 169fd78177
commit a5b8d3c0c2
2 changed files with 79 additions and 21 deletions

View File

@ -1,7 +1,6 @@
diff -up firefox-48.0/media/webrtc/trunk/Makefile.old firefox-48.0/media/webrtc/trunk/Makefile
diff -up firefox-48.0/widget/gtk/gtk3drawing.cpp.old firefox-48.0/widget/gtk/gtk3drawing.cpp
--- firefox-48.0/widget/gtk/gtk3drawing.cpp.old 2016-07-25 22:22:07.000000000 +0200
+++ firefox-48.0/widget/gtk/gtk3drawing.cpp 2016-07-28 09:50:25.000000000 +0200
diff -up firefox-48.0/widget/gtk/gtk3drawing.cpp.gtk3-20 firefox-48.0/widget/gtk/gtk3drawing.cpp
--- firefox-48.0/widget/gtk/gtk3drawing.cpp.gtk3-20 2016-07-25 22:22:07.000000000 +0200
+++ firefox-48.0/widget/gtk/gtk3drawing.cpp 2016-07-29 08:37:44.736785903 +0200
@@ -18,15 +18,9 @@
#include <math.h>
@ -1534,9 +1533,9 @@ diff -up firefox-48.0/widget/gtk/gtk3drawing.cpp.old firefox-48.0/widget/gtk/gtk
is_initialized = FALSE;
diff -up firefox-48.0/widget/gtk/gtkdrawing.h.old firefox-48.0/widget/gtk/gtkdrawing.h
--- firefox-48.0/widget/gtk/gtkdrawing.h.old 2016-07-25 22:22:07.000000000 +0200
+++ firefox-48.0/widget/gtk/gtkdrawing.h 2016-07-28 09:50:25.000000000 +0200
diff -up firefox-48.0/widget/gtk/gtkdrawing.h.gtk3-20 firefox-48.0/widget/gtk/gtkdrawing.h
--- firefox-48.0/widget/gtk/gtkdrawing.h.gtk3-20 2016-07-25 22:22:07.000000000 +0200
+++ firefox-48.0/widget/gtk/gtkdrawing.h 2016-07-29 08:37:44.736785903 +0200
@@ -69,12 +69,6 @@ typedef enum {
MOZ_GTK_TAB_SELECTED = 1 << 10
} GtkTabFlags;
@ -1617,10 +1616,26 @@ diff -up firefox-48.0/widget/gtk/gtkdrawing.h.old firefox-48.0/widget/gtk/gtkdra
MOZ_GTK_WIDGET_NODE_COUNT
} WidgetNodeType;
diff -up firefox-48.0/widget/gtk/mozgtk/mozgtk.c.old firefox-48.0/widget/gtk/mozgtk/mozgtk.c
--- firefox-48.0/widget/gtk/mozgtk/mozgtk.c.old 2016-07-28 11:19:55.923461294 +0200
+++ firefox-48.0/widget/gtk/mozgtk/mozgtk.c 2016-07-28 11:25:24.095940924 +0200
@@ -587,6 +587,11 @@ STUB(gtk_color_chooser_get_type)
diff -up firefox-48.0/widget/gtk/mozgtk/mozgtk.c.gtk3-20 firefox-48.0/widget/gtk/mozgtk/mozgtk.c
--- firefox-48.0/widget/gtk/mozgtk/mozgtk.c.gtk3-20 2016-07-25 22:22:07.000000000 +0200
+++ firefox-48.0/widget/gtk/mozgtk/mozgtk.c 2016-07-29 08:42:14.976262337 +0200
@@ -517,6 +517,7 @@ STUB(gdk_event_get_source_device)
STUB(gdk_window_get_type)
STUB(gdk_x11_window_get_xid)
STUB(gdk_x11_display_get_type)
+STUB(gtk_box_new)
STUB(gtk_cairo_should_draw_window)
STUB(gtk_cairo_transform_to_window)
STUB(gtk_combo_box_text_append)
@@ -570,6 +571,7 @@ STUB(gtk_tree_view_column_get_button)
STUB(gtk_widget_get_preferred_size)
STUB(gtk_widget_get_state_flags)
STUB(gtk_widget_get_style_context)
+STUB(gtk_widget_path_append_for_widget)
STUB(gtk_widget_path_append_type)
STUB(gtk_widget_path_copy)
STUB(gtk_widget_path_free)
@@ -587,6 +589,11 @@ STUB(gtk_color_chooser_get_type)
STUB(gtk_color_chooser_set_rgba)
STUB(gtk_color_chooser_get_rgba)
STUB(gtk_color_chooser_set_use_alpha)
@ -1632,9 +1647,49 @@ diff -up firefox-48.0/widget/gtk/mozgtk/mozgtk.c.old firefox-48.0/widget/gtk/moz
#endif
#ifdef GTK2_SYMBOLS
diff -up firefox-48.0/widget/gtk/nsNativeThemeGTK.cpp.old firefox-48.0/widget/gtk/nsNativeThemeGTK.cpp
--- firefox-48.0/widget/gtk/nsNativeThemeGTK.cpp.old 2016-07-25 22:22:07.000000000 +0200
+++ firefox-48.0/widget/gtk/nsNativeThemeGTK.cpp 2016-07-28 11:35:21.804656790 +0200
diff -up firefox-48.0/widget/gtk/nsLookAndFeel.cpp.gtk3-20 firefox-48.0/widget/gtk/nsLookAndFeel.cpp
--- firefox-48.0/widget/gtk/nsLookAndFeel.cpp.gtk3-20 2016-07-29 08:39:08.267199758 +0200
+++ firefox-48.0/widget/gtk/nsLookAndFeel.cpp 2016-07-29 08:42:14.977262356 +0200
@@ -32,6 +32,7 @@
#if MOZ_WIDGET_GTK != 2
#include <cairo-gobject.h>
+#include "WidgetStyleCache.h"
#endif
using mozilla::LookAndFeel;
@@ -1142,15 +1143,24 @@ nsLookAndFeel::Init()
gtk_style_context_get_color(style, GTK_STATE_FLAG_NORMAL, &color);
sMozWindowText = GDK_RGBA_TO_NS_RGBA(color);
gtk_style_context_restore(style);
+ g_object_unref(style);
// tooltip foreground and background
- gtk_style_context_add_class(style, GTK_STYLE_CLASS_TOOLTIP);
- gtk_style_context_add_class(style, GTK_STYLE_CLASS_BACKGROUND);
+ style = ClaimStyleContext(MOZ_GTK_TOOLTIP);
gtk_style_context_get_background_color(style, GTK_STATE_FLAG_NORMAL, &color);
sInfoBackground = GDK_RGBA_TO_NS_RGBA(color);
- gtk_style_context_get_color(style, GTK_STATE_FLAG_NORMAL, &color);
+ {
+ GtkStyleContext* boxStyle =
+ CreateStyleForWidget(gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0),
+ style);
+ GtkStyleContext* labelStyle =
+ CreateStyleForWidget(gtk_label_new(nullptr), boxStyle);
+ gtk_style_context_get_color(labelStyle, GTK_STATE_FLAG_NORMAL, &color);
+ g_object_unref(labelStyle);
+ g_object_unref(boxStyle);
+ }
sInfoText = GDK_RGBA_TO_NS_RGBA(color);
- g_object_unref(style);
+ ReleaseStyleContext(style);
// menu foreground & menu background
GtkWidget *accel_label = gtk_accel_label_new("M");
diff -up firefox-48.0/widget/gtk/nsNativeThemeGTK.cpp.gtk3-20 firefox-48.0/widget/gtk/nsNativeThemeGTK.cpp
--- firefox-48.0/widget/gtk/nsNativeThemeGTK.cpp.gtk3-20 2016-07-25 22:22:07.000000000 +0200
+++ firefox-48.0/widget/gtk/nsNativeThemeGTK.cpp 2016-07-29 08:37:44.738785914 +0200
@@ -354,10 +354,8 @@ nsNativeThemeGTK::GetGtkWidgetAndState(u
if (isTopLevel) {
@ -1675,9 +1730,9 @@ diff -up firefox-48.0/widget/gtk/nsNativeThemeGTK.cpp.old firefox-48.0/widget/gt
aGtkWidgetType = MOZ_GTK_MENUITEM;
break;
case NS_THEME_MENUSEPARATOR:
diff -up firefox-48.0/widget/gtk/WidgetStyleCache.cpp.old firefox-48.0/widget/gtk/WidgetStyleCache.cpp
--- firefox-48.0/widget/gtk/WidgetStyleCache.cpp.old 2016-07-25 22:22:07.000000000 +0200
+++ firefox-48.0/widget/gtk/WidgetStyleCache.cpp 2016-07-28 09:50:25.000000000 +0200
diff -up firefox-48.0/widget/gtk/WidgetStyleCache.cpp.gtk3-20 firefox-48.0/widget/gtk/WidgetStyleCache.cpp
--- firefox-48.0/widget/gtk/WidgetStyleCache.cpp.gtk3-20 2016-07-25 22:22:07.000000000 +0200
+++ firefox-48.0/widget/gtk/WidgetStyleCache.cpp 2016-07-29 08:37:44.739785919 +0200
@@ -22,7 +22,7 @@ static bool sStyleContextNeedsRestore;
static GtkStyleContext* sCurrentStyleContext;
#endif
@ -2249,9 +2304,9 @@ diff -up firefox-48.0/widget/gtk/WidgetStyleCache.cpp.old firefox-48.0/widget/gt
return style;
}
diff -up firefox-48.0/widget/gtk/WidgetStyleCache.h.old firefox-48.0/widget/gtk/WidgetStyleCache.h
--- firefox-48.0/widget/gtk/WidgetStyleCache.h.old 2016-07-25 22:22:07.000000000 +0200
+++ firefox-48.0/widget/gtk/WidgetStyleCache.h 2016-06-22 10:13:10.000000000 +0200
diff -up firefox-48.0/widget/gtk/WidgetStyleCache.h.gtk3-20 firefox-48.0/widget/gtk/WidgetStyleCache.h
--- firefox-48.0/widget/gtk/WidgetStyleCache.h.gtk3-20 2016-07-25 22:22:07.000000000 +0200
+++ firefox-48.0/widget/gtk/WidgetStyleCache.h 2016-07-29 08:37:44.739785919 +0200
@@ -21,10 +21,24 @@ enum : StyleFlags {
GtkWidget*
GetWidget(WidgetNodeType aNodeType);

View File

@ -82,7 +82,7 @@
Summary: Mozilla Firefox Web browser
Name: firefox
Version: 48.0
Release: 4%{?pre_tag}%{?dist}
Release: 5%{?pre_tag}%{?dist}
URL: https://www.mozilla.org/firefox/
License: MPLv1.1 or GPLv2+ or LGPLv2+
Group: Applications/Internet
@ -772,6 +772,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
#---------------------------------------------------------------------
%changelog
* Fri Jul 29 2016 Martin Stransky <stransky@redhat.com> - 48.0-5
- Added fix for mozbz#1250704 - tooltips text color
* Thu Jul 28 2016 Martin Stransky <stransky@redhat.com> - 48.0-4
- Enable dark themes by pref in about:config (Bug 1272332)
- Backported gtk3.20 upstream fixes