Bug 857022 - Remove MOZ_MEDIA build-time define. r=ted

We don't test with MOZ_MEDIA=0 so that configuration no longer
works. It's better to drop the switch altogether and enable
this code unconditionally. Per-codec and -feature configure
and runtime options remain available.
This commit is contained in:
Ralph Giles 2013-04-04 14:09:00 -07:00
Родитель 184a2e6f46
Коммит e1fe5aed01
5 изменённых файлов: 3 добавлений и 39 удалений

Просмотреть файл

@ -310,10 +310,8 @@ function onLoadPageInfo()
gStrings.mediaEmbed = gBundle.getString("mediaEmbed");
gStrings.mediaLink = gBundle.getString("mediaLink");
gStrings.mediaInput = gBundle.getString("mediaInput");
#ifdef MOZ_MEDIA
gStrings.mediaVideo = gBundle.getString("mediaVideo");
gStrings.mediaAudio = gBundle.getString("mediaAudio");
#endif
var args = "arguments" in window &&
window.arguments.length >= 1 &&
@ -677,14 +675,12 @@ function grabAll(elem)
addImage(href, gStrings.mediaImg, "", elem, false);
} catch (e) { }
}
#ifdef MOZ_MEDIA
else if (elem instanceof HTMLVideoElement) {
addImage(elem.currentSrc, gStrings.mediaVideo, "", elem, false);
}
else if (elem instanceof HTMLAudioElement) {
addImage(elem.currentSrc, gStrings.mediaAudio, "", elem, false);
}
#endif
else if (elem instanceof HTMLLinkElement) {
if (elem.rel && /\bicon\b/i.test(elem.rel))
addImage(elem.href, gStrings.mediaLink, "", elem, false);
@ -1015,7 +1011,6 @@ function makePreview(row)
document.getElementById("theimagecontainer").collapsed = false
document.getElementById("brokenimagecontainer").collapsed = true;
}
#ifdef MOZ_MEDIA
else if (item instanceof HTMLVideoElement && isProtocolAllowed) {
newImage = document.createElementNS("http://www.w3.org/1999/xhtml", "video");
newImage.id = "thepreviewimage";
@ -1037,7 +1032,6 @@ function makePreview(row)
document.getElementById("theimagecontainer").collapsed = false;
document.getElementById("brokenimagecontainer").collapsed = true;
}
#endif
else {
// fallback image for protocols not allowed (e.g., javascript:)
// or elements not [yet] handled (e.g., object, embed).

Просмотреть файл

@ -4201,7 +4201,6 @@ MOZ_TREMOR=
MOZ_WAVE=1
MOZ_SAMPLE_TYPE_FLOAT32=
MOZ_SAMPLE_TYPE_S16=
MOZ_MEDIA=
MOZ_OPUS=1
MOZ_WEBM=1
MOZ_DASH=
@ -5312,7 +5311,6 @@ if test -n "$MOZ_WEBRTC"; then
dnl MOZ_WEBRTC_ASSERT_ALWAYS turns on a number of safety asserts in
dnl opt/production builds (via MOZ_CRASH())
AC_DEFINE(MOZ_WEBRTC_ASSERT_ALWAYS)
MOZ_MEDIA=1
MOZ_RAW=1
MOZ_VP8=1
MOZ_VP8_ENCODER=1
@ -5380,7 +5378,6 @@ MOZ_ARG_DISABLE_BOOL(webspeech,
if test -n "$MOZ_WEBSPEECH"; then
AC_DEFINE(MOZ_WEBSPEECH)
MOZ_MEDIA=1
fi
AC_SUBST(MOZ_WEBSPEECH)
@ -5395,7 +5392,6 @@ MOZ_ARG_ENABLE_BOOL(raw,
if test -n "$MOZ_RAW"; then
AC_DEFINE(MOZ_RAW)
MOZ_MEDIA=1
fi
AC_SUBST(MOZ_RAW)
@ -5411,7 +5407,6 @@ MOZ_ARG_DISABLE_BOOL(ogg,
if test -n "$MOZ_OGG"; then
AC_DEFINE(MOZ_OGG)
MOZ_CUBEB=1
MOZ_MEDIA=1
dnl Checks for __attribute__(aligned()) directive
AC_CACHE_CHECK([__attribute__ ((aligned ())) support],
@ -5474,7 +5469,6 @@ MOZ_ARG_DISABLE_BOOL(wmf,
if test -n "$MOZ_WMF"; then
AC_DEFINE(MOZ_WMF)
MOZ_CUBEB=1
MOZ_MEDIA=1
fi;
dnl ========================================================
@ -5570,7 +5564,6 @@ AC_SUBST(MOZ_LIBVPX_LIBS)
if test "$MOZ_WEBM"; then
MOZ_CUBEB=1
MOZ_MEDIA=1
if test "$MOZ_SAMPLE_TYPE_FLOAT32"; then
MOZ_VORBIS=1
else
@ -5673,7 +5666,6 @@ MOZ_ARG_DISABLE_BOOL(wave,
if test -n "$MOZ_WAVE"; then
AC_DEFINE(MOZ_WAVE)
MOZ_CUBEB=1
MOZ_MEDIA=1
fi
dnl ========================================================
@ -5692,10 +5684,6 @@ if test -n "$MOZ_CUBEB"; then
AC_DEFINE(MOZ_CUBEB)
fi
if test -n "$MOZ_MEDIA"; then
AC_DEFINE(MOZ_MEDIA)
fi
if test -n "$MOZ_VORBIS" -a -n "$MOZ_TREMOR"; then
AC_MSG_ERROR([MOZ_VORBIS and MOZ_TREMOR are mutually exclusive! The build system should not allow them both to be set, but they are. Please file a bug at https://bugzilla.mozilla.org/])
fi
@ -5798,7 +5786,6 @@ AC_SUBST(MOZ_GSTREAMER)
if test -n "$MOZ_GSTREAMER"; then
AC_DEFINE(MOZ_GSTREAMER)
MOZ_MEDIA=1
fi
@ -8913,7 +8900,6 @@ AC_SUBST(MOZ_NSS_PATCH)
AC_SUBST(MOZ_APP_COMPONENT_LIBS)
AC_SUBST(MOZ_APP_EXTRA_LIBS)
AC_SUBST(MOZ_MEDIA)
AC_SUBST(MOZ_SPEEX_RESAMPLER)
AC_SUBST(MOZ_SOUNDTOUCH)
AC_SUBST(MOZ_CUBEB)

Просмотреть файл

@ -122,6 +122,7 @@ webidl_files = \
HTMLPropertiesCollection.webidl \
HTMLQuoteElement.webidl \
HTMLScriptElement.webidl \
HTMLSourceElement.webidl \
HTMLSpanElement.webidl \
HTMLStyleElement.webidl \
HTMLTableCaptionElement.webidl \
@ -143,6 +144,7 @@ webidl_files = \
LinkStyle.webidl \
LocalMediaStream.webidl \
Location.webidl \
MediaError.webidl \
MediaStream.webidl \
MessageEvent.webidl \
MouseEvent.webidl \
@ -300,13 +302,6 @@ webidl_files += \
$(NULL)
endif
ifdef MOZ_MEDIA
webidl_files += \
HTMLSourceElement.webidl \
MediaError.webidl \
$(NULL)
endif
ifdef MOZ_WEBGL
webidl_files += \
WebGLRenderingContext.webidl \

Просмотреть файл

@ -72,10 +72,8 @@
#include "nsIDOMHTMLOptionElement.h"
#include "nsIDOMHTMLTextAreaElement.h"
#include "nsIDOMHTMLDocument.h"
#ifdef MOZ_MEDIA
#include "nsIDOMHTMLSourceElement.h"
#include "nsIDOMHTMLMediaElement.h"
#endif // MOZ_MEDIA
#include "nsIImageLoadingContent.h"
@ -2719,7 +2717,6 @@ nsresult nsWebBrowserPersist::OnWalkDOMNode(nsIDOMNode *aNode)
return NS_OK;
}
#ifdef MOZ_MEDIA
nsCOMPtr<nsIDOMHTMLMediaElement> nodeAsMedia = do_QueryInterface(aNode);
if (nodeAsMedia)
{
@ -2732,7 +2729,6 @@ nsresult nsWebBrowserPersist::OnWalkDOMNode(nsIDOMNode *aNode)
StoreURIAttribute(aNode, "src");
return NS_OK;
}
#endif // MOZ_MEDIA
if (content->IsHTML(nsGkAtoms::body)) {
StoreURIAttribute(aNode, "background");
@ -3070,7 +3066,6 @@ nsWebBrowserPersist::CloneNodeWithFixedUpAttributes(
return rv;
}
#ifdef MOZ_MEDIA
nsCOMPtr<nsIDOMHTMLMediaElement> nodeAsMedia = do_QueryInterface(aNodeIn);
if (nodeAsMedia)
{
@ -3094,7 +3089,6 @@ nsWebBrowserPersist::CloneNodeWithFixedUpAttributes(
return rv;
}
#endif // MOZ_MEDIA
if (content->IsSVG(nsGkAtoms::img))
{

Просмотреть файл

@ -47,6 +47,7 @@ CPPSRCS = \
nsStreamTransportService.cpp \
nsIOService.cpp \
nsLoadGroup.cpp \
nsMediaFragmentURIParser.cpp \
nsMIMEInputStream.cpp \
nsProtocolProxyService.cpp \
nsProxyInfo.cpp \
@ -80,12 +81,6 @@ CPPSRCS = \
NetworkActivityMonitor.cpp \
$(NULL)
ifdef MOZ_MEDIA
CPPSRCS += \
nsMediaFragmentURIParser.cpp \
$(NULL)
endif
LOCAL_INCLUDES += -I$(topsrcdir)/dom/base
ifeq ($(MOZ_WIDGET_TOOLKIT),os2)