diff options
Diffstat (limited to 'www/firefox/files')
-rw-r--r-- | www/firefox/files/patch-bug1021761 | 40 | ||||
-rw-r--r-- | www/firefox/files/patch-bug1073117 | 728 | ||||
-rw-r--r-- | www/firefox/files/patch-bug1101582 | 82 | ||||
-rw-r--r-- | www/firefox/files/patch-bug1103858 | 42 | ||||
-rw-r--r-- | www/firefox/files/patch-bug1128161 | 28 | ||||
-rw-r--r-- | www/firefox/files/patch-bug1138845 | 134 | ||||
-rw-r--r-- | www/firefox/files/patch-bug1143686 | 46 | ||||
-rw-r--r-- | www/firefox/files/patch-bug1144643 | 33 | ||||
-rw-r--r-- | www/firefox/files/patch-bug779713 | 12 | ||||
-rw-r--r-- | www/firefox/files/patch-bug899126 | 98 | ||||
-rw-r--r-- | www/firefox/files/patch-system-openh264 | 166 | ||||
-rw-r--r-- | www/firefox/files/patch-z-bug517422 | 25 |
12 files changed, 832 insertions, 602 deletions
diff --git a/www/firefox/files/patch-bug1021761 b/www/firefox/files/patch-bug1021761 index 74a5d7a30f61..253327b733a7 100644 --- a/www/firefox/files/patch-bug1021761 +++ b/www/firefox/files/patch-bug1021761 @@ -542,42 +542,42 @@ index a962553..1f780f4 100644 } alsa_locked_pcm_close(stm->pcm); stm->pcm = NULL; -@@ -937,12 +1043,12 @@ alsa_get_max_channel_count(cubeb * ctx, uint32_t * max_channels) +@@ -938,12 +1044,12 @@ alsa_get_max_channel_count(cubeb * ctx, uint32_t * max_channels) return CUBEB_ERROR; } -- rv = snd_pcm_hw_params_any(stm->pcm, hw_params); -+ rv = WRAP(snd_pcm_hw_params_any)(stm->pcm, hw_params); - if (rv < 0) { +- r = snd_pcm_hw_params_any(stm->pcm, hw_params); ++ r = WRAP(snd_pcm_hw_params_any)(stm->pcm, hw_params); + if (r < 0) { return CUBEB_ERROR; } -- rv = snd_pcm_hw_params_get_channels_max(hw_params, max_channels); -+ rv = WRAP(snd_pcm_hw_params_get_channels_max)(hw_params, max_channels); - if (rv < 0) { +- r = snd_pcm_hw_params_get_channels_max(hw_params, max_channels); ++ r = WRAP(snd_pcm_hw_params_get_channels_max)(hw_params, max_channels); + if (r < 0) { return CUBEB_ERROR; } -@@ -962,34 +1068,34 @@ alsa_get_preferred_sample_rate(cubeb * ctx, uint32_t * rate) { +@@ -963,34 +1069,34 @@ alsa_get_preferred_sample_rate(cubeb * ctx, uint32_t * rate) { /* get a pcm, disabling resampling, so we get a rate the * hardware/dmix/pulse/etc. supports. */ -- rv = snd_pcm_open(&pcm, "", SND_PCM_STREAM_PLAYBACK | SND_PCM_NO_AUTO_RESAMPLE, 0); -+ rv = WRAP(snd_pcm_open)(&pcm, "", SND_PCM_STREAM_PLAYBACK | SND_PCM_NO_AUTO_RESAMPLE, 0); - if (rv < 0) { +- r = snd_pcm_open(&pcm, "default", SND_PCM_STREAM_PLAYBACK | SND_PCM_NO_AUTO_RESAMPLE, 0); ++ r = WRAP(snd_pcm_open)(&pcm, "default", SND_PCM_STREAM_PLAYBACK | SND_PCM_NO_AUTO_RESAMPLE, 0); + if (r < 0) { return CUBEB_ERROR; } -- rv = snd_pcm_hw_params_any(pcm, hw_params); -+ rv = WRAP(snd_pcm_hw_params_any)(pcm, hw_params); - if (rv < 0) { +- r = snd_pcm_hw_params_any(pcm, hw_params); ++ r = WRAP(snd_pcm_hw_params_any)(pcm, hw_params); + if (r < 0) { - snd_pcm_close(pcm); + WRAP(snd_pcm_close)(pcm); return CUBEB_ERROR; } -- rv = snd_pcm_hw_params_get_rate(hw_params, rate, &dir); -+ rv = WRAP(snd_pcm_hw_params_get_rate)(hw_params, rate, &dir); - if (rv >= 0) { +- r = snd_pcm_hw_params_get_rate(hw_params, rate, &dir); ++ r = WRAP(snd_pcm_hw_params_get_rate)(hw_params, rate, &dir); + if (r >= 0) { /* There is a default rate: use it. */ - snd_pcm_close(pcm); + WRAP(snd_pcm_close)(pcm); @@ -587,9 +587,9 @@ index a962553..1f780f4 100644 /* Use a common rate, alsa may adjust it based on hw/etc. capabilities. */ *rate = 44100; -- rv = snd_pcm_hw_params_set_rate_near(pcm, hw_params, rate, NULL); -+ rv = WRAP(snd_pcm_hw_params_set_rate_near)(pcm, hw_params, rate, NULL); - if (rv < 0) { +- r = snd_pcm_hw_params_set_rate_near(pcm, hw_params, rate, NULL); ++ r = WRAP(snd_pcm_hw_params_set_rate_near)(pcm, hw_params, rate, NULL); + if (r < 0) { - snd_pcm_close(pcm); + WRAP(snd_pcm_close)(pcm); return CUBEB_ERROR; diff --git a/www/firefox/files/patch-bug1073117 b/www/firefox/files/patch-bug1073117 index 756a64293b35..e9d86eceeff4 100644 --- a/www/firefox/files/patch-bug1073117 +++ b/www/firefox/files/patch-bug1073117 @@ -1,245 +1,511 @@ +diff --git widget/gtk/gtk2drawing.c widget/gtk/gtk2drawing.c +index 34f22af..1b950ab 100644 +--- widget/gtk/gtk2drawing.c ++++ widget/gtk/gtk2drawing.c +@@ -831,7 +831,7 @@ moz_gtk_get_focus_outline_size(gint* focus_h_width, gint* focus_v_width) + return MOZ_GTK_SUCCESS; + } + +-gint ++static gint + moz_gtk_widget_get_focus(GtkWidget* widget, gboolean* interior_focus, + gint* focus_width, gint* focus_pad) + { +@@ -928,7 +928,7 @@ moz_gtk_splitter_get_metrics(gint orientation, gint* size) + return MOZ_GTK_SUCCESS; + } + +-gint ++static gint + moz_gtk_button_get_inner_border(GtkWidget* widget, GtkBorder* inner_border) + { + static const GtkBorder default_inner_border = { 1, 1, 1, 1 }; diff --git widget/gtk/gtk3drawing.c widget/gtk/gtk3drawing.c -index e9e21b1..750140c 100644 +index 08a58d6..7fef6fa 100644 --- widget/gtk/gtk3drawing.c +++ widget/gtk/gtk3drawing.c -@@ -64,6 +64,7 @@ static GtkWidget* gScrolledWindowWidget; +@@ -762,37 +762,17 @@ moz_gtk_radio_get_metrics(gint* indicator_size, gint* indicator_spacing) + gint + moz_gtk_get_focus_outline_size(gint* focus_h_width, gint* focus_v_width) + { +- gboolean interior_focus; +- gint focus_width = 0; ++ GtkBorder border; ++ GtkBorder padding; ++ GtkStyleContext *style; - static style_prop_t style_prop_func; - static gboolean have_arrow_scaling; -+static gboolean checkbox_check_state; - static gboolean is_initialized; + ensure_entry_widget(); +- gtk_widget_style_get(gEntryWidget, +- "interior-focus", &interior_focus, +- "focus-line-width", &focus_width, +- NULL); +- if (interior_focus) { +- GtkBorder border; +- GtkStyleContext *style = gtk_widget_get_style_context(gEntryWidget); +- gtk_style_context_get_border(style, 0, &border); +- *focus_h_width = border.left + focus_width; +- *focus_v_width = border.top + focus_width; +- } else { +- *focus_h_width = focus_width; +- *focus_v_width = focus_width; +- } +- return MOZ_GTK_SUCCESS; +-} +- +-gint +-moz_gtk_widget_get_focus(GtkWidget* widget, gboolean* interior_focus, +- gint* focus_width, gint* focus_pad) +-{ +- gtk_widget_style_get (widget, +- "interior-focus", interior_focus, +- "focus-line-width", focus_width, +- "focus-padding", focus_pad, +- NULL); ++ style = gtk_widget_get_style_context(gEntryWidget); - #define ARROW_UP 0 -@@ -71,6 +72,10 @@ static gboolean is_initialized; - #define ARROW_RIGHT G_PI_2 - #define ARROW_LEFT (G_PI+G_PI_2) ++ gtk_style_context_get_border(style, 0, &border); ++ gtk_style_context_get_padding(style, 0, &padding); ++ *focus_h_width = border.left + padding.left; ++ *focus_v_width = border.top + padding.top; + return MOZ_GTK_SUCCESS; + } -+#if !GTK_CHECK_VERSION(3,14,0) -+#define GTK_STATE_FLAG_CHECKED (1 << 11) -+#endif -+ - static GtkStateFlags - GetStateFlagsFromGtkWidgetState(GtkWidgetState* state) - { -@@ -714,6 +719,11 @@ moz_gtk_init() - 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 -@@ -1004,10 +1014,10 @@ moz_gtk_toggle_paint(cairo_t *cr, GdkRectangle* rect, - gtk_widget_set_sensitive(w, !state->disabled); - gtk_widget_set_direction(w, direction); +@@ -880,24 +860,6 @@ moz_gtk_splitter_get_metrics(gint orientation, gint* size) + return MOZ_GTK_SUCCESS; + } + +-gint +-moz_gtk_button_get_inner_border(GtkWidget* widget, GtkBorder* inner_border) +-{ +- static const GtkBorder default_inner_border = { 1, 1, 1, 1 }; +- GtkBorder *tmp_border; +- +- gtk_widget_style_get (widget, "inner-border", &tmp_border, NULL); +- +- if (tmp_border) { +- *inner_border = *tmp_border; +- gtk_border_free(tmp_border); +- } +- else +- *inner_border = default_inner_border; +- +- return MOZ_GTK_SUCCESS; +-} +- + static gint + moz_gtk_button_paint(cairo_t *cr, GdkRectangle* rect, + GtkWidgetState* state, +@@ -908,19 +870,8 @@ moz_gtk_button_paint(cairo_t *cr, GdkRectangle* rect, + GtkStyleContext* style = gtk_widget_get_style_context(widget); + gint x = rect->x, y=rect->y, width=rect->width, height=rect->height; + +- gboolean interior_focus; +- gint focus_width, focus_pad; +- +- moz_gtk_widget_get_focus(widget, &interior_focus, &focus_width, &focus_pad); + gtk_widget_set_direction(widget, direction); +- +- if (!interior_focus && state->focused) { +- x += focus_width + focus_pad; +- y += focus_width + focus_pad; +- width -= 2 * (focus_width + focus_pad); +- height -= 2 * (focus_width + focus_pad); +- } +- ++ 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) { -@@ -1025,7 +1035,7 @@ moz_gtk_toggle_paint(cairo_t *cr, GdkRectangle* rect, - 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); - } -@@ -2588,8 +2598,9 @@ moz_gtk_check_menu_item_paint(cairo_t *cr, GdkRectangle* rect, - gtk_style_context_add_class(style, GTK_STYLE_CLASS_CHECK); + gtk_style_context_set_state(style, state_flags); + +@@ -953,20 +904,12 @@ moz_gtk_button_paint(cairo_t *cr, GdkRectangle* rect, } -- 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); -diff --git widget/gtk/nsLookAndFeel.cpp widget/gtk/nsLookAndFeel.cpp -index 3562cf2..ea4cc0e 100644 ---- widget/gtk/nsLookAndFeel.cpp -+++ widget/gtk/nsLookAndFeel.cpp -@@ -38,7 +38,6 @@ nsLookAndFeel::nsLookAndFeel() - mStyle(nullptr), - #else - mBackgroundStyle(nullptr), -- mViewStyle(nullptr), - mButtonStyle(nullptr), - #endif - mDefaultFontCached(false), mButtonFontCached(false), -@@ -53,7 +52,6 @@ nsLookAndFeel::~nsLookAndFeel() - g_object_unref(mStyle); - #else - g_object_unref(mBackgroundStyle); -- g_object_unref(mViewStyle); - g_object_unref(mButtonStyle); - #endif + if (state->focused) { +- if (interior_focus) { +- GtkBorder border; +- gtk_style_context_get_border(style, state_flags, &border); +- x += border.left + focus_pad; +- y += border.top + focus_pad; +- width -= 2 * (border.left + focus_pad); +- height -= 2 * (border.top + focus_pad); +- } else { +- x -= focus_width + focus_pad; +- y -= focus_width + focus_pad; +- width += 2 * (focus_width + focus_pad); +- height += 2 * (focus_width + focus_pad); +- } +- ++ GtkBorder border; ++ gtk_style_context_get_border(style, state_flags, &border); ++ x += border.left; ++ y += border.top; ++ width -= (border.left + border.right); ++ height -= (border.top + border.bottom); + gtk_render_focus(style, cr, x, y, width, height); + } + gtk_style_context_restore(style); +@@ -1056,33 +999,23 @@ calculate_button_inner_rect(GtkWidget* button, GdkRectangle* rect, + GtkTextDirection direction, + gboolean ignore_focus) + { +- GtkBorder inner_border; +- gboolean interior_focus; +- gint focus_width, focus_pad; + GtkStyleContext* style; + GtkBorder border; ++ GtkBorder padding = {0, 0, 0, 0}; + + style = gtk_widget_get_style_context(button); + + /* This mirrors gtkbutton's child positioning */ +- moz_gtk_button_get_inner_border(button, &inner_border); +- moz_gtk_widget_get_focus(button, &interior_focus, +- &focus_width, &focus_pad); +- +- if (ignore_focus) +- focus_width = focus_pad = 0; +- + gtk_style_context_get_border(style, 0, &border); ++ if (!ignore_focus) ++ gtk_style_context_get_padding(style, 0, &padding); + +- inner_rect->x = rect->x + border.left + focus_width + focus_pad; +- inner_rect->x += direction == GTK_TEXT_DIR_LTR ? +- inner_border.left : inner_border.right; +- inner_rect->y = rect->y + inner_border.top + border.top + +- focus_width + focus_pad; +- inner_rect->width = MAX(1, rect->width - inner_border.left - +- inner_border.right - (border.left + focus_pad + focus_width) * 2); +- inner_rect->height = MAX(1, rect->height - inner_border.top - +- inner_border.bottom - (border.top + focus_pad + focus_width) * 2); ++ inner_rect->x = rect->x + border.left + padding.left; ++ inner_rect->y = rect->y + padding.top + border.top; ++ inner_rect->width = MAX(1, rect->width - padding.left - ++ padding.right - border.left * 2); ++ inner_rect->height = MAX(1, rect->height - padding.top - ++ padding.bottom - border.top * 2); + + return MOZ_GTK_SUCCESS; } -@@ -114,13 +112,19 @@ nsLookAndFeel::NativeGetColor(ColorID aID, nscolor& aColor) - 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: -@@ -238,19 +242,6 @@ nsLookAndFeel::NativeGetColor(ColorID aID, nscolor& aColor) - 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, -@@ -393,19 +384,6 @@ nsLookAndFeel::NativeGetColor(ColorID aID, nscolor& aColor) - 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; -@@ -967,7 +945,7 @@ nsLookAndFeel::Init() - GtkStyleContext *style; +@@ -1457,19 +1390,12 @@ moz_gtk_entry_paint(cairo_t *cr, GdkRectangle* rect, + { + gint x = rect->x, y = rect->y, width = rect->width, height = rect->height; + GtkStyleContext* style; +- gboolean interior_focus; +- gint focus_width; + int draw_focus_outline_only = state->depressed; // NS_THEME_FOCUS_OUTLINE - // 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()); - -@@ -977,9 +955,6 @@ nsLookAndFeel::Init() - 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); - -@@ -992,11 +967,24 @@ nsLookAndFeel::Init() - 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_widget_set_direction(widget, direction); + + style = gtk_widget_get_style_context(widget); + +- gtk_widget_style_get(widget, +- "interior-focus", &interior_focus, +- "focus-line-width", &focus_width, +- NULL); +- + if (draw_focus_outline_only) { + // Inflate the given 'rect' with the focus outline size. + gint h, v; +@@ -1501,14 +1427,6 @@ moz_gtk_entry_paint(cairo_t *cr, GdkRectangle* rect, + /* This will get us the lit borders that focused textboxes enjoy on + * some themes. */ + gtk_style_context_set_state(style, GTK_STATE_FLAG_FOCUSED); +- if (!interior_focus) { +- /* Indent the border a little bit if we have exterior focus +- (this is what GTK does to draw native entries) */ +- x += focus_width; +- y += focus_width; +- width -= 2 * focus_width; +- height -= 2 * focus_width; +- } + } + + if (state->disabled) { +@@ -1520,11 +1438,6 @@ moz_gtk_entry_paint(cairo_t *cr, GdkRectangle* rect, + } + gtk_render_frame(style, cr, x, y, width, height); + +- if (state->focused && !state->disabled) { +- if (!interior_focus) { +- gtk_render_focus(style, cr, rect->x, rect->y, rect->width, rect->height); +- } +- } + gtk_style_context_restore(style); + + return MOZ_GTK_SUCCESS; +@@ -1829,8 +1742,6 @@ moz_gtk_container_paint(cairo_t *cr, GdkRectangle* rect, + GtkStateFlags state_flags = GetStateFlagsFromGtkWidgetState(state); + GtkStyleContext* style; + GtkWidget *widget; +- gboolean interior_focus; +- gint focus_width, focus_pad; + + if (isradio) { + ensure_radiobutton_widget(); +@@ -1843,7 +1754,6 @@ moz_gtk_container_paint(cairo_t *cr, GdkRectangle* rect, + + style = gtk_widget_get_style_context(widget); gtk_style_context_save(style); -@@ -1005,12 +993,6 @@ nsLookAndFeel::Init() - sMozWindowBackground = GDK_RGBA_TO_NS_RGBA(color); - 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); +- moz_gtk_widget_get_focus(widget, &interior_focus, &focus_width, &focus_pad); + gtk_style_context_set_state(style, state_flags); + + /* this is for drawing a prelight box */ +@@ -1852,10 +1762,6 @@ moz_gtk_container_paint(cairo_t *cr, GdkRectangle* rect, + rect->x, rect->y, rect->width, rect->height); + } + +- if (state->focused && !interior_focus) { +- gtk_render_focus(style, cr, +- rect->x, rect->y, rect->width, rect->height); +- } gtk_style_context_restore(style); + + return MOZ_GTK_SUCCESS; +@@ -1868,7 +1774,6 @@ moz_gtk_toggle_label_paint(cairo_t *cr, GdkRectangle* rect, + { + GtkStyleContext *style; + GtkWidget *widget; +- gboolean interior_focus; + + if (!state->focused) + return MOZ_GTK_SUCCESS; +@@ -1889,10 +1794,6 @@ moz_gtk_toggle_label_paint(cairo_t *cr, GdkRectangle* rect, + } + gtk_widget_set_direction(widget, direction); + +- gtk_widget_style_get(widget, "interior-focus", &interior_focus, NULL); +- if (!interior_focus) +- return MOZ_GTK_SUCCESS; +- + gtk_style_context_set_state(style, GetStateFlagsFromGtkWidgetState(state)); + gtk_render_focus(style, cr, + rect->x, rect->y, rect->width, rect->height); +@@ -2690,26 +2591,18 @@ moz_gtk_get_widget_border(GtkThemeWidgetType widget, gint* left, gint* top, + switch (widget) { + case MOZ_GTK_BUTTON: + { +- GtkBorder inner_border; +- gboolean interior_focus; +- gint focus_width, focus_pad; +- + ensure_button_widget(); ++ style = gtk_widget_get_style_context(gButtonWidget); ++ + *left = *top = *right = *bottom = gtk_container_get_border_width(GTK_CONTAINER(gButtonWidget)); + + /* Don't add this padding in HTML, otherwise the buttons will + become too big and stuff the layout. */ + if (!inhtml) { +- moz_gtk_widget_get_focus(gButtonWidget, &interior_focus, &focus_width, &focus_pad); +- moz_gtk_button_get_inner_border(gButtonWidget, &inner_border); +- *left += focus_width + focus_pad + inner_border.left; +- *right += focus_width + focus_pad + inner_border.right; +- *top += focus_width + focus_pad + inner_border.top; +- *bottom += focus_width + focus_pad + inner_border.bottom; ++ moz_gtk_add_style_padding(style, left, top, right, bottom); + } + +- moz_gtk_add_style_border(gtk_widget_get_style_context(gButtonWidget), +- left, top, right, bottom); ++ moz_gtk_add_style_border(style, left, top, right, bottom); + return MOZ_GTK_SUCCESS; + } + case MOZ_GTK_ENTRY: +@@ -2717,7 +2610,13 @@ moz_gtk_get_widget_border(GtkThemeWidgetType widget, gint* left, gint* top, + ensure_entry_widget(); + style = gtk_widget_get_style_context(gEntryWidget); + moz_gtk_add_style_border(style, left, top, right, bottom); +- moz_gtk_add_style_padding(style, left, top, right, bottom); ++ ++ /* Use the document padding in HTML ++ and GTK style padding in XUL. */ ++ if (!inhtml) { ++ moz_gtk_add_style_padding(style, left, top, right, bottom); ++ } ++ + return MOZ_GTK_SUCCESS; + } + case MOZ_GTK_TREEVIEW: +@@ -2737,23 +2636,15 @@ moz_gtk_get_widget_border(GtkThemeWidgetType widget, gint* left, gint* top, + * assigned. + * That is why the following code is the same as for MOZ_GTK_BUTTON. + * */ +- +- GtkBorder inner_border; +- gboolean interior_focus; +- gint focus_width, focus_pad; ++ GtkStyleContext *style; + + ensure_tree_header_cell_widget(); + *left = *top = *right = *bottom = gtk_container_get_border_width(GTK_CONTAINER(gTreeHeaderCellWidget)); - // tooltip foreground and background -@@ -1256,11 +1238,9 @@ nsLookAndFeel::RefreshImpl() - mStyle = nullptr; - #else - g_object_unref(mBackgroundStyle); -- g_object_unref(mViewStyle); - g_object_unref(mButtonStyle); - - mBackgroundStyle = nullptr; -- mViewStyle = nullptr; - mButtonStyle = nullptr; - #endif - -diff --git widget/gtk/nsLookAndFeel.h widget/gtk/nsLookAndFeel.h -index aabbca6..7686cca 100644 ---- widget/gtk/nsLookAndFeel.h -+++ widget/gtk/nsLookAndFeel.h -@@ -35,7 +35,6 @@ protected: - struct _GtkStyle *mStyle; - #else - struct _GtkStyleContext *mBackgroundStyle; -- struct _GtkStyleContext *mViewStyle; - struct _GtkStyleContext *mButtonStyle; - #endif - -@@ -75,8 +74,8 @@ protected: - nscolor sMozFieldBackground; - nscolor sMozWindowText; - nscolor sMozWindowBackground; -- nscolor sMozWindowSelectedText; -- nscolor sMozWindowSelectedBackground; -+ nscolor sTextSelectedText; -+ nscolor sTextSelectedBackground; - nscolor sMozScrollbar; - char16_t sInvisibleCharacter; - float sCaretRatio; +- moz_gtk_widget_get_focus(gTreeHeaderCellWidget, &interior_focus, &focus_width, &focus_pad); +- moz_gtk_button_get_inner_border(gTreeHeaderCellWidget, &inner_border); +- *left += focus_width + focus_pad + inner_border.left; +- *right += focus_width + focus_pad + inner_border.right; +- *top += focus_width + focus_pad + inner_border.top; +- *bottom += focus_width + focus_pad + inner_border.bottom; +- +- moz_gtk_add_style_border(gtk_widget_get_style_context(gTreeHeaderCellWidget), +- left, top, right, bottom); ++ style = gtk_widget_get_style_context(gTreeHeaderCellWidget); ++ ++ moz_gtk_add_style_border(style, left, top, right, bottom); ++ moz_gtk_add_style_padding(style, left, top, right, bottom); + return MOZ_GTK_SUCCESS; + } + case MOZ_GTK_TREE_HEADER_SORTARROW: +@@ -2773,29 +2664,23 @@ moz_gtk_get_widget_border(GtkThemeWidgetType widget, gint* left, gint* top, + /* We need to account for the arrow on the dropdown, so text + * doesn't come too close to the arrow, or in some cases spill + * into the arrow. */ +- gboolean ignored_interior_focus, wide_separators; +- gint focus_width, focus_pad, separator_width; ++ gboolean wide_separators; ++ gint separator_width; + GtkRequisition arrow_req; + GtkBorder border; + + ensure_combo_box_widgets(); + +- *left = gtk_container_get_border_width(GTK_CONTAINER(gComboBoxButtonWidget)); ++ *left = *top = *right = *bottom = ++ gtk_container_get_border_width(GTK_CONTAINER(gComboBoxButtonWidget)); ++ ++ style = gtk_widget_get_style_context(gComboBoxButtonWidget); + + if (!inhtml) { +- moz_gtk_widget_get_focus(gComboBoxButtonWidget, +- &ignored_interior_focus, +- &focus_width, &focus_pad); +- *left += focus_width + focus_pad; ++ moz_gtk_add_style_padding(style, left, top, right, bottom); + } + +- style = gtk_widget_get_style_context(gComboBoxButtonWidget); +- gtk_style_context_get_border(style, 0, &border); +- +- *top = *left + border.top; +- *left += border.left; +- +- *right = *left; *bottom = *top; ++ moz_gtk_add_style_border(style, left, top, right, bottom); + + /* If there is no separator, don't try to count its width. */ + separator_width = 0; +@@ -2847,60 +2732,23 @@ moz_gtk_get_widget_border(GtkThemeWidgetType widget, gint* left, gint* top, + ensure_frame_widget(); + w = gFrameWidget; + break; +- case MOZ_GTK_CHECKBUTTON_LABEL: +- case MOZ_GTK_RADIOBUTTON_LABEL: +- { +- gboolean interior_focus; +- gint focus_width, focus_pad; +- +- /* If the focus is interior, then the label has a border of +- (focus_width + focus_pad). */ +- if (widget == MOZ_GTK_CHECKBUTTON_LABEL) { +- ensure_checkbox_widget(); +- moz_gtk_widget_get_focus(gCheckboxWidget, &interior_focus, +- &focus_width, &focus_pad); +- } +- else { +- ensure_radiobutton_widget(); +- moz_gtk_widget_get_focus(gRadiobuttonWidget, &interior_focus, +- &focus_width, &focus_pad); +- } +- +- if (interior_focus) +- *left = *top = *right = *bottom = (focus_width + focus_pad); +- +- return MOZ_GTK_SUCCESS; +- } +- + case MOZ_GTK_CHECKBUTTON_CONTAINER: + case MOZ_GTK_RADIOBUTTON_CONTAINER: + { +- gboolean interior_focus; +- gint focus_width, focus_pad; +- +- /* If the focus is _not_ interior, then the container has a border +- of (focus_width + focus_pad). */ + if (widget == MOZ_GTK_CHECKBUTTON_CONTAINER) { + ensure_checkbox_widget(); +- moz_gtk_widget_get_focus(gCheckboxWidget, &interior_focus, +- &focus_width, &focus_pad); + w = gCheckboxWidget; + } else { + ensure_radiobutton_widget(); +- moz_gtk_widget_get_focus(gRadiobuttonWidget, &interior_focus, +- &focus_width, &focus_pad); + w = gRadiobuttonWidget; + } ++ style = gtk_widget_get_style_context(w); + + *left = *top = *right = *bottom = gtk_container_get_border_width(GTK_CONTAINER(w)); +- +- if (!interior_focus) { +- *left += (focus_width + focus_pad); +- *right += (focus_width + focus_pad); +- *top += (focus_width + focus_pad); +- *bottom += (focus_width + focus_pad); +- } +- ++ moz_gtk_add_style_border(style, ++ left, top, right, bottom); ++ moz_gtk_add_style_padding(style, ++ left, top, right, bottom); + return MOZ_GTK_SUCCESS; + } + case MOZ_GTK_MENUPOPUP: +@@ -2927,6 +2775,8 @@ moz_gtk_get_widget_border(GtkThemeWidgetType widget, gint* left, gint* top, + return MOZ_GTK_SUCCESS; + } + /* These widgets have no borders, since they are not containers. */ ++ case MOZ_GTK_CHECKBUTTON_LABEL: ++ case MOZ_GTK_RADIOBUTTON_LABEL: + case MOZ_GTK_SPLITTER_HORIZONTAL: + case MOZ_GTK_SPLITTER_VERTICAL: + case MOZ_GTK_CHECKBUTTON: +diff --git widget/gtk/gtkdrawing.h widget/gtk/gtkdrawing.h +index 1938e8f..5f71cfd 100644 +--- widget/gtk/gtkdrawing.h ++++ widget/gtk/gtkdrawing.h +@@ -293,16 +293,6 @@ moz_gtk_checkbox_get_metrics(gint* indicator_size, gint* indicator_spacing); + gint + moz_gtk_radio_get_metrics(gint* indicator_size, gint* indicator_spacing); + +-/** +- * Get the inner-border value for a GtkButton widget (button or tree header) +- * widget: [IN] the widget to get the border value for +- * inner_border: [OUT] the inner border +- * +- * returns: MOZ_GTK_SUCCESS if there was no error, an error code otherwise +- */ +-gint +-moz_gtk_button_get_inner_border(GtkWidget* widget, GtkBorder* inner_border); +- + /** Get the extra size for the focus ring for outline:auto. + * widget: [IN] the widget to get the focus metrics for + * focus_h_width: [OUT] the horizontal width +@@ -313,19 +303,6 @@ moz_gtk_button_get_inner_border(GtkWidget* widget, GtkBorder* inner_border); + gint + moz_gtk_get_focus_outline_size(gint* focus_h_width, gint* focus_v_width); + +-/** Get the focus metrics for a treeheadercell, button, checkbox, or radio button. +- * widget: [IN] the widget to get the focus metrics for +- * interior_focus: [OUT] whether the focus is drawn around the +- * label (TRUE) or around the whole container (FALSE) +- * focus_width: [OUT] the width of the focus line +- * focus_pad: [OUT] the padding between the focus line and children +- * +- * returns: MOZ_GTK_SUCCESS if there was no error, an error code otherwise +- */ +-gint +-moz_gtk_widget_get_focus(GtkWidget* widget, gboolean* interior_focus, +- gint* focus_width, gint* focus_pad); +- + /** Get the horizontal padding for the menuitem widget or checkmenuitem widget. + * horizontal_padding: [OUT] The left and right padding of the menuitem or checkmenuitem + * diff --git a/www/firefox/files/patch-bug1101582 b/www/firefox/files/patch-bug1101582 deleted file mode 100644 index d3abf8b62378..000000000000 --- a/www/firefox/files/patch-bug1101582 +++ /dev/null @@ -1,82 +0,0 @@ -commit 8142810 -Author: Martin Stransky <stransky@redhat.com> -Date: Thu Nov 27 04:08:00 2014 +0100 - - Bug 1101582 - [GTK3] - Use window background color for ThreeDFace,ButtonFace. r=karlt - This fixes missing borders on non-natively-styled textareas. ---- - widget/gtk/nsLookAndFeel.cpp | 21 ++++++++++----------- - widget/gtk/nsLookAndFeel.h | 2 +- - 2 files changed, 11 insertions(+), 12 deletions(-) - -diff --git widget/gtk/nsLookAndFeel.cpp widget/gtk/nsLookAndFeel.cpp -index 93066b4..3562cf2 100644 ---- widget/gtk/nsLookAndFeel.cpp -+++ widget/gtk/nsLookAndFeel.cpp -@@ -284,10 +284,17 @@ nsLookAndFeel::NativeGetColor(ColorID aID, nscolor& aColor) - #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: -@@ -302,11 +309,6 @@ nsLookAndFeel::NativeGetColor(ColorID aID, nscolor& aColor) - 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: -@@ -1141,7 +1143,7 @@ nsLookAndFeel::Init() - - 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 = -@@ -1189,12 +1191,9 @@ nsLookAndFeel::Init() - 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 -diff --git widget/gtk/nsLookAndFeel.h widget/gtk/nsLookAndFeel.h -index be15179..aabbca6 100644 ---- widget/gtk/nsLookAndFeel.h -+++ widget/gtk/nsLookAndFeel.h -@@ -64,7 +64,7 @@ protected: - nscolor sMenuHoverText; - nscolor sButtonText; - nscolor sButtonHoverText; -- nscolor sFrameBackground; -+ nscolor sButtonBackground; - nscolor sFrameOuterLightBorder; - nscolor sFrameInnerDarkBorder; - nscolor sOddCellBackground; diff --git a/www/firefox/files/patch-bug1103858 b/www/firefox/files/patch-bug1103858 deleted file mode 100644 index 16cfd9973a86..000000000000 --- a/www/firefox/files/patch-bug1103858 +++ /dev/null @@ -1,42 +0,0 @@ -diff --git configure.in configure.in -index b2b45e7..dcfdfb7 100644 ---- configure.in -+++ configure.in -@@ -8346,7 +8346,7 @@ case "$OS_TARGET" in - NECKO_WIFI=1 - fi - ;; -- Darwin|FreeBSD|SunOS|WINNT) -+ Darwin|DragonFly|FreeBSD|SunOS|WINNT) - NECKO_WIFI=1 - ;; - Linux) -diff --git netwerk/wifi/moz.build netwerk/wifi/moz.build -index d4de063..3949380 100644 ---- netwerk/wifi/moz.build -+++ netwerk/wifi/moz.build -@@ -35,7 +35,7 @@ if CONFIG['OS_ARCH'] == 'Darwin': - UNIFIED_SOURCES += [ - 'osx_corewlan.mm', - ] --elif CONFIG['OS_ARCH'] == 'FreeBSD': -+elif CONFIG['OS_ARCH'] in ('DragonFly', 'FreeBSD'): - UNIFIED_SOURCES += [ - 'nsWifiScannerFreeBSD.cpp', - ] -diff --git netwerk/wifi/nsWifiScannerFreeBSD.cpp netwerk/wifi/nsWifiScannerFreeBSD.cpp -index bdf171e..4185d69 100644 ---- netwerk/wifi/nsWifiScannerFreeBSD.cpp -+++ netwerk/wifi/nsWifiScannerFreeBSD.cpp -@@ -13,7 +13,11 @@ - #include <sys/socket.h> - #include <net/if.h> - #include <net/if_media.h> -+#ifdef __DragonFly__ -+#include <netproto/802_11/ieee80211_ioctl.h> -+#else - #include <net80211/ieee80211_ioctl.h> -+#endif - - #include <ifaddrs.h> - #include <string.h> diff --git a/www/firefox/files/patch-bug1128161 b/www/firefox/files/patch-bug1128161 deleted file mode 100644 index d61cbb3ceec0..000000000000 --- a/www/firefox/files/patch-bug1128161 +++ /dev/null @@ -1,28 +0,0 @@ -commit 6af7f0e6 -Author: Chris Double <chris.double@double.co.nz> -Date: Tue Feb 3 11:20:17 2015 +1300 - - Bug 1128161 - Fix build error when logging is disabled - r=ajones ---- - dom/media/mediasource/MediaSourceUtils.cpp | 2 -- - 1 file changed, 2 deletions(-) - -diff --git dom/media/mediasource/MediaSourceUtils.cpp dom/media/mediasource/MediaSourceUtils.cpp -index 44a40f5..83bba60 100644 ---- dom/media/mediasource/MediaSourceUtils.cpp -+++ dom/media/mediasource/MediaSourceUtils.cpp -@@ -11,7 +11,6 @@ - - namespace mozilla { - --#if defined(PR_LOGGING) - nsCString - DumpTimeRanges(dom::TimeRanges* aRanges) - { -@@ -31,6 +30,5 @@ DumpTimeRanges(dom::TimeRanges* aRanges) - - return dump; - } --#endif - - } // namespace mozilla diff --git a/www/firefox/files/patch-bug1138845 b/www/firefox/files/patch-bug1138845 new file mode 100644 index 000000000000..12a9542f538f --- /dev/null +++ b/www/firefox/files/patch-bug1138845 @@ -0,0 +1,134 @@ +commit 4b5b332 +Author: Mike Hommey <mh+mozilla@glandium.org> +Date: Tue Mar 3 18:41:13 2015 +0900 + + Bug 1138845 - Don't require atk-bridge for gtk+3 builds. r=tbsaunde +--- + accessible/atk/Platform.cpp | 29 +++++++++++++++++++---------- + config/system-headers | 1 - + configure.in | 2 +- + 3 files changed, 20 insertions(+), 12 deletions(-) + +diff --git accessible/atk/Platform.cpp accessible/atk/Platform.cpp +index a2afd96..2ed5e0b 100644 +--- accessible/atk/Platform.cpp ++++ accessible/atk/Platform.cpp +@@ -18,8 +18,9 @@ + #include <dbus/dbus.h> + #endif + #include <gtk/gtk.h> ++ + #if (MOZ_WIDGET_GTK == 3) +-#include <atk-bridge.h> ++extern "C" __attribute__((weak,visibility("default"))) int atk_bridge_adaptor_init(int*, char **[]); + #endif + + using namespace mozilla; +@@ -46,7 +47,6 @@ static gulong sToplevel_hide_hook = 0; + + GType g_atk_hyperlink_impl_type = G_TYPE_INVALID; + +-#if (MOZ_WIDGET_GTK == 2) + struct GnomeAccessibilityModule + { + const char *libName; +@@ -67,11 +67,13 @@ static GnomeAccessibilityModule sAtkBridge = { + "gnome_accessibility_module_shutdown", nullptr + }; + ++#if (MOZ_WIDGET_GTK == 2) + static GnomeAccessibilityModule sGail = { + "libgail.so", nullptr, + "gnome_accessibility_module_init", nullptr, + "gnome_accessibility_module_shutdown", nullptr + }; ++#endif + + static nsresult + LoadGtkModule(GnomeAccessibilityModule& aModule) +@@ -98,7 +100,11 @@ LoadGtkModule(GnomeAccessibilityModule& aModule) + else + subLen = loc2 - loc1; + nsAutoCString sub(Substring(libPath, loc1, subLen)); ++#if (MOZ_WIDGET_GTK == 2) + sub.AppendLiteral("/gtk-2.0/modules/"); ++#else ++ sub.AppendLiteral("/gtk-3.0/modules/"); ++#endif + sub.Append(aModule.libName); + aModule.lib = PR_LoadLibrary(sub.get()); + if (aModule.lib) +@@ -123,7 +129,6 @@ LoadGtkModule(GnomeAccessibilityModule& aModule) + } + return NS_OK; + } +-#endif // (MOZ_WIDGET_GTK == 2) + + void + a11y::PlatformInit() +@@ -175,14 +180,17 @@ a11y::PlatformInit() + + // Init atk-bridge now + PR_SetEnv("NO_AT_BRIDGE=0"); +-#if (MOZ_WIDGET_GTK == 2) +- rv = LoadGtkModule(sAtkBridge); +- if (NS_SUCCEEDED(rv)) { +- (*sAtkBridge.init)(); +- } +-#else +- atk_bridge_adaptor_init(nullptr, nullptr); ++#if (MOZ_WIDGET_GTK == 3) ++ if (atk_bridge_adaptor_init) { ++ atk_bridge_adaptor_init(nullptr, nullptr); ++ } else + #endif ++ { ++ nsresult rv = LoadGtkModule(sAtkBridge); ++ if (NS_SUCCEEDED(rv)) { ++ (*sAtkBridge.init)(); ++ } ++ } + + if (!sToplevel_event_hook_added) { + sToplevel_event_hook_added = true; +@@ -210,7 +218,6 @@ a11y::PlatformShutdown() + sToplevel_hide_hook); + } + +-#if (MOZ_WIDGET_GTK == 2) + if (sAtkBridge.lib) { + // Do not shutdown/unload atk-bridge, + // an exit function registered will take care of it +@@ -221,6 +228,7 @@ a11y::PlatformShutdown() + sAtkBridge.init = nullptr; + sAtkBridge.shutdown = nullptr; + } ++#if (MOZ_WIDGET_GTK == 2) + if (sGail.lib) { + // Do not shutdown gail because + // 1) Maybe it's not init-ed by us. e.g. GtkEmbed +diff --git config/system-headers config/system-headers +index 2c94a7d..cf01775 100644 +--- config/system-headers ++++ config/system-headers +@@ -189,7 +189,6 @@ asm/signal.h + ASRegistry.h + assert.h + atk/atk.h +-atk-bridge.h + atlcom.h + atlconv.h + atlctl.cpp +diff --git configure.in configure.in +index 0bd1eb7..f3b3365 100644 +--- configure.in ++++ configure.in +@@ -4408,7 +4408,7 @@ 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 atk-bridge-2.0 $GDK_PACKAGES) ++ 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" + dnl Contrary to MOZ_GTK2_LIBS, MOZ_GTK3_LIBS needs to be literally added to TK_LIBS instead + dnl of a make reference because of how TK_LIBS is mangled in toolkit/library/moz.build diff --git a/www/firefox/files/patch-bug1143686 b/www/firefox/files/patch-bug1143686 new file mode 100644 index 000000000000..d4cc2834d67e --- /dev/null +++ b/www/firefox/files/patch-bug1143686 @@ -0,0 +1,46 @@ +commit e50e738 +Author: Martin Stransky <stransky@redhat.com> +Date: Mon Mar 16 08:00:00 2015 -0400 + + Bug 1143686 - Gtk3 - Render scrollbar thumb with margin. r=karlt +--- + widget/gtk/gtk3drawing.c | 14 ++++++++++---- + 1 file changed, 10 insertions(+), 4 deletions(-) + +diff --git widget/gtk/gtk3drawing.c widget/gtk/gtk3drawing.c +index 17f46ab..08a58d6 100644 +--- widget/gtk/gtk3drawing.c ++++ widget/gtk/gtk3drawing.c +@@ -1230,6 +1230,7 @@ moz_gtk_scrollbar_thumb_paint(GtkThemeWidgetType widget, + GtkStyleContext* style; + GtkScrollbar *scrollbar; + GtkAdjustment *adj; ++ GtkBorder margin; + + ensure_scrollbar_widget(); + +@@ -1239,15 +1240,20 @@ moz_gtk_scrollbar_thumb_paint(GtkThemeWidgetType widget, + scrollbar = GTK_SCROLLBAR(gVertScrollbarWidget); + + gtk_widget_set_direction(GTK_WIDGET(scrollbar), direction); +- ++ + style = gtk_widget_get_style_context(GTK_WIDGET(scrollbar)); + gtk_style_context_save(style); +- ++ + gtk_style_context_add_class(style, GTK_STYLE_CLASS_SLIDER); + gtk_style_context_set_state(style, state_flags); + +- gtk_render_slider(style, cr, rect->x, rect->y, +- rect->width, rect->height, ++ gtk_style_context_get_margin (style, state_flags, &margin); ++ ++ gtk_render_slider(style, cr, ++ rect->x + margin.left, ++ rect->y + margin.top, ++ rect->width - margin.left - margin.right, ++ rect->height - margin.top - margin.bottom, + (widget == MOZ_GTK_SCROLLBAR_THUMB_HORIZONTAL) ? + GTK_ORIENTATION_HORIZONTAL : GTK_ORIENTATION_VERTICAL); + diff --git a/www/firefox/files/patch-bug1144643 b/www/firefox/files/patch-bug1144643 new file mode 100644 index 000000000000..fe8150ba182c --- /dev/null +++ b/www/firefox/files/patch-bug1144643 @@ -0,0 +1,33 @@ +commit a0ccc19 +Author: Martin Stransky <stransky@redhat.com> +Date: Wed Mar 18 07:14:00 2015 -0400 + + Bug 1144643 - Render tooltips as transparent on Gtk3. r=karlt + + --HG-- + extra : rebase_source : 23085532b27350ca71cbe18db071628388003f33 +--- + widget/gtk/nsNativeThemeGTK.cpp | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git widget/gtk/nsNativeThemeGTK.cpp widget/gtk/nsNativeThemeGTK.cpp +index e5e1867..26d13a5 100644 +--- widget/gtk/nsNativeThemeGTK.cpp ++++ widget/gtk/nsNativeThemeGTK.cpp +@@ -1528,9 +1528,15 @@ nsNativeThemeGTK::GetWidgetTransparency(nsIFrame* aFrame, uint8_t aWidgetType) + case NS_THEME_MENUPOPUP: + case NS_THEME_WINDOW: + case NS_THEME_DIALOG: +- // Tooltips use gtk_paint_flat_box(). ++ return eOpaque; ++ // Tooltips use gtk_paint_flat_box() on Gtk2 ++ // but are shaped on Gtk3 + case NS_THEME_TOOLTIP: ++#if (MOZ_WIDGET_GTK == 2) + return eOpaque; ++#else ++ return eTransparent; ++#endif + } + + return eUnknownTransparency; diff --git a/www/firefox/files/patch-bug779713 b/www/firefox/files/patch-bug779713 index 37e0bc2fb5c0..aad910191c5d 100644 --- a/www/firefox/files/patch-bug779713 +++ b/www/firefox/files/patch-bug779713 @@ -47,14 +47,14 @@ diff --git mfbt/Attributes.h mfbt/Attributes.h index d317766..ddb13da 100644 --- mfbt/Attributes.h +++ mfbt/Attributes.h -@@ -51,6 +51,7 @@ +@@ -50,6 +50,7 @@ + * don't indicate support for them here, due to * http://stackoverflow.com/questions/20498142/visual-studio-2013-explicit-keyword-bug */ - # if _MSC_VER >= 1800 -+# define MOZ_HAVE_CXX11_ALIGNAS - # define MOZ_HAVE_CXX11_DELETE - # endif - # if _MSC_VER >= 1700 ++# define MOZ_HAVE_CXX11_ALIGNAS + # define MOZ_HAVE_CXX11_FINAL final + # define MOZ_HAVE_CXX11_OVERRIDE + # define MOZ_HAVE_NEVER_INLINE __declspec(noinline) @@ -74,6 +75,9 @@ # ifndef __has_extension # define __has_extension __has_feature /* compatibility, for older versions of clang */ diff --git a/www/firefox/files/patch-bug899126 b/www/firefox/files/patch-bug899126 deleted file mode 100644 index 70a254c701b5..000000000000 --- a/www/firefox/files/patch-bug899126 +++ /dev/null @@ -1,98 +0,0 @@ -commit 0f63381 -Author: Guilherme Goncalves <guilherme.p.gonc@gmail.com> -Date: Tue Nov 18 14:03:00 2014 -0800 - - Bug 899126 - Part 1 - Implement bin_unused for jemalloc3. r=glandium ---- - memory/build/mozjemalloc_compat.c | 57 ++++++++++++++++++++++++++++++++++++++- - 1 file changed, 56 insertions(+), 1 deletion(-) - -diff --git memory/build/mozjemalloc_compat.c memory/build/mozjemalloc_compat.c -index 70265a7..0a9b21a 100644 ---- memory/build/mozjemalloc_compat.c -+++ memory/build/mozjemalloc_compat.c -@@ -12,6 +12,8 @@ - #include "jemalloc_types.h" - #include "mozilla/Types.h" - -+#include <stdbool.h> -+ - #if defined(MOZ_NATIVE_JEMALLOC) - - MOZ_IMPORT_API int -@@ -47,6 +49,16 @@ je_(nallocm)(size_t *rsize, size_t size, int flags); - je_(mallctlbymib)(mib, miblen, &v, &sz, NULL, 0); \ - } while (0) - -+#define CTL_IJ_GET(n, v, i, j) do { \ -+ size_t mib[6]; \ -+ size_t miblen = sizeof(mib) / sizeof(mib[0]); \ -+ size_t sz = sizeof(v); \ -+ je_(mallctlnametomib)(n, mib, &miblen); \ -+ mib[2] = i; \ -+ mib[4] = j; \ -+ je_(mallctlbymib)(mib, miblen, &v, &sz, NULL, 0); \ -+} while (0) -+ - MOZ_MEMORY_API size_t - malloc_good_size_impl(size_t size) - { -@@ -61,6 +73,48 @@ malloc_good_size_impl(size_t size) - return size; - } - -+static size_t -+compute_bin_unused(unsigned int narenas) -+{ -+ size_t bin_unused = 0; -+ -+ uint32_t nregs; // number of regions per run in the j-th bin -+ size_t reg_size; // size of regions served by the j-th bin -+ size_t curruns; // number of runs belonging to a bin -+ size_t curregs; // number of allocated regions in a bin -+ -+ unsigned int nbins; // number of bins per arena -+ unsigned int i, j; -+ -+ // curruns and curregs are not defined for uninitialized arenas, -+ // so we skip them when computing bin_unused. However, initialized -+ // arenas are not guaranteed to be sequential, so we must test each -+ // one when iterating below. -+ bool initialized[100]; // should be narenas, but MSVC doesn't have VLAs -+ size_t isz = sizeof(initialized) / sizeof(initialized[0]); -+ -+ je_(mallctl)("arenas.initialized", initialized, &isz, NULL, 0); -+ CTL_GET("arenas.nbins", nbins); -+ -+ for (j = 0; j < nbins; j++) { -+ CTL_I_GET("arenas.bin.0.nregs", nregs, j); -+ CTL_I_GET("arenas.bin.0.size", reg_size, j); -+ -+ for (i = 0; i < narenas; i++) { -+ if (!initialized[i]) { -+ continue; -+ } -+ -+ CTL_IJ_GET("stats.arenas.0.bins.0.curruns", curruns, i, j); -+ CTL_IJ_GET("stats.arenas.0.bins.0.curregs", curregs, i, j); -+ -+ bin_unused += (nregs * curruns - curregs) * reg_size; -+ } -+ } -+ -+ return bin_unused; -+} -+ - MOZ_JEMALLOC_API void - jemalloc_stats_impl(jemalloc_stats_t *stats) - { -@@ -93,7 +147,8 @@ jemalloc_stats_impl(jemalloc_stats_t *stats) - // We could get this value out of base.c::base_pages, but that really should - // be an upstream change, so don't worry about it for now. - stats->bookkeeping = 0; -- stats->bin_unused = 0; -+ -+ stats->bin_unused = compute_bin_unused(narenas); - } - - MOZ_JEMALLOC_API void diff --git a/www/firefox/files/patch-system-openh264 b/www/firefox/files/patch-system-openh264 index 5215ddb43475..d51644631776 100644 --- a/www/firefox/files/patch-system-openh264 +++ b/www/firefox/files/patch-system-openh264 @@ -101,33 +101,60 @@ index 9593492..470384b 100644 this._deferred.resolve(extractedPaths); }, err => { this._deferred.reject(err); -diff --git toolkit/mozapps/extensions/internal/OpenH264Provider.jsm toolkit/mozapps/extensions/internal/OpenH264Provider.jsm +diff --git toolkit/mozapps/extensions/internal/GMPProvider.jsm toolkit/mozapps/extensions/internal/GMPProvider.jsm index 1f3a0b1..93517be 100644 ---- toolkit/mozapps/extensions/internal/OpenH264Provider.jsm -+++ toolkit/mozapps/extensions/internal/OpenH264Provider.jsm -@@ -29,6 +29,7 @@ - const OPENH264_PLUGIN_ID = "gmp-gmpopenh264"; - const OPENH264_PREF_BRANCH = "media." + OPENH264_PLUGIN_ID + "."; - const OPENH264_PREF_ENABLED = "enabled"; -+const OPENH264_PREF_PATH = "path"; - const OPENH264_PREF_VERSION = "version"; - const OPENH264_PREF_LASTUPDATE = "lastUpdate"; - const OPENH264_PREF_AUTOUPDATE = "autoupdate"; -@@ -93,7 +94,12 @@ - - get description() { return pluginsBundle.GetStringFromName("openH264_description"); }, +--- toolkit/mozapps/extensions/internal/GMPProvider.jsm ++++ toolkit/mozapps/extensions/internal/GMPProvider.jsm +@@ -40,6 +40,7 @@ const KEY_LOGGING_LEVEL = KEY_LOG_B + const KEY_LOGGING_DUMP = KEY_LOG_BASE + "dump"; + const KEY_EME_ENABLED = "media.eme.enabled"; // Global pref to enable/disable all EME plugins + const KEY_PLUGIN_ENABLED = "media.{0}.enabled"; ++const KEY_PLUGIN_PATH = "media.{0}.path"; + const KEY_PLUGIN_LAST_UPDATE = "media.{0}.lastUpdate"; + const KEY_PLUGIN_VERSION = "media.{0}.version"; + const KEY_PLUGIN_AUTOUPDATE = "media.{0}.autoupdate"; +@@ -165,8 +166,8 @@ function GMPWrapper(aPluginInfo) { + this._plugin.id + ") "); + Preferences.observe(GMPPrefs.getPrefKey(KEY_PLUGIN_ENABLED, this._plugin.id), + this.onPrefEnabledChanged, this); +- Preferences.observe(GMPPrefs.getPrefKey(KEY_PLUGIN_VERSION, this._plugin.id), +- this.onPrefVersionChanged, this); ++ Preferences.observe(GMPPrefs.getPrefKey(KEY_PLUGIN_PATH, this._plugin.id), ++ this.onPrefPathChanged, this); + if (this._plugin.isEME) { + Preferences.observe(GMPPrefs.getPrefKey(KEY_EME_ENABLED, this._plugin.id), + this.onPrefEnabledChanged, this); +@@ -183,11 +184,8 @@ GMPWrapper.prototype = { + + set gmpPath(aPath) { this._gmpPath = aPath; }, + get gmpPath() { +- if (!this._gmpPath && this.isInstalled) { +- this._gmpPath = OS.Path.join(OS.Constants.Path.profileDir, +- this._plugin.id, +- GMPPrefs.get(KEY_PLUGIN_VERSION, null, +- this._plugin.id)); ++ if (!this._gmpPath) { ++ this._gmpPath = GMPPrefs.get(KEY_PLUGIN_PATH, null, this._plugin.id); + } + return this._gmpPath; + }, +@@ -202,8 +200,13 @@ GMPWrapper.prototype = { + get description() { return this._plugin.description; }, + get fullDescription() { return this._plugin.fullDescription; }, -- get version() { return prefs.get(OPENH264_PREF_VERSION, ""); }, -+ get version() { +- get version() { return GMPPrefs.get(KEY_PLUGIN_VERSION, null, +- this._plugin.id); }, ++ get version() { + if (this.isInstalled) { -+ return prefs.get(OPENH264_PREF_VERSION, ""); ++ return GMPPrefs.get(KEY_PLUGIN_VERSION, null, ++ this._plugin.id); + } -+ return ""; ++ return null; + }, get isActive() { return !this.userDisabled; }, get appDisabled() { return false; }, -@@ -217,24 +223,17 @@ +@@ -346,24 +349,17 @@ GMPWrapper.prototype = { get pluginMimeTypes() { return []; }, get pluginLibraries() { @@ -136,86 +163,67 @@ index 1f3a0b1..93517be 100644 - return [path]; - } - return []; -+ let path = prefs.get(OPENH264_PREF_PATH, null); ++ let path = GMPPrefs.get(KEY_PLUGIN_PATH, null, this._plugin.id); + return path && path.length ? [OS.Path.basename(path)] : []; }, get pluginFullpath() { - if (this.isInstalled) { - let path = OS.Path.join(OS.Constants.Path.profileDir, -- OPENH264_PLUGIN_ID, +- this._plugin.id, - this.version); - return [path]; - } - return []; -+ let path = prefs.get(OPENH264_PREF_PATH, null); ++ let path = GMPPrefs.get(KEY_PLUGIN_PATH, null, this._plugin.id); + return path && path.length ? [path] : []; }, get isInstalled() { -- return this.version.length > 0; -+ let path = prefs.get(OPENH264_PREF_PATH, ""); -+ return path.length > 0; +- return this.version && this.version.length > 0; ++ let path = GMPPrefs.get(KEY_PLUGIN_PATH, null, this._plugin.id); ++ return path && path.length > 0; }, - }; - -@@ -245,19 +244,14 @@ - "OpenH264Provider" + "::"); - OpenH264Wrapper._log = Log.repository.getLoggerWithMessagePrefix("Toolkit.OpenH264Provider", - "OpenH264Wrapper" + "::"); -- this.gmpPath = null; -- if (OpenH264Wrapper.isInstalled) { -- this.gmpPath = OS.Path.join(OS.Constants.Path.profileDir, -- OPENH264_PLUGIN_ID, -- prefs.get(OPENH264_PREF_VERSION, null)); -- } -+ this.gmpPath = prefs.get(OPENH264_PREF_PATH, null); - let enabled = prefs.get(OPENH264_PREF_ENABLED, true); - this._log.trace("startup() - enabled=" + enabled + ", gmpPath="+this.gmpPath); - - Services.obs.addObserver(this, AddonManager.OPTIONS_NOTIFICATION_DISPLAYED, false); - prefs.observe(OPENH264_PREF_ENABLED, this.onPrefEnabledChanged, this); -- prefs.observe(OPENH264_PREF_VERSION, this.onPrefVersionChanged, this); -+ prefs.observe(OPENH264_PREF_PATH, this.onPrefPathChanged, this); - prefs.observe(OPENH264_PREF_LOGGING, configureLogging); - - if (this.gmpPath && enabled) { -@@ -270,7 +264,7 @@ - this._log.trace("shutdown()"); - Services.obs.removeObserver(this, AddonManager.OPTIONS_NOTIFICATION_DISPLAYED); - prefs.ignore(OPENH264_PREF_ENABLED, this.onPrefEnabledChanged, this); -- prefs.ignore(OPENH264_PREF_VERSION, this.onPrefVersionChanged, this); -+ prefs.ignore(OPENH264_PREF_PATH, this.onPrefPathChanged, this); - prefs.ignore(OPENH264_PREF_LOGGING, configureLogging); - - return OpenH264Wrapper._updateTask; -@@ -296,25 +290,20 @@ - wrapper); + onPrefEnabledChanged: function() { +@@ -386,10 +382,10 @@ GMPWrapper.prototype = { + this); }, - onPrefVersionChanged: function() { + onPrefPathChanged: function() { - let wrapper = OpenH264Wrapper; - - AddonManagerPrivate.callAddonListeners("onUninstalling", wrapper, false); - if (this.gmpPath) { -- this._log.info("onPrefVersionChanged() - unregistering gmp directory " + this.gmpPath); -+ this._log.info("onPrefPathChanged() - removing gmp directory " + this.gmpPath); - gmpService.removePluginDirectory(this.gmpPath); + AddonManagerPrivate.callAddonListeners("onUninstalling", this, false); + if (this._gmpPath) { +- this._log.info("onPrefVersionChanged() - unregistering gmp directory " + ++ this._log.info("onPrefPathChanged() - unregistering gmp directory " + + this._gmpPath); + gmpService.removePluginDirectory(this._gmpPath); } - AddonManagerPrivate.callAddonListeners("onUninstalled", wrapper); +@@ -397,15 +393,9 @@ GMPWrapper.prototype = { - AddonManagerPrivate.callInstallListeners("onExternalInstall", null, wrapper, null, false); -- this.gmpPath = null; -- if (OpenH264Wrapper.isInstalled) { -- this.gmpPath = OS.Path.join(OS.Constants.Path.profileDir, -- OPENH264_PLUGIN_ID, -- prefs.get(OPENH264_PREF_VERSION, null)); + AddonManagerPrivate.callInstallListeners("onExternalInstall", null, this, + null, false); +- this._gmpPath = null; +- if (this.isInstalled) { +- this._gmpPath = OS.Path.join(OS.Constants.Path.profileDir, +- this._plugin.id, +- GMPPrefs.get(KEY_PLUGIN_VERSION, null, +- this._plugin.id)); - } -+ this.gmpPath = prefs.get(OPENH264_PREF_PATH, null); - if (this.gmpPath && wrapper.isActive) { -- this._log.info("onPrefVersionChanged() - registering gmp directory " + this.gmpPath); -+ this._log.info("onPrefPathChanged() - adding gmp directory " + this.gmpPath); - gmpService.addPluginDirectory(this.gmpPath); ++ this._gmpPath = GMPPrefs.get(KEY_PLUGIN_PATH, null, this._plugin.id); + if (this._gmpPath && this.isActive) { +- this._log.info("onPrefVersionChanged() - registering gmp directory " + ++ this._log.info("onPrefPathChanged() - registering gmp directory " + + this._gmpPath); + gmpService.addPluginDirectory(this._gmpPath); } - AddonManagerPrivate.callAddonListeners("onInstalled", wrapper); +@@ -415,8 +405,8 @@ GMPWrapper.prototype = { + shutdown: function() { + Preferences.ignore(GMPPrefs.getPrefKey(KEY_PLUGIN_ENABLED, this._plugin.id), + this.onPrefEnabledChanged, this); +- Preferences.ignore(GMPPrefs.getPrefKey(KEY_PLUGIN_VERSION, this._plugin.id), +- this.onPrefVersionChanged, this); ++ Preferences.ignore(GMPPrefs.getPrefKey(KEY_PLUGIN_PATH, this._plugin.id), ++ this.onPrefPathChanged, this); + if (this._isEME) { + Preferences.ignore(GMPPrefs.getPrefKey(KEY_EME_ENABLED, this._plugin.id), + this.onPrefEnabledChanged, this); diff --git a/www/firefox/files/patch-z-bug517422 b/www/firefox/files/patch-z-bug517422 index f837f2db6735..374364907ca0 100644 --- a/www/firefox/files/patch-z-bug517422 +++ b/www/firefox/files/patch-z-bug517422 @@ -22,14 +22,17 @@ diff --git config/external/moz.build config/external/moz.build index f67c5c7..eb909ce 100644 --- config/external/moz.build +++ config/external/moz.build -@@ -16,13 +16,19 @@ if CONFIG['MOZ_UPDATER']: - if not CONFIG['MOZ_NATIVE_BZ2']: - external_dirs += ['modules/libbz2'] +@@ -19,10 +19,19 @@ if CONFIG['MOZ_UPDATER']: + # There's no "native brotli" yet, but probably in the future... + external_dirs += ['modules/brotli'] -if CONFIG['MOZ_VORBIS']: +if not CONFIG['MOZ_NATIVE_OGG']: + external_dirs += ['media/libogg'] + ++if not CONFIG['MOZ_NATIVE_OPUS']: ++ external_dirs += ['media/libopus'] ++ +if not CONFIG['MOZ_NATIVE_THEORA']: + external_dirs += ['media/libtheora'] + @@ -40,12 +43,8 @@ index f67c5c7..eb909ce 100644 +if CONFIG['MOZ_TREMOR'] and not CONFIG['MOZ_NATIVE_TREMOR']: external_dirs += ['media/libtremor'] --if CONFIG['MOZ_OPUS']: -+if CONFIG['MOZ_OPUS'] and not CONFIG['MOZ_NATIVE_OPUS']: - external_dirs += ['media/libopus'] - if CONFIG['MOZ_WEBM']: -@@ -37,14 +43,16 @@ if CONFIG['MOZ_VPX'] and not CONFIG['MOZ_NATIVE_LIBVPX']: +@@ -37,15 +46,16 @@ if CONFIG['MOZ_VPX'] and not CONFIG['MOZ if not CONFIG['MOZ_NATIVE_PNG']: external_dirs += ['media/libpng'] @@ -59,6 +58,7 @@ index f67c5c7..eb909ce 100644 'media/kiss_fft', 'media/libcubeb', - 'media/libogg', +- 'media/libopus', - 'media/libtheora', - 'media/libspeex_resampler', 'media/libstagefright', @@ -120,7 +120,7 @@ diff --git configure.in configure.in index 87db361..7947626 100644 --- configure.in +++ configure.in -@@ -5056,6 +5056,57 @@ if test "${ac_cv_c_attribute_aligned}" != "0"; then +@@ -5223,6 +5223,140 @@ if test "${ac_cv_c_attribute_aligned}" ! fi dnl ======================================================== @@ -175,13 +175,6 @@ index 87db361..7947626 100644 +AC_SUBST(MOZ_NATIVE_TREMOR) + +dnl ======================================================== - dnl = Disable Opus audio codec support - dnl ======================================================== - MOZ_ARG_DISABLE_BOOL(opus, -@@ -5064,6 +5115,89 @@ MOZ_ARG_DISABLE_BOOL(opus, - MOZ_OPUS=1) - - dnl ======================================================== +dnl Check for libopus +dnl ======================================================== + |