diff options
-rw-r--r-- | firefox-redhat-default-prefs.js | 3 | ||||
-rw-r--r-- | firefox.spec | 14 | ||||
-rw-r--r-- | mozilla-1051209.patch | 47 | ||||
-rw-r--r-- | mozilla-1073117-check.patch | 125 | ||||
-rw-r--r-- | mozilla-1073117-color.patch | 278 | ||||
-rw-r--r-- | mozilla-1101582.patch | 122 |
6 files changed, 587 insertions, 2 deletions
diff --git a/firefox-redhat-default-prefs.js b/firefox-redhat-default-prefs.js index 00e945b..2648220 100644 --- a/firefox-redhat-default-prefs.js +++ b/firefox-redhat-default-prefs.js @@ -21,4 +21,5 @@ pref("browser.newtabpage.pinned", '[{"url":"http://start.fedoraproject pref("geo.wifi.uri", "https://location.services.mozilla.com/v1/geolocate?key=%MOZILLA_API_KEY%"); pref("media.gmp-gmpopenh264.provider.enabled",false); pref("media.gmp-gmpopenh264.autoupdate",false); -pref("media.gmp-gmpopenh264.enabled",false);
\ No newline at end of file +pref("media.gmp-gmpopenh264.enabled",false); +pref("media.gmp-gmpopenh264.enabled",false); diff --git a/firefox.spec b/firefox.spec index a4ef4cc..b3f0372 100644 --- a/firefox.spec +++ b/firefox.spec @@ -113,7 +113,7 @@ Summary: Mozilla Firefox Web browser Name: firefox Version: 34.0 -Release: 2%{?pre_tag}%{?dist} +Release: 3%{?pre_tag}%{?dist} URL: http://www.mozilla.org/projects/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -152,6 +152,10 @@ Patch301: mozilla-1097550-dict-fix.patch # Gtk3 upstream patches Patch402: mozilla-gtk3-tab-size.patch +Patch403: mozilla-1051209.patch +Patch404: mozilla-1101582.patch +Patch405: mozilla-1073117-check.patch +Patch406: mozilla-1073117-color.patch %if %{official_branding} # Required by Mozilla Corporation @@ -300,6 +304,10 @@ cd %{tarballdir} %if %{toolkit_gtk3} %patch402 -p1 -b .gtk3-tab-size +%patch403 -p1 -b .1051209 +%patch404 -p1 -b .1101582 +%patch405 -p1 -b .1073117-check +%patch406 -p1 -b .1073117-color %endif %if %{official_branding} @@ -763,6 +771,10 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : #--------------------------------------------------------------------- %changelog +* Mon Dec 8 2014 Martin Stransky <stransky@redhat.com> - 34.0-3 +- Gtk3 flash plugin fix (rhbz#1171457) +- Gtk3 theme fixes + * Wed Dec 3 2014 Jan Horak <jhorak@redhat.com> - 34.0-2 - Fix for mozbz#1097550 - wrong default dictionary diff --git a/mozilla-1051209.patch b/mozilla-1051209.patch new file mode 100644 index 0000000..df7f3a1 --- /dev/null +++ b/mozilla-1051209.patch @@ -0,0 +1,47 @@ +# HG changeset patch +# User Mike Hommey <mh+mozilla@glandium.org> +# Date 1409907676 -32400 +# Fri Sep 05 18:01:16 2014 +0900 +# Node ID 4eac619b94070c8e854f6b3925879700430ab7f1 +# Parent 477f8748127a6f702616803e6c43632cb560f8a2 +Bug 1051209 - Properly link libxul.so on GTK+3 builds after bug 1045783 + +diff --git a/configure.in b/configure.in +--- a/configure.in ++++ b/configure.in +@@ -4153,17 +4153,16 @@ cairo-gtk3) + MOZ_ENABLE_XREMOTE=1 + MOZ_GL_DEFAULT_PROVIDER=GLX + + AC_DEFINE(MOZ_X11) + MOZ_X11=1 + USE_FC_FREETYPE=1 + + TK_CFLAGS='$(MOZ_GTK3_CFLAGS)' +- TK_LIBS='$(MOZ_GTK3_LIBS)' + MOZ_WIDGET_GTK=3 + AC_DEFINE_UNQUOTED(MOZ_WIDGET_GTK,$MOZ_WIDGET_GTK) + MOZ_PDF_PRINTING=1 + MOZ_INSTRUMENT_EVENT_LOOP=1 + ;; + + cairo-gtk2|cairo-gtk2-x11) + MOZ_WIDGET_TOOLKIT=gtk2 +@@ -4266,16 +4265,17 @@ fi + if test "$MOZ_INSTRUMENT_EVENT_LOOP"; then + AC_DEFINE(MOZ_INSTRUMENT_EVENT_LOOP) + fi + + if test "$COMPILE_ENVIRONMENT"; then + if test "$MOZ_ENABLE_GTK3"; then + PKG_CHECK_MODULES(MOZ_GTK3, gtk+-3.0 >= $GTK3_VERSION gtk+-unix-print-3.0 glib-2.0 gobject-2.0 $GDK_PACKAGES) + MOZ_GTK3_CFLAGS="-I${_topsrcdir}/widget/gtk/compat-gtk3 $MOZ_GTK3_CFLAGS" ++ TK_LIBS=$MOZ_GTK3_LIBS + fi + if test "$MOZ_ENABLE_GTK"; then + if test "$MOZ_X11"; then + GDK_PACKAGES=gdk-x11-2.0 + fi + + PKG_CHECK_MODULES(MOZ_GTK2, gtk+-2.0 >= $GTK2_VERSION gtk+-unix-print-2.0 glib-2.0 gobject-2.0 $GDK_PACKAGES) + MOZ_GTK2_CFLAGS="-I${_topsrcdir}/widget/gtk/compat $MOZ_GTK2_CFLAGS" diff --git a/mozilla-1073117-check.patch b/mozilla-1073117-check.patch new file mode 100644 index 0000000..eff3b5a --- /dev/null +++ b/mozilla-1073117-check.patch @@ -0,0 +1,125 @@ +# HG changeset patch +# Parent cef590a6f94681064fa954890bae6014db819158 +# User Martin Stransky <stransky@redhat.com> +Bug 1073117 - Add new GTK_STATE_FLAG_CHECKED for checkbox rendering, r=?karlt + +diff --git a/widget/gtk/gtk3drawing.c b/widget/gtk/gtk3drawing.c +--- a/widget/gtk/gtk3drawing.c ++++ b/widget/gtk/gtk3drawing.c +@@ -59,23 +59,28 @@ static GtkWidget* gExpanderWidget; + static GtkWidget* gToolbarSeparatorWidget; + static GtkWidget* gMenuSeparatorWidget; + static GtkWidget* gHPanedWidget; + static GtkWidget* gVPanedWidget; + static GtkWidget* gScrolledWindowWidget; + + static style_prop_t style_prop_func; + static gboolean have_arrow_scaling; ++static gboolean checkbox_check_state; + static gboolean is_initialized; + + #define ARROW_UP 0 + #define ARROW_DOWN G_PI + #define ARROW_RIGHT G_PI_2 + #define ARROW_LEFT (G_PI+G_PI_2) + ++#if !GTK_CHECK_VERSION(3,14,0) ++#define GTK_STATE_FLAG_CHECKED (1 << 11) ++#endif ++ + static GtkStateFlags + GetStateFlagsFromGtkWidgetState(GtkWidgetState* state) + { + GtkStateFlags stateFlags = GTK_STATE_FLAG_NORMAL; + + if (state->disabled) + stateFlags = GTK_STATE_FLAG_INSENSITIVE; + else { +@@ -709,17 +714,22 @@ moz_gtk_init() + GtkWidgetClass *entry_class; + + if (is_initialized) + return MOZ_GTK_SUCCESS; + + is_initialized = TRUE; + have_arrow_scaling = (gtk_major_version > 2 || + (gtk_major_version == 2 && gtk_minor_version >= 12)); +- ++ if (gtk_major_version > 3 || ++ (gtk_major_version == 3 && gtk_minor_version >= 14)) ++ checkbox_check_state = GTK_STATE_FLAG_CHECKED; ++ else ++ checkbox_check_state = GTK_STATE_FLAG_ACTIVE; ++ + /* Add style property to GtkEntry. + * Adding the style property to the normal GtkEntry class means that it + * will work without issues inside GtkComboBox and for Spinbuttons. */ + entry_class = g_type_class_ref(GTK_TYPE_ENTRY); + + return MOZ_GTK_SUCCESS; + } + +@@ -999,20 +1009,20 @@ moz_gtk_toggle_paint(cairo_t *cr, GdkRec + focus_width = width + 2 * indicator_spacing; + focus_height = height + 2 * indicator_spacing; + + style = gtk_widget_get_style_context(w); + + gtk_widget_set_sensitive(w, !state->disabled); + gtk_widget_set_direction(w, direction); + gtk_style_context_save(style); +- ++ + if (isradio) { + gtk_style_context_add_class(style, GTK_STYLE_CLASS_RADIO); +- gtk_style_context_set_state(style, selected ? GTK_STATE_FLAG_ACTIVE : ++ gtk_style_context_set_state(style, selected ? checkbox_check_state : + GTK_STATE_FLAG_NORMAL); + gtk_render_option(style, cr, x, y, width, height); + if (state->focused) { + gtk_render_focus(style, cr, focus_x, focus_y, + focus_width, focus_height); + } + } + else { +@@ -1020,17 +1030,17 @@ moz_gtk_toggle_paint(cairo_t *cr, GdkRec + * 'indeterminate' type on checkboxes. In GTK, the shadow type + * must also be changed for the state to be drawn. + */ + gtk_style_context_add_class(style, GTK_STYLE_CLASS_CHECK); + if (inconsistent) { + gtk_style_context_set_state(style, GTK_STATE_FLAG_INCONSISTENT); + gtk_toggle_button_set_inconsistent(GTK_TOGGLE_BUTTON(gCheckboxWidget), TRUE); + } else if (selected) { +- gtk_style_context_set_state(style, GTK_STATE_FLAG_ACTIVE); ++ gtk_style_context_set_state(style, checkbox_check_state); + } else { + gtk_toggle_button_set_inconsistent(GTK_TOGGLE_BUTTON(gCheckboxWidget), FALSE); + } + gtk_render_check(style, cr, x, y, width, height); + if (state->focused) { + gtk_render_focus(style, cr, + focus_x, focus_y, focus_width, focus_height); + } +@@ -2583,18 +2593,19 @@ moz_gtk_check_menu_item_paint(cairo_t *c + style = gtk_widget_get_style_context(gCheckMenuItemWidget); + gtk_style_context_save(style); + if (isradio) { + gtk_style_context_add_class(style, GTK_STYLE_CLASS_RADIO); + } else { + gtk_style_context_add_class(style, GTK_STYLE_CLASS_CHECK); + } + +- if (checked) +- state_flags |= GTK_STATE_FLAG_ACTIVE; ++ if (checked) { ++ state_flags |= checkbox_check_state; ++ } + + gtk_style_context_set_state(style, state_flags); + gtk_style_context_get_padding(style, state_flags, &padding); + + offset = gtk_container_get_border_width(GTK_CONTAINER(gCheckMenuItemWidget)) + + padding.left + 2; + + if (direction == GTK_TEXT_DIR_RTL) { diff --git a/mozilla-1073117-color.patch b/mozilla-1073117-color.patch new file mode 100644 index 0000000..b3dee3a --- /dev/null +++ b/mozilla-1073117-color.patch @@ -0,0 +1,278 @@ +# HG changeset patch +# Parent 18188c19a3c3ec9cd4474de5bd1f5558ec750a36 +# User Martin Stransky <stransky@redhat.com> +Bug 1073117 - [gtk3] Use GTK_STYLE_CLASS_VIEW style for selected text rendering. r=?karlt +It also merges some duplicated colors and adds GTK_STATE_FLAG_FOCUSED for selected text. + + +diff --git a/widget/gtk/nsLookAndFeel.cpp b/widget/gtk/nsLookAndFeel.cpp +--- a/widget/gtk/nsLookAndFeel.cpp ++++ b/widget/gtk/nsLookAndFeel.cpp +@@ -33,32 +33,30 @@ using mozilla::LookAndFeel; + (int)((c).blue*255), (int)((c).alpha*255))) + + nsLookAndFeel::nsLookAndFeel() + : nsXPLookAndFeel(), + #if (MOZ_WIDGET_GTK == 2) + mStyle(nullptr), + #else + mBackgroundStyle(nullptr), +- mViewStyle(nullptr), + mButtonStyle(nullptr), + #endif + mDefaultFontCached(false), mButtonFontCached(false), + mFieldFontCached(false), mMenuFontCached(false) + { + Init(); + } + + nsLookAndFeel::~nsLookAndFeel() + { + #if (MOZ_WIDGET_GTK == 2) + g_object_unref(mStyle); + #else + g_object_unref(mBackgroundStyle); +- g_object_unref(mViewStyle); + g_object_unref(mButtonStyle); + #endif + } + + nsresult + nsLookAndFeel::NativeGetColor(ColorID aID, nscolor& aColor) + { + #if (MOZ_WIDGET_GTK == 3) +@@ -109,23 +107,29 @@ nsLookAndFeel::NativeGetColor(ColorID aI + case eColorID__moz_dialogtext: + aColor = sMozWindowText; + break; + case eColorID_WidgetSelectBackground: + case eColorID_TextSelectBackground: + case eColorID_IMESelectedRawTextBackground: + case eColorID_IMESelectedConvertedTextBackground: + case eColorID__moz_dragtargetzone: +- aColor = sMozWindowSelectedBackground; ++ case eColorID__moz_cellhighlight: ++ case eColorID__moz_html_cellhighlight: ++ case eColorID_highlight: // preference selected item, ++ aColor = sTextSelectedBackground; + break; + case eColorID_WidgetSelectForeground: + case eColorID_TextSelectForeground: + case eColorID_IMESelectedRawTextForeground: + case eColorID_IMESelectedConvertedTextForeground: +- aColor = sMozWindowSelectedText; ++ case eColorID_highlighttext: ++ case eColorID__moz_cellhighlighttext: ++ case eColorID__moz_html_cellhighlighttext: ++ aColor = sTextSelectedText; + break; + #endif + case eColorID_Widget3DHighlight: + aColor = NS_RGB(0xa0,0xa0,0xa0); + break; + case eColorID_Widget3DShadow: + aColor = NS_RGB(0x40,0x40,0x40); + break; +@@ -233,29 +237,16 @@ nsLookAndFeel::NativeGetColor(ColorID aI + aColor = GDK_RGBA_TO_NS_RGBA(gdk_color); + break; + case eColorID_graytext: // disabled text in windows, menus, etc. + case eColorID_inactivecaptiontext: // text in inactive window caption + gtk_style_context_get_color(mBackgroundStyle, + GTK_STATE_FLAG_INSENSITIVE, &gdk_color); + aColor = GDK_RGBA_TO_NS_RGBA(gdk_color); + break; +- case eColorID_highlight: // preference selected item, +- // background of selected item +- gtk_style_context_get_background_color(mViewStyle, +- GTK_STATE_FLAG_SELECTED, +- &gdk_color); +- aColor = GDK_RGBA_TO_NS_RGBA(gdk_color); +- break; +- case eColorID_highlighttext: +- // text of selected item +- gtk_style_context_get_color(mViewStyle, +- GTK_STATE_FLAG_SELECTED, &gdk_color); +- aColor = GDK_RGBA_TO_NS_RGBA(gdk_color); +- break; + case eColorID_inactivecaption: + // inactive window caption + gtk_style_context_get_background_color(mBackgroundStyle, + GTK_STATE_FLAG_INSENSITIVE, + &gdk_color); + aColor = GDK_RGBA_TO_NS_RGBA(gdk_color); + break; + #endif +@@ -388,29 +379,16 @@ nsLookAndFeel::NativeGetColor(ColorID aI + gtk_style_context_get_background_color(mButtonStyle, + GTK_STATE_FLAG_PRELIGHT, + &gdk_color); + aColor = GDK_RGBA_TO_NS_RGBA(gdk_color); + break; + case eColorID__moz_buttonhovertext: + aColor = sButtonHoverText; + break; +- case eColorID__moz_cellhighlight: +- case eColorID__moz_html_cellhighlight: +- gtk_style_context_get_background_color(mViewStyle, +- GTK_STATE_FLAG_SELECTED, +- &gdk_color); +- aColor = GDK_RGBA_TO_NS_RGBA(gdk_color); +- break; +- case eColorID__moz_cellhighlighttext: +- case eColorID__moz_html_cellhighlighttext: +- gtk_style_context_get_color(mViewStyle, +- GTK_STATE_FLAG_SELECTED, &gdk_color); +- aColor = GDK_RGBA_TO_NS_RGBA(gdk_color); +- break; + #endif + case eColorID__moz_menuhover: + aColor = sMenuHover; + break; + case eColorID__moz_menuhovertext: + aColor = sMenuHoverText; + break; + case eColorID__moz_oddtreerow: +@@ -962,60 +940,66 @@ nsLookAndFeel::Init() + } + + g_object_unref(menu); + #else + GdkRGBA color; + GtkStyleContext *style; + + // Gtk manages a screen's CSS in the settings object so we +- // ask Gtk to create it explicitly. Otherwise we may end up ++ // ask Gtk to create it explicitly. Otherwise we may end up + // with wrong color theme, see Bug 972382 + (void)gtk_settings_get_for_screen(gdk_screen_get_default()); + + GtkWidgetPath *path = gtk_widget_path_new(); + gtk_widget_path_append_type(path, GTK_TYPE_WINDOW); + + mBackgroundStyle = create_context(path); + gtk_style_context_add_class(mBackgroundStyle, GTK_STYLE_CLASS_BACKGROUND); + +- mViewStyle = create_context(path); +- gtk_style_context_add_class(mViewStyle, GTK_STYLE_CLASS_VIEW); +- + mButtonStyle = create_context(path); + gtk_style_context_add_class(mButtonStyle, GTK_STYLE_CLASS_BUTTON); + + // Scrollbar colors + style = create_context(path); + gtk_style_context_add_class(style, GTK_STYLE_CLASS_SCROLLBAR); + gtk_style_context_add_class(style, GTK_STYLE_CLASS_TROUGH); + gtk_style_context_get_background_color(style, GTK_STATE_FLAG_NORMAL, &color); + sMozScrollbar = GDK_RGBA_TO_NS_RGBA(color); + g_object_unref(style); + + // Text colors +- gtk_style_context_get_background_color(mViewStyle, GTK_STATE_FLAG_NORMAL, &color); ++ style = create_context(path); ++ gtk_style_context_add_class(style, GTK_STYLE_CLASS_VIEW); ++ gtk_style_context_get_background_color(style, GTK_STATE_FLAG_NORMAL, &color); + sMozFieldBackground = GDK_RGBA_TO_NS_RGBA(color); +- gtk_style_context_get_color(mViewStyle, GTK_STATE_FLAG_NORMAL, &color); ++ gtk_style_context_get_color(style, GTK_STATE_FLAG_NORMAL, &color); + sMozFieldText = GDK_RGBA_TO_NS_RGBA(color); + ++ // Selected text and background ++ gtk_style_context_get_background_color(style, ++ static_cast<GtkStateFlags>(GTK_STATE_FLAG_FOCUSED|GTK_STATE_FLAG_SELECTED), ++ &color); ++ sTextSelectedBackground = GDK_RGBA_TO_NS_RGBA(color); ++ gtk_style_context_get_color(style, ++ static_cast<GtkStateFlags>(GTK_STATE_FLAG_FOCUSED|GTK_STATE_FLAG_SELECTED), ++ &color); ++ sTextSelectedText = GDK_RGBA_TO_NS_RGBA(color); ++ g_object_unref(style); ++ + // Window colors + style = create_context(path); + gtk_style_context_save(style); + gtk_style_context_add_class(style, GTK_STYLE_CLASS_BACKGROUND); + gtk_style_context_get_background_color(style, GTK_STATE_FLAG_NORMAL, &color); + sMozWindowBackground = GDK_RGBA_TO_NS_RGBA(color); ++ ++ // Text colors + gtk_style_context_get_color(style, GTK_STATE_FLAG_NORMAL, &color); + sMozWindowText = GDK_RGBA_TO_NS_RGBA(color); +- +- // Selected text and background +- gtk_style_context_get_background_color(style, GTK_STATE_FLAG_SELECTED, &color); +- sMozWindowSelectedBackground = GDK_RGBA_TO_NS_RGBA(color); +- gtk_style_context_get_color(style, GTK_STATE_FLAG_SELECTED, &color); +- sMozWindowSelectedText = GDK_RGBA_TO_NS_RGBA(color); + gtk_style_context_restore(style); + + // tooltip foreground and background + gtk_style_context_add_class(style, GTK_STYLE_CLASS_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); + sInfoText = GDK_RGBA_TO_NS_RGBA(color); +@@ -1251,21 +1235,19 @@ nsLookAndFeel::RefreshImpl() + mFieldFontCached = false; + mMenuFontCached = false; + + #if (MOZ_WIDGET_GTK == 2) + g_object_unref(mStyle); + mStyle = nullptr; + #else + g_object_unref(mBackgroundStyle); +- g_object_unref(mViewStyle); + g_object_unref(mButtonStyle); + + mBackgroundStyle = nullptr; +- mViewStyle = nullptr; + mButtonStyle = nullptr; + #endif + + Init(); + } + + bool + nsLookAndFeel::GetEchoPasswordImpl() { +diff --git a/widget/gtk/nsLookAndFeel.h b/widget/gtk/nsLookAndFeel.h +--- a/widget/gtk/nsLookAndFeel.h ++++ b/widget/gtk/nsLookAndFeel.h +@@ -30,17 +30,16 @@ public: + virtual char16_t GetPasswordCharacterImpl(); + virtual bool GetEchoPasswordImpl(); + + protected: + #if (MOZ_WIDGET_GTK == 2) + struct _GtkStyle *mStyle; + #else + struct _GtkStyleContext *mBackgroundStyle; +- struct _GtkStyleContext *mViewStyle; + struct _GtkStyleContext *mButtonStyle; + #endif + + // Cached fonts + bool mDefaultFontCached; + bool mButtonFontCached; + bool mFieldFontCached; + bool mMenuFontCached; +@@ -70,18 +69,18 @@ protected: + nscolor sOddCellBackground; + nscolor sNativeHyperLinkText; + nscolor sComboBoxText; + nscolor sComboBoxBackground; + nscolor sMozFieldText; + nscolor sMozFieldBackground; + nscolor sMozWindowText; + nscolor sMozWindowBackground; +- nscolor sMozWindowSelectedText; +- nscolor sMozWindowSelectedBackground; ++ nscolor sTextSelectedText; ++ nscolor sTextSelectedBackground; + nscolor sMozScrollbar; + char16_t sInvisibleCharacter; + float sCaretRatio; + bool sMenuSupportsDrag; + + void Init(); + }; + diff --git a/mozilla-1101582.patch b/mozilla-1101582.patch new file mode 100644 index 0000000..c1963f8 --- /dev/null +++ b/mozilla-1101582.patch @@ -0,0 +1,122 @@ +# HG changeset patch +# Parent cef590a6f94681064fa954890bae6014db819158 +# User Martin Stransky <stransky@redhat.com> +Bug 1101582 - [GTK3] - Use window background color for ThreeDFace,ButtonFace r=karlt +This fixes missing borders on non-natively-styled textareas. + +diff --git a/widget/gtk/nsLookAndFeel.cpp b/widget/gtk/nsLookAndFeel.cpp +--- a/widget/gtk/nsLookAndFeel.cpp ++++ b/widget/gtk/nsLookAndFeel.cpp +@@ -279,39 +279,41 @@ nsLookAndFeel::NativeGetColor(ColorID aI + // scrollbar gray area + #if (MOZ_WIDGET_GTK == 2) + aColor = GDK_COLOR_TO_NS_RGB(mStyle->bg[GTK_STATE_ACTIVE]); + #else + aColor = sMozScrollbar; + #endif + break; + ++ case eColorID_threedlightshadow: ++ // 3-D highlighted inner edge color ++ // always same as background in GTK code + case eColorID_threedface: + case eColorID_buttonface: + // 3-D face color +- aColor = sFrameBackground; ++#if (MOZ_WIDGET_GTK == 3) ++ aColor = sMozWindowBackground; ++#else ++ aColor = sButtonBackground; ++#endif + break; + + case eColorID_buttontext: + // text on push buttons + aColor = sButtonText; + break; + + case eColorID_buttonhighlight: + // 3-D highlighted edge color + case eColorID_threedhighlight: + // 3-D highlighted outer edge color + aColor = sFrameOuterLightBorder; + break; + +- case eColorID_threedlightshadow: +- // 3-D highlighted inner edge color +- aColor = sFrameBackground; // always same as background in GTK code +- break; +- + case eColorID_buttonshadow: + // 3-D shadow edge color + case eColorID_threedshadow: + // 3-D shadow inner edge color + aColor = sFrameInnerDarkBorder; + break; + + #if (MOZ_WIDGET_GTK == 2) +@@ -1136,17 +1138,17 @@ nsLookAndFeel::Init() + } + + sOddCellBackground = GDK_COLOR_TO_NS_RGB(colorValue); + if (colorValuePtr) + gdk_color_free(colorValuePtr); + + style = gtk_widget_get_style(button); + if (style) { +- sFrameBackground = GDK_COLOR_TO_NS_RGB(style->bg[GTK_STATE_NORMAL]); ++ sButtonBackground = GDK_COLOR_TO_NS_RGB(style->bg[GTK_STATE_NORMAL]); + sFrameOuterLightBorder = + GDK_COLOR_TO_NS_RGB(style->light[GTK_STATE_NORMAL]); + sFrameInnerDarkBorder = + GDK_COLOR_TO_NS_RGB(style->dark[GTK_STATE_NORMAL]); + } + #else + // Button text, background, border + style = gtk_widget_get_style_context(label); +@@ -1184,22 +1186,19 @@ nsLookAndFeel::Init() + gtk_style_context_add_region(style, GTK_STYLE_REGION_ROW, GTK_REGION_ODD); + gtk_style_context_get_background_color(style, GTK_STATE_FLAG_NORMAL, &color); + sOddCellBackground = GDK_RGBA_TO_NS_RGBA(color); + gtk_style_context_restore(style); + + GtkWidget *frame = gtk_frame_new(nullptr); + gtk_container_add(GTK_CONTAINER(parent), frame); + +- style = gtk_widget_get_style_context(frame); +- gtk_style_context_get_background_color(style, GTK_STATE_FLAG_NORMAL, &color); +- sFrameBackground = GDK_RGBA_TO_NS_RGBA(color); +- + // TODO GTK3 - update sFrameOuterLightBorder + // for GTK_BORDER_STYLE_INSET/OUTSET/GROVE/RIDGE border styles (Bug 978172). ++ style = gtk_widget_get_style_context(frame); + gtk_style_context_get_border_color(style, GTK_STATE_FLAG_NORMAL, &color); + sFrameInnerDarkBorder = sFrameOuterLightBorder = GDK_RGBA_TO_NS_RGBA(color); + #endif + // Some themes have a unified menu bar, and support window dragging on it + gboolean supports_menubar_drag = FALSE; + GParamSpec *param_spec = + gtk_widget_class_find_style_property(GTK_WIDGET_GET_CLASS(menuBar), + "window-dragging"); +diff --git a/widget/gtk/nsLookAndFeel.h b/widget/gtk/nsLookAndFeel.h +--- a/widget/gtk/nsLookAndFeel.h ++++ b/widget/gtk/nsLookAndFeel.h +@@ -59,17 +59,17 @@ protected: + nscolor sMenuBackground; + nscolor sMenuBarText; + nscolor sMenuBarHoverText; + nscolor sMenuText; + nscolor sMenuHover; + nscolor sMenuHoverText; + nscolor sButtonText; + nscolor sButtonHoverText; +- nscolor sFrameBackground; ++ nscolor sButtonBackground; + nscolor sFrameOuterLightBorder; + nscolor sFrameInnerDarkBorder; + nscolor sOddCellBackground; + nscolor sNativeHyperLinkText; + nscolor sComboBoxText; + nscolor sComboBoxBackground; + nscolor sMozFieldText; + nscolor sMozFieldBackground; |