- update to Firefox 18.0 (bnc#796895)

* requires NSS 3.14.1
  * removed obsolete SLE11 patches (mozilla-gcc43*)
- ported patches
- reenable WebRTC

OBS-URL: https://build.opensuse.org/package/show/mozilla:Factory/MozillaFirefox?expand=0&rev=308
This commit is contained in:
Wolfgang Rosenauer 2013-01-07 20:49:28 +00:00 committed by Git OBS Bridge
parent 842700101e
commit ec6fc4ae7a
24 changed files with 696 additions and 469 deletions

View File

@ -1,3 +1,12 @@
-------------------------------------------------------------------
Sun Jan 6 21:54:18 UTC 2013 - wr@rosenauer.org
- update to Firefox 18.0 (bnc#796895)
* requires NSS 3.14.1
* removed obsolete SLE11 patches (mozilla-gcc43*)
- ported patches
- reenable WebRTC
-------------------------------------------------------------------
Thu Nov 29 19:56:51 UTC 2012 - wr@rosenauer.org

View File

@ -1,7 +1,7 @@
#
# spec file for package MozillaFirefox
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
# 2006-2012 Wolfgang Rosenauer
#
# All modifications and additions to the file contributed by third parties
@ -17,8 +17,8 @@
#
%define major 17
%define mainver %major.0.1
%define major 18
%define mainver %major.0
%define update_channel release
Name: MozillaFirefox
@ -44,8 +44,8 @@ BuildRequires: libproxy-devel
%else
BuildRequires: wireless-tools
%endif
BuildRequires: mozilla-nspr-devel >= 4.9.2
BuildRequires: mozilla-nss-devel >= 3.13.6
BuildRequires: mozilla-nspr-devel >= 4.9.4
BuildRequires: mozilla-nss-devel >= 3.14.1
BuildRequires: nss-shared-helper-devel
%if %suse_version > 1140
BuildRequires: pkgconfig(gstreamer-0.10)
@ -54,7 +54,7 @@ BuildRequires: pkgconfig(gstreamer-plugins-base-0.10)
%endif
Version: %{mainver}
Release: 0
%define releasedate 2012112800
%define releasedate 2013010500
Provides: firefox = %{mainver}
Provides: firefox = %{version}-%{release}
Provides: web_browser
@ -95,13 +95,10 @@ Patch9: mozilla-repo.patch
Patch10: mozilla-sle11.patch
Patch11: mozilla-disable-neon-option.patch
Patch12: mozilla-arm-disable-edsp.patch
Patch13: mozilla-gstreamer.patch
Patch13: mozilla-gstreamer-803287.patch
Patch14: mozilla-ppc.patch
Patch15: mozilla-gstreamer-760140.patch
# SLE11 patches
Patch20: mozilla-gcc43-enums.patch
Patch21: mozilla-gcc43-template_hacks.patch
Patch22: mozilla-gcc43-templates_instantiation.patch
Patch16: mozilla-webrtc.patch
# Firefox/browser
Patch30: firefox-browser-css.patch
Patch31: firefox-kde.patch
@ -116,6 +113,10 @@ Requires: %{name}-branding > 4.0
Requires: mozilla-nspr >= %(rpm -q --queryformat '%{VERSION}' mozilla-nspr)
Requires: mozilla-nss >= %(rpm -q --queryformat '%{VERSION}' mozilla-nss)
Recommends: libcanberra0
# libproxy's mozjs pacrunner crashes FF (bnc#759123)
%if %suse_version < 1220
Obsoletes: libproxy1-pacrunner-mozjs <= 0.4.7
%endif
%define firefox_appid \{ec8030f7-c20a-464f-9b0e-13a3a9e97384\}
%define _use_internal_dependency_generator 0
%define __find_requires sh %{SOURCE4}
@ -158,7 +159,7 @@ Development files for Firefox to make packaging of addons easier.
%if %localize
%package translations-common
Summary: Common translations for MozillaFirefox
Summary: Common translations for Firefox
Group: System/Localization
Provides: locale(%{name}:ar;ca;cs;da;de;en_GB;es_AR;es_CL;es_ES;fi;fr;hu;it;ja;ko;nb_NO;nl;pl;pt_BR;pt_PT;ru;sv_SE;zh_CN;zh_TW)
Requires: %{name} = %{version}
@ -166,10 +167,10 @@ Obsoletes: %{name}-translations < %{version}-%{release}
%description translations-common
This package contains several common languages for the user interface
of MozillaFirefox.
of Firefox.
%package translations-other
Summary: Extra translations for MozillaFirefox
Summary: Extra translations for Firefox
Group: System/Localization
Provides: locale(%{name}:ach;af;ak;as;ast;be;bg;bn_BD;bn_IN;br;bs;csb;cy;el;en_ZA;eo;es_MX;et;eu;fa;ff;fy_NL;ga_IE;gd;gl;gu_IN;he;hi_IN;hr;hy_AM;id;is;kk;km;kn;ku;lg;lij;lt;lv;mai;mk;ml;mr;nn_NO;nso;or;pa_IN;rm;ro;si;sk;sl;son;sq;sr;ta;ta_LK;te;th;tr;uk;vi;zu)
Requires: %{name} = %{version}
@ -177,11 +178,11 @@ Obsoletes: %{name}-translations < %{version}-%{release}
%description translations-other
This package contains rarely used languages for the user interface
of MozillaFirefox.
of Firefox.
%endif
%package branding-upstream
Summary: Upstream branding for MozillaFirefox
Summary: Upstream branding for Firefox
Group: Productivity/Networking/Web/Browsers
Provides: %{name}-branding = 5.0
Conflicts: otherproviders(%{name}-branding)
@ -197,7 +198,7 @@ Supplements: packageand(%{name}:branding-upstream)
#BRAND: It's also possible to drop files in /usr/lib/firefox/searchplugins
%description branding-upstream
This package provides upstream look and feel for MozillaFirefox.
This package provides upstream look and feel for Firefox.
%if %crashreporter
@ -231,12 +232,7 @@ cd $RPM_BUILD_DIR/mozilla
%patch13 -p1
%patch14 -p1
%patch15 -p1
# SLE patches
%if %suse_version <= 1110
%patch20 -p1
%patch21 -p1
%patch22 -p1
%endif
%patch16 -p1
#
%patch30 -p1
%if %suse_version >= 1110
@ -299,7 +295,6 @@ ac_add_options --disable-debug
ac_add_options --enable-startup-notification
#ac_add_options --enable-chrome-format=jar
ac_add_options --enable-update-channel=%{update_channel}
ac_add_options --disable-webrtc # webrtc build is broken for system NSPR
EOF
%if %suse_version > 1130
cat << EOF >> $MOZCONFIG

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:9d2e8dad6293d8ff53c6d4a2577f8b018d49475bd77088185ba32d99705992ff
size 29966
oid sha256:bc2fcd2cdbe11b51361f888f50b80837ae01c06a3916ad1f7fff1f922fcf21e0
size 29924

View File

@ -2,8 +2,8 @@
CHANNEL="release"
BRANCH="releases/mozilla-$CHANNEL"
RELEASE_TAG="FIREFOX_17_0_1_RELEASE"
VERSION="17.0.1"
RELEASE_TAG="FIREFOX_18_0_RELEASE"
VERSION="18.0"
# mozilla
echo "cloning $BRANCH..."

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:36d4eab5d653332e0814d2c6a9cad8ac5f5c69aece2f11abef440adda5874f50
size 92101778

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1d9421b89267bf10d5975794d54dd07924d7b55110cd49a7b5b84dad8751e4be
size 97931811

View File

@ -1,27 +1,27 @@
# HG changeset patch
# Parent 7272ee3a4df832b885fec122f02d32f23dcc9cdb
# Parent ab9210b3779914924d12de5a3952d4cc52cd9d78
diff --git a/browser/app/Makefile.in b/browser/app/Makefile.in
--- a/browser/app/Makefile.in
+++ b/browser/app/Makefile.in
@@ -127,16 +127,21 @@ endif
@@ -133,16 +133,21 @@ endif
endif #} LIBXUL_SDK
ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2)
libs::
$(INSTALL) $(IFLAGS1) $(DIST)/branding/mozicon128.png $(DIST)/bin/icons
$(INSTALL) $(IFLAGS1) $(DIST)/branding/default16.png $(DIST)/bin/chrome/icons/default
$(INSTALL) $(IFLAGS1) $(DIST)/branding/default32.png $(DIST)/bin/chrome/icons/default
$(INSTALL) $(IFLAGS1) $(DIST)/branding/default48.png $(DIST)/bin/chrome/icons/default
$(INSTALL) $(IFLAGS1) $(DIST)/branding/mozicon128.png $(FINAL_TARGET)/icons
$(INSTALL) $(IFLAGS1) $(DIST)/branding/default16.png $(FINAL_TARGET)/chrome/icons/default
$(INSTALL) $(IFLAGS1) $(DIST)/branding/default32.png $(FINAL_TARGET)/chrome/icons/default
$(INSTALL) $(IFLAGS1) $(DIST)/branding/default48.png $(FINAL_TARGET)/chrome/icons/default
+ifdef MOZ_OFFICIAL_BRANDING
+ $(INSTALL) $(IFLAGS1) $(DIST)/branding/default22.png $(DIST)/bin/chrome/icons/default
+ $(INSTALL) $(IFLAGS1) $(DIST)/branding/default24.png $(DIST)/bin/chrome/icons/default
+ $(INSTALL) $(IFLAGS1) $(DIST)/branding/default256.png $(DIST)/bin/chrome/icons/default
+ $(INSTALL) $(IFLAGS1) $(DIST)/branding/default22.png $(FINAL_TARGET)/chrome/icons/default
+ $(INSTALL) $(IFLAGS1) $(DIST)/branding/default24.png $(FINAL_TARGET)/chrome/icons/default
+ $(INSTALL) $(IFLAGS1) $(DIST)/branding/default256.png $(FINAL_TARGET)/chrome/icons/default
+endif
endif
libs:: $(srcdir)/profile/prefs.js
$(INSTALL) $(IFLAGS1) $^ $(DIST)/bin/defaults/profile
$(INSTALL) $(IFLAGS1) $^ $(FINAL_TARGET)/defaults/profile
ifndef LIBXUL_SDK
# channel-prefs.js is handled separate from other prefs due to bug 756325
@ -29,7 +29,7 @@ diff --git a/browser/app/Makefile.in b/browser/app/Makefile.in
diff --git a/browser/branding/official/Makefile.in b/browser/branding/official/Makefile.in
--- a/browser/branding/official/Makefile.in
+++ b/browser/branding/official/Makefile.in
@@ -35,18 +35,21 @@ OSX_BRANDING_FILES = \
@@ -42,18 +42,21 @@ OSX_BRANDING_FILES = \
firefox.icns \
disk.icns \
document.icns \
@ -54,7 +54,7 @@ diff --git a/browser/branding/official/Makefile.in b/browser/branding/official/M
diff --git a/browser/installer/package-manifest.in b/browser/installer/package-manifest.in
--- a/browser/installer/package-manifest.in
+++ b/browser/installer/package-manifest.in
@@ -496,18 +496,21 @@
@@ -541,18 +541,21 @@
@BINPATH@/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/icon.png
#ifdef SHIP_FEEDBACK
@BINPATH@/distribution/extensions/testpilot@labs.mozilla.com.xpi

View File

@ -2,7 +2,7 @@ diff --git a/browser/base/content/browser-kde.xul b/browser/base/content/browser
new file mode 100644
--- /dev/null
+++ b/browser/base/content/browser-kde.xul
@@ -0,0 +1,1272 @@
@@ -0,0 +1,1274 @@
+#filter substitution
+<?xml version="1.0"?>
+# -*- Mode: HTML -*-
@ -76,11 +76,11 @@ new file mode 100644
+ <menuitem id="context_reloadTab" label="&reloadTab.label;" accesskey="&reloadTab.accesskey;"
+ oncommand="gBrowser.reloadTab(TabContextMenu.contextTab);"/>
+ <menuseparator/>
+ <menuitem id="context_pinTab" label="&pinAppTab.label;"
+ accesskey="&pinAppTab.accesskey;"
+ <menuitem id="context_pinTab" label="&pinTab.label;"
+ accesskey="&pinTab.accesskey;"
+ oncommand="gBrowser.pinTab(TabContextMenu.contextTab);"/>
+ <menuitem id="context_unpinTab" label="&unpinAppTab.label;" hidden="true"
+ accesskey="&unpinAppTab.accesskey;"
+ <menuitem id="context_unpinTab" label="&unpinTab.label;" hidden="true"
+ accesskey="&unpinTab.accesskey;"
+ oncommand="gBrowser.unpinTab(TabContextMenu.contextTab);"/>
+ <menu id="context_tabViewMenu" label="&moveToGroup.label;"
+ accesskey="&moveToGroup.accesskey;">
@ -402,10 +402,6 @@ new file mode 100644
+ </hbox>
+ </panel>
+
+ <tooltip id="urlTooltip">
+ <label crop="center" flex="1" class="tooltip-label"/>
+ </tooltip>
+
+ <panel id="ctrlTab-panel" class="KUI-panel" hidden="true" norestorefocus="true" level="top">
+ <hbox>
+ <button class="ctrlTab-preview" flex="1"/>
@ -582,6 +578,7 @@ new file mode 100644
+ <image id="password-notification-icon" class="notification-anchor-icon" role="button"/>
+ <image id="webapps-notification-icon" class="notification-anchor-icon" role="button"/>
+ <image id="plugins-notification-icon" class="notification-anchor-icon" role="button"/>
+ <image id="blocked-plugins-notification-icon" class="notification-anchor-icon" role="button"/>
+ </box>
+ <!-- Use onclick instead of normal popup= syntax since the popup
+ code fires onmousedown, and hence eats our favicon drag events.
@ -1069,7 +1066,7 @@ new file mode 100644
+ contentcontextmenu="contentAreaContextMenu"
+ autocompletepopup="PopupAutoComplete"
+ onclick="contentAreaClick(event, false);"/>
+ <chatbar id="pinnedchats" layer="true" mousethrough="always"/>
+ <chatbar id="pinnedchats" layer="true" mousethrough="always" hidden="true"/>
+ <statuspanel id="statusbar-display" inactive="true"/>
+ </vbox>
+ <splitter id="devtools-side-splitter" hidden="true"/>
@ -1077,7 +1074,12 @@ new file mode 100644
+ style="min-width: 18em; width: 22em; max-width: 42em;" persist="width">
+ <toolbar id="devtools-sidebar-toolbar"
+ class="devtools-toolbar"
+ nowindowdrag="true"/>
+ nowindowdrag="true">
+ <spacer flex="1"/>
+ <toolbarbutton tooltiptext="&inspectSidebarCloseButton.tooltiptext;"
+ class="devtools-closebutton"
+ command="Inspector:Sidebar"/>
+ </toolbar>
+ <deck id="devtools-sidebar-deck" flex="1"/>
+ </vbox>
+ <splitter id="social-sidebar-splitter"
@ -1278,9 +1280,9 @@ new file mode 100644
diff --git a/browser/base/jar.mn b/browser/base/jar.mn
--- a/browser/base/jar.mn
+++ b/browser/base/jar.mn
@@ -36,16 +36,18 @@ browser.jar:
content/browser/abouthome/mozilla.png (content/abouthome/mozilla.png)
content/browser/abouthome/noise.png (content/abouthome/noise.png)
@@ -50,16 +50,18 @@ browser.jar:
content/browser/abouthome/mozilla@2x.png (content/abouthome/mozilla@2x.png)
#endif
content/browser/aboutRobots-icon.png (content/aboutRobots-icon.png)
content/browser/aboutRobots-widget-left.png (content/aboutRobots-widget-left.png)
content/browser/aboutSocialError.xhtml (content/aboutSocialError.xhtml)
@ -1294,9 +1296,9 @@ diff --git a/browser/base/jar.mn b/browser/base/jar.mn
content/browser/newtab/newTab.xul (content/newtab/newTab.xul)
* content/browser/newtab/newTab.js (content/newtab/newTab.js)
content/browser/newtab/newTab.css (content/newtab/newTab.css)
content/browser/newtab/preload.xhtml (content/newtab/preload.xhtml)
* content/browser/pageinfo/pageInfo.xul (content/pageinfo/pageInfo.xul)
* content/browser/pageinfo/pageInfo.js (content/pageinfo/pageInfo.js)
content/browser/pageinfo/pageInfo.css (content/pageinfo/pageInfo.css)
diff --git a/browser/components/build/nsModule.cpp b/browser/components/build/nsModule.cpp
--- a/browser/components/build/nsModule.cpp
+++ b/browser/components/build/nsModule.cpp
@ -1383,7 +1385,7 @@ diff --git a/browser/components/preferences/advanced.js b/browser/components/pre
// when the user will select the default. We refresh here periodically
// in case the default changes. On other Windows OS's defaults can also
// be set while the prefs are open.
@@ -725,14 +731,25 @@ var gAdvancedPane = {
@@ -715,14 +721,25 @@ var gAdvancedPane = {
* Set browser as the operating system default browser.
*/
setDefaultBrowser: function()
@ -1845,8 +1847,8 @@ new file mode 100644
diff --git a/browser/installer/package-manifest.in b/browser/installer/package-manifest.in
--- a/browser/installer/package-manifest.in
+++ b/browser/installer/package-manifest.in
@@ -561,18 +561,20 @@
@BINPATH@/@PREF_DIR@/services-sync.js
@@ -579,18 +579,20 @@
@BINPATH@/@PREF_DIR@/healthreport-prefs.js
#endif
@BINPATH@/greprefs.js
@BINPATH@/defaults/autoconfig/platform.js

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:18552a20adcf62c5cea6b54ca5d5d7829db3b837fd8428635d3a53f4322c14d4
size 52155540

3
l10n-18.0.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:fe0078528a121e861b2e5eb80adf76fbf3688a3ca59e6925c22aa423c6835c0c
size 52439072

View File

@ -1,93 +0,0 @@
# HG changeset patch
# Parent 6d0e0f7dc4cf04f1d08f8b4f8e9312ac05928608
remove trailing commas in enum definitions as these are unpalatable for gcc
(4.3.4) in pedantic mode
diff --git a/media/webrtc/trunk/src/common_types.h b/media/webrtc/trunk/src/common_types.h
--- a/media/webrtc/trunk/src/common_types.h
+++ b/media/webrtc/trunk/src/common_types.h
@@ -342,17 +342,17 @@ enum TelephoneEventDetectionMethods
enum NsModes // type of Noise Suppression
{
kNsUnchanged = 0, // previously set mode
kNsDefault, // platform default
kNsConference, // conferencing default
kNsLowSuppression, // lowest suppression
kNsModerateSuppression,
kNsHighSuppression,
- kNsVeryHighSuppression, // highest suppression
+ kNsVeryHighSuppression // highest suppression
};
enum AgcModes // type of Automatic Gain Control
{
kAgcUnchanged = 0, // previously set mode
kAgcDefault, // platform default
// adaptive mode for use when analog volume control exists (e.g. for
// PC softphone)
@@ -367,17 +367,17 @@ enum AgcModes // type o
// EC modes
enum EcModes // type of Echo Control
{
kEcUnchanged = 0, // previously set mode
kEcDefault, // platform default
kEcConference, // conferencing default (aggressive AEC)
kEcAec, // Acoustic Echo Cancellation
- kEcAecm, // AEC mobile
+ kEcAecm // AEC mobile
};
// AECM modes
enum AecmModes // mode of AECM
{
kAecmQuietEarpieceOrHeadset = 0,
// Quiet earpiece or headset use
kAecmEarpiece, // most earpiece use
@@ -416,43 +416,43 @@ enum NetEqModes // NetEQ pla
// Optimized trade-off between low delay and jitter robustness for two-way
// communication.
kNetEqDefault = 0,
// Improved jitter robustness at the cost of increased delay. Can be
// used in one-way communication.
kNetEqStreaming = 1,
// Optimzed for decodability of fax signals rather than for perceived audio
// quality.
- kNetEqFax = 2,
+ kNetEqFax = 2
};
enum NetEqBgnModes // NetEQ Background Noise (BGN) configurations
{
// BGN is always on and will be generated when the incoming RTP stream
// stops (default).
kBgnOn = 0,
// The BGN is faded to zero (complete silence) after a few seconds.
kBgnFade = 1,
// BGN is not used at all. Silence is produced after speech extrapolation
// has faded.
- kBgnOff = 2,
+ kBgnOff = 2
};
enum OnHoldModes // On Hold direction
{
kHoldSendAndPlay = 0, // Put both sending and playing in on-hold state.
kHoldSendOnly, // Put only sending in on-hold state.
kHoldPlayOnly // Put only playing in on-hold state.
};
enum AmrMode
{
kRfc3267BwEfficient = 0,
kRfc3267OctetAligned = 1,
- kRfc3267FileStorage = 2,
+ kRfc3267FileStorage = 2
};
// ==================================================================
// Video specific types
// ==================================================================
// Raw video types
enum RawVideoType

View File

@ -1,26 +0,0 @@
# HG changeset patch
# Parent 993c5b5a44ca18c5273b74c75704b418c2477d28
bmo#783505 - bump gcc version required for building without template hacks
diff --git a/js/src/jstypedarray.cpp b/js/src/jstypedarray.cpp
--- a/js/src/jstypedarray.cpp
+++ b/js/src/jstypedarray.cpp
@@ -1404,17 +1404,17 @@ class TypedArrayTemplate
// retrieves a given Value, probably from a slot on the object.
template<Value ValueGetter(JSObject *obj)>
static JSBool
Getter(JSContext *cx, unsigned argc, Value *vp)
{
CallArgs args = CallArgsFromVp(argc, vp);
// FIXME: Hack to keep us building with gcc 4.2. Remove this once we
// drop support for gcc 4.2. See bug 783505 for the details.
-#if defined(__GNUC__) && __GNUC_MINOR__ <= 2
+#if defined(__GNUC__) && __GNUC_MINOR__ <= 3
return CallNonGenericMethod(cx, IsThisClass, GetterImpl<ValueGetter>, args);
#else
return CallNonGenericMethod<ThisTypeArray::IsThisClass,
ThisTypeArray::GetterImpl<ValueGetter> >(cx, args);
#endif
}
// Define an accessor for a read-only property that invokes a native getter

View File

@ -1,20 +0,0 @@
# HG changeset patch
# Parent 2e78665a1ab70f4dc3884965428bda14da684ef6
bmo#732340 - explicitly instantiate templates
diff --git a/gfx/harfbuzz/src/hb-ot-layout.cc b/gfx/harfbuzz/src/hb-ot-layout.cc
--- a/gfx/harfbuzz/src/hb-ot-layout.cc
+++ b/gfx/harfbuzz/src/hb-ot-layout.cc
@@ -479,8 +479,12 @@ hb_ot_layout_position_lookup (hb_font_t
return hb_ot_layout_from_face (font->face)->gpos->position_lookup (&c, lookup_index);
}
void
hb_ot_layout_position_finish (hb_font_t *font, hb_buffer_t *buffer, hb_bool_t zero_width_attached_marks)
{
GPOS::position_finish (font, buffer, zero_width_attached_marks);
}
+
+template int SortedArrayOf<Record<LangSys> >::search<unsigned int>(unsigned int const &) const;
+template int SortedArrayOf<Record<Script> >::search<unsigned int>(unsigned int const &) const;
+template int SortedArrayOf<IntType<unsigned short> >::search<unsigned int>(unsigned int const &) const;

View File

@ -4,7 +4,7 @@ Bug 760140 - Query the GstRegistry for the required demuxers/decoders from canPl
diff --git a/content/base/src/nsContentUtils.cpp b/content/base/src/nsContentUtils.cpp
--- a/content/base/src/nsContentUtils.cpp
+++ b/content/base/src/nsContentUtils.cpp
@@ -137,16 +137,19 @@ static NS_DEFINE_CID(kXTFServiceCID, NS_
@@ -147,16 +147,19 @@ static NS_DEFINE_CID(kXTFServiceCID, NS_
#include "xpcprivate.h" // nsXPConnect
#include "nsScriptSecurityManager.h"
#include "nsIChannelPolicy.h"
@ -24,43 +24,10 @@ diff --git a/content/base/src/nsContentUtils.cpp b/content/base/src/nsContentUti
#include "mozilla/Base64.h"
#include "mozilla/Preferences.h"
#include "nsDOMMutationObserver.h"
@@ -6580,26 +6583,23 @@ nsContentUtils::FindInternalContentViewe
}
return docFactory.forget();
}
}
}
#endif
#ifdef MOZ_GSTREAMER
- if (nsHTMLMediaElement::IsH264Enabled()) {
- for (unsigned int i = 0; i < ArrayLength(nsHTMLMediaElement::gH264Types); ++i) {
- const char* type = nsHTMLMediaElement::gH264Types[i];
- if (!strcmp(aType, type)) {
- docFactory = do_GetService("@mozilla.org/content/document-loader-factory;1");
- if (docFactory && aLoaderType) {
- *aLoaderType = TYPE_CONTENT;
- }
- return docFactory.forget();
+ if (nsHTMLMediaElement::IsGStreamerEnabled()) {
+ if (nsGStreamerDecoder::CanHandleMediaType(aType, nullptr)) {
+ docFactory = do_GetService("@mozilla.org/content/document-loader-factory;1");
+ if (docFactory && aLoaderType) {
+ *aLoaderType = TYPE_CONTENT;
}
+ return docFactory.forget();
}
}
#endif
#ifdef MOZ_MEDIA_PLUGINS
if (nsHTMLMediaElement::IsMediaPluginsEnabled() &&
nsHTMLMediaElement::IsMediaPluginsType(nsDependentCString(aType))) {
docFactory = do_GetService("@mozilla.org/content/document-loader-factory;1");
diff --git a/content/html/content/public/nsHTMLMediaElement.h b/content/html/content/public/nsHTMLMediaElement.h
--- a/content/html/content/public/nsHTMLMediaElement.h
+++ b/content/html/content/public/nsHTMLMediaElement.h
@@ -256,17 +256,19 @@ public:
@@ -263,17 +263,19 @@ public:
void UpdateMediaSize(nsIntSize size);
// Returns the CanPlayStatus indicating if we can handle this
@ -81,32 +48,31 @@ diff --git a/content/html/content/public/nsHTMLMediaElement.h b/content/html/con
// Returns true if we should handle this MIME type when it appears
// as an <object> or as a toplevel page. If, in practice, our support
// for the type is more limited than appears in the wild, we should return
@@ -296,20 +298,17 @@ public:
#ifdef MOZ_WEBM
static bool IsWebMEnabled();
@@ -305,19 +307,16 @@ public:
static bool IsWebMType(const nsACString& aType);
static const char gWebMTypes[2][11];
static char const *const gWebMCodecs[4];
#endif
#ifdef MOZ_GSTREAMER
- static bool IsH264Enabled();
static bool IsGStreamerEnabled();
static bool IsGStreamerSupportedType(const nsACString& aType);
- static bool IsH264Type(const nsACString& aType);
- static const char gH264Types[3][16];
- static char const *const gH264Codecs[7];
+ static bool IsGStreamerEnabled();
#endif
#ifdef MOZ_MEDIA_PLUGINS
static bool IsMediaPluginsEnabled();
static bool IsMediaPluginsType(const nsACString& aType);
#ifdef MOZ_WIDGET_GONK
static bool IsOmxEnabled();
static bool IsOmxSupportedType(const nsACString& aType);
static const char gOmxTypes[5][16];
static char const *const gH264Codecs[7];
#endif
/**
diff --git a/content/html/content/src/nsHTMLMediaElement.cpp b/content/html/content/src/nsHTMLMediaElement.cpp
--- a/content/html/content/src/nsHTMLMediaElement.cpp
+++ b/content/html/content/src/nsHTMLMediaElement.cpp
@@ -2112,52 +2112,20 @@ nsHTMLMediaElement::IsWebMType(const nsA
@@ -2128,51 +2128,34 @@ nsHTMLMediaElement::IsWebMType(const nsA
return true;
}
}
@ -114,55 +80,52 @@ diff --git a/content/html/content/src/nsHTMLMediaElement.cpp b/content/html/cont
}
#endif
-#if defined(MOZ_GSTREAMER) || defined(MOZ_WIDGET_GONK)
+#ifdef MOZ_WIDGET_GONK
char const *const nsHTMLMediaElement::gH264Codecs[7] = {
"avc1.42E01E",
"avc1.42001E",
"avc1.58A01E",
"avc1.4D401E",
"avc1.64001E",
"mp4a.40.2",
nullptr
};
#endif
#ifdef MOZ_GSTREAMER
-const char nsHTMLMediaElement::gH264Types[3][16] = {
- "video/mp4",
- "video/3gpp",
- "video/quicktime",
-};
-
-char const *const nsHTMLMediaElement::gH264Codecs[7] = {
- "avc1.42E01E",
- "avc1.42001E",
- "avc1.58A01E",
- "avc1.4D401E",
- "avc1.64001E",
- "mp4a.40.2",
- nullptr
-};
-
bool
-nsHTMLMediaElement::IsH264Enabled()
+nsHTMLMediaElement::IsGStreamerEnabled()
nsHTMLMediaElement::IsGStreamerEnabled()
{
- return Preferences::GetBool("media.h264.enabled");
-}
return Preferences::GetBool("media.gstreamer.enabled");
}
-
-bool
-nsHTMLMediaElement::IsH264Type(const nsACString& aType)
-{
- if (!IsH264Enabled()) {
- return false;
- }
-
- for (uint32_t i = 0; i < ArrayLength(gH264Types); ++i) {
- if (aType.EqualsASCII(gH264Types[i])) {
- return true;
- }
- }
-
- return false;
+ return Preferences::GetBool("media.gstreamer.enabled");
}
-}
#endif
#ifdef MOZ_MEDIA_PLUGINS
bool
nsHTMLMediaElement::IsMediaPluginsEnabled()
{
return Preferences::GetBool("media.plugins.enabled");
@@ -2180,18 +2148,22 @@ nsHTMLMediaElement::IsMediaPluginsType(c
}
#ifdef MOZ_WIDGET_GONK
const char nsHTMLMediaElement::gOmxTypes[5][16] = {
"audio/mpeg",
"audio/mp4",
"video/mp4",
"video/3gpp",
@@ -2257,18 +2240,22 @@ nsHTMLMediaElement::IsDASHMPDType(const
return false;
}
#endif
@ -185,9 +148,9 @@ diff --git a/content/html/content/src/nsHTMLMediaElement.cpp b/content/html/cont
#endif
#ifdef MOZ_OGG
if (IsOggType(nsDependentCString(aMIMEType))) {
@@ -2208,20 +2180,22 @@ nsHTMLMediaElement::CanHandleMediaType(c
#ifdef MOZ_WEBM
if (IsWebMType(nsDependentCString(aMIMEType))) {
@@ -2292,20 +2279,22 @@ nsHTMLMediaElement::CanHandleMediaType(c
if (IsDASHMPDType(nsDependentCString(aMIMEType))) {
// DASH manifest uses WebM codecs only.
*aCodecList = gWebMCodecs;
return CANPLAY_YES;
}
@ -205,14 +168,14 @@ diff --git a/content/html/content/src/nsHTMLMediaElement.cpp b/content/html/cont
+ if (nsGStreamerDecoder::CanHandleMediaType(aMIMEType, aCodecs))
+ return CANPLAY_YES;
#endif
#ifdef MOZ_MEDIA_PLUGINS
if (IsMediaPluginsEnabled() && GetMediaPluginHost()->FindDecoder(nsDependentCString(aMIMEType), aCodecList))
#ifdef MOZ_WIDGET_GONK
if (IsOmxSupportedType(nsDependentCString(aMIMEType))) {
*aCodecList = gH264Codecs;
return CANPLAY_MAYBE;
}
#endif
return CANPLAY_NO;
}
@@ -2236,17 +2210,17 @@ bool nsHTMLMediaElement::ShouldHandleMed
#ifdef MOZ_MEDIA_PLUGINS
@@ -2326,17 +2315,17 @@ bool nsHTMLMediaElement::ShouldHandleMed
if (IsOggType(nsDependentCString(aMIMEType)))
return true;
#endif
@ -225,13 +188,13 @@ diff --git a/content/html/content/src/nsHTMLMediaElement.cpp b/content/html/cont
+ if (nsGStreamerDecoder::CanHandleMediaType(aMIMEType, nullptr))
return true;
#endif
#ifdef MOZ_MEDIA_PLUGINS
if (IsMediaPluginsEnabled() && GetMediaPluginHost()->FindDecoder(nsDependentCString(aMIMEType), NULL))
#ifdef MOZ_WIDGET_GONK
if (IsOmxSupportedType(nsDependentCString(aMIMEType))) {
return true;
}
#endif
// We should not return true for Wave types, since there are some
// Wave codecs actually in use in the wild that we don't support, and
@@ -2272,26 +2246,31 @@ nsHTMLMediaElement::GetCanPlay(const nsA
#ifdef MOZ_MEDIA_PLUGINS
@@ -2367,26 +2356,31 @@ nsHTMLMediaElement::GetCanPlay(const nsA
{
nsContentTypeParser parser(aType);
nsAutoString mimeType;
@ -268,27 +231,99 @@ diff --git a/content/html/content/src/nsHTMLMediaElement.cpp b/content/html/cont
// of the 'codecs' parameter
nsCharSeparatedTokenizer tokenizer(codecs, ',');
bool expectMoreTokens = false;
@@ -2369,17 +2348,19 @@ nsHTMLMediaElement::CreateDecoder(const
@@ -2425,46 +2419,41 @@ nsHTMLMediaElement::CanPlayType(const ns
}
#ifdef MOZ_GSTREAMER
bool
nsHTMLMediaElement::IsGStreamerSupportedType(const nsACString& aMimeType)
{
if (!IsGStreamerEnabled())
return false;
- if (IsH264Type(aMimeType))
+
+ const char *type;
+ NS_CStringGetData(aMimeType, &type, nullptr);
+ if (nsGStreamerDecoder::CanHandleMediaType(type, nullptr))
return true;
- if (!Preferences::GetBool("media.prefer-gstreamer", false))
- return false;
-#ifdef MOZ_WEBM
- if (IsWebMType(aMimeType))
- return true;
-#endif
-#ifdef MOZ_OGG
- if (IsOggType(aMimeType))
- return true;
-#endif
+
return false;
}
#endif
already_AddRefed<nsMediaDecoder>
nsHTMLMediaElement::CreateDecoder(const nsACString& aType)
{
#ifdef MOZ_GSTREAMER
// When enabled, use GStreamer for H.264, but not for codecs handled by our
// bundled decoders, unless the "media.prefer-gstreamer" pref is set.
- if (IsGStreamerSupportedType(aType)) {
- nsRefPtr<nsGStreamerDecoder> decoder = new nsGStreamerDecoder();
- if (decoder->Init(this)) {
- return decoder.forget();
+ if (!Preferences::GetBool("media.prefer-gstreamer", false)) {
+ if (IsGStreamerSupportedType(aType)) {
+ nsRefPtr<nsGStreamerDecoder> decoder = new nsGStreamerDecoder();
+ if (decoder->Init(this)) {
+ return decoder.forget();
+ }
}
}
#endif
-
#ifdef MOZ_RAW
if (IsRawType(aType)) {
nsRefPtr<nsRawDecoder> decoder = new nsRawDecoder();
if (decoder->Init(this)) {
return decoder.forget();
}
}
#endif
@@ -2503,25 +2492,33 @@ nsHTMLMediaElement::CreateDecoder(const
#ifdef MOZ_WEBM
if (IsWebMType(aType)) {
nsRefPtr<nsWebMDecoder> decoder = new nsWebMDecoder();
if (decoder->Init(this)) {
return decoder.forget();
}
}
#endif
#ifdef MOZ_GSTREAMER
- if (IsH264Type(aType)) {
+ const char *type;
+ NS_CStringGetData(aType, &type, NULL);
+ if (nsGStreamerDecoder::CanHandleMediaType(type, NULL)) {
nsRefPtr<nsGStreamerDecoder> decoder = new nsGStreamerDecoder();
-
#ifdef MOZ_DASH
if (IsDASHMPDType(aType)) {
nsRefPtr<nsDASHDecoder> decoder = new nsDASHDecoder();
if (decoder->Init(this)) {
return decoder.forget();
}
}
#endif
+#ifdef MOZ_GSTREAMER
+ // use GStreamer as fallback if not preferred
+ if (IsGStreamerSupportedType(aType)) {
+ nsRefPtr<nsGStreamerDecoder> decoder = new nsGStreamerDecoder();
+ if (decoder->Init(this)) {
+ return decoder.forget();
+ }
+ }
+#endif
return nullptr;
}
nsresult nsHTMLMediaElement::InitializeDecoderAsClone(nsMediaDecoder* aOriginal)
{
NS_ASSERTION(mLoadingSrc, "mLoadingSrc must already be set");
NS_ASSERTION(mDecoder == nullptr, "Shouldn't have a decoder");
diff --git a/content/media/gstreamer/Makefile.in b/content/media/gstreamer/Makefile.in
--- a/content/media/gstreamer/Makefile.in
+++ b/content/media/gstreamer/Makefile.in
@ -367,11 +402,11 @@ new file mode 100644
+#define ENTRY_FORMAT(entry) entry[0]
+#define ENTRY_CAPS(entry) entry[1]
+
+nsGStreamerFormatHelper* nsGStreamerFormatHelper::gInstance = NULL;
+nsGStreamerFormatHelper* nsGStreamerFormatHelper::gInstance = nullptr;
+
+nsGStreamerFormatHelper *nsGStreamerFormatHelper::Instance() {
+ if (!gInstance) {
+ gst_init(NULL, NULL);
+ gst_init(nullptr, nullptr);
+ gInstance = new nsGStreamerFormatHelper();
+ }
+
@ -379,7 +414,7 @@ new file mode 100644
+}
+
+nsGStreamerFormatHelper::nsGStreamerFormatHelper()
+ : mFactories(NULL),
+ : mFactories(nullptr),
+ mCookie(0)
+{
+ const char *containers[3][2] = {
@ -424,7 +459,7 @@ new file mode 100644
+ unsigned int i;
+
+ /* convert aMIMEType to gst container caps */
+ const char *capsString = NULL;
+ const char *capsString = nullptr;
+ for (i = 0; i < G_N_ELEMENTS(mContainers); i++) {
+ if (!strcmp(ENTRY_FORMAT(mContainers[i]), aMIMEType)) {
+ capsString = ENTRY_CAPS(mContainers[i]);
@ -434,7 +469,7 @@ new file mode 100644
+
+ if (!capsString) {
+ /* we couldn't find any matching caps */
+ return NULL;
+ return nullptr;
+ }
+
+ GstCaps *caps = gst_caps_from_string(capsString);
@ -447,7 +482,7 @@ new file mode 100644
+ nsCCharSeparatedTokenizer tokenizer(codecs, ',');
+ while (tokenizer.hasMoreTokens()) {
+ const nsCSubstring& codec = tokenizer.nextToken();
+ capsString = NULL;
+ capsString = nullptr;
+
+ for (i = 0; i < G_N_ELEMENTS(mCodecs); i++) {
+ if (codec.Equals(ENTRY_FORMAT(mCodecs[i]))) {
@ -458,7 +493,7 @@ new file mode 100644
+
+ if (!capsString) {
+ gst_caps_unref(caps);
+ return NULL;
+ return nullptr;
+ }
+
+ GstCaps *tmp = gst_caps_from_string(capsString);
@ -479,7 +514,7 @@ new file mode 100644
+ * structure */
+ for (unsigned int i = 0; i < gst_caps_get_size(aCaps); i++) {
+ GstStructure *s = gst_caps_get_structure(aCaps, i);
+ GstCaps *caps = gst_caps_new_full(gst_structure_copy(s), NULL);
+ GstCaps *caps = gst_caps_new_full(gst_structure_copy(s), nullptr);
+ list = gst_element_factory_list_filter (factories, caps, GST_PAD_SINK, FALSE);
+ gst_caps_unref(caps);
+ if (!list) {
@ -545,25 +580,3 @@ new file mode 100644
+};
+
+#endif
diff --git a/modules/libpref/src/init/all.js b/modules/libpref/src/init/all.js
--- a/modules/libpref/src/init/all.js
+++ b/modules/libpref/src/init/all.js
@@ -165,17 +165,17 @@ pref("media.opus.enabled", true);
#endif
#ifdef MOZ_WAVE
pref("media.wave.enabled", true);
#endif
#ifdef MOZ_WEBM
pref("media.webm.enabled", true);
#endif
#ifdef MOZ_GSTREAMER
-pref("media.h264.enabled", true);
+pref("media.gstreamer.enabled", true);
#endif
#ifdef MOZ_WEBRTC
pref("media.navigator.enabled", false);
#else
#ifdef ANDROID
pref("media.navigator.enabled", true);
#endif
#endif

View File

@ -0,0 +1,293 @@
# HG changeset patch
# Parent 09328afa274e7cf6354f446ae37735218b796e7f
# User Wolfgang Rosenauer <wr@rosenauer.org>
Bug 803287 - Don't use GStreamer (when enabled) for Ogg/WebM if builtin backends present. (TM: 19)
diff --git a/content/base/src/nsContentUtils.cpp b/content/base/src/nsContentUtils.cpp
--- a/content/base/src/nsContentUtils.cpp
+++ b/content/base/src/nsContentUtils.cpp
@@ -6676,71 +6676,55 @@ nsContentUtils::FindInternalContentViewe
else
*aLoaderType = TYPE_UNKNOWN;
}
return docFactory.forget();
}
#ifdef MOZ_MEDIA
#ifdef MOZ_OGG
- if (nsHTMLMediaElement::IsOggEnabled()) {
- for (unsigned int i = 0; i < ArrayLength(nsHTMLMediaElement::gOggTypes); ++i) {
- const char* type = nsHTMLMediaElement::gOggTypes[i];
- if (!strcmp(aType, type)) {
- docFactory = do_GetService("@mozilla.org/content/document-loader-factory;1");
- if (docFactory && aLoaderType) {
- *aLoaderType = TYPE_CONTENT;
- }
- return docFactory.forget();
- }
+ if (nsHTMLMediaElement::IsOggType(nsDependentCString(aType))) {
+ docFactory = do_GetService("@mozilla.org/content/document-loader-factory;1");
+ if (docFactory && aLoaderType) {
+ *aLoaderType = TYPE_CONTENT;
}
+ return docFactory.forget();
}
#endif
#ifdef MOZ_WEBM
- if (nsHTMLMediaElement::IsWebMEnabled()) {
- for (unsigned int i = 0; i < ArrayLength(nsHTMLMediaElement::gWebMTypes); ++i) {
- const char* type = nsHTMLMediaElement::gWebMTypes[i];
- if (!strcmp(aType, type)) {
- docFactory = do_GetService("@mozilla.org/content/document-loader-factory;1");
- if (docFactory && aLoaderType) {
- *aLoaderType = TYPE_CONTENT;
- }
- return docFactory.forget();
- }
+ if (nsHTMLMediaElement::IsWebMType(nsDependentCString(aType))) {
+ docFactory = do_GetService("@mozilla.org/content/document-loader-factory;1");
+ if (docFactory && aLoaderType) {
+ *aLoaderType = TYPE_CONTENT;
}
+ return docFactory.forget();
}
#endif
#ifdef MOZ_GSTREAMER
- if (nsHTMLMediaElement::IsH264Enabled()) {
- for (unsigned int i = 0; i < ArrayLength(nsHTMLMediaElement::gH264Types); ++i) {
- const char* type = nsHTMLMediaElement::gH264Types[i];
- if (!strcmp(aType, type)) {
- docFactory = do_GetService("@mozilla.org/content/document-loader-factory;1");
- if (docFactory && aLoaderType) {
- *aLoaderType = TYPE_CONTENT;
- }
- return docFactory.forget();
- }
+ if (nsHTMLMediaElement::IsGStreamerSupportedType(nsDependentCString(aType))) {
+ docFactory = do_GetService("@mozilla.org/content/document-loader-factory;1");
+ if (docFactory && aLoaderType) {
+ *aLoaderType = TYPE_CONTENT;
}
+ return docFactory.forget();
}
#endif
#ifdef MOZ_MEDIA_PLUGINS
if (nsHTMLMediaElement::IsMediaPluginsEnabled() &&
nsHTMLMediaElement::IsMediaPluginsType(nsDependentCString(aType))) {
docFactory = do_GetService("@mozilla.org/content/document-loader-factory;1");
if (docFactory && aLoaderType) {
*aLoaderType = TYPE_CONTENT;
}
return docFactory.forget();
}
#endif // MOZ_MEDIA_PLUGINS
-
#endif // MOZ_MEDIA
return NULL;
}
// static
bool
nsContentUtils::IsPatternMatching(nsAString& aValue, nsAString& aPattern,
diff --git a/content/html/content/public/nsHTMLMediaElement.h b/content/html/content/public/nsHTMLMediaElement.h
--- a/content/html/content/public/nsHTMLMediaElement.h
+++ b/content/html/content/public/nsHTMLMediaElement.h
@@ -303,17 +303,18 @@ public:
#ifdef MOZ_WEBM
static bool IsWebMEnabled();
static bool IsWebMType(const nsACString& aType);
static const char gWebMTypes[2][11];
static char const *const gWebMCodecs[4];
#endif
#ifdef MOZ_GSTREAMER
- static bool IsH264Enabled();
+ static bool IsGStreamerEnabled();
+ static bool IsGStreamerSupportedType(const nsACString& aType);
static bool IsH264Type(const nsACString& aType);
static const char gH264Types[3][16];
static char const *const gH264Codecs[7];
#endif
#ifdef MOZ_WIDGET_GONK
static bool IsOmxEnabled();
static bool IsOmxSupportedType(const nsACString& aType);
diff --git a/content/html/content/src/nsHTMLMediaElement.cpp b/content/html/content/src/nsHTMLMediaElement.cpp
--- a/content/html/content/src/nsHTMLMediaElement.cpp
+++ b/content/html/content/src/nsHTMLMediaElement.cpp
@@ -2148,34 +2148,29 @@ char const *const nsHTMLMediaElement::gH
#ifdef MOZ_GSTREAMER
const char nsHTMLMediaElement::gH264Types[3][16] = {
"video/mp4",
"video/3gpp",
"video/quicktime",
};
bool
-nsHTMLMediaElement::IsH264Enabled()
+nsHTMLMediaElement::IsGStreamerEnabled()
{
- return Preferences::GetBool("media.h264.enabled");
+ return Preferences::GetBool("media.gstreamer.enabled");
}
bool
nsHTMLMediaElement::IsH264Type(const nsACString& aType)
{
- if (!IsH264Enabled()) {
- return false;
- }
-
for (uint32_t i = 0; i < ArrayLength(gH264Types); ++i) {
if (aType.EqualsASCII(gH264Types[i])) {
return true;
}
}
-
return false;
}
#endif
#ifdef MOZ_WIDGET_GONK
const char nsHTMLMediaElement::gOmxTypes[5][16] = {
"audio/mpeg",
"audio/mp4",
@@ -2424,34 +2419,63 @@ nsHTMLMediaElement::CanPlayType(const ns
default:
case CANPLAY_MAYBE:
aResult.AssignLiteral("maybe");
break;
}
return NS_OK;
}
+#ifdef MOZ_GSTREAMER
+bool
+nsHTMLMediaElement::IsGStreamerSupportedType(const nsACString& aMimeType)
+{
+ if (!IsGStreamerEnabled())
+ return false;
+ if (IsH264Type(aMimeType))
+ return true;
+ if (!Preferences::GetBool("media.prefer-gstreamer", false))
+ return false;
+#ifdef MOZ_WEBM
+ if (IsWebMType(aMimeType))
+ return true;
+#endif
+#ifdef MOZ_OGG
+ if (IsOggType(aMimeType))
+ return true;
+#endif
+ return false;
+}
+#endif
+
already_AddRefed<nsMediaDecoder>
nsHTMLMediaElement::CreateDecoder(const nsACString& aType)
{
+#ifdef MOZ_GSTREAMER
+ // When enabled, use GStreamer for H.264, but not for codecs handled by our
+ // bundled decoders, unless the "media.prefer-gstreamer" pref is set.
+ if (IsGStreamerSupportedType(aType)) {
+ nsRefPtr<nsGStreamerDecoder> decoder = new nsGStreamerDecoder();
+ if (decoder->Init(this)) {
+ return decoder.forget();
+ }
+ }
+#endif
+
#ifdef MOZ_RAW
if (IsRawType(aType)) {
nsRefPtr<nsRawDecoder> decoder = new nsRawDecoder();
if (decoder->Init(this)) {
return decoder.forget();
}
}
#endif
#ifdef MOZ_OGG
if (IsOggType(aType)) {
-#ifdef MOZ_GSTREAMER
- nsRefPtr<nsGStreamerDecoder> decoder = new nsGStreamerDecoder();
-#else
nsRefPtr<nsOggDecoder> decoder = new nsOggDecoder();
-#endif
if (decoder->Init(this)) {
return decoder.forget();
}
}
#endif
#ifdef MOZ_WAVE
if (IsWaveType(aType)) {
nsRefPtr<nsWaveDecoder> decoder = new nsWaveDecoder();
@@ -2473,44 +2497,32 @@ nsHTMLMediaElement::CreateDecoder(const
nsRefPtr<nsMediaPluginDecoder> decoder = new nsMediaPluginDecoder(aType);
if (decoder->Init(this)) {
return decoder.forget();
}
}
#endif
#ifdef MOZ_WEBM
if (IsWebMType(aType)) {
-#ifdef MOZ_GSTREAMER
- nsRefPtr<nsGStreamerDecoder> decoder = new nsGStreamerDecoder();
-#else
nsRefPtr<nsWebMDecoder> decoder = new nsWebMDecoder();
-#endif
if (decoder->Init(this)) {
return decoder.forget();
}
}
#endif
#ifdef MOZ_DASH
if (IsDASHMPDType(aType)) {
nsRefPtr<nsDASHDecoder> decoder = new nsDASHDecoder();
if (decoder->Init(this)) {
return decoder.forget();
}
}
#endif
-#ifdef MOZ_GSTREAMER
- if (IsH264Type(aType)) {
- nsRefPtr<nsGStreamerDecoder> decoder = new nsGStreamerDecoder();
- if (decoder->Init(this)) {
- return decoder.forget();
- }
- }
-#endif
return nullptr;
}
nsresult nsHTMLMediaElement::InitializeDecoderAsClone(nsMediaDecoder* aOriginal)
{
NS_ASSERTION(mLoadingSrc, "mLoadingSrc must already be set");
NS_ASSERTION(mDecoder == nullptr, "Shouldn't have a decoder");
diff --git a/modules/libpref/src/init/all.js b/modules/libpref/src/init/all.js
--- a/modules/libpref/src/init/all.js
+++ b/modules/libpref/src/init/all.js
@@ -164,17 +164,17 @@ pref("media.wave.enabled", true);
#endif
#ifdef MOZ_WEBM
pref("media.webm.enabled", true);
#endif
#ifdef MOZ_DASH
pref("media.dash.enabled", true);
#endif
#ifdef MOZ_GSTREAMER
-pref("media.h264.enabled", true);
+pref("media.gstreamer.enabled", true);
#endif
#ifdef MOZ_WEBRTC
pref("media.navigator.enabled", false);
pref("media.peerconnection.enabled", false);
pref("media.navigator.permission.disabled", false);
#else
#ifdef ANDROID
pref("media.navigator.enabled", true);

View File

@ -1,52 +0,0 @@
# HG changeset patch
# Parent e4b87e710b1a5f0bb7db058911bc163b4bf30227
# User Wolfgang Rosenauer <wr@rosenauer.org>
No Bug - use GStreamer _only_ for MP4 (not WebM/OGG)
diff --git a/content/html/content/src/nsHTMLMediaElement.cpp b/content/html/content/src/nsHTMLMediaElement.cpp
--- a/content/html/content/src/nsHTMLMediaElement.cpp
+++ b/content/html/content/src/nsHTMLMediaElement.cpp
@@ -2277,21 +2277,17 @@ nsHTMLMediaElement::CreateDecoder(const
nsRefPtr<nsRawDecoder> decoder = new nsRawDecoder();
if (decoder->Init(this)) {
return decoder.forget();
}
}
#endif
#ifdef MOZ_OGG
if (IsOggType(aType)) {
-#ifdef MOZ_GSTREAMER
- nsRefPtr<nsGStreamerDecoder> decoder = new nsGStreamerDecoder();
-#else
nsRefPtr<nsOggDecoder> decoder = new nsOggDecoder();
-#endif
if (decoder->Init(this)) {
return decoder.forget();
}
}
#endif
#ifdef MOZ_WAVE
if (IsWaveType(aType)) {
nsRefPtr<nsWaveDecoder> decoder = new nsWaveDecoder();
@@ -2305,21 +2301,17 @@ nsHTMLMediaElement::CreateDecoder(const
nsRefPtr<nsMediaPluginDecoder> decoder = new nsMediaPluginDecoder(aType);
if (decoder->Init(this)) {
return decoder.forget();
}
}
#endif
#ifdef MOZ_WEBM
if (IsWebMType(aType)) {
-#ifdef MOZ_GSTREAMER
- nsRefPtr<nsGStreamerDecoder> decoder = new nsGStreamerDecoder();
-#else
nsRefPtr<nsWebMDecoder> decoder = new nsWebMDecoder();
-#endif
if (decoder->Init(this)) {
return decoder.forget();
}
}
#endif
#ifdef MOZ_GSTREAMER
if (IsH264Type(aType)) {

View File

@ -45,7 +45,7 @@ diff --git a/modules/libpref/src/Preferences.cpp b/modules/libpref/src/Preferenc
#include "prefapi.h"
#include "prefread.h"
#include "prefapi_private_data.h"
@@ -896,16 +897,34 @@ pref_LoadPrefsInDir(nsIFile* aDir, char
@@ -950,16 +951,34 @@ pref_LoadPrefsInDir(nsIFile* aDir, char
static nsresult pref_LoadPrefsInDirList(const char *listId)
{
@ -80,9 +80,9 @@ diff --git a/modules/libpref/src/Preferences.cpp b/modules/libpref/src/Preferenc
return NS_OK;
bool hasMore;
@@ -921,17 +940,17 @@ static nsresult pref_LoadPrefsInDirList(
@@ -975,17 +994,17 @@ static nsresult pref_LoadPrefsInDirList(
nsCAutoString leaf;
nsAutoCString leaf;
path->GetNativeLeafName(leaf);
// Do we care if a file provided by this process fails to load?
@ -99,7 +99,7 @@ diff --git a/modules/libpref/src/Preferences.cpp b/modules/libpref/src/Preferenc
{
nsZipItemPtr<char> manifest(jarReader, name, true);
NS_ENSURE_TRUE(manifest.Buffer(), NS_ERROR_NOT_AVAILABLE);
@@ -1025,28 +1044,40 @@ static nsresult pref_InitInitialObjects(
@@ -1079,28 +1098,40 @@ static nsresult pref_InitInitialObjects(
/* these pref file names should not be used: we process them after all other application pref files for backwards compatibility */
static const char* specialFiles[] = {
#if defined(XP_MACOSX)
@ -159,7 +159,7 @@ diff --git a/toolkit/components/downloads/Makefile.in b/toolkit/components/downl
diff --git a/toolkit/components/downloads/nsDownloadManager.cpp b/toolkit/components/downloads/nsDownloadManager.cpp
--- a/toolkit/components/downloads/nsDownloadManager.cpp
+++ b/toolkit/components/downloads/nsDownloadManager.cpp
@@ -35,16 +35,20 @@
@@ -36,16 +36,20 @@
#ifdef XP_WIN
#include <shlobj.h>
@ -180,7 +180,7 @@ diff --git a/toolkit/components/downloads/nsDownloadManager.cpp b/toolkit/compon
#include "AndroidBridge.h"
#endif
@@ -2233,16 +2237,25 @@ nsDownload::SetState(DownloadState aStat
@@ -2253,16 +2257,25 @@ nsDownload::SetState(DownloadState aStat
nsCOMPtr<nsIPrefBranch> pref(do_GetService(NS_PREFSERVICE_CONTRACTID));
// Master pref to control this function.
@ -194,7 +194,7 @@ diff --git a/toolkit/components/downloads/nsDownloadManager.cpp b/toolkit/compon
+ command.AppendElement( NS_LITERAL_CSTRING( "DOWNLOADFINISHED" ));
+ nsAutoString displayName;
+ GetDisplayName( displayName );
+ command.AppendElement( nsCAutoString( ToNewUTF8String( displayName )));
+ command.AppendElement( nsAutoCString( ToNewUTF8String( displayName )));
+ nsKDEUtils::command( command );
+ } else {
+ // begin non-KDE block
@ -206,7 +206,7 @@ diff --git a/toolkit/components/downloads/nsDownloadManager.cpp b/toolkit/compon
int64_t goat = PR_Now() - mStartTime;
showTaskbarAlert = goat > alertIntervalUSec;
@@ -2266,19 +2279,20 @@ nsDownload::SetState(DownloadState aStat
@@ -2286,19 +2299,20 @@ nsDownload::SetState(DownloadState aStat
// If downloads are automatically removed per the user's
// retention policy, there's no reason to make the text clickable
// because if it is, they'll click open the download manager and
@ -231,7 +231,7 @@ diff --git a/toolkit/components/downloads/nsDownloadManager.cpp b/toolkit/compon
diff --git a/toolkit/content/jar.mn b/toolkit/content/jar.mn
--- a/toolkit/content/jar.mn
+++ b/toolkit/content/jar.mn
@@ -45,29 +45,33 @@ toolkit.jar:
@@ -46,29 +46,33 @@ toolkit.jar:
content/global/viewZoomOverlay.js (viewZoomOverlay.js)
*+ content/global/bindings/autocomplete.xml (widgets/autocomplete.xml)
content/global/bindings/browser.xml (widgets/browser.xml)
@ -2068,8 +2068,7 @@ new file mode 100644
diff --git a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp b/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp
--- a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp
+++ b/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp
@@ -13,16 +13,19 @@
#include "prnetdb.h"
@@ -14,16 +14,18 @@
#include "prenv.h"
#include "nsPrintfCString.h"
#include "nsNetUtil.h"
@ -2077,9 +2076,9 @@ diff --git a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp b/toolkit/sy
#include "nsIGSettingsService.h"
#include "nsInterfaceHashtable.h"
#include "mozilla/Attributes.h"
#include "nsIURI.h"
+#include "nsVoidArray.h"
+#include "nsKDEUtils.h"
+
class nsUnixSystemProxySettings MOZ_FINAL : public nsISystemProxySettings {
public:
@ -2088,7 +2087,7 @@ diff --git a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp b/toolkit/sy
nsUnixSystemProxySettings() {}
nsresult Init();
@@ -34,16 +37,17 @@ private:
@@ -35,16 +37,17 @@ private:
nsCOMPtr<nsIGSettingsService> mGSettings;
nsCOMPtr<nsIGSettingsCollection> mProxySettings;
nsInterfaceHashtable<nsCStringHashKey, nsIGSettingsCollection> mSchemeProxySettings;
@ -2102,31 +2101,31 @@ diff --git a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp b/toolkit/sy
NS_IMPL_ISUPPORTS1(nsUnixSystemProxySettings, nsISystemProxySettings)
nsresult
nsUnixSystemProxySettings::Init()
NS_IMETHODIMP
nsUnixSystemProxySettings::GetMainThreadOnly(bool *aMainThreadOnly)
{
// If this is a GNOME session, load gconf and try to use its preferences.
@@ -496,16 +500,19 @@ nsUnixSystemProxySettings::GetProxyForUR
nsCAutoString host;
rv = aURI->GetHost(host);
NS_ENSURE_SUCCESS(rv, rv);
// dbus prevents us from being threadsafe, but this routine should not block anyhow
@@ -499,16 +502,19 @@ nsUnixSystemProxySettings::GetProxyFromG
int32_t port;
rv = aURI->GetPort(&port);
NS_ENSURE_SUCCESS(rv, rv);
+ if( nsKDEUtils::kdeSupport())
+ return GetProxyFromKDE(scheme, host, port, aResult);
nsresult
nsUnixSystemProxySettings::GetProxyForURI(const nsACString & aSpec,
const nsACString & aScheme,
const nsACString & aHost,
const int32_t aPort,
nsACString & aResult)
{
+ if (nsKDEUtils::kdeSupport())
+ return GetProxyFromKDE(aScheme, aHost, aPort, aResult);
+
if (mProxySettings) {
rv = GetProxyFromGSettings(scheme, host, port, aResult);
if (rv == NS_OK)
nsresult rv = GetProxyFromGSettings(aScheme, aHost, aPort, aResult);
if (NS_SUCCEEDED(rv))
return rv;
}
if (mGConf)
return GetProxyFromGConf(scheme, host, port, aResult);
return GetProxyFromGConf(aScheme, aHost, aPort, aResult);
@@ -531,8 +538,34 @@ static const mozilla::Module::ContractID
@@ -534,8 +540,34 @@ static const mozilla::Module::ContractID
static const mozilla::Module kUnixProxyModule = {
mozilla::Module::kVersion,
@ -2142,7 +2141,7 @@ diff --git a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp b/toolkit/sy
+ PRInt32 aPort,
+ nsACString& aResult)
+{
+ nsCAutoString url;
+ nsAutoCString url;
+ url = aScheme;
+ url += "://";
+ url += aHost;
@ -2321,7 +2320,7 @@ new file mode 100644
+ *eol = '\0';
+ command_done = ( strcmp( buf, "\\1" ) == 0 );
+ command_failed = ( strcmp( buf, "\\0" ) == 0 );
+ nsCAutoString line( buf );
+ nsAutoCString line( buf );
+ line.ReplaceSubstring( "\\n", "\n" );
+ line.ReplaceSubstring( "\\" "\\", "\\" ); // \\ -> \ , i.e. unescape
+ if( p->output && !( command_done || command_failed ))
@ -2364,7 +2363,7 @@ new file mode 100644
+ nsCOMPtr<nsISupportsCString> str = do_QueryElementAt( command, i );
+ if( str )
+ {
+ nsCAutoString s;
+ nsAutoCString s;
+ str->GetData( s );
+ in.AppendElement( s );
+ }
@ -2625,7 +2624,7 @@ new file mode 100644
+#include "nsVoidArray.h"
+#include "nsKDEUtils.h"
+
+/* static */ PRBool
+/* static */ bool
+nsCommonRegistry::HandlerExists(const char *aProtocolScheme)
+{
+ if( nsKDEUtils::kdeSupport())
@ -2683,7 +2682,7 @@ new file mode 100644
+class nsCommonRegistry
+{
+ public:
+ static PRBool HandlerExists(const char *aProtocolScheme);
+ static bool HandlerExists(const char *aProtocolScheme);
+
+ static nsresult LoadURL(nsIURI *aURL);
+
@ -2698,7 +2697,7 @@ diff --git a/uriloader/exthandler/unix/nsKDERegistry.cpp b/uriloader/exthandler/
new file mode 100644
--- /dev/null
+++ b/uriloader/exthandler/unix/nsKDERegistry.cpp
@@ -0,0 +1,86 @@
@@ -0,0 +1,90 @@
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
@ -2713,12 +2712,12 @@ new file mode 100644
+#include "nsAutoPtr.h"
+#include "nsKDEUtils.h"
+
+/* static */ PRBool
+/* static */ bool
+nsKDERegistry::HandlerExists(const char *aProtocolScheme)
+{
+ nsTArray<nsCString> command;
+ command.AppendElement( NS_LITERAL_CSTRING( "HANDLEREXISTS" ));
+ command.AppendElement( nsCAutoString( aProtocolScheme ));
+ command.AppendElement( nsAutoCString( aProtocolScheme ));
+ return nsKDEUtils::command( command );
+}
+
@ -2730,7 +2729,11 @@ new file mode 100644
+ nsCString url;
+ aURL->GetSpec( url );
+ command.AppendElement( url );
+ return nsKDEUtils::command( command );
+ bool rv = nsKDEUtils::command( command );
+ if (!rv)
+ return NS_ERROR_FAILURE;
+
+ return NS_OK;
+}
+
+/* static */ void
@ -2799,13 +2802,13 @@ new file mode 100644
+#include "nsTArray.h"
+
+class nsMIMEInfoBase;
+class nsCAutoString;
+class nsAutoCString;
+class nsCString;
+
+class nsKDERegistry
+{
+ public:
+ static PRBool HandlerExists(const char *aProtocolScheme);
+ static bool HandlerExists(const char *aProtocolScheme);
+
+ static nsresult LoadURL(nsIURI *aURL);
+
@ -2855,7 +2858,7 @@ diff --git a/uriloader/exthandler/unix/nsMIMEInfoUnix.cpp b/uriloader/exthandler
if (NS_FAILED(rv)){
HildonURIAction *action = hildon_uri_get_default_action(mSchemeOrType.get(), nullptr);
if (action) {
nsCAutoString spec;
nsAutoCString spec;
aURI->GetAsciiSpec(spec);
if (hildon_uri_open(spec.get(), action, nullptr))
@@ -61,22 +64,22 @@ nsMIMEInfoUnix::LoadUriInternal(nsIURI *
@ -2870,7 +2873,7 @@ diff --git a/uriloader/exthandler/unix/nsMIMEInfoUnix.cpp b/uriloader/exthandler
- nsRefPtr<nsMIMEInfoBase> mimeInfo = nsGNOMERegistry::GetFromType(mSchemeOrType);
+ nsRefPtr<nsMIMEInfoBase> mimeInfo = nsCommonRegistry::GetFromType(mSchemeOrType);
if (!mimeInfo) {
nsCAutoString ext;
nsAutoCString ext;
nsresult rv = GetPrimaryExtension(ext);
if (NS_SUCCEEDED(rv)) {
- mimeInfo = nsGNOMERegistry::GetFromExtension(ext);
@ -2910,7 +2913,7 @@ diff --git a/uriloader/exthandler/unix/nsMIMEInfoUnix.cpp b/uriloader/exthandler
+ }
+
nsCOMPtr<nsIGIOService> giovfs = do_GetService(NS_GIOSERVICE_CONTRACTID);
nsCAutoString uriSpec;
nsAutoCString uriSpec;
if (giovfs) {
// nsGIOMimeApp->Launch wants a URI string instead of local file
nsresult rv;
@ -2929,7 +2932,7 @@ diff --git a/uriloader/exthandler/unix/nsMIMEInfoUnix.cpp b/uriloader/exthandler
- nsRefPtr<nsMIMEInfoBase> mimeInfo = nsGNOMERegistry::GetFromExtension(nativePath);
+ nsRefPtr<nsMIMEInfoBase> mimeInfo = nsCommonRegistry::GetFromExtension(nativePath);
if (mimeInfo) {
nsCAutoString type;
nsAutoCString type;
mimeInfo->GetType(type);
if (giovfs) {
nsCOMPtr<nsIGIOMimeApp> app;
@ -3097,10 +3100,10 @@ diff --git a/widget/gtk2/nsFilePicker.cpp b/widget/gtk2/nsFilePicker.cpp
- return NS_OK;
+ // Unless it's KDE.
+ if( mMode != modeOpen || !nsKDEUtils::kdeSupport())
+ return NS_OK;
+ return NS_OK;
}
nsCAutoString filter, name;
nsAutoCString filter, name;
CopyUTF16toUTF8(aFilter, filter);
CopyUTF16toUTF8(aTitle, name);
@ -3139,7 +3142,7 @@ diff --git a/widget/gtk2/nsFilePicker.cpp b/widget/gtk2/nsFilePicker.cpp
GtkFileChooserAction action = GetGtkFileChooserAction(mMode);
const gchar *accept_button = (action == GTK_FILE_CHOOSER_ACTION_SAVE)
? GTK_STOCK_SAVE : GTK_STOCK_OPEN;
@@ -587,8 +607,235 @@ nsFilePicker::Done(GtkWidget* file_choos
@@ -588,8 +608,235 @@ nsFilePicker::Done(GtkWidget* file_choos
if (mCallback) {
mCallback->Done(result);
mCallback = nullptr;
@ -3216,14 +3219,14 @@ diff --git a/widget/gtk2/nsFilePicker.cpp b/widget/gtk2/nsFilePicker.cpp
+ }
+ }
+
+ nsCAutoString directory;
+ nsAutoCString directory;
+ if (mDisplayDirectory) {
+ mDisplayDirectory->GetNativePath(directory);
+ } else if (mPrevDisplayDirectory) {
+ mPrevDisplayDirectory->GetNativePath(directory);
+ }
+
+ nsCAutoString startdir;
+ nsAutoCString startdir;
+ if (!directory.IsEmpty()) {
+ startdir = directory;
+ }
@ -3239,7 +3242,7 @@ diff --git a/widget/gtk2/nsFilePicker.cpp b/widget/gtk2/nsFilePicker.cpp
+ if( startdir.IsEmpty())
+ startdir = ".";
+
+ nsCAutoString filters;
+ nsAutoCString filters;
+ PRInt32 count = mFilters.Length();
+ if( count == 0 ) //just in case
+ filters = "*";
@ -3254,12 +3257,12 @@ diff --git a/widget/gtk2/nsFilePicker.cpp b/widget/gtk2/nsFilePicker.cpp
+ }
+
+ nsTArray<nsCString> command;
+ command.AppendElement( nsCAutoString( arg ));
+ command.AppendElement( nsAutoCString( arg ));
+ command.AppendElement( startdir );
+ if( mMode != nsIFilePicker::modeGetFolder )
+ {
+ command.AppendElement( filters );
+ nsCAutoString selected;
+ nsAutoCString selected;
+ selected.AppendInt( mSelectedType );
+ command.AppendElement( selected );
+ }
@ -3269,7 +3272,7 @@ diff --git a/widget/gtk2/nsFilePicker.cpp b/widget/gtk2/nsFilePicker.cpp
+ if( PRInt32 xid = windowToXid( mParentWidget ))
+ {
+ command.AppendElement( NS_LITERAL_CSTRING( "PARENT" ));
+ nsCAutoString parent;
+ nsAutoCString parent;
+ parent.AppendInt( xid );
+ command.AppendElement( parent );
+ }
@ -3357,7 +3360,7 @@ diff --git a/widget/gtk2/nsFilePicker.cpp b/widget/gtk2/nsFilePicker.cpp
+ if( PRInt32 xid = windowToXid( mParentWidget ))
+ {
+ command.AppendElement( NS_LITERAL_CSTRING( "PARENT" ));
+ nsCAutoString parent;
+ nsAutoCString parent;
+ parent.AppendInt( xid );
+ command.AppendElement( parent );
+ }
@ -3545,7 +3548,7 @@ diff --git a/xpcom/components/ManifestParser.cpp b/xpcom/components/ManifestPars
diff --git a/xpcom/io/Makefile.in b/xpcom/io/Makefile.in
--- a/xpcom/io/Makefile.in
+++ b/xpcom/io/Makefile.in
@@ -157,17 +157,17 @@ include $(topsrcdir)/ipc/chromium/chromi
@@ -161,17 +161,17 @@ include $(topsrcdir)/ipc/chromium/chromi
DEFINES += -D_IMPL_NS_COM
ifeq ($(OS_ARCH),Linux)
@ -3567,7 +3570,7 @@ diff --git a/xpcom/io/Makefile.in b/xpcom/io/Makefile.in
diff --git a/xpcom/io/nsLocalFileUnix.cpp b/xpcom/io/nsLocalFileUnix.cpp
--- a/xpcom/io/nsLocalFileUnix.cpp
+++ b/xpcom/io/nsLocalFileUnix.cpp
@@ -49,16 +49,17 @@
@@ -50,16 +50,17 @@
#include "prproces.h"
#include "nsIDirectoryEnumerator.h"
#include "nsISimpleEnumerator.h"
@ -3585,7 +3588,7 @@ diff --git a/xpcom/io/nsLocalFileUnix.cpp b/xpcom/io/nsLocalFileUnix.cpp
#include "prmem.h"
#include "plbase64.h"
@@ -1760,44 +1761,51 @@ nsLocalFile::SetPersistentDescriptor(con
@@ -1752,44 +1753,51 @@ nsLocalFile::SetPersistentDescriptor(con
return InitWithNativePath(aPersistentDescriptor);
#endif
}
@ -3599,7 +3602,7 @@ diff --git a/xpcom/io/nsLocalFileUnix.cpp b/xpcom/io/nsLocalFileUnix.cpp
- if (!giovfs && !gnomevfs)
- return NS_ERROR_FAILURE;
-
+ nsCAutoString url;
+ nsAutoCString url;
bool isDirectory;
if (NS_FAILED(IsDirectory(&isDirectory)))
return NS_ERROR_FAILURE;
@ -3613,7 +3616,7 @@ diff --git a/xpcom/io/nsLocalFileUnix.cpp b/xpcom/io/nsLocalFileUnix.cpp
+ url = mPath;
} else {
nsCOMPtr<nsIFile> parentDir;
nsCAutoString dirPath;
nsAutoCString dirPath;
if (NS_FAILED(GetParent(getter_AddRefs(parentDir))))
return NS_ERROR_FAILURE;
if (NS_FAILED(parentDir->GetNativePath(dirPath)))
@ -3651,7 +3654,7 @@ diff --git a/xpcom/io/nsLocalFileUnix.cpp b/xpcom/io/nsLocalFileUnix.cpp
return rv;
}
return NS_ERROR_FAILURE;
@@ -1823,16 +1831,23 @@ nsLocalFile::Launch()
@@ -1815,16 +1823,23 @@ nsLocalFile::Launch()
if (nullptr == connection)
return NS_ERROR_FAILURE;

View File

@ -1,14 +1,14 @@
# HG changeset patch
# User Wolfgang Rosenauer <wr@rosenauer.org>
# Parent 0d6917b8f28f6e0398dbf329dda4932ba4f997c2
# Parent 97c6ae4c21e703a18e04f4d9fae9e2f06aeb13df
Bug 583793 - Firefox interface language set to LANG, ignores LANGUAGE
diff --git a/intl/locale/src/nsLocaleService.cpp b/intl/locale/src/nsLocaleService.cpp
--- a/intl/locale/src/nsLocaleService.cpp
+++ b/intl/locale/src/nsLocaleService.cpp
@@ -160,16 +160,17 @@ nsLocaleService::nsLocaleService(void)
@@ -127,16 +127,17 @@ nsLocaleService::nsLocaleService(void)
nsRefPtr<nsLocale> resultLocale(new nsLocale());
NS_ENSURE_TRUE(resultLocale, );
NS_ENSURE_TRUE_VOID(resultLocale);
#ifdef MOZ_WIDGET_QT
const char* lang = QLocale::system().name().toAscii();
@ -24,7 +24,7 @@ diff --git a/intl/locale/src/nsLocaleService.cpp b/intl/locale/src/nsLocaleServi
for( i = 0; i < LocaleListLength; i++ ) {
nsresult result;
@@ -188,16 +189,21 @@ nsLocaleService::nsLocaleService(void)
@@ -155,16 +156,21 @@ nsLocaleService::nsLocaleService(void)
} else {
CopyASCIItoUTF16(lang, platformLocale);
result = nsPosixLocale::GetXPLocale(lang, xpLocale);

View File

@ -9,11 +9,11 @@ retrieving revision 1.1
diff --git a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp b/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp
--- a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp
+++ b/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp
@@ -74,22 +74,28 @@ private:
nsresult SetProxyResultFromGSettings(const char* aKeyBase, const char* aType, nsACString& aResult);
};
NS_IMPL_ISUPPORTS1(nsUnixSystemProxySettings, nsISystemProxySettings)
@@ -50,22 +50,28 @@ nsUnixSystemProxySettings::GetMainThread
// dbus prevents us from being threadsafe, but this routine should not block anyhow
*aMainThreadOnly = true;
return NS_OK;
}
nsresult
nsUnixSystemProxySettings::Init()

View File

@ -4,7 +4,7 @@ Subject: introduce a pref to prefer certain plugins for mime-types
diff --git a/dom/plugins/base/nsPluginHost.cpp b/dom/plugins/base/nsPluginHost.cpp
--- a/dom/plugins/base/nsPluginHost.cpp
+++ b/dom/plugins/base/nsPluginHost.cpp
@@ -1588,17 +1588,51 @@ nsPluginHost::FindPluginForType(const ch
@@ -1543,17 +1543,51 @@ nsPluginHost::FindPluginForType(const ch
if (!aMimeType) {
return nullptr;
}
@ -14,7 +14,7 @@ diff --git a/dom/plugins/base/nsPluginHost.cpp b/dom/plugins/base/nsPluginHost.c
InfallibleTArray<nsPluginTag*> matchingPlugins;
+ char *preferredPluginPath = NULL;
+ nsCAutoString mimetypePrefString ("modules.plugins.mimetype.");
+ nsAutoCString mimetypePrefString ("modules.plugins.mimetype.");
+ mimetypePrefString.Append(aMimeType);
+ const char *mimetypePrefChar = mimetypePrefString.get();
+ nsAdoptingCString pluginPath = Preferences::GetCString(mimetypePrefChar);

View File

@ -7,7 +7,7 @@ References:
diff --git a/configure.in b/configure.in
--- a/configure.in
+++ b/configure.in
@@ -7987,16 +7987,31 @@ AC_SUBST(QCMS_LIBS)
@@ -8108,16 +8108,31 @@ AC_SUBST(QCMS_LIBS)
dnl ========================================================
dnl HarfBuzz
@ -42,32 +42,32 @@ diff --git a/configure.in b/configure.in
diff --git a/security/manager/ssl/src/Makefile.in b/security/manager/ssl/src/Makefile.in
--- a/security/manager/ssl/src/Makefile.in
+++ b/security/manager/ssl/src/Makefile.in
@@ -90,12 +90,14 @@ DEFINES += \
@@ -93,10 +93,13 @@ DEFINES += \
$(NULL)
EXPORTS += \
CryptoTask.h \
nsNSSShutDown.h \
ScopedNSSTypes.h \
$(NULL)
# Use local includes because they are inserted before INCLUDES
# so that Mozilla's nss.h is used, not glibc's
-LOCAL_INCLUDES += $(NSS_CFLAGS)
+LOCAL_INCLUDES += $(NSS_CFLAGS) $(NSSHELPER_CFLAGS)
+
+LOCAL_INCLUDES += $(NSSHELPER_CFLAGS)
+EXTRA_DSO_LDOPTS += $(NSSHELPER_LIBS)
+
include $(topsrcdir)/config/rules.mk
diff --git a/security/manager/ssl/src/nsNSSComponent.cpp b/security/manager/ssl/src/nsNSSComponent.cpp
--- a/security/manager/ssl/src/nsNSSComponent.cpp
+++ b/security/manager/ssl/src/nsNSSComponent.cpp
@@ -1,14 +1,21 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
@@ -3,16 +3,23 @@
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifdef MOZ_LOGGING
#define FORCE_PR_LOG 1
#endif
+#ifdef MOZ_ENABLE_NSSHELPER
+#pragma GCC visibility push(default)
+#include <nss-shared-helper.h>
@ -83,7 +83,7 @@ diff --git a/security/manager/ssl/src/nsNSSComponent.cpp b/security/manager/ssl/
#include "nsNetUtil.h"
#include "nsAppDirectoryServiceDefs.h"
#include "nsDirectoryService.h"
@@ -1731,18 +1738,34 @@ nsNSSComponent::InitializeNSS(bool showW
@@ -1735,18 +1742,34 @@ nsNSSComponent::InitializeNSS(bool showW
ConfigureInternalPKCS11Token();
// The NSS_INIT_NOROOTINIT flag turns off the loading of the root certs
@ -123,7 +123,7 @@ diff --git a/security/manager/ssl/src/nsNSSComponent.cpp b/security/manager/ssl/
diff --git a/toolkit/library/Makefile.in b/toolkit/library/Makefile.in
--- a/toolkit/library/Makefile.in
+++ b/toolkit/library/Makefile.in
@@ -443,17 +443,17 @@ EXTRA_DSO_LDOPTS += -INCREMENTAL:NO
@@ -484,17 +484,17 @@ EXTRA_DSO_LDOPTS += -INCREMENTAL:NO
endif
endif
endif

View File

@ -5,7 +5,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=513422
diff --git a/xpcom/glue/SSE.cpp b/xpcom/glue/SSE.cpp
--- a/xpcom/glue/SSE.cpp
+++ b/xpcom/glue/SSE.cpp
@@ -44,26 +44,77 @@ namespace {
@@ -12,26 +12,77 @@ namespace {
// SSE.h has parallel #ifs which declare MOZILLA_SSE_HAVE_CPUID_DETECTION.
// We can't declare these functions in the header file, however, because
// <intrin.h> conflicts with <windows.h> on MSVC 2005, and some files want to
@ -80,7 +80,7 @@ diff --git a/xpcom/glue/SSE.cpp b/xpcom/glue/SSE.cpp
+ return !!(unsigned(regs[reg]) & bit);
}
#elif defined(_MSC_VER) && _MSC_VER >= 1400 && (defined(_M_IX86) || defined(_M_AMD64))
#elif defined(_MSC_VER) && (defined(_M_IX86) || defined(_M_AMD64))
// MSVC 2005 or newer on x86-32 or x86-64
#include <intrin.h>

103
mozilla-webrtc.patch Normal file
View File

@ -0,0 +1,103 @@
# HG changeset patch
# Parent 0b3f9d97af70d01863519daf4f57f8918b4bc17c
# User Wolfgang Rosenauer <wr@rosenauer.org>
Bug 805549 - signaling_sipcc fails to compile because of unused variable
diff --git a/media/webrtc/signaling/signaling.gyp b/media/webrtc/signaling/signaling.gyp
--- a/media/webrtc/signaling/signaling.gyp
+++ b/media/webrtc/signaling/signaling.gyp
@@ -189,17 +189,16 @@
'SIP_OS_LINUX',
'_GNU_SOURCE',
'LINUX',
'GIPS_VER=3510',
'SECLIB_OPENSSL',
],
'cflags_mozilla': [
- '-Werror',
],
}],
['OS=="win"', {
'include_dirs': [
],
'defines': [
'SIP_OS_WINDOWS',
'WIN32',
@@ -217,18 +216,16 @@
],
'defines': [
'SIP_OS_OSX',
'OSX',
'_FORTIFY_SOURCE=2',
],
'cflags_mozilla': [
- '-Werror',
- '-Wno-error=conversion'
],
}],
],
},
#
# SIPCC
#
@@ -641,17 +638,16 @@
'USE_TIMER_SELECT_BASED',
'FULL_BUILD',
'STUBBED_OUT',
'USE_PRINTF'
'LINUX',
],
'cflags_mozilla': [
- '-Werror',
],
}],
['OS=="win"', {
'include_dirs': [
],
'sources': [
# SIPSTACK
@@ -760,18 +756,16 @@
'FULL_BUILD',
'STUBBED_OUT',
'USE_PRINTF',
'_DARWIN_C_SOURCE',
'NO_NSPR_10_SUPPORT',
],
'cflags_mozilla': [
- '-Werror',
- '-Wno-error=conversion'
],
}],
],
},
],
}
diff --git a/media/webrtc/signaling/src/sipcc/core/common/config_parser.c b/media/webrtc/signaling/src/sipcc/core/common/config_parser.c
--- a/media/webrtc/signaling/src/sipcc/core/common/config_parser.c
+++ b/media/webrtc/signaling/src/sipcc/core/common/config_parser.c
@@ -402,17 +402,16 @@ void config_set_ccm_ip_mac ()
/*
* config_setup_element
* Setup elements that once were downloaded from CUCM in an XML file.
* Settings are stored in config.h
*/
void config_setup_elements (const char *sipUser, const char *sipPassword, const char *sipDomain)
{
unsigned int i;
- char buf[MAX_SIP_URL_LENGTH] = {'\0'};
char ip[MAX_SIP_URL_LENGTH] = {'\0'};
char option[MAX_SIP_URL_LENGTH] = {'\0'};
int line = 0;
cc_boolean isSecure = FALSE, isValid = TRUE;
char macaddr[MAC_ADDR_SIZE];
compare_or_set_int_value(CFGID_MEDIA_PORT_RANGE_START, gStartMediaPort, (const unsigned char *) "startMediaPort");
compare_or_set_int_value(CFGID_MEDIA_PORT_RANGE_END, gStopMediaPort, (const unsigned char *) "stopMediaPort");

View File

@ -1,2 +1,2 @@
REV=c23c45132139
REV=8efe34fa2289
REPO=http://hg.mozilla.org/releases/mozilla-release