summaryrefslogtreecommitdiff
path: root/www/firefox/files
diff options
context:
space:
mode:
Diffstat (limited to 'www/firefox/files')
-rw-r--r--www/firefox/files/patch-bug1073117370
-rw-r--r--www/firefox/files/patch-bug112254720
-rw-r--r--www/firefox/files/patch-bug112557916
-rw-r--r--www/firefox/files/patch-bug112558013
-rw-r--r--www/firefox/files/patch-bug77971314
-rw-r--r--www/firefox/files/patch-bug82698538
-rw-r--r--www/firefox/files/patch-bug8475684
-rw-r--r--www/firefox/files/patch-ijg-libjpeg2
-rw-r--r--www/firefox/files/patch-system-openh264120
-rw-r--r--www/firefox/files/patch-z-bug51742281
10 files changed, 535 insertions, 143 deletions
diff --git a/www/firefox/files/patch-bug1073117 b/www/firefox/files/patch-bug1073117
index e9d86eceeff4..7708023aee70 100644
--- a/www/firefox/files/patch-bug1073117
+++ b/www/firefox/files/patch-bug1073117
@@ -24,7 +24,30 @@ diff --git widget/gtk/gtk3drawing.c widget/gtk/gtk3drawing.c
index 08a58d6..7fef6fa 100644
--- widget/gtk/gtk3drawing.c
+++ widget/gtk/gtk3drawing.c
-@@ -762,37 +762,17 @@ moz_gtk_radio_get_metrics(gint* indicator_size, gint* indicator_spacing)
+@@ -65,6 +65,7 @@ static GtkWidget* gScrolledWindowWidget;
+ static style_prop_t style_prop_func;
+ static gboolean have_arrow_scaling;
+ static gboolean checkbox_check_state;
++static gboolean notebook_has_tab_gap;
+ static gboolean is_initialized;
+
+ #define ARROW_UP 0
+@@ -725,6 +726,14 @@ moz_gtk_init()
+ else
+ checkbox_check_state = GTK_STATE_FLAG_ACTIVE;
+
++ if(!gtk_check_version(3, 12, 0)) {
++ ensure_tab_widget();
++ gtk_widget_style_get(gTabWidget, "has-tab-gap", &notebook_has_tab_gap, NULL);
++ }
++ else {
++ notebook_has_tab_gap = TRUE;
++ }
++
+ /* 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. */
+@@ -762,37 +771,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)
{
@@ -280,7 +303,306 @@ index 08a58d6..7fef6fa 100644
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,
+@@ -2105,6 +2015,9 @@ moz_gtk_get_tab_thickness(void)
+ GtkStyleContext * style;
+
+ ensure_tab_widget();
++ if (!notebook_has_tab_gap)
++ return 0; /* tabs do not overdraw the tabpanel border with "no gap" style */
++
+ style = gtk_widget_get_style_context(gTabWidget);
+ gtk_style_context_add_class(style, GTK_STYLE_CLASS_NOTEBOOK);
+ gtk_style_context_get_border(style, 0, &border);
+@@ -2150,7 +2063,7 @@ moz_gtk_tab_paint(cairo_t *cr, GdkRectangle* rect,
+ ensure_tab_widget();
+ gtk_widget_set_direction(gTabWidget, direction);
+
+- style = gtk_widget_get_style_context(gTabWidget);
++ style = gtk_widget_get_style_context(gTabWidget);
+ gtk_style_context_save(style);
+ moz_gtk_tab_prepare_style_context(style, flags);
+
+@@ -2167,143 +2080,155 @@ moz_gtk_tab_paint(cairo_t *cr, GdkRectangle* rect,
+
+ focusRect = backRect = tabRect;
+
+- if ((flags & MOZ_GTK_TAB_SELECTED) == 0) {
+- /* Only draw the tab */
+- gtk_render_extension(style, cr,
+- tabRect.x, tabRect.y, tabRect.width, tabRect.height,
+- (flags & MOZ_GTK_TAB_BOTTOM) ?
+- GTK_POS_TOP : GTK_POS_BOTTOM );
+- } else {
+- /* Draw the tab and the gap
+- * We want the gap to be positioned exactly on the tabpanel top
+- * border; since tabbox.css may set a negative margin so that the tab
+- * frame rect already overlaps the tabpanel frame rect, we need to take
+- * that into account when drawing. To that effect, nsNativeThemeGTK
+- * passes us this negative margin (bmargin in the graphic below) in the
+- * lowest bits of |flags|. We use it to set gap_voffset, the distance
+- * between the top of the gap and the bottom of the tab (resp. the
+- * bottom of the gap and the top of the tab when we draw a bottom tab),
+- * while ensuring that the gap always touches the border of the tab,
+- * i.e. 0 <= gap_voffset <= gap_height, to avoid surprinsing results
+- * with big negative or positive margins.
+- * Here is a graphical explanation in the case of top tabs:
+- * ___________________________
+- * / \
+- * | T A B |
+- * ----------|. . . . . . . . . . . . . . .|----- top of tabpanel
+- * : ^ bmargin : ^
+- * : | (-negative margin, : |
+- * bottom : v passed in flags) : | gap_height
+- * of -> :.............................: | (the size of the
+- * the tab . part of the gap . | tabpanel top border)
+- * . outside of the tab . v
+- * ----------------------------------------------
+- *
+- * To draw the gap, we use gtk_paint_box_gap(), see comment in
+- * moz_gtk_tabpanels_paint(). This box_gap is made 3 * gap_height tall,
+- * which should suffice to ensure that the only visible border is the
+- * pierced one. If the tab is in the middle, we make the box_gap begin
+- * a bit to the left of the tab and end a bit to the right, adjusting
+- * the gap position so it still is under the tab, because we want the
+- * rendering of a gap in the middle of a tabpanel. This is the role of
+- * the gints gap_{l,r}_offset. On the contrary, if the tab is the
+- * first, we align the start border of the box_gap with the start
+- * border of the tab (left if LTR, right if RTL), by setting the
+- * appropriate offset to 0.*/
+- gint gap_loffset, gap_roffset, gap_voffset, gap_height;
+-
+- /* Get height needed by the gap */
+- gap_height = moz_gtk_get_tab_thickness();
+-
+- /* Extract gap_voffset from the first bits of flags */
+- gap_voffset = flags & MOZ_GTK_TAB_MARGIN_MASK;
+- if (gap_voffset > gap_height)
+- gap_voffset = gap_height;
+-
+- /* Set gap_{l,r}_offset to appropriate values */
+- gap_loffset = gap_roffset = 20; /* should be enough */
+- if (flags & MOZ_GTK_TAB_FIRST) {
+- if (direction == GTK_TEXT_DIR_RTL)
+- gap_roffset = initial_gap;
+- else
+- gap_loffset = initial_gap;
+- }
+-
+- if (flags & MOZ_GTK_TAB_BOTTOM) {
+- /* Draw the tab on bottom */
+- focusRect.y += gap_voffset;
+- focusRect.height -= gap_voffset;
+-
++ if (notebook_has_tab_gap) {
++ if ((flags & MOZ_GTK_TAB_SELECTED) == 0) {
++ /* Only draw the tab */
+ gtk_render_extension(style, cr,
+- tabRect.x, tabRect.y + gap_voffset, tabRect.width,
+- tabRect.height - gap_voffset, GTK_POS_TOP);
+-
+- gtk_style_context_remove_region(style, GTK_STYLE_REGION_TAB);
+-
+- backRect.y += (gap_voffset - gap_height);
+- backRect.height = gap_height;
+-
+- /* Draw the gap; erase with background color before painting in
+- * case theme does not */
+- gtk_render_background(style, cr, backRect.x, backRect.y,
+- backRect.width, backRect.height);
+- cairo_save(cr);
+- cairo_rectangle(cr, backRect.x, backRect.y, backRect.width, backRect.height);
+- cairo_clip(cr);
+-
+- gtk_render_frame_gap(style, cr,
+- tabRect.x - gap_loffset,
+- tabRect.y + gap_voffset - 3 * gap_height,
+- tabRect.width + gap_loffset + gap_roffset,
+- 3 * gap_height, GTK_POS_BOTTOM,
+- gap_loffset, gap_loffset + tabRect.width);
+- cairo_restore(cr);
++ tabRect.x, tabRect.y, tabRect.width, tabRect.height,
++ (flags & MOZ_GTK_TAB_BOTTOM) ?
++ GTK_POS_TOP : GTK_POS_BOTTOM );
+ } else {
+- /* Draw the tab on top */
+- focusRect.height -= gap_voffset;
+- gtk_render_extension(style, cr,
+- tabRect.x, tabRect.y, tabRect.width,
+- tabRect.height - gap_voffset, GTK_POS_BOTTOM);
+-
+- gtk_style_context_remove_region(style, GTK_STYLE_REGION_TAB);
+-
+- backRect.y += (tabRect.height - gap_voffset);
+- backRect.height = gap_height;
+-
+- /* Draw the gap; erase with background color before painting in
+- * case theme does not */
+- gtk_render_background(style, cr, backRect.x, backRect.y,
+- backRect.width, backRect.height);
+-
+- cairo_save(cr);
+- cairo_rectangle(cr, backRect.x, backRect.y, backRect.width, backRect.height);
+- cairo_clip(cr);
+-
+- gtk_render_frame_gap(style, cr,
+- tabRect.x - gap_loffset,
+- tabRect.y + tabRect.height - gap_voffset,
+- tabRect.width + gap_loffset + gap_roffset,
+- 3 * gap_height, GTK_POS_TOP,
+- gap_loffset, gap_loffset + tabRect.width);
+- cairo_restore(cr);
++ /* Draw the tab and the gap
++ * We want the gap to be positioned exactly on the tabpanel top
++ * border; since tabbox.css may set a negative margin so that the tab
++ * frame rect already overlaps the tabpanel frame rect, we need to take
++ * that into account when drawing. To that effect, nsNativeThemeGTK
++ * passes us this negative margin (bmargin in the graphic below) in the
++ * lowest bits of |flags|. We use it to set gap_voffset, the distance
++ * between the top of the gap and the bottom of the tab (resp. the
++ * bottom of the gap and the top of the tab when we draw a bottom tab),
++ * while ensuring that the gap always touches the border of the tab,
++ * i.e. 0 <= gap_voffset <= gap_height, to avoid surprinsing results
++ * with big negative or positive margins.
++ * Here is a graphical explanation in the case of top tabs:
++ * ___________________________
++ * / \
++ * | T A B |
++ * ----------|. . . . . . . . . . . . . . .|----- top of tabpanel
++ * : ^ bmargin : ^
++ * : | (-negative margin, : |
++ * bottom : v passed in flags) : | gap_height
++ * of -> :.............................: | (the size of the
++ * the tab . part of the gap . | tabpanel top border)
++ * . outside of the tab . v
++ * ----------------------------------------------
++ *
++ * To draw the gap, we use gtk_paint_box_gap(), see comment in
++ * moz_gtk_tabpanels_paint(). This box_gap is made 3 * gap_height tall,
++ * which should suffice to ensure that the only visible border is the
++ * pierced one. If the tab is in the middle, we make the box_gap begin
++ * a bit to the left of the tab and end a bit to the right, adjusting
++ * the gap position so it still is under the tab, because we want the
++ * rendering of a gap in the middle of a tabpanel. This is the role of
++ * the gints gap_{l,r}_offset. On the contrary, if the tab is the
++ * first, we align the start border of the box_gap with the start
++ * border of the tab (left if LTR, right if RTL), by setting the
++ * appropriate offset to 0.*/
++ gint gap_loffset, gap_roffset, gap_voffset, gap_height;
++
++ /* Get height needed by the gap */
++ gap_height = moz_gtk_get_tab_thickness();
++
++ /* Extract gap_voffset from the first bits of flags */
++ gap_voffset = flags & MOZ_GTK_TAB_MARGIN_MASK;
++ if (gap_voffset > gap_height)
++ gap_voffset = gap_height;
++
++ /* Set gap_{l,r}_offset to appropriate values */
++ gap_loffset = gap_roffset = 20; /* should be enough */
++ if (flags & MOZ_GTK_TAB_FIRST) {
++ if (direction == GTK_TEXT_DIR_RTL)
++ gap_roffset = initial_gap;
++ else
++ gap_loffset = initial_gap;
++ }
++
++ if (flags & MOZ_GTK_TAB_BOTTOM) {
++ /* Draw the tab on bottom */
++ focusRect.y += gap_voffset;
++ focusRect.height -= gap_voffset;
++
++ gtk_render_extension(style, cr,
++ tabRect.x, tabRect.y + gap_voffset, tabRect.width,
++ tabRect.height - gap_voffset, GTK_POS_TOP);
++
++ gtk_style_context_remove_region(style, GTK_STYLE_REGION_TAB);
++
++ backRect.y += (gap_voffset - gap_height);
++ backRect.height = gap_height;
++
++ /* Draw the gap; erase with background color before painting in
++ * case theme does not */
++ gtk_render_background(style, cr, backRect.x, backRect.y,
++ backRect.width, backRect.height);
++ cairo_save(cr);
++ cairo_rectangle(cr, backRect.x, backRect.y, backRect.width, backRect.height);
++ cairo_clip(cr);
++
++ gtk_render_frame_gap(style, cr,
++ tabRect.x - gap_loffset,
++ tabRect.y + gap_voffset - 3 * gap_height,
++ tabRect.width + gap_loffset + gap_roffset,
++ 3 * gap_height, GTK_POS_BOTTOM,
++ gap_loffset, gap_loffset + tabRect.width);
++ cairo_restore(cr);
++ } else {
++ /* Draw the tab on top */
++ focusRect.height -= gap_voffset;
++ gtk_render_extension(style, cr,
++ tabRect.x, tabRect.y, tabRect.width,
++ tabRect.height - gap_voffset, GTK_POS_BOTTOM);
++
++ gtk_style_context_remove_region(style, GTK_STYLE_REGION_TAB);
++
++ backRect.y += (tabRect.height - gap_voffset);
++ backRect.height = gap_height;
++
++ /* Draw the gap; erase with background color before painting in
++ * case theme does not */
++ gtk_render_background(style, cr, backRect.x, backRect.y,
++ backRect.width, backRect.height);
++
++ cairo_save(cr);
++ cairo_rectangle(cr, backRect.x, backRect.y, backRect.width, backRect.height);
++ cairo_clip(cr);
++
++ gtk_render_frame_gap(style, cr,
++ tabRect.x - gap_loffset,
++ tabRect.y + tabRect.height - gap_voffset,
++ tabRect.width + gap_loffset + gap_roffset,
++ 3 * gap_height, GTK_POS_TOP,
++ gap_loffset, gap_loffset + tabRect.width);
++ cairo_restore(cr);
++ }
+ }
++ } else {
++ gtk_render_background(style, cr, tabRect.x, tabRect.y, tabRect.width, tabRect.height);
++ gtk_render_frame(style, cr, tabRect.x, tabRect.y, tabRect.width, tabRect.height);
+ }
+
++ gtk_style_context_restore(style);
++
+ if (state->focused) {
+ /* Paint the focus ring */
+- GtkBorder border;
+- gtk_style_context_get_border(style, GetStateFlagsFromGtkWidgetState(state), &border);
++ GtkBorder padding;
++
++ gtk_style_context_save(style);
++ moz_gtk_tab_prepare_style_context(style, flags);
+
+- focusRect.x += border.left;
+- focusRect.width -= (border.left + border.right);
+- focusRect.y += border.top;
+- focusRect.height -= (border.top + border.bottom);
++ gtk_style_context_get_padding(style, GetStateFlagsFromGtkWidgetState(state), &padding);
++
++ focusRect.x += padding.left;
++ focusRect.width -= (padding.left + padding.right);
++ focusRect.y += padding.top;
++ focusRect.height -= (padding.top + padding.bottom);
+
+ gtk_render_focus(style, cr,
+ focusRect.x, focusRect.y, focusRect.width, focusRect.height);
++
++ gtk_style_context_restore(style);
+ }
+
+- gtk_style_context_restore(style);
+
+ return MOZ_GTK_SUCCESS;
+ }
+@@ -2684,26 +2609,18 @@ moz_gtk_get_widget_border(GtkThemeWidgetType widget, gint* left, gint* top,
switch (widget) {
case MOZ_GTK_BUTTON:
{
@@ -468,6 +790,37 @@ index 08a58d6..7fef6fa 100644
case MOZ_GTK_SPLITTER_HORIZONTAL:
case MOZ_GTK_SPLITTER_VERTICAL:
case MOZ_GTK_CHECKBUTTON:
+@@ -2975,11 +2849,7 @@ moz_gtk_get_tab_border(gint* left, gint* top, gint* right, gint* bottom,
+ gtk_style_context_save(style);
+ moz_gtk_tab_prepare_style_context(style, flags);
+
+- // TODO add_style_border() should be replaced
+- // with focus-line-width and focus-padding
+- // see Bug 877605
+ *left = *top = *right = *bottom = 0;
+- moz_gtk_add_style_border(style, left, top, right, bottom);
+ moz_gtk_add_style_padding(style, left, top, right, bottom);
+
+ gtk_widget_style_get (gTabWidget, "tab-curvature", &tab_curvature, NULL);
+@@ -2990,16 +2860,9 @@ moz_gtk_get_tab_border(gint* left, gint* top, gint* right, gint* bottom,
+ int initial_gap;
+ gtk_widget_style_get (gTabWidget, "initial-gap", &initial_gap, NULL);
+ if (direction == GTK_TEXT_DIR_RTL)
+- *right += initial_gap;
++ *right += initial_gap;
+ else
+- *left += initial_gap;
+- }
+-
+- // Top tabs have no bottom border, bottom tabs have no top border
+- if (flags & MOZ_GTK_TAB_BOTTOM) {
+- *top = 0;
+- } else {
+- *bottom = 0;
++ *left += initial_gap;
+ }
+
+ gtk_style_context_restore(style);
diff --git widget/gtk/gtkdrawing.h widget/gtk/gtkdrawing.h
index 1938e8f..5f71cfd 100644
--- widget/gtk/gtkdrawing.h
@@ -509,3 +862,16 @@ index 1938e8f..5f71cfd 100644
/** 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 widget/gtk/nsNativeThemeGTK.cpp widget/gtk/nsNativeThemeGTK.cpp
+index e5e1867..76d28e3 100644
+--- widget/gtk/nsNativeThemeGTK.cpp
++++ widget/gtk/nsNativeThemeGTK.cpp
+@@ -761,6 +761,8 @@ nsNativeThemeGTK::GetExtraSizeForWidget(nsIFrame* aFrame, uint8_t aWidgetType,
+ return false;
+
+ gint gap_height = moz_gtk_get_tab_thickness();
++ if (!gap_height)
++ return false;
+
+ int32_t extra = gap_height - GetTabMarginPixels(aFrame);
+ if (extra <= 0)
diff --git a/www/firefox/files/patch-bug1122547 b/www/firefox/files/patch-bug1122547
deleted file mode 100644
index ce65ec961912..000000000000
--- a/www/firefox/files/patch-bug1122547
+++ /dev/null
@@ -1,20 +0,0 @@
-diff --git media/webrtc/trunk/webrtc/modules/video_coding/main/source/receiver.cc media/webrtc/trunk/webrtc/modules/video_coding/main/source/receiver.cc
-index e68a104..a090241 100644
---- media/webrtc/trunk/webrtc/modules/video_coding/main/source/receiver.cc
-+++ media/webrtc/trunk/webrtc/modules/video_coding/main/source/receiver.cc
-@@ -159,12 +159,13 @@ VCMEncodedFrame* VCMReceiver::FrameForDecoding(
- // Assume that render timing errors are due to changes in the video stream.
- if (next_render_time_ms < 0) {
- timing_error = true;
-- } else if (std::abs(next_render_time_ms - now_ms) > max_video_delay_ms_) {
-+ } else if (std::abs(static_cast<int>(next_render_time_ms - now_ms)) >
-+ max_video_delay_ms_) {
- WEBRTC_TRACE(webrtc::kTraceWarning, webrtc::kTraceVideoCoding,
- VCMId(vcm_id_, receiver_id_),
- "This frame is out of our delay bounds, resetting jitter "
- "buffer: %d > %d",
-- static_cast<int>(std::abs(next_render_time_ms - now_ms)),
-+ std::abs(static_cast<int>(next_render_time_ms - now_ms)),
- max_video_delay_ms_);
- timing_error = true;
- } else if (static_cast<int>(timing_->TargetVideoDelay()) >
diff --git a/www/firefox/files/patch-bug1125579 b/www/firefox/files/patch-bug1125579
deleted file mode 100644
index ca1a61af5364..000000000000
--- a/www/firefox/files/patch-bug1125579
+++ /dev/null
@@ -1,16 +0,0 @@
-diff --git js/src/jit/ExecutableAllocator.h js/src/jit/ExecutableAllocator.h
-index d55c8ed..ab6188f 100644
---- js/src/jit/ExecutableAllocator.h
-+++ js/src/jit/ExecutableAllocator.h
-@@ -405,6 +405,11 @@ public:
- _flush_cache(reinterpret_cast<char*>(code), size, BCACHE);
- #endif
- }
-+#elif defined(JS_CODEGEN_ARM) && (defined(__FreeBSD__) || defined(__NetBSD__))
-+ static void cacheFlush(void* code, size_t size)
-+ {
-+ __clear_cache(code, reinterpret_cast<char*>(code) + size);
-+ }
- #elif defined(JS_CODEGEN_ARM) && (defined(__linux__) || defined(ANDROID)) && defined(__GNUC__)
- static void cacheFlush(void* code, size_t size)
- {
diff --git a/www/firefox/files/patch-bug1125580 b/www/firefox/files/patch-bug1125580
deleted file mode 100644
index 1495a4567d63..000000000000
--- a/www/firefox/files/patch-bug1125580
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git js/src/jit/arm/Architecture-arm.cpp js/src/jit/arm/Architecture-arm.cpp
-index fe1373b..76641aa 100644
---- js/src/jit/arm/Architecture-arm.cpp
-+++ js/src/jit/arm/Architecture-arm.cpp
-@@ -16,7 +16,7 @@
- #include "jit/arm/Assembler-arm.h"
- #include "jit/RegisterSets.h"
-
--#if defined(ANDROID) || defined(JS_ARM_SIMULATOR)
-+#if !defined(__linux__) || defined(ANDROID) || defined(JS_ARM_SIMULATOR)
- // The Android NDK and B2G do not include the hwcap.h kernel header, and it is not
- // defined when building the simulator, so inline the header defines we need.
- # define HWCAP_VFP (1 << 6)
diff --git a/www/firefox/files/patch-bug779713 b/www/firefox/files/patch-bug779713
index aad910191c5d..cbf73d463db0 100644
--- a/www/firefox/files/patch-bug779713
+++ b/www/firefox/files/patch-bug779713
@@ -52,10 +52,10 @@ index d317766..ddb13da 100644
* http://stackoverflow.com/questions/20498142/visual-studio-2013-explicit-keyword-bug
*/
+# 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 @@
+ # define MOZ_HAVE_NORETURN __declspec(noreturn)
+ # ifdef __clang__
+@@ -70,6 +71,9 @@
# ifndef __has_extension
# define __has_extension __has_feature /* compatibility, for older versions of clang */
# endif
@@ -65,13 +65,13 @@ index d317766..ddb13da 100644
# if __has_extension(cxx_constexpr)
# define MOZ_HAVE_CXX11_CONSTEXPR
# endif
-@@ -95,6 +99,9 @@
+@@ -84,6 +88,9 @@
# endif
#elif defined(__GNUC__)
# if defined(__GXX_EXPERIMENTAL_CXX0X__) || __cplusplus >= 201103L
+# if MOZ_GCC_VERSION_AT_LEAST(4, 8, 0)
+# define MOZ_HAVE_CXX11_ALIGNAS
+# endif
- # if MOZ_GCC_VERSION_AT_LEAST(4, 7, 0)
- # define MOZ_HAVE_CXX11_OVERRIDE
- # define MOZ_HAVE_CXX11_FINAL final
+ # define MOZ_HAVE_CXX11_CONSTEXPR
+ # define MOZ_HAVE_EXPLICIT_CONVERSION
+ # endif
diff --git a/www/firefox/files/patch-bug826985 b/www/firefox/files/patch-bug826985
index 9451bab78a28..4fb4dde7bd4d 100644
--- a/www/firefox/files/patch-bug826985
+++ b/www/firefox/files/patch-bug826985
@@ -145,26 +145,26 @@ index d46b5aa..e452223 100644
'targets': [
{
'target_name': 'video_capture_module',
-@@ -46,6 +49,19 @@
- 'linux/video_capture_linux.cc',
- 'linux/video_capture_linux.h',
- ],
-+ 'conditions': [
-+ ['use_libv4l2==1', {
-+ 'defines': [
-+ 'HAVE_LIBV4L2',
-+ ],
-+ 'cflags_mozilla': [
-+ '$(MOZ_LIBV4L2_CFLAGS)',
-+ ],
-+ 'libraries': [
-+ '-lv4l2',
-+ ],
-+ }],
+@@ -69,6 +72,19 @@
+ 'linux/video_capture_linux.cc',
+ 'linux/video_capture_linux.h',
+ ],
++ 'conditions': [
++ ['use_libv4l2==1', {
++ 'defines': [
++ 'HAVE_LIBV4L2',
+ ],
- }], # linux
- ['OS=="mac"', {
- 'sources': [
++ 'cflags_mozilla': [
++ '$(MOZ_LIBV4L2_CFLAGS)',
++ ],
++ 'libraries': [
++ '-lv4l2',
++ ],
++ }],
++ ],
+ }], # linux
+ ['OS=="mac"', {
+ 'sources': [
diff --git toolkit/library/moz.build toolkit/library/moz.build
index 9c16ffa..1db3794 100644
--- toolkit/library/moz.build
diff --git a/www/firefox/files/patch-bug847568 b/www/firefox/files/patch-bug847568
index bc53bcd16c8d..59bef6d9651a 100644
--- a/www/firefox/files/patch-bug847568
+++ b/www/firefox/files/patch-bug847568
@@ -216,9 +216,9 @@ diff --git netwerk/dns/moz.build netwerk/dns/moz.build
index 0b0717a..2e665c9 100644
--- netwerk/dns/moz.build
+++ netwerk/dns/moz.build
-@@ -63,3 +63,6 @@ GENERATED_FILES = [
+@@ -64,3 +64,6 @@ GENERATED_FILES = [
LOCAL_INCLUDES += [
- '../base/src',
+ '/netwerk/base',
]
+
+if CONFIG['MOZ_NATIVE_HARFBUZZ']:
diff --git a/www/firefox/files/patch-ijg-libjpeg b/www/firefox/files/patch-ijg-libjpeg
index 6abfc6eeffd7..f3378046dd32 100644
--- a/www/firefox/files/patch-ijg-libjpeg
+++ b/www/firefox/files/patch-ijg-libjpeg
@@ -28,7 +28,7 @@ index 8fa8200..1d2a259 100644
-}
+#ifdef JCS_EXTENSIONS
- #if defined(IS_BIG_ENDIAN)
+ #if MOZ_BIG_ENDIAN
#define MOZ_JCS_EXT_NATIVE_ENDIAN_XRGB JCS_EXT_XRGB
#else
#define MOZ_JCS_EXT_NATIVE_ENDIAN_XRGB JCS_EXT_BGRX
diff --git a/www/firefox/files/patch-system-openh264 b/www/firefox/files/patch-system-openh264
index d51644631776..e694b28f436e 100644
--- a/www/firefox/files/patch-system-openh264
+++ b/www/firefox/files/patch-system-openh264
@@ -67,14 +67,6 @@ diff --git toolkit/modules/GMPInstallManager.jsm toolkit/modules/GMPInstallManag
index 9593492..470384b 100644
--- toolkit/modules/GMPInstallManager.jsm
+++ toolkit/modules/GMPInstallManager.jsm
-@@ -107,6 +107,7 @@
- */
- KEY_LOG_ENABLED: "media.gmp-manager.log",
- KEY_ADDON_LAST_UPDATE: "media.{0}.lastUpdate",
-+ KEY_ADDON_PATH: "media.{0}.path",
- KEY_ADDON_VERSION: "media.{0}.version",
- KEY_ADDON_AUTOUPDATE: "media.{0}.autoupdate",
- KEY_URL: "media.gmp-manager.url",
@@ -888,9 +889,7 @@
let gmpAddon = this._gmpAddon;
let installToDirPath = Cc["@mozilla.org/file/local;1"].
@@ -86,75 +78,91 @@ index 9593492..470384b 100644
installToDirPath.initWithPath(path);
log.info("install to directory path: " + installToDirPath.path);
let gmpInstaller = new GMPExtractor(zipPath, installToDirPath.path);
-@@ -899,10 +898,12 @@
+@@ -885,10 +883,12 @@
// Success, set the prefs
let now = Math.round(Date.now() / 1000);
- GMPPrefs.set(GMPPrefs.KEY_ADDON_LAST_UPDATE, now, gmpAddon.id);
+ GMPPrefs.set(GMPPrefs.KEY_PLUGIN_LAST_UPDATE, now, gmpAddon.id);
- // Setting the version pref signals installation completion to consumers,
- // if you need to set other prefs etc. do it before this.
+ // Setting the path pref signals installation completion to consumers,
+ // so set the version and potential other information they use first.
- GMPPrefs.set(GMPPrefs.KEY_ADDON_VERSION, gmpAddon.version,
+ GMPPrefs.set(GMPPrefs.KEY_PLUGIN_VERSION, gmpAddon.version,
gmpAddon.id);
-+ GMPPrefs.set(GMPPrefs.KEY_ADDON_PATH,
++ GMPPrefs.set(GMPPrefs.KEY_PLUGIN_PATH,
+ installToDirPath.path, gmpAddon.id);
this._deferred.resolve(extractedPaths);
}, err => {
this._deferred.reject(err);
+diff --git toolkit/modules/GMPUtils.jsm toolkit/modules/GMPUtils.jsm
+index 1f3a0b1..93517be 100644
+--- toolkit/modules/GMPUtils.jsm
++++ toolkit/modules/GMPUtils.jsm
+@@ -70,6 +70,7 @@ this.GMPPrefs = {
+ KEY_EME_ENABLED: "media.eme.enabled",
+ KEY_PLUGIN_ENABLED: "media.{0}.enabled",
+ KEY_PLUGIN_LAST_UPDATE: "media.{0}.lastUpdate",
++ KEY_PLUGIN_PATH: "media.{0}.path",
+ KEY_PLUGIN_VERSION: "media.{0}.version",
+ KEY_PLUGIN_AUTOUPDATE: "media.{0}.autoupdate",
+ KEY_PLUGIN_FORCEVISIBLE: "media.{0}.forcevisible",
diff --git toolkit/mozapps/extensions/internal/GMPProvider.jsm toolkit/mozapps/extensions/internal/GMPProvider.jsm
index 1f3a0b1..93517be 100644
--- 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) {
+@@ -100,12 +100,11 @@
+ Log.repository.getLoggerWithMessagePrefix("Toolkit.GMP",
+ "GMPWrapper(" +
this._plugin.id + ") ");
- Preferences.observe(GMPPrefs.getPrefKey(KEY_PLUGIN_ENABLED, this._plugin.id),
+- Preferences.observe(GMPPrefs.getPrefKey(GMPPrefs.KEY_PLUGIN_ENABLED,
+- this._plugin.id),
++ Preferences.observe(GMPPrefs.getPrefKey(GMPPrefs.KEY_PLUGIN_ENABLED, this._plugin.id),
this.onPrefEnabledChanged, this);
-- Preferences.observe(GMPPrefs.getPrefKey(KEY_PLUGIN_VERSION, this._plugin.id),
+- Preferences.observe(GMPPrefs.getPrefKey(GMPPrefs.KEY_PLUGIN_VERSION,
++ Preferences.observe(GMPPrefs.getPrefKey(GMPPrefs.KEY_PLUGIN_PATH,
+ 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 = {
+ Preferences.observe(GMPPrefs.KEY_EME_ENABLED,
+ this.onPrefEMEGlobalEnabledChanged, this);
+@@ -120,17 +119,14 @@
+ optionsType: AddonManager.OPTIONS_TYPE_INLINE,
+ get optionsURL() { return this._plugin.optionsURL; },
++
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));
+- GMPPrefs.get(GMPPrefs.KEY_PLUGIN_VERSION,
+- null, this._plugin.id));
+ if (!this._gmpPath) {
-+ this._gmpPath = GMPPrefs.get(KEY_PLUGIN_PATH, null, this._plugin.id);
++ this._gmpPath = GMPPrefs.get(GMPPrefs.KEY_PLUGIN_PATH, null, this._plugin.id);
}
return this._gmpPath;
},
-@@ -202,8 +200,13 @@ GMPWrapper.prototype = {
+-
+ get id() { return this._plugin.id; },
+ get type() { return "plugin"; },
+ get isGMPlugin() { return true; },
+@@ -141,8 +137,13 @@
get description() { return this._plugin.description; },
get fullDescription() { return this._plugin.fullDescription; },
-- get version() { return GMPPrefs.get(KEY_PLUGIN_VERSION, null,
+- get version() { return GMPPrefs.get(GMPPrefs.KEY_PLUGIN_VERSION, null,
- this._plugin.id); },
+ get version() {
+ if (this.isInstalled) {
-+ return GMPPrefs.get(KEY_PLUGIN_VERSION, null,
++ return GMPPrefs.get(GMPPrefs.KEY_PLUGIN_VERSION, null,
+ this._plugin.id);
+ }
+ return null;
+ },
- get isActive() { return !this.userDisabled; },
- get appDisabled() { return false; },
-@@ -346,24 +349,17 @@ GMPWrapper.prototype = {
+ get isActive() { return !this.appDisabled && !this.userDisabled; },
+ get appDisabled() {
+@@ -289,24 +290,17 @@
get pluginMimeTypes() { return []; },
get pluginLibraries() {
@@ -163,7 +171,7 @@ index 1f3a0b1..93517be 100644
- return [path];
- }
- return [];
-+ let path = GMPPrefs.get(KEY_PLUGIN_PATH, null, this._plugin.id);
++ let path = GMPPrefs.get(GMPPrefs.KEY_PLUGIN_PATH, null, this._plugin.id);
+ return path && path.length ? [OS.Path.basename(path)] : [];
},
get pluginFullpath() {
@@ -174,19 +182,19 @@ index 1f3a0b1..93517be 100644
- return [path];
- }
- return [];
-+ let path = GMPPrefs.get(KEY_PLUGIN_PATH, null, this._plugin.id);
++ let path = GMPPrefs.get(GMPPrefs.KEY_PLUGIN_PATH, null, this._plugin.id);
+ return path && path.length ? [path] : [];
},
get isInstalled() {
- return this.version && this.version.length > 0;
-+ let path = GMPPrefs.get(KEY_PLUGIN_PATH, null, this._plugin.id);
++ let path = GMPPrefs.get(GMPPrefs.KEY_PLUGIN_PATH, null, this._plugin.id);
+ return path && path.length > 0;
},
- onPrefEnabledChanged: function() {
-@@ -386,10 +382,10 @@ GMPWrapper.prototype = {
- this);
+ _handleEnabledChanged: function() {
+@@ -362,10 +356,10 @@
+ }
},
- onPrefVersionChanged: function() {
@@ -198,32 +206,34 @@ index 1f3a0b1..93517be 100644
this._gmpPath);
gmpService.removePluginDirectory(this._gmpPath);
}
-@@ -397,15 +393,9 @@ GMPWrapper.prototype = {
-
+@@ -374,15 +368,10 @@
AddonManagerPrivate.callInstallListeners("onExternalInstall", null, this,
null, false);
+ AddonManagerPrivate.callAddonListeners("onInstalling", this, 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));
+- GMPPrefs.get(GMPPrefs.KEY_PLUGIN_VERSION,
+- null, this._plugin.id));
- }
-+ this._gmpPath = GMPPrefs.get(KEY_PLUGIN_PATH, null, this._plugin.id);
++ this._gmpPath = GMPPrefs.get(GMPPrefs.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);
}
-@@ -415,8 +405,8 @@ GMPWrapper.prototype = {
- shutdown: function() {
- Preferences.ignore(GMPPrefs.getPrefKey(KEY_PLUGIN_ENABLED, this._plugin.id),
+@@ -393,9 +382,9 @@
+ Preferences.ignore(GMPPrefs.getPrefKey(GMPPrefs.KEY_PLUGIN_ENABLED,
+ this._plugin.id),
this.onPrefEnabledChanged, this);
-- Preferences.ignore(GMPPrefs.getPrefKey(KEY_PLUGIN_VERSION, this._plugin.id),
+- Preferences.ignore(GMPPrefs.getPrefKey(GMPPrefs.KEY_PLUGIN_VERSION,
++ Preferences.ignore(GMPPrefs.getPrefKey(GMPPrefs.KEY_PLUGIN_PATH,
+ 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);
+ if (this._plugin.isEME) {
+ Preferences.ignore(GMPPrefs.KEY_EME_ENABLED,
+ this.onPrefEMEGlobalEnabledChanged, this);
diff --git a/www/firefox/files/patch-z-bug517422 b/www/firefox/files/patch-z-bug517422
index 374364907ca0..0137e4858cf8 100644
--- a/www/firefox/files/patch-z-bug517422
+++ b/www/firefox/files/patch-z-bug517422
@@ -4,7 +4,7 @@ diff --git config/Makefile.in config/Makefile.in
index 5383399..0410004 100644
--- config/Makefile.in
+++ config/Makefile.in
-@@ -77,6 +77,13 @@ export:: $(export-preqs)
+@@ -77,6 +77,14 @@ export:: $(export-preqs)
-DMOZ_NATIVE_ICU=$(MOZ_NATIVE_ICU) \
-DMOZ_NATIVE_GRAPHITE2=$(MOZ_NATIVE_GRAPHITE2) \
-DMOZ_NATIVE_HARFBUZZ=$(MOZ_NATIVE_HARFBUZZ) \
@@ -12,6 +12,7 @@ index 5383399..0410004 100644
+ -DMOZ_NATIVE_THEORA=$(MOZ_NATIVE_THEORA) \
+ -DMOZ_NATIVE_VORBIS=$(MOZ_NATIVE_VORBIS) \
+ -DMOZ_NATIVE_TREMOR=$(MOZ_NATIVE_TREMOR) \
++ -DMOZ_NATIVE_CELT=$(MOZ_NATIVE_CELT) \
+ -DMOZ_NATIVE_OPUS=$(MOZ_NATIVE_OPUS) \
+ -DMOZ_NATIVE_SPEEX=$(MOZ_NATIVE_SPEEX) \
+ -DMOZ_NATIVE_SOUNDTOUCH=$(MOZ_NATIVE_SOUNDTOUCH) \
@@ -30,7 +31,7 @@ index f67c5c7..eb909ce 100644
+if not CONFIG['MOZ_NATIVE_OGG']:
+ external_dirs += ['media/libogg']
+
-+if not CONFIG['MOZ_NATIVE_OPUS']:
++if not CONFIG['MOZ_NATIVE_CELT'] or not CONFIG['MOZ_NATIVE_OPUS']:
+ external_dirs += ['media/libopus']
+
+if not CONFIG['MOZ_NATIVE_THEORA']:
@@ -86,7 +87,7 @@ index bef567c..9807c29 100644
ogg/ogg.h
ogg/os_types.h
nestegg/nestegg.h
-@@ -1365,3 +1365,29 @@ graphite2/Segment.h
+@@ -1365,3 +1365,35 @@ graphite2/Segment.h
harfbuzz/hb-ot.h
harfbuzz/hb.h
#endif
@@ -104,6 +105,12 @@ index bef567c..9807c29 100644
+#if MOZ_NATIVE_TREMOR==1
+tremor/ivorbiscodec.h
+#endif
++#if MOZ_NATIVE_CELT==1
++celt.h
++celt_header.h
++celt/celt.h
++celt/celt_header.h
++#endif
+#if MOZ_NATIVE_OPUS==1
+opus.h
+opus_multistream.h
@@ -120,7 +127,7 @@ diff --git configure.in configure.in
index 87db361..7947626 100644
--- configure.in
+++ configure.in
-@@ -5223,6 +5223,140 @@ if test "${ac_cv_c_attribute_aligned}" !
+@@ -5223,6 +5223,157 @@ if test "${ac_cv_c_attribute_aligned}" !
fi
dnl ========================================================
@@ -175,6 +182,23 @@ index 87db361..7947626 100644
+AC_SUBST(MOZ_NATIVE_TREMOR)
+
+dnl ========================================================
++dnl Check for libcelt
++dnl ========================================================
++
++MOZ_ARG_WITH_BOOL(system-celt,
++[ --with-system-celt Use system libcelt (located with pkgconfig)],
++MOZ_NATIVE_CELT=1,
++MOZ_NATIVE_CELT=)
++
++if test -n "$MOZ_NATIVE_CELT"; then
++ PKG_CHECK_MODULES(MOZ_CELT, celt)
++else
++ MOZ_CELT_CFLAGS='-I$(topsrcdir)/media/libopus'
++fi
++
++AC_SUBST(MOZ_NATIVE_CELT)
++
++dnl ========================================================
+dnl Check for libopus
+dnl ========================================================
+
@@ -442,24 +466,62 @@ diff --git media/webrtc/trunk/webrtc/modules/audio_coding/codecs/opus/opus.gypi
index 00e77e7..55f48ab 100644
--- media/webrtc/trunk/webrtc/modules/audio_coding/codecs/opus/opus.gypi
+++ media/webrtc/trunk/webrtc/modules/audio_coding/codecs/opus/opus.gypi
-@@ -17,9 +17,9 @@
+@@ -17,18 +17,11 @@
'conditions': [
['build_with_mozilla==1', {
# Mozilla provides its own build of the opus library.
- 'include_dirs': [
- '/media/libopus/include',
-- ]
+- '/media/libopus/src',
+- '/media/libopus/celt',
+ 'cflags_mozilla': [
++ '$(filter -I%, $(MOZ_CELT_CFLAGS))/celt',
+ '$(MOZ_OPUS_CFLAGS)',
-+ ],
++ '$(filter -I%, $(MOZ_OPUS_CFLAGS))/../src',
+ ],
+- 'direct_dependent_settings': {
+- 'include_dirs': [
+- '/media/libopus/include',
+- '/media/libopus/src',
+- '/media/libopus/celt',
+- ],
+- },
}, {
'dependencies': [
'<(DEPTH)/third_party/opus/opus.gyp:opus'
+diff --git media/webrtc/trunk/webrtc/modules/audio_coding/neteq/neteq.gypi media/webrtc/trunk/webrtc/modules/audio_coding/neteq/neteq.gypi
+index 00e77e7..55f48ab 100644
+--- media/webrtc/trunk/webrtc/modules/audio_coding/neteq/neteq.gypi
++++ media/webrtc/trunk/webrtc/modules/audio_coding/neteq/neteq.gypi
+@@ -84,19 +84,11 @@
+ ],
+ }],
+ ['build_with_mozilla==1', {
+- 'include_dirs': [
+- # Need Opus header files for the audio classifier.
+- '<(DEPTH)/../../../media/opus/celt',
+-# '<(DEPTH)/third_party/opus/src/src',
++ 'cflags_mozilla': [
++ '$(filter -I%, $(MOZ_CELT_CFLAGS))/celt',
++ '$(MOZ_OPUS_CFLAGS)',
++ '$(filter -I%, $(MOZ_OPUS_CFLAGS))/../src',
+ ],
+- 'direct_dependent_settings': {
+- 'include_dirs': [
+- '../../../../../../media/opus/celt',
+- # Need Opus header files for the audio classifier.
+- '<(DEPTH)/../../../media/opus/celt',
+-# '<(DEPTH)/third_party/opus/src/src',
+- ],
+- },
+ }],
+ ],
+ 'sources': [
diff --git toolkit/library/moz.build toolkit/library/moz.build
index d42137a..695e75a8 100644
--- toolkit/library/moz.build
+++ toolkit/library/moz.build
-@@ -178,6 +178,27 @@ if CONFIG['MOZ_NATIVE_PNG']:
+@@ -178,6 +178,30 @@ if CONFIG['MOZ_NATIVE_PNG']:
if CONFIG['MOZ_NATIVE_HUNSPELL']:
OS_LIBS += CONFIG['MOZ_HUNSPELL_LIBS']
@@ -475,6 +537,9 @@ index d42137a..695e75a8 100644
+if CONFIG['MOZ_NATIVE_TREMOR']:
+ OS_LIBS += CONFIG['MOZ_TREMOR_LIBS']
+
++if CONFIG['MOZ_NATIVE_CELT']:
++ OS_LIBS += CONFIG['MOZ_CELT_LIBS']
++
+if CONFIG['MOZ_NATIVE_OPUS']:
+ OS_LIBS += CONFIG['MOZ_OPUS_LIBS']
+