зеркало из https://github.com/mozilla/gecko-dev.git
Merge latest green b2g-inbound changeset and mozilla-central
This commit is contained in:
Коммит
f607ac80fe
2
CLOBBER
2
CLOBBER
|
@ -18,4 +18,4 @@
|
|||
# Modifying this file will now automatically clobber the buildbot machines \o/
|
||||
#
|
||||
|
||||
Bug 908977 - Generate XPIDL headers directly into dist/include
|
||||
Bug 912832 - Inverse tiers and subtiers for build traversal
|
||||
|
|
19
Makefile.in
19
Makefile.in
|
@ -52,10 +52,10 @@ ifndef MOZ_PROFILE_USE
|
|||
#
|
||||
# We need to explicitly put backend.RecursiveMakeBackend.built here
|
||||
# otherwise the rule in rules.mk doesn't run early enough.
|
||||
default all export libs tools:: CLOBBER $(topsrcdir)/configure config.status backend.RecursiveMakeBackend.built
|
||||
libs export tools:: CLOBBER $(topsrcdir)/configure config.status backend.RecursiveMakeBackend.built
|
||||
$(call SUBMAKE,backend.RecursiveMakeBackend.built,js/src,1)
|
||||
|
||||
default all export::
|
||||
export::
|
||||
$(call py_action,purge_manifests,-d _build_manifests/purge .)
|
||||
endif
|
||||
|
||||
|
@ -79,7 +79,7 @@ config.status: $(topsrcdir)/configure
|
|||
@echo "but your build might not succeed."
|
||||
@exit 1
|
||||
|
||||
default all export::
|
||||
export::
|
||||
$(RM) -r $(DIST)/sdk
|
||||
|
||||
ifdef ENABLE_TESTS
|
||||
|
@ -87,20 +87,13 @@ ifdef ENABLE_TESTS
|
|||
include $(topsrcdir)/testing/testsuite-targets.mk
|
||||
endif
|
||||
|
||||
# Hacky way for precompile tier to bypass default tier traversal mechanism.
|
||||
TIER_precompile_CUSTOM := 1
|
||||
|
||||
default all export::
|
||||
export::
|
||||
$(call py_action,process_install_manifest,$(DIST)/include _build_manifests/install/dist_include js/src/_build_manifests/install/dist_include)
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
default all::
|
||||
$(call BUILDSTATUS,TIERS $(TIERS))
|
||||
$(foreach tier,$(TIERS),$(call SUBMAKE,tier_$(tier)))
|
||||
$(call BUILDSTATUS,TIERS export compile libs tools)
|
||||
|
||||
include $(topsrcdir)/config/makefiles/tiers.mk
|
||||
$(foreach tier,$(TIERS),$(eval $(call CREATE_TIER_RULE,$(tier))))
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
distclean::
|
||||
$(RM) $(DIST_GARBAGE)
|
||||
|
|
|
@ -3,10 +3,3 @@
|
|||
# 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/.
|
||||
|
||||
MODULE = 'alerts'
|
||||
|
||||
CPP_SOURCES += [
|
||||
'nsAccessibilityFactory.cpp',
|
||||
]
|
||||
|
||||
|
|
|
@ -3,6 +3,3 @@
|
|||
# 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/.
|
||||
|
||||
MODULE = 'alerts'
|
||||
|
||||
|
|
|
@ -6606,6 +6606,11 @@ var gIdentityHandler = {
|
|||
label: gNavigatorBundle.getString("mixedContentBlocked.unblock.label"),
|
||||
accessKey: gNavigatorBundle.getString("mixedContentBlocked.unblock.accesskey"),
|
||||
callback: function() {
|
||||
// Use telemetry to measure how often unblocking happens
|
||||
const kMIXED_CONTENT_UNBLOCK_EVENT = 2;
|
||||
let histogram =
|
||||
Services.telemetry.getHistogramById("MIXED_CONTENT_UNBLOCK_COUNTER");
|
||||
histogram.add(kMIXED_CONTENT_UNBLOCK_EVENT);
|
||||
// Reload the page with the content unblocked
|
||||
BrowserReloadWithFlags(nsIWebNavigation.LOAD_FLAGS_ALLOW_MIXED_CONTENT);
|
||||
}
|
||||
|
|
|
@ -4701,6 +4701,7 @@ let TabStateCacheTelemetry = {
|
|||
// Avoid double initialization
|
||||
return;
|
||||
}
|
||||
this._initialized = true;
|
||||
Services.obs.addObserver(this, "profile-before-change", false);
|
||||
},
|
||||
|
||||
|
|
|
@ -228,19 +228,16 @@ if test "$OS_TARGET" = "Android" -a -z "$gonkdir"; then
|
|||
if test -n "$MOZ_ANDROID_LIBSTDCXX" ; then
|
||||
if test -e "$android_ndk/sources/cxx-stl/gnu-libstdc++/$android_gnu_compiler_version/libs/$ANDROID_CPU_ARCH/libgnustl_static.a"; then
|
||||
# android-ndk-r8b
|
||||
STLPORT_LDFLAGS="-L$android_ndk/sources/cxx-stl/gnu-libstdc++/$android_gnu_compiler_version/libs/$ANDROID_CPU_ARCH/"
|
||||
STLPORT_CPPFLAGS="-I$android_ndk/sources/cxx-stl/gnu-libstdc++/$android_gnu_compiler_version/include -I$android_ndk/sources/cxx-stl/gnu-libstdc++/$android_gnu_compiler_version/libs/$ANDROID_CPU_ARCH/include"
|
||||
STLPORT_LIBS="-lgnustl_static"
|
||||
STLPORT_LIBS="-L$android_ndk/sources/cxx-stl/gnu-libstdc++/$android_gnu_compiler_version/libs/$ANDROID_CPU_ARCH/ -lgnustl_static"
|
||||
STLPORT_CPPFLAGS="-I$android_ndk/sources/cxx-stl/gnu-libstdc++/$android_gnu_compiler_version/include -I$android_ndk/sources/cxx-stl/gnu-libstdc++/$android_gnu_compiler_version/libs/$ANDROID_CPU_ARCH/include -I$android_ndk/sources/cxx-stl/gnu-libstdc++/$android_gnu_compiler_version/include/backward"
|
||||
elif test -e "$android_ndk/sources/cxx-stl/gnu-libstdc++/libs/$ANDROID_CPU_ARCH/libgnustl_static.a"; then
|
||||
# android-ndk-r7, android-ndk-r7b, android-ndk-r8
|
||||
STLPORT_LDFLAGS="-L$android_ndk/sources/cxx-stl/gnu-libstdc++/libs/$ANDROID_CPU_ARCH/"
|
||||
STLPORT_LIBS="-L$android_ndk/sources/cxx-stl/gnu-libstdc++/libs/$ANDROID_CPU_ARCH/ -lgnustl_static"
|
||||
STLPORT_CPPFLAGS="-I$android_ndk/sources/cxx-stl/gnu-libstdc++/include -I$android_ndk/sources/cxx-stl/gnu-libstdc++/libs/$ANDROID_CPU_ARCH/include"
|
||||
STLPORT_LIBS="-lgnustl_static"
|
||||
elif test -e "$android_ndk/sources/cxx-stl/gnu-libstdc++/libs/$ANDROID_CPU_ARCH/libstdc++.a"; then
|
||||
# android-ndk-r5c, android-ndk-r6, android-ndk-r6b
|
||||
STLPORT_CPPFLAGS="-I$android_ndk/sources/cxx-stl/gnu-libstdc++/include -I$android_ndk/sources/cxx-stl/gnu-libstdc++/libs/$ANDROID_CPU_ARCH/include"
|
||||
STLPORT_LDFLAGS="-L$android_ndk/sources/cxx-stl/gnu-libstdc++/libs/$ANDROID_CPU_ARCH/"
|
||||
STLPORT_LIBS="-lstdc++"
|
||||
STLPORT_LIBS="-L$android_ndk/sources/cxx-stl/gnu-libstdc++/libs/$ANDROID_CPU_ARCH/ -lstdc++"
|
||||
else
|
||||
AC_MSG_ERROR([Couldn't find path to gnu-libstdc++ in the android ndk])
|
||||
fi
|
||||
|
|
|
@ -40,3 +40,12 @@ TESTFLAGS := -fsyntax-only -Xclang -verify \
|
|||
|
||||
$(TESTS): test-%: tests/%.cpp $(PLUGIN)
|
||||
$(CXX) $(TESTFLAGS) $<
|
||||
|
||||
compile libs export tools: all
|
||||
|
||||
distclean clean:
|
||||
rm -f $(OBJS) $(TESTS) $(PLUGIN)
|
||||
|
||||
check:
|
||||
|
||||
.PHONY: compile libs export tools distclean clean check
|
||||
|
|
|
@ -93,7 +93,7 @@ def parsecommandlineargs(args):
|
|||
value=val, valueloc=Location('<command-line>', i, len(vname) + len(t)),
|
||||
targetexp=None, source=data.Variables.SOURCE_COMMANDLINE))
|
||||
else:
|
||||
r.append(a)
|
||||
r.append(data.stripdotslash(a))
|
||||
|
||||
return stmts, r, ' '.join(overrides)
|
||||
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
all:
|
||||
$(MAKE) -f $(TESTPATH)/cmd-stripdotslash.mk ./foo
|
||||
|
||||
./foo:
|
||||
@echo TEST-PASS
|
|
@ -13,10 +13,26 @@ import shutil
|
|||
import subprocess
|
||||
import sys
|
||||
|
||||
from distutils.version import StrictVersion
|
||||
|
||||
|
||||
# Minimum version of Python required to build.
|
||||
MINIMUM_PYTHON_VERSION = StrictVersion('2.7.3')
|
||||
MINIMUM_PYTHON_MAJOR = 2
|
||||
MINIMUM_PYTHON_MINOR = 7
|
||||
|
||||
|
||||
UPGRADE_WINDOWS = '''
|
||||
Please upgrade to the latest MozillaBuild development environments. See
|
||||
https://developer.mozilla.org/en-US/docs/Developer_Guide/Build_Instructions/Windows_Prerequisites
|
||||
'''.lstrip()
|
||||
|
||||
UPGRADE_OTHER = '''
|
||||
Run |mach bootstrap| to ensure your system is up to date.
|
||||
|
||||
If you still receive this error, your shell environment is likely detecting
|
||||
another Python version. Ensure a modern Python can be found in the paths
|
||||
defined by the $PATH environment variable and try again.
|
||||
'''.lstrip()
|
||||
|
||||
|
||||
class VirtualenvManager(object):
|
||||
|
@ -343,13 +359,20 @@ class VirtualenvManager(object):
|
|||
|
||||
def verify_python_version(log_handle):
|
||||
"""Ensure the current version of Python is sufficient."""
|
||||
major, minor = sys.version_info[:2]
|
||||
major, minor, micro = sys.version_info[:3]
|
||||
|
||||
our = StrictVersion('%d.%d.%d' % (major, minor, micro))
|
||||
|
||||
if major != MINIMUM_PYTHON_MAJOR or our < MINIMUM_PYTHON_VERSION:
|
||||
log_handle.write('Python %s or greater (but not Python 3) is '
|
||||
'required to build. ' % MINIMUM_PYTHON_VERSION)
|
||||
log_handle.write('You are running Python %s.\n' % our)
|
||||
|
||||
if os.name in ('nt', 'ce'):
|
||||
log_handle.write(UPGRADE_WINDOWS)
|
||||
else:
|
||||
log_handle.write(UPGRADE_OTHER)
|
||||
|
||||
if major != MINIMUM_PYTHON_MAJOR or minor < MINIMUM_PYTHON_MINOR:
|
||||
log_handle.write('Python %d.%d or greater (but not Python 3) is '
|
||||
'required to build. ' %
|
||||
(MINIMUM_PYTHON_MAJOR, MINIMUM_PYTHON_MINOR))
|
||||
log_handle.write('You are running Python %d.%d.\n' % (major, minor))
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
|
|
|
@ -120,6 +120,8 @@ endef
|
|||
MOZCONFIG_CONTENT := $(subst ||,$(CR),$(subst || ,$(CR),$(shell _PYMAKE=$(.PYMAKE) $(TOPSRCDIR)/$(MOZCONFIG_LOADER) $(TOPSRCDIR) | sed 's/$$/||/')))
|
||||
$(eval $(MOZCONFIG_CONTENT))
|
||||
|
||||
export FOUND_MOZCONFIG
|
||||
|
||||
# As '||' was used as a newline separator, it means it's not occurring in
|
||||
# lines themselves. It can thus safely be used to replaces normal spaces,
|
||||
# to then replace newlines with normal spaces. This allows to get a list
|
||||
|
|
|
@ -113,7 +113,7 @@ STL_WRAPPERS_SENTINEL = $(DIST)/stl_wrappers/sentinel
|
|||
|
||||
$(STL_WRAPPERS_SENTINEL): $(srcdir)/make-stl-wrappers.py $(srcdir)/$(stl_compiler)-stl-wrapper.template.h $(srcdir)/stl-headers $(GLOBAL_DEPS)
|
||||
$(PYTHON) $(srcdir)/make-stl-wrappers.py stl_wrappers $(stl_compiler) $(srcdir)/$(stl_compiler)-stl-wrapper.template.h $(srcdir)/stl-headers
|
||||
$(PYTHON) $(srcdir)/nsinstall.py stl_wrappers $(DIST)
|
||||
$(PYTHON) $(srcdir)/nsinstall.py -t stl_wrappers $(DIST)
|
||||
touch $(STL_WRAPPERS_SENTINEL)
|
||||
|
||||
export:: $(STL_WRAPPERS_SENTINEL)
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
from __future__ import print_function
|
||||
import os, re, string, sys
|
||||
from mozbuild.util import FileAvoidWrite
|
||||
|
||||
def find_in_path(file, searchpath):
|
||||
for dir in searchpath.split(os.pathsep):
|
||||
|
@ -37,13 +38,10 @@ def main(outdir, compiler, template_file, header_list_file):
|
|||
continue
|
||||
|
||||
path = header_path(header, compiler)
|
||||
try:
|
||||
f = open(os.path.join(outdir, header), 'w')
|
||||
with FileAvoidWrite(os.path.join(outdir, header)) as f:
|
||||
f.write(string.Template(template).substitute(HEADER=header,
|
||||
HEADER_PATH=path,
|
||||
NEW_HEADER_PATH=path_to_new))
|
||||
finally:
|
||||
f.close()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
|
|
@ -7,33 +7,18 @@
|
|||
|
||||
SUPPRESS_DEFAULT_RULES := 1
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
# We don't print the build status messages unless we're in a top level build
|
||||
# otherwise the output is unexpected and it confuses downstream parsers.
|
||||
define make_subtier_dir
|
||||
$(call BUILDSTATUS,SUBTIER_START precompile $(1))
|
||||
+$(MAKE) -C $(2) $(3)
|
||||
$(call BUILDSTATUS,SUBTIER_FINISH precompile $(1))
|
||||
|
||||
endef
|
||||
|
||||
default::
|
||||
$(call BUILDSTATUS,TIER_START precompile IPDL WebIDL XPIDL)
|
||||
+$(MAKE) export
|
||||
$(call BUILDSTATUS,TIER_FINISH precompile)
|
||||
|
||||
export:: ipdl webidl xpidl
|
||||
|
||||
ipdl:
|
||||
$(call make_subtier_dir,IPDL,$(DEPTH)/ipc/ipdl,ipdl)
|
||||
$(call SUBMAKE,ipdl,$(DEPTH)/ipc/ipdl)
|
||||
|
||||
webidl:
|
||||
$(call make_subtier_dir,WebIDL,$(DEPTH)/dom/bindings,webidl)
|
||||
$(call SUBMAKE,webidl,$(DEPTH)/dom/bindings)
|
||||
|
||||
xpidl:
|
||||
$(call BUILDSTATUS,SUBTIER_START precompile XPIDL)
|
||||
+$(MAKE) -C $(DEPTH)/xpcom/idl-parser xpidl-parser
|
||||
$(call SUBMAKE,xpidl-parser,$(DEPTH)/xpcom/idl-parser)
|
||||
$(call py_action,process_install_manifest,$(DIST)/idl $(DEPTH)/_build_manifests/install/dist_idl)
|
||||
+$(MAKE) -C $(DEPTH)/config/makefiles/xpidl xpidl
|
||||
$(call BUILDSTATUS,SUBTIER_FINISH precompile XPIDL)
|
||||
$(call SUBMAKE,xpidl,$(DEPTH)/config/makefiles/xpidl)
|
||||
|
|
|
@ -1,49 +0,0 @@
|
|||
# -*- makefile -*-
|
||||
# vim:set ts=8 sw=8 sts=8 noet:
|
||||
#
|
||||
# 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/.
|
||||
|
||||
# This file contains logic for tier traversal.
|
||||
|
||||
define CREATE_SUBTIER_RULE
|
||||
$(2)_tier_$(1):
|
||||
$$(call BUILDSTATUS,SUBTIER_START $(1) $(2) $$(tier_$(1)_dirs))
|
||||
$$(foreach dir,$$(tier_$(1)_dirs),$$(call TIER_DIR_SUBMAKE,$(1),$(2),$$(dir),$(2)))
|
||||
$$(call BUILDSTATUS,SUBTIER_FINISH $(1) $(2))
|
||||
|
||||
endef
|
||||
|
||||
# This function is called and evaluated to produce the rule to build the
|
||||
# specified tier.
|
||||
#
|
||||
# Tiers are traditionally composed of directories that are invoked either
|
||||
# once (so-called "static" directories) or 3 times with the export, libs, and
|
||||
# tools sub-tiers.
|
||||
#
|
||||
# If the TIER_$(tier)_CUSTOM variable is defined, then these traditional
|
||||
# tier rules are ignored and each directory in the tier is executed via a
|
||||
# sub-make invocation (make -C).
|
||||
define CREATE_TIER_RULE
|
||||
tier_$(1)::
|
||||
ifdef TIER_$(1)_CUSTOM
|
||||
$$(foreach dir,$$($$@_dirs),$$(call SUBMAKE,,$$(dir)))
|
||||
else
|
||||
$(call BUILDSTATUS,TIER_START $(1) $(if $(tier_$(1)_staticdirs),static )$(if $(tier_$(1)_dirs),export libs tools))
|
||||
ifneq (,$(tier_$(1)_staticdirs))
|
||||
$(call BUILDSTATUS,SUBTIER_START $(1) static $$($$@_staticdirs))
|
||||
$$(foreach dir,$$($$@_staticdirs),$$(call TIER_DIR_SUBMAKE,$(1),static,$$(dir),,1))
|
||||
$(call BUILDSTATUS,SUBTIER_FINISH $(1) static)
|
||||
endif
|
||||
ifneq (,$(tier_$(1)_dirs))
|
||||
$$(MAKE) export_$$@
|
||||
$$(MAKE) libs_$$@
|
||||
$$(MAKE) tools_$$@
|
||||
endif
|
||||
$(call BUILDSTATUS,TIER_FINISH $(1))
|
||||
endif
|
||||
|
||||
$(foreach subtier,export libs tools,$(call CREATE_SUBTIER_RULE,$(1),$(subtier)))
|
||||
|
||||
endef
|
|
@ -10,6 +10,19 @@ endif
|
|||
# Tier traversal handling
|
||||
#########################
|
||||
|
||||
ifdef TIERS
|
||||
|
||||
compile libs export tools::
|
||||
$(call BUILDSTATUS,TIER_START $@ $(filter-out $(if $(filter export,$@),,precompile),$(TIERS)))
|
||||
$(foreach tier,$(TIERS), $(if $(filter-out compile_precompile libs_precompile tools_precompile,$@_$(tier)), \
|
||||
$(call BUILDSTATUS,SUBTIER_START $@ $(tier) $(if $(filter libs,$@),$(tier_$(tier)_staticdirs)) $(tier_$(tier)_dirs)) \
|
||||
$(if $(filter libs,$@),$(foreach dir, $(tier_$(tier)_staticdirs), $(call TIER_DIR_SUBMAKE,$@,$(tier),$(dir),,1))) \
|
||||
$(foreach dir, $(tier_$(tier)_dirs), $(call TIER_DIR_SUBMAKE,$@,$(tier),$(dir),$@)) \
|
||||
$(call BUILDSTATUS,SUBTIER_FINISH $@ $(tier))))
|
||||
$(call BUILDSTATUS,TIER_FINISH $@)
|
||||
|
||||
else
|
||||
|
||||
define CREATE_SUBTIER_TRAVERSAL_RULE
|
||||
PARALLEL_DIRS_$(1) = $$(addsuffix _$(1),$$(PARALLEL_DIRS))
|
||||
|
||||
|
@ -28,10 +41,12 @@ endif
|
|||
|
||||
endef
|
||||
|
||||
$(foreach subtier,export libs tools,$(eval $(call CREATE_SUBTIER_TRAVERSAL_RULE,$(subtier))))
|
||||
$(foreach subtier,export compile libs tools,$(eval $(call CREATE_SUBTIER_TRAVERSAL_RULE,$(subtier))))
|
||||
|
||||
export:: $(SUBMAKEFILES)
|
||||
compile export:: $(SUBMAKEFILES)
|
||||
$(LOOP_OVER_TOOL_DIRS)
|
||||
|
||||
tools:: $(SUBMAKEFILES)
|
||||
$(foreach dir,$(TOOL_DIRS),$(call SUBMAKE,libs,$(dir)))
|
||||
|
||||
endif
|
||||
|
|
|
@ -436,7 +436,10 @@ endif
|
|||
|
||||
ifdef MACH
|
||||
ifndef NO_BUILDSTATUS_MESSAGES
|
||||
BUILDSTATUS=@echo "BUILDSTATUS $1"
|
||||
define BUILDSTATUS
|
||||
@echo "BUILDSTATUS $1"
|
||||
|
||||
endef
|
||||
endif
|
||||
endif
|
||||
|
||||
|
@ -458,7 +461,6 @@ $(call BUILDSTATUS,TIERDIR_FINISH $(1) $(2) $(3))
|
|||
|
||||
endef # Ths empty line is important.
|
||||
|
||||
|
||||
ifneq (,$(strip $(DIRS)))
|
||||
LOOP_OVER_DIRS = \
|
||||
$(foreach dir,$(DIRS),$(call SUBMAKE,$@,$(dir)))
|
||||
|
@ -688,12 +690,11 @@ SUBMAKEFILES += $(addsuffix /Makefile, $(DIRS) $(TOOL_DIRS) $(PARALLEL_DIRS))
|
|||
# of something else. Makefiles which use this var *must* provide a sensible
|
||||
# default rule before including rules.mk
|
||||
ifndef SUPPRESS_DEFAULT_RULES
|
||||
ifndef TIERS
|
||||
default all::
|
||||
$(MAKE) export
|
||||
$(MAKE) compile
|
||||
$(MAKE) libs
|
||||
$(MAKE) tools
|
||||
endif # TIERS
|
||||
endif # SUPPRESS_DEFAULT_RULES
|
||||
|
||||
ifeq ($(findstring s,$(filter-out --%, $(MAKEFLAGS))),)
|
||||
|
@ -730,6 +731,8 @@ GLOBAL_DEPS += Makefile.in
|
|||
endif
|
||||
|
||||
##############################################
|
||||
compile:: $(OBJS) $(HOST_OBJS)
|
||||
|
||||
include $(topsrcdir)/config/makefiles/target_libs.mk
|
||||
|
||||
##############################################
|
||||
|
|
|
@ -14,7 +14,7 @@ interface nsIDOMClientRect;
|
|||
interface nsIURI;
|
||||
|
||||
%{C++
|
||||
#include "nsNPAPIPluginInstance.h"
|
||||
class nsNPAPIPluginInstance;
|
||||
%}
|
||||
[ptr] native nsNPAPIPluginInstancePtr(nsNPAPIPluginInstance);
|
||||
|
||||
|
|
|
@ -25,6 +25,8 @@
|
|||
#include "js/Value.h"
|
||||
#include "Layers.h"
|
||||
#include "MediaDecoder.h"
|
||||
// nsNPAPIPluginInstance must be included before nsIDocument.h, which is included in mozAutoDocUpdate.h.
|
||||
#include "nsNPAPIPluginInstance.h"
|
||||
#include "mozAutoDocUpdate.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "mozilla/AutoRestore.h"
|
||||
|
|
|
@ -1431,6 +1431,9 @@ nsDocument::~nsDocument()
|
|||
}
|
||||
|
||||
if (!isAboutScheme) {
|
||||
// Record the page load
|
||||
uint32_t pageLoaded = 1;
|
||||
Accumulate(Telemetry::MIXED_CONTENT_UNBLOCK_COUNTER, pageLoaded);
|
||||
// Record the mixed content status of the docshell in Telemetry
|
||||
enum {
|
||||
NO_MIXED_CONTENT = 0, // There is no Mixed Content on the page
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
#include "nsIObjectFrame.h"
|
||||
#include "nsIPermissionManager.h"
|
||||
#include "nsPluginHost.h"
|
||||
#include "nsPluginInstanceOwner.h"
|
||||
#include "nsJSNPRuntime.h"
|
||||
#include "nsIPresShell.h"
|
||||
#include "nsIScriptGlobalObject.h"
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
#include "nsIChannelEventSink.h"
|
||||
#include "nsIObjectLoadingContent.h"
|
||||
#include "nsIRunnable.h"
|
||||
#include "nsPluginInstanceOwner.h"
|
||||
#include "nsIThreadInternal.h"
|
||||
#include "nsIFrame.h"
|
||||
#include "nsIFrameLoader.h"
|
||||
|
@ -30,6 +29,7 @@ class AutoSetInstantiatingToFalse;
|
|||
class nsObjectFrame;
|
||||
class nsFrameLoader;
|
||||
class nsXULElement;
|
||||
class nsPluginInstanceOwner;
|
||||
|
||||
class nsObjectLoadingContent : public nsImageLoadingContent
|
||||
, public nsIStreamListener
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
#include "nsIContent.h"
|
||||
#include "nsIStreamListener.h"
|
||||
#include "nsWeakReference.h"
|
||||
#include "jsapi.h"
|
||||
#include "nsIChannelEventSink.h"
|
||||
#include "nsIAsyncVerifyRedirectCallback.h"
|
||||
#include "nsIInterfaceRequestor.h"
|
||||
|
|
|
@ -177,12 +177,8 @@ nsDOMEventTargetHelper::AddEventListener(const nsAString& aType,
|
|||
"explicit by making aOptionalArgc non-zero.");
|
||||
|
||||
if (aOptionalArgc < 2) {
|
||||
nsresult rv;
|
||||
nsIScriptContext* context = GetContextForEventHandlers(&rv);
|
||||
nsresult rv = WantsUntrusted(&aWantsUntrusted);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
nsCOMPtr<nsIDocument> doc =
|
||||
nsContentUtils::GetDocumentFromScriptContext(context);
|
||||
aWantsUntrusted = doc && !nsContentUtils::IsChromeDoc(doc);
|
||||
}
|
||||
|
||||
nsEventListenerManager* elm = GetListenerManager(true);
|
||||
|
@ -200,15 +196,11 @@ nsDOMEventTargetHelper::AddEventListener(const nsAString& aType,
|
|||
{
|
||||
bool wantsUntrusted;
|
||||
if (aWantsUntrusted.IsNull()) {
|
||||
nsresult rv;
|
||||
nsIScriptContext* context = GetContextForEventHandlers(&rv);
|
||||
nsresult rv = WantsUntrusted(&wantsUntrusted);
|
||||
if (NS_FAILED(rv)) {
|
||||
aRv.Throw(rv);
|
||||
return;
|
||||
}
|
||||
nsCOMPtr<nsIDocument> doc =
|
||||
nsContentUtils::GetDocumentFromScriptContext(context);
|
||||
wantsUntrusted = doc && !nsContentUtils::IsChromeDoc(doc);
|
||||
} else {
|
||||
wantsUntrusted = aWantsUntrusted.Value();
|
||||
}
|
||||
|
@ -234,12 +226,8 @@ nsDOMEventTargetHelper::AddSystemEventListener(const nsAString& aType,
|
|||
"explicit by making aOptionalArgc non-zero.");
|
||||
|
||||
if (aOptionalArgc < 2) {
|
||||
nsresult rv;
|
||||
nsIScriptContext* context = GetContextForEventHandlers(&rv);
|
||||
nsresult rv = WantsUntrusted(&aWantsUntrusted);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
nsCOMPtr<nsIDocument> doc =
|
||||
nsContentUtils::GetDocumentFromScriptContext(context);
|
||||
aWantsUntrusted = doc && !nsContentUtils::IsChromeDoc(doc);
|
||||
}
|
||||
|
||||
return NS_AddSystemEventListener(this, aType, aListener, aUseCapture,
|
||||
|
@ -353,3 +341,15 @@ nsDOMEventTargetHelper::GetContextForEventHandlers(nsresult* aRv)
|
|||
: nullptr;
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsDOMEventTargetHelper::WantsUntrusted(bool* aRetVal)
|
||||
{
|
||||
nsresult rv;
|
||||
nsIScriptContext* context = GetContextForEventHandlers(&rv);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
nsCOMPtr<nsIDocument> doc =
|
||||
nsContentUtils::GetDocumentFromScriptContext(context);
|
||||
// We can let listeners on workers to always handle all the events.
|
||||
*aRetVal = (doc && !nsContentUtils::IsChromeDoc(doc)) || !NS_IsMainThread();
|
||||
return rv;
|
||||
}
|
||||
|
|
|
@ -120,6 +120,8 @@ public:
|
|||
nsIGlobalObject* GetParentObject() const { return mParentObject; }
|
||||
bool HasOrHasHadOwner() { return mHasOrHasHadOwnerWindow; }
|
||||
protected:
|
||||
nsresult WantsUntrusted(bool* aRetVal);
|
||||
|
||||
nsRefPtr<nsEventListenerManager> mListenerManager;
|
||||
// Dispatch a trusted, non-cancellable and non-bubbling event to |this|.
|
||||
nsresult DispatchTrustedEvent(const nsAString& aEventName);
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
* 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/. */
|
||||
|
||||
#include "nsTArray.h"
|
||||
#include "AudioAvailableEventManager.h"
|
||||
#include "VideoUtils.h"
|
||||
|
||||
#include "MediaDecoder.h"
|
||||
#include "nsIRunnable.h"
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
|
|
|
@ -7,13 +7,18 @@
|
|||
#ifndef AudioAvailableEventManager_h__
|
||||
#define AudioAvailableEventManager_h__
|
||||
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsIRunnable.h"
|
||||
#include "MediaDecoder.h"
|
||||
#include "MediaDecoderReader.h"
|
||||
#include "nsAutoPtr.h"
|
||||
#include "nsTArray.h"
|
||||
#include "AudioSampleFormat.h"
|
||||
#include "mozilla/ReentrantMonitor.h"
|
||||
|
||||
class nsIRunnable;
|
||||
template <class T> class nsCOMPtr;
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
class MediaDecoder;
|
||||
|
||||
class AudioAvailableEventManager
|
||||
{
|
||||
public:
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "AudioChannelFormat.h"
|
||||
#include "nsTArray.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
|
|
|
@ -6,7 +6,10 @@
|
|||
#ifndef MOZILLA_AUDIOCHANNELFORMAT_H_
|
||||
#define MOZILLA_AUDIOCHANNELFORMAT_H_
|
||||
|
||||
#include "nsTArray.h"
|
||||
#include <stdint.h>
|
||||
|
||||
template <class T>
|
||||
class nsTArray;
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
* 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/. */
|
||||
|
||||
#include "mozilla/arm.h"
|
||||
#include "AudioNodeEngine.h"
|
||||
#ifdef BUILD_ARM_NEON
|
||||
#include "mozilla/arm.h"
|
||||
#include "AudioNodeEngineNEON.h"
|
||||
#endif
|
||||
|
||||
|
|
|
@ -8,13 +8,13 @@
|
|||
|
||||
#include "AudioSegment.h"
|
||||
#include "mozilla/dom/AudioNode.h"
|
||||
#include "mozilla/dom/AudioParam.h"
|
||||
#include "mozilla/Mutex.h"
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
namespace dom {
|
||||
struct ThreeDPoint;
|
||||
class AudioParamTimeline;
|
||||
}
|
||||
|
||||
class AudioNodeStream;
|
||||
|
|
|
@ -3,9 +3,9 @@
|
|||
* 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/. */
|
||||
|
||||
#include "MediaStreamGraphImpl.h"
|
||||
#include "AudioNodeEngine.h"
|
||||
#include "AudioNodeExternalInputStream.h"
|
||||
#include "AudioChannelFormat.h"
|
||||
#include "speex/speex_resampler.h"
|
||||
|
||||
using namespace mozilla::dom;
|
||||
|
|
|
@ -7,11 +7,7 @@
|
|||
#define MOZILLA_AUDIONODEEXTERNALINPUTSTREAM_H_
|
||||
|
||||
#include "MediaStreamGraph.h"
|
||||
#include "AudioChannelFormat.h"
|
||||
#include "AudioNodeEngine.h"
|
||||
#include "AudioNodeStream.h"
|
||||
#include "mozilla/dom/AudioParam.h"
|
||||
#include <deque>
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
#define LOG(type, msg) PR_LOG(gMediaStreamGraphLog, type, msg)
|
||||
|
|
|
@ -8,6 +8,8 @@
|
|||
#include "MediaStreamGraphImpl.h"
|
||||
#include "AudioNodeEngine.h"
|
||||
#include "ThreeDPoint.h"
|
||||
#include "AudioChannelFormat.h"
|
||||
#include "AudioParamTimeline.h"
|
||||
|
||||
using namespace mozilla::dom;
|
||||
|
||||
|
|
|
@ -7,10 +7,8 @@
|
|||
#define MOZILLA_AUDIONODESTREAM_H_
|
||||
|
||||
#include "MediaStreamGraph.h"
|
||||
#include "AudioChannelFormat.h"
|
||||
#include "AudioNodeEngine.h"
|
||||
#include "mozilla/dom/AudioNodeBinding.h"
|
||||
#include "mozilla/dom/AudioParam.h"
|
||||
#include "AudioSegment.h"
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
#define LOG(type, msg) PR_LOG(gMediaStreamGraphLog, type, msg)
|
||||
|
@ -26,6 +24,7 @@ class AudioParamTimeline;
|
|||
}
|
||||
|
||||
class ThreadSharedFloatArrayBufferList;
|
||||
class AudioNodeEngine;
|
||||
|
||||
/**
|
||||
* An AudioNodeStream produces one audio track with ID AUDIO_TRACK.
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
#define MOZILLA_AUDIOSEGMENT_H_
|
||||
|
||||
#include "MediaSegment.h"
|
||||
#include "nsISupportsImpl.h"
|
||||
#include "AudioSampleFormat.h"
|
||||
#include "SharedBuffer.h"
|
||||
|
||||
|
|
|
@ -8,12 +8,12 @@
|
|||
#include "prlog.h"
|
||||
#include "prdtoa.h"
|
||||
#include "AudioStream.h"
|
||||
#include "nsAlgorithm.h"
|
||||
#include "VideoUtils.h"
|
||||
#include "mozilla/Monitor.h"
|
||||
#include "mozilla/Mutex.h"
|
||||
#include <algorithm>
|
||||
#include "mozilla/Preferences.h"
|
||||
#include "soundtouch/SoundTouch.h"
|
||||
|
||||
#if defined(MOZ_CUBEB)
|
||||
#include "nsAutoRef.h"
|
||||
|
|
|
@ -6,12 +6,14 @@
|
|||
#if !defined(AudioStream_h_)
|
||||
#define AudioStream_h_
|
||||
|
||||
#include "nscore.h"
|
||||
#include "AudioSampleFormat.h"
|
||||
#include "AudioChannelCommon.h"
|
||||
#include "soundtouch/SoundTouch.h"
|
||||
#include "nsAutoPtr.h"
|
||||
|
||||
namespace soundtouch {
|
||||
class SoundTouch;
|
||||
}
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
class AudioStream;
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#define AUDIOSTREAMTRACK_H_
|
||||
|
||||
#include "MediaStreamTrack.h"
|
||||
#include "DOMMediaStream.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "DOMMediaStream.h"
|
||||
#include "nsDOMClassInfoID.h"
|
||||
#include "nsContentUtils.h"
|
||||
#include "mozilla/dom/MediaStreamBinding.h"
|
||||
#include "mozilla/dom/LocalMediaStreamBinding.h"
|
||||
|
|
|
@ -8,13 +8,12 @@
|
|||
|
||||
#include "nsIDOMMediaStream.h"
|
||||
#include "nsCycleCollectionParticipant.h"
|
||||
#include "nsIPrincipal.h"
|
||||
#include "nsWrapperCache.h"
|
||||
#include "nsIDOMWindow.h"
|
||||
#include "StreamBuffer.h"
|
||||
#include "nsIRunnable.h"
|
||||
#include "nsIDOMWindow.h"
|
||||
|
||||
class nsXPCClassInfo;
|
||||
class nsIPrincipal;
|
||||
|
||||
// GetCurrentTime is defined in winbase.h as zero argument macro forwarding to
|
||||
// GetTickCount() and conflicts with NS_DECL_NSIDOMMEDIASTREAM, containing
|
||||
|
|
|
@ -8,7 +8,9 @@
|
|||
#define DecoderTraits_h_
|
||||
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsAString.h"
|
||||
|
||||
class nsAString;
|
||||
class nsACString;
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
|
|
|
@ -6,7 +6,8 @@
|
|||
|
||||
#include "EncodedBufferCache.h"
|
||||
#include "nsAnonymousTemporaryFile.h"
|
||||
#include "nsLocalFile.h"
|
||||
#include "nsDOMFile.h"
|
||||
#include "prio.h"
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
|
|
|
@ -7,10 +7,12 @@
|
|||
#ifndef EncodedBufferCache_h_
|
||||
#define EncodedBufferCache_h_
|
||||
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsTArray.h"
|
||||
#include "mozilla/Mutex.h"
|
||||
#include "prio.h"
|
||||
#include "nsDOMFile.h"
|
||||
|
||||
struct PRFileDesc;
|
||||
class nsIDOMBlob;
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
* 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/. */
|
||||
|
||||
#include "mozilla/XPCOM.h"
|
||||
#include "FileBlockCache.h"
|
||||
#include "VideoUtils.h"
|
||||
#include "prio.h"
|
||||
#include <algorithm>
|
||||
|
||||
namespace mozilla {
|
||||
|
|
|
@ -9,10 +9,12 @@
|
|||
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "mozilla/Monitor.h"
|
||||
#include "prio.h"
|
||||
#include "nsTArray.h"
|
||||
#include "MediaCache.h"
|
||||
#include "nsDeque.h"
|
||||
#include "nsThreadUtils.h"
|
||||
|
||||
struct PRFileDesc;
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
|
|
|
@ -5,20 +5,21 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "mozilla/ReentrantMonitor.h"
|
||||
#include "mozilla/XPCOM.h"
|
||||
|
||||
#include "MediaCache.h"
|
||||
#include "nsNetUtil.h"
|
||||
#include "prio.h"
|
||||
#include "nsContentUtils.h"
|
||||
#include "nsThreadUtils.h"
|
||||
#include "MediaResource.h"
|
||||
#include "nsMathUtils.h"
|
||||
#include "prlog.h"
|
||||
#include "mozilla/Preferences.h"
|
||||
#include "FileBlockCache.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "nsAnonymousTemporaryFile.h"
|
||||
#include "nsIObserverService.h"
|
||||
#include "nsISeekableStream.h"
|
||||
#include "nsIPrincipal.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "mozilla/Services.h"
|
||||
#include <algorithm>
|
||||
|
||||
namespace mozilla {
|
||||
|
@ -364,6 +365,26 @@ MediaCacheFlusher::Observe(nsISupports *aSubject, char const *aTopic, PRUnichar
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
MediaCacheStream::MediaCacheStream(ChannelMediaResource* aClient)
|
||||
: mClient(aClient),
|
||||
mInitialized(false),
|
||||
mHasHadUpdate(false),
|
||||
mClosed(false),
|
||||
mDidNotifyDataEnded(false),
|
||||
mResourceID(0),
|
||||
mIsTransportSeekable(false),
|
||||
mCacheSuspended(false),
|
||||
mChannelEnded(false),
|
||||
mChannelOffset(0),
|
||||
mStreamLength(-1),
|
||||
mStreamOffset(0),
|
||||
mPlaybackBytesPerSecond(10000),
|
||||
mPinCount(0),
|
||||
mCurrentMode(MODE_PLAYBACK),
|
||||
mMetadataInPartialBlockBuffer(false)
|
||||
{
|
||||
}
|
||||
|
||||
void MediaCacheStream::BlockList::AddFirstBlock(int32_t aBlock)
|
||||
{
|
||||
NS_ASSERTION(!mEntries.GetEntry(aBlock), "Block already in list");
|
||||
|
|
|
@ -8,8 +8,11 @@
|
|||
#define MediaCache_h_
|
||||
|
||||
#include "nsTArray.h"
|
||||
#include "nsIPrincipal.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsHashKeys.h"
|
||||
#include "nsTHashtable.h"
|
||||
|
||||
class nsIPrincipal;
|
||||
|
||||
namespace mozilla {
|
||||
// defined in MediaResource.h
|
||||
|
@ -191,17 +194,7 @@ public:
|
|||
|
||||
// aClient provides the underlying transport that cache will use to read
|
||||
// data for this stream.
|
||||
MediaCacheStream(ChannelMediaResource* aClient)
|
||||
: mClient(aClient), mInitialized(false),
|
||||
mHasHadUpdate(false),
|
||||
mClosed(false),
|
||||
mDidNotifyDataEnded(false), mResourceID(0),
|
||||
mIsTransportSeekable(false), mCacheSuspended(false),
|
||||
mChannelEnded(false),
|
||||
mChannelOffset(0), mStreamLength(-1),
|
||||
mStreamOffset(0), mPlaybackBytesPerSecond(10000),
|
||||
mPinCount(0), mCurrentMode(MODE_PLAYBACK),
|
||||
mMetadataInPartialBlockBuffer(false) {}
|
||||
MediaCacheStream(ChannelMediaResource* aClient);
|
||||
~MediaCacheStream();
|
||||
|
||||
// Set up this stream with the cache. Can fail on OOM. One
|
||||
|
|
|
@ -8,11 +8,7 @@
|
|||
#include "mozilla/FloatingPoint.h"
|
||||
#include "mozilla/MathAlgorithms.h"
|
||||
#include <limits>
|
||||
#include "nsNetUtil.h"
|
||||
#include "AudioStream.h"
|
||||
#include "mozilla/dom/HTMLVideoElement.h"
|
||||
#include "nsIObserver.h"
|
||||
#include "nsIObserverService.h"
|
||||
#include "nsTArray.h"
|
||||
#include "VideoUtils.h"
|
||||
#include "MediaDecoderStateMachine.h"
|
||||
|
@ -22,6 +18,9 @@
|
|||
#include "MediaResource.h"
|
||||
#include "nsError.h"
|
||||
#include "mozilla/Preferences.h"
|
||||
#include "nsIMemoryReporter.h"
|
||||
#include "nsComponentManagerUtils.h"
|
||||
#include "nsITimer.h"
|
||||
#include <algorithm>
|
||||
|
||||
#ifdef MOZ_WMF
|
||||
|
|
|
@ -180,19 +180,12 @@ destroying the MediaDecoder object.
|
|||
|
||||
#include "nsISupports.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsIThread.h"
|
||||
#include "nsIChannel.h"
|
||||
#include "nsIObserver.h"
|
||||
#include "nsAutoPtr.h"
|
||||
#include "nsSize.h"
|
||||
#include "prlog.h"
|
||||
#include "gfxContext.h"
|
||||
#include "gfxRect.h"
|
||||
#include "MediaResource.h"
|
||||
#include "mozilla/ReentrantMonitor.h"
|
||||
#include "mozilla/TimeStamp.h"
|
||||
#include "MediaStreamGraph.h"
|
||||
#include "MediaDecoderOwner.h"
|
||||
#include "AudioChannelCommon.h"
|
||||
#include "AbstractMediaDecoder.h"
|
||||
|
||||
|
@ -214,9 +207,7 @@ namespace layers {
|
|||
class Image;
|
||||
} //namespace layers
|
||||
|
||||
class MediaByteRange;
|
||||
class VideoFrameContainer;
|
||||
class AudioStream;
|
||||
class MediaDecoderStateMachine;
|
||||
class MediaDecoderOwner;
|
||||
|
||||
|
|
|
@ -4,10 +4,11 @@
|
|||
* 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/. */
|
||||
|
||||
#include "GrallocImages.h"
|
||||
#include "MediaDecoderReader.h"
|
||||
#ifdef MOZ_OMX_DECODER
|
||||
#include "GrallocImages.h"
|
||||
#endif
|
||||
#include "AbstractMediaDecoder.h"
|
||||
#include "MediaDecoderStateMachine.h"
|
||||
#include "VideoUtils.h"
|
||||
#include "ImageContainer.h"
|
||||
|
||||
|
|
|
@ -9,15 +9,23 @@
|
|||
#include <nsDeque.h>
|
||||
#include "nsSize.h"
|
||||
#include "mozilla/ReentrantMonitor.h"
|
||||
#include "MediaStreamGraph.h"
|
||||
#include "SharedBuffer.h"
|
||||
#include "AudioSampleFormat.h"
|
||||
#include "MediaResource.h"
|
||||
#include "mozilla/dom/HTMLMediaElement.h"
|
||||
#include "AbstractMediaDecoder.h"
|
||||
#include "ImageTypes.h"
|
||||
|
||||
struct nsIntRect;
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
class AbstractMediaDecoder;
|
||||
namespace layers {
|
||||
class Image;
|
||||
class ImageContainer;
|
||||
}
|
||||
|
||||
namespace dom {
|
||||
class TimeRanges;
|
||||
}
|
||||
|
||||
// Stores info relevant to presenting media frames.
|
||||
class VideoInfo {
|
||||
|
|
|
@ -11,10 +11,8 @@
|
|||
|
||||
#include "mozilla/DebugOnly.h"
|
||||
#include <stdint.h>
|
||||
#include "mozilla/Util.h"
|
||||
|
||||
#include "MediaDecoderStateMachine.h"
|
||||
#include <limits>
|
||||
#include "AudioStream.h"
|
||||
#include "nsTArray.h"
|
||||
#include "MediaDecoder.h"
|
||||
|
@ -26,6 +24,8 @@
|
|||
#include "AudioSegment.h"
|
||||
#include "VideoSegment.h"
|
||||
#include "ImageContainer.h"
|
||||
#include "nsComponentManagerUtils.h"
|
||||
#include "nsITimer.h"
|
||||
|
||||
#include "prenv.h"
|
||||
#include "mozilla/Preferences.h"
|
||||
|
@ -726,8 +726,6 @@ void MediaDecoderStateMachine::SendStreamData()
|
|||
|
||||
if (mAudioCaptured) {
|
||||
// Discard audio packets that are no longer needed.
|
||||
int64_t audioPacketTimeToDiscard =
|
||||
std::min(minLastAudioPacketTime, mStartTime + mCurrentFrameTime);
|
||||
while (true) {
|
||||
nsAutoPtr<AudioData> a(mReader->AudioQueue().PopFront());
|
||||
if (!a)
|
||||
|
@ -738,7 +736,7 @@ void MediaDecoderStateMachine::SendStreamData()
|
|||
// very start. That's OK, we'll play silence instead for a brief moment.
|
||||
// That's OK. Seeking to this time would have a similar issue for such
|
||||
// badly muxed resources.
|
||||
if (a->GetEnd() >= audioPacketTimeToDiscard) {
|
||||
if (a->GetEnd() >= minLastAudioPacketTime) {
|
||||
mReader->AudioQueue().PushFront(a.forget());
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -81,13 +81,16 @@ hardware (via AudioStream).
|
|||
#include "MediaDecoder.h"
|
||||
#include "AudioAvailableEventManager.h"
|
||||
#include "mozilla/ReentrantMonitor.h"
|
||||
#include "nsITimer.h"
|
||||
#include "AudioSegment.h"
|
||||
#include "VideoSegment.h"
|
||||
#include "MediaDecoderReader.h"
|
||||
#include "MediaDecoderOwner.h"
|
||||
#include "MediaMetadataManager.h"
|
||||
|
||||
class nsITimer;
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
class MediaDecoderReader;
|
||||
class AudioSegment;
|
||||
class VideoSegment;
|
||||
|
||||
/*
|
||||
The state machine class. This manages the decoding and seeking in the
|
||||
|
|
|
@ -7,17 +7,15 @@
|
|||
#include "MediaRecorder.h"
|
||||
#include "GeneratedEvents.h"
|
||||
#include "MediaEncoder.h"
|
||||
#include "mozilla/Util.h"
|
||||
#include "nsDOMEventTargetHelper.h"
|
||||
#include "nsDOMFile.h"
|
||||
#include "nsError.h"
|
||||
#include "nsIDocument.h"
|
||||
#include "nsIDOMBlobEvent.h"
|
||||
#include "nsIDOMRecordErrorEvent.h"
|
||||
#include "nsIScriptObjectPrincipal.h"
|
||||
#include "nsIScriptSecurityManager.h"
|
||||
#include "nsAString.h"
|
||||
#include "nsTArray.h"
|
||||
#include "DOMMediaStream.h"
|
||||
#include "EncodedBufferCache.h"
|
||||
#include "nsIDOMFile.h"
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
|
@ -150,7 +148,7 @@ MediaRecorder::ExtractEncodedData()
|
|||
do {
|
||||
nsTArray<nsTArray<uint8_t> > outputBufs;
|
||||
mEncoder->GetEncodedData(&outputBufs, mMimeType);
|
||||
for (uint i = 0; i < outputBufs.Length(); i++) {
|
||||
for (uint32_t i = 0; i < outputBufs.Length(); i++) {
|
||||
mEncodedBufferCache->AppendBuffer(outputBufs[i]);
|
||||
}
|
||||
|
||||
|
|
|
@ -7,18 +7,19 @@
|
|||
#ifndef MediaRecorder_h
|
||||
#define MediaRecorder_h
|
||||
|
||||
#include "DOMMediaStream.h"
|
||||
#include "MediaEncoder.h"
|
||||
#include "mozilla/dom/MediaRecorderBinding.h"
|
||||
#include "nsDOMEventTargetHelper.h"
|
||||
#include "EncodedBufferCache.h"
|
||||
#include "TrackUnionStream.h"
|
||||
|
||||
// Max size for allowing queue encoded data in memory
|
||||
#define MAX_ALLOW_MEMORY_BUFFER 1024000
|
||||
namespace mozilla {
|
||||
|
||||
class ErrorResult;
|
||||
class DOMMediaStream;
|
||||
class EncodedBufferCache;
|
||||
class MediaEncoder;
|
||||
class ProcessedMediaStream;
|
||||
class MediaInputPort;
|
||||
|
||||
namespace dom {
|
||||
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
#include "nsIHttpChannel.h"
|
||||
#include "nsISeekableStream.h"
|
||||
#include "nsIInputStream.h"
|
||||
#include "nsIOutputStream.h"
|
||||
#include "nsIRequestObserver.h"
|
||||
#include "nsIStreamListener.h"
|
||||
#include "nsIScriptSecurityManager.h"
|
||||
|
@ -26,7 +25,6 @@
|
|||
#include "mozilla/dom/HTMLMediaElement.h"
|
||||
#include "nsError.h"
|
||||
#include "nsICachingChannel.h"
|
||||
#include "nsURILoader.h"
|
||||
#include "nsIAsyncVerifyRedirectCallback.h"
|
||||
#include "nsContentUtils.h"
|
||||
#include "nsHostObjectProtocolHandler.h"
|
||||
|
|
|
@ -7,11 +7,10 @@
|
|||
#define MediaResource_h_
|
||||
|
||||
#include "mozilla/Mutex.h"
|
||||
#include "mozilla/XPCOM.h"
|
||||
#ifdef MOZ_DASH
|
||||
#include "mozilla/ReentrantMonitor.h"
|
||||
#endif
|
||||
#include "nsIChannel.h"
|
||||
#include "nsIHttpChannel.h"
|
||||
#include "nsIPrincipal.h"
|
||||
#include "nsIURI.h"
|
||||
#include "nsIStreamListener.h"
|
||||
#include "nsIChannelEventSink.h"
|
||||
|
@ -19,6 +18,7 @@
|
|||
#include "MediaCache.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "mozilla/TimeStamp.h"
|
||||
#include "nsThreadUtils.h"
|
||||
|
||||
// For HTTP seeking, if number of bytes needing to be
|
||||
// seeked forward is less than this value then a read is
|
||||
|
@ -32,6 +32,9 @@ static const uint32_t HTTP_REQUESTED_RANGE_NOT_SATISFIABLE_CODE = 416;
|
|||
// reach a CWND of 30 (See bug 831998)
|
||||
static const int64_t RELIABLE_DATA_THRESHOLD = 57 * 1460;
|
||||
|
||||
class nsIHttpChannel;
|
||||
class nsIPrincipal;
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
class MediaDecoder;
|
||||
|
|
|
@ -13,9 +13,7 @@
|
|||
#include "nsIObserver.h"
|
||||
#include "nsServiceManagerUtils.h"
|
||||
#include "nsWidgetsCID.h"
|
||||
#include "nsXPCOMCIDInternal.h"
|
||||
#include "prlog.h"
|
||||
#include "VideoUtils.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "TrackUnionStream.h"
|
||||
#include "ImageContainer.h"
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
#include "AudioStream.h"
|
||||
#include "nsTArray.h"
|
||||
#include "nsIRunnable.h"
|
||||
#include "nsISupportsImpl.h"
|
||||
#include "StreamBuffer.h"
|
||||
#include "TimeVarying.h"
|
||||
#include "VideoFrameContainer.h"
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
#include "DOMMediaStream.h"
|
||||
#include "nsIUUIDGenerator.h"
|
||||
#include "nsServiceManagerUtils.h"
|
||||
#include "MediaStreamGraph.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
|
|
@ -7,11 +7,13 @@
|
|||
#define MEDIASTREAMTRACK_H_
|
||||
|
||||
#include "nsDOMEventTargetHelper.h"
|
||||
#include "DOMMediaStream.h"
|
||||
#include "nsID.h"
|
||||
#include "StreamBuffer.h"
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
class DOMMediaStream;
|
||||
|
||||
namespace dom {
|
||||
|
||||
class AudioStreamTrack;
|
||||
|
|
|
@ -6,11 +6,8 @@
|
|||
#ifndef MOZILLA_STREAMBUFFER_H_
|
||||
#define MOZILLA_STREAMBUFFER_H_
|
||||
|
||||
#include "mozilla/DebugOnly.h"
|
||||
|
||||
#include "MediaSegment.h"
|
||||
#include "nsAutoPtr.h"
|
||||
#include <algorithm>
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
#include "mozilla/dom/TextTrack.h"
|
||||
#include "mozilla/dom/TextTrackBinding.h"
|
||||
#include "mozilla/dom/TextTrackCueList.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
|
|
@ -8,13 +8,10 @@
|
|||
#define mozilla_dom_TextTrack_h
|
||||
|
||||
#include "mozilla/dom/TextTrackBinding.h"
|
||||
#include "mozilla/dom/TextTrackCue.h"
|
||||
#include "mozilla/dom/TextTrackCueList.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsCycleCollectionParticipant.h"
|
||||
#include "nsDOMEventTargetHelper.h"
|
||||
#include "nsString.h"
|
||||
#include "nsWrapperCache.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
|
|
@ -5,9 +5,7 @@
|
|||
|
||||
#include "mozilla/dom/HTMLTrackElement.h"
|
||||
#include "mozilla/dom/TextTrackCue.h"
|
||||
#include "mozilla/dom/ProcessingInstruction.h"
|
||||
#include "nsIFrame.h"
|
||||
#include "nsTextNode.h"
|
||||
#include "nsVideoFrame.h"
|
||||
|
||||
// Alternate value for the 'auto' keyword.
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#ifndef mozilla_dom_TextTrackCueList_h
|
||||
#define mozilla_dom_TextTrackCueList_h
|
||||
|
||||
#include "mozilla/dom/TextTrackCue.h"
|
||||
#include "nsTArray.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsCycleCollectionParticipant.h"
|
||||
#include "nsWrapperCache.h"
|
||||
|
|
|
@ -14,8 +14,6 @@
|
|||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
class TextTrack;
|
||||
|
||||
class TextTrackList MOZ_FINAL : public nsDOMEventTargetHelper
|
||||
{
|
||||
public:
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
|
||||
#include "mozilla/Mutex.h"
|
||||
#include "mozilla/TimeStamp.h"
|
||||
#include "nsISupportsImpl.h"
|
||||
#include "gfxPoint.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsAutoPtr.h"
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
#include "mozilla/dom/VideoPlaybackQualityBinding.h"
|
||||
#include "nsCycleCollectionParticipant.h"
|
||||
#include "nsWrapperCache.h"
|
||||
#include "MediaDecoder.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#define VIDEOSTREAMTRACK_H_
|
||||
|
||||
#include "MediaStreamTrack.h"
|
||||
#include "DOMMediaStream.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
#include "MediaResource.h"
|
||||
#include "mozilla/dom/TimeRanges.h"
|
||||
#include "nsMathUtils.h"
|
||||
#include "nsSize.h"
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
|
|
|
@ -11,8 +11,11 @@
|
|||
#include "mozilla/ReentrantMonitor.h"
|
||||
#include "mozilla/CheckedInt.h"
|
||||
|
||||
#include "nsRect.h"
|
||||
#if !(defined(XP_WIN) || defined(XP_MACOSX) || defined(LINUX)) || \
|
||||
defined(MOZ_ASAN)
|
||||
// For MEDIA_THREAD_STACK_SIZE
|
||||
#include "nsIThreadManager.h"
|
||||
#endif
|
||||
#include "nsThreadUtils.h"
|
||||
#include "prtime.h"
|
||||
|
||||
|
@ -21,6 +24,8 @@ using mozilla::CheckedUint64;
|
|||
using mozilla::CheckedInt32;
|
||||
using mozilla::CheckedUint32;
|
||||
|
||||
struct nsIntSize;
|
||||
|
||||
// This file contains stuff we'd rather put elsewhere, but which is
|
||||
// dependent on other changes which we don't want to wait for. We plan to
|
||||
// remove this file in the near future.
|
||||
|
|
|
@ -5,8 +5,7 @@
|
|||
|
||||
#include "WebVTTLoadListener.h"
|
||||
#include "mozilla/dom/TextTrackCue.h"
|
||||
#include "nsIAsyncVerifyRedirectCallback.h"
|
||||
#include "VideoUtils.h"
|
||||
#include "mozilla/dom/HTMLTrackElement.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
|
|
@ -9,11 +9,9 @@
|
|||
#include "nsIStreamListener.h"
|
||||
#include "nsIChannelEventSink.h"
|
||||
#include "nsIInterfaceRequestor.h"
|
||||
#include "nsIObserver.h"
|
||||
#include "nsAutoPtr.h"
|
||||
#include "nsAutoRef.h"
|
||||
#include "nsCycleCollectionParticipant.h"
|
||||
#include "mozilla/dom/HTMLTrackElement.h"
|
||||
|
||||
struct webvtt_parser_t;
|
||||
struct webvtt_cue;
|
||||
|
@ -30,6 +28,9 @@ public:
|
|||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
class HTMLTrackElement;
|
||||
|
||||
/**
|
||||
* Class that manages the libwebvtt parsing library and functions as an
|
||||
* interface between Gecko and libwebvtt.
|
||||
|
|
|
@ -11,6 +11,8 @@
|
|||
#include "SourceFilter.h"
|
||||
#include "DirectShowUtils.h"
|
||||
#include "SampleSink.h"
|
||||
#include "MediaResource.h"
|
||||
#include "VideoUtils.h"
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
#include "MediaEncoder.h"
|
||||
#include "MediaDecoder.h"
|
||||
#include "nsIPrincipal.h"
|
||||
#ifdef MOZ_OGG
|
||||
#include "OggWriter.h"
|
||||
#endif
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#include <string.h>
|
||||
#include "GStreamerReader.h"
|
||||
#include "GStreamerMozVideoBuffer.h"
|
||||
#include "ImageContainer.h"
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
|
|
|
@ -144,14 +144,14 @@ nsresult GStreamerReader::Init(MediaDecoderReader* aCloneDonor)
|
|||
|
||||
mAudioSink = gst_parse_bin_from_description("capsfilter name=filter ! "
|
||||
#ifdef MOZ_SAMPLE_TYPE_FLOAT32
|
||||
"appsink name=audiosink max-buffers=2 sync=true caps=audio/x-raw-float,"
|
||||
"appsink name=audiosink max-buffers=2 sync=false caps=audio/x-raw-float,"
|
||||
#ifdef IS_LITTLE_ENDIAN
|
||||
"channels={1,2},width=32,endianness=1234", TRUE, nullptr);
|
||||
#else
|
||||
"channels={1,2},width=32,endianness=4321", TRUE, nullptr);
|
||||
#endif
|
||||
#else
|
||||
"appsink name=audiosink max-buffers=2 sync=true caps=audio/x-raw-int,"
|
||||
"appsink name=audiosink max-buffers=2 sync=false caps=audio/x-raw-int,"
|
||||
#ifdef IS_LITTLE_ENDIAN
|
||||
"channels={1,2},width=16,endianness=1234", TRUE, nullptr);
|
||||
#else
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
#pragma GCC diagnostic pop
|
||||
#include <map>
|
||||
#include "MediaDecoderReader.h"
|
||||
#include "nsRect.h"
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
|
@ -26,6 +27,10 @@ namespace dom {
|
|||
class TimeRanges;
|
||||
}
|
||||
|
||||
namespace layers {
|
||||
class PlanarYCbCrImage;
|
||||
}
|
||||
|
||||
class AbstractMediaDecoder;
|
||||
|
||||
class GStreamerReader : public MediaDecoderReader
|
||||
|
|
|
@ -17,6 +17,18 @@
|
|||
#include "VideoUtils.h"
|
||||
#include <algorithm>
|
||||
|
||||
// On Android JellyBean, the hardware.h header redefines version_major and
|
||||
// version_minor, which breaks our build. See:
|
||||
// https://bugzilla.mozilla.org/show_bug.cgi?id=912702#c6
|
||||
#ifdef MOZ_WIDGET_GONK
|
||||
#ifdef version_major
|
||||
#undef version_major
|
||||
#endif
|
||||
#ifdef version_minor
|
||||
#undef version_minor
|
||||
#endif
|
||||
#endif
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
|
|
|
@ -23,6 +23,7 @@ extern "C" {
|
|||
#include "mozilla/TimeStamp.h"
|
||||
#include "VorbisUtils.h"
|
||||
#include "MediaMetadataManager.h"
|
||||
#include "nsISeekableStream.h"
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
|
||||
#include "MediaResource.h"
|
||||
#include "MediaDecoderReader.h"
|
||||
#include "nsRect.h"
|
||||
#include <ui/GraphicBuffer.h>
|
||||
|
||||
namespace android {
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
#include "GonkNativeWindowClient.h"
|
||||
#include "OMXCodecProxy.h"
|
||||
#include "OmxDecoder.h"
|
||||
#include "nsISeekableStream.h"
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
PRLogModuleInfo *gOmxDecoderLog;
|
||||
|
|
|
@ -14,10 +14,16 @@
|
|||
#include "nsIGfxInfo.h"
|
||||
#include "gfxCrashReporterUtils.h"
|
||||
#include "prmem.h"
|
||||
#include "prlink.h"
|
||||
#include "MediaResourceServer.h"
|
||||
#include "nsServiceManagerUtils.h"
|
||||
|
||||
#include "MPAPI.h"
|
||||
|
||||
#if defined(ANDROID) && !defined(MOZ_WIDGET_GONK)
|
||||
#include "nsIPropertyBag2.h"
|
||||
#endif
|
||||
|
||||
#if defined(ANDROID) || defined(MOZ_WIDGET_GONK)
|
||||
#include "android/log.h"
|
||||
#define ALOG(args...) __android_log_print(ANDROID_LOG_INFO, "MediaPluginHost" , ## args)
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
#include "RawReader.h"
|
||||
#include "RawDecoder.h"
|
||||
#include "VideoUtils.h"
|
||||
#include "nsISeekableStream.h"
|
||||
|
||||
using namespace mozilla;
|
||||
|
||||
|
@ -276,7 +277,7 @@ nsresult RawReader::Seek(int64_t aTime, int64_t aStartTime, int64_t aEndTime, in
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult RawReader::GetBuffered(TimeRanges* aBuffered, int64_t aStartTime)
|
||||
nsresult RawReader::GetBuffered(dom::TimeRanges* aBuffered, int64_t aStartTime)
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
|
@ -129,6 +129,9 @@ MOCHITEST_FILES = \
|
|||
test_streams_srcObject.html \
|
||||
test_reset_src.html \
|
||||
test_streams_autoplay.html \
|
||||
test_streams_element_capture.html \
|
||||
test_streams_element_capture_reset.html \
|
||||
test_streams_element_capture_createObjectURL.html \
|
||||
test_streams_gc.html \
|
||||
test_streams_tracks.html \
|
||||
$(filter disabled-for-intermittent-failures--bug-608634, test_error_in_video_document.html) \
|
||||
|
@ -143,18 +146,6 @@ MOCHITEST_FILES = \
|
|||
test_bug895305.html \
|
||||
$(NULL)
|
||||
|
||||
# Disabled on Windows for frequent intermittent failures
|
||||
ifneq ($(OS_ARCH), WINNT)
|
||||
MOCHITEST_FILES += \
|
||||
test_streams_element_capture.html \
|
||||
test_streams_element_capture_reset.html \
|
||||
test_streams_element_capture_createObjectURL.html \
|
||||
$(NULL)
|
||||
else
|
||||
$(filter disabled-on-windows-for-timeouts--bug-752796, test_streams_element_capture.html)
|
||||
$(filter disabled-on-windows-for-timeouts--bug-752796, test_streams_element_capture_reset.html)
|
||||
endif
|
||||
|
||||
# Don't run in suite
|
||||
ifndef MOZ_SUITE
|
||||
MOCHITEST_FILES += test_play_twice.html
|
||||
|
|
|
@ -10,10 +10,12 @@
|
|||
#include "mozilla/dom/TimeRanges.h"
|
||||
#include "MediaDecoderStateMachine.h"
|
||||
#include "VideoUtils.h"
|
||||
#include "nsISeekableStream.h"
|
||||
|
||||
#include <stdint.h>
|
||||
#include "mozilla/Util.h"
|
||||
#include "mozilla/CheckedInt.h"
|
||||
#include "mozilla/Endian.h"
|
||||
#include <algorithm>
|
||||
|
||||
namespace mozilla {
|
||||
|
@ -69,11 +71,7 @@ namespace {
|
|||
uint32_t
|
||||
ReadUint32BE(const char** aBuffer)
|
||||
{
|
||||
uint32_t result =
|
||||
uint8_t((*aBuffer)[0]) << 24 |
|
||||
uint8_t((*aBuffer)[1]) << 16 |
|
||||
uint8_t((*aBuffer)[2]) << 8 |
|
||||
uint8_t((*aBuffer)[3]);
|
||||
uint32_t result = BigEndian::readUint32(*aBuffer);
|
||||
*aBuffer += sizeof(uint32_t);
|
||||
return result;
|
||||
}
|
||||
|
@ -81,11 +79,7 @@ namespace {
|
|||
uint32_t
|
||||
ReadUint32LE(const char** aBuffer)
|
||||
{
|
||||
uint32_t result =
|
||||
uint8_t((*aBuffer)[3]) << 24 |
|
||||
uint8_t((*aBuffer)[2]) << 16 |
|
||||
uint8_t((*aBuffer)[1]) << 8 |
|
||||
uint8_t((*aBuffer)[0]);
|
||||
uint32_t result = LittleEndian::readUint32(*aBuffer);
|
||||
*aBuffer += sizeof(uint32_t);
|
||||
return result;
|
||||
}
|
||||
|
@ -93,9 +87,7 @@ namespace {
|
|||
uint16_t
|
||||
ReadUint16LE(const char** aBuffer)
|
||||
{
|
||||
uint16_t result =
|
||||
uint8_t((*aBuffer)[1]) << 8 |
|
||||
uint8_t((*aBuffer)[0]) << 0;
|
||||
uint16_t result = LittleEndian::readUint16(*aBuffer);
|
||||
*aBuffer += sizeof(uint16_t);
|
||||
return result;
|
||||
}
|
||||
|
@ -103,7 +95,9 @@ namespace {
|
|||
int16_t
|
||||
ReadInt16LE(const char** aBuffer)
|
||||
{
|
||||
return static_cast<int16_t>(ReadUint16LE(aBuffer));
|
||||
uint16_t result = LittleEndian::readInt16(*aBuffer);
|
||||
*aBuffer += sizeof(int16_t);
|
||||
return result;
|
||||
}
|
||||
|
||||
uint8_t
|
||||
|
@ -141,7 +135,7 @@ nsresult WaveReader::ReadMetadata(VideoInfo* aInfo,
|
|||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
nsAutoPtr<HTMLMediaElement::MetadataTags> tags;
|
||||
nsAutoPtr<dom::HTMLMediaElement::MetadataTags> tags;
|
||||
|
||||
bool loadAllChunks = LoadAllChunks(tags);
|
||||
if (!loadAllChunks) {
|
||||
|
@ -278,7 +272,7 @@ static double RoundToUsecs(double aSeconds) {
|
|||
return floor(aSeconds * USECS_PER_S) / USECS_PER_S;
|
||||
}
|
||||
|
||||
nsresult WaveReader::GetBuffered(TimeRanges* aBuffered, int64_t aStartTime)
|
||||
nsresult WaveReader::GetBuffered(dom::TimeRanges* aBuffered, int64_t aStartTime)
|
||||
{
|
||||
if (!mInfo.mHasAudio) {
|
||||
return NS_OK;
|
||||
|
@ -542,7 +536,7 @@ WaveReader::GetNextChunk(uint32_t* aChunk, uint32_t* aChunkSize)
|
|||
|
||||
bool
|
||||
WaveReader::LoadListChunk(uint32_t aChunkSize,
|
||||
nsAutoPtr<HTMLMediaElement::MetadataTags> &aTags)
|
||||
nsAutoPtr<dom::HTMLMediaElement::MetadataTags> &aTags)
|
||||
{
|
||||
// List chunks are always word (two byte) aligned.
|
||||
NS_ABORT_IF_FALSE(mDecoder->GetResource()->Tell() % 2 == 0,
|
||||
|
@ -576,7 +570,7 @@ WaveReader::LoadListChunk(uint32_t aChunkSize,
|
|||
|
||||
const char* const end = chunk.get() + aChunkSize;
|
||||
|
||||
aTags = new HTMLMediaElement::MetadataTags;
|
||||
aTags = new dom::HTMLMediaElement::MetadataTags;
|
||||
|
||||
while (p + 8 < end) {
|
||||
uint32_t id = ReadUint32BE(&p);
|
||||
|
@ -618,7 +612,7 @@ WaveReader::LoadListChunk(uint32_t aChunkSize,
|
|||
}
|
||||
|
||||
bool
|
||||
WaveReader::LoadAllChunks(nsAutoPtr<HTMLMediaElement::MetadataTags> &aTags)
|
||||
WaveReader::LoadAllChunks(nsAutoPtr<dom::HTMLMediaElement::MetadataTags> &aTags)
|
||||
{
|
||||
// Chunks are always word (two byte) aligned.
|
||||
NS_ABORT_IF_FALSE(mDecoder->GetResource()->Tell() % 2 == 0,
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#define WaveReader_h_
|
||||
|
||||
#include "MediaDecoderReader.h"
|
||||
#include "mozilla/dom/HTMLMediaElement.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
#include "AudioBufferSourceNode.h"
|
||||
#include "mozilla/dom/AudioBufferSourceNodeBinding.h"
|
||||
#include "mozilla/dom/AudioParam.h"
|
||||
#include "nsMathUtils.h"
|
||||
#include "AudioNodeEngine.h"
|
||||
#include "AudioNodeStream.h"
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
#include "AudioNode.h"
|
||||
#include "mozilla/ErrorResult.h"
|
||||
#include "AudioNodeStream.h"
|
||||
#include "AudioNodeEngine.h"
|
||||
#include "mozilla/dom/AudioParam.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
|
|
@ -136,7 +136,7 @@ public:
|
|||
virtual nsresult ReadMetadata(VideoInfo* aInfo,
|
||||
MetadataTags** aTags);
|
||||
virtual nsresult Seek(int64_t aTime, int64_t aStartTime, int64_t aEndTime, int64_t aCurrentTime);
|
||||
virtual nsresult GetBuffered(TimeRanges* aBuffered, int64_t aStartTime);
|
||||
virtual nsresult GetBuffered(dom::TimeRanges* aBuffered, int64_t aStartTime);
|
||||
virtual void NotifyDataArrived(const char* aBuffer, uint32_t aLength, int64_t aOffset);
|
||||
|
||||
#ifdef MOZ_DASH
|
||||
|
|
|
@ -3,12 +3,5 @@
|
|||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
include $(topsrcdir)/dom/dom-config.mk
|
||||
|
||||
VPATH += \
|
||||
$(srcdir)/test \
|
||||
$(NULL)
|
||||
|
||||
LOCAL_INCLUDES += $(VPATH:%=-I%)
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
include $(topsrcdir)/ipc/chromium/chromium-config.mk
|
||||
|
|
|
@ -27,7 +27,6 @@ EXPORTS.mozilla.dom += [
|
|||
|
||||
CPP_SOURCES += [
|
||||
'EnableWebSpeechRecognitionCheck.cpp',
|
||||
'FakeSpeechRecognitionService.cpp',
|
||||
'SpeechGrammar.cpp',
|
||||
'SpeechGrammarList.cpp',
|
||||
'SpeechRecognition.cpp',
|
||||
|
@ -38,6 +37,7 @@ CPP_SOURCES += [
|
|||
'endpointer.cc',
|
||||
'energy_endpointer.cc',
|
||||
'energy_endpointer_params.cc',
|
||||
'test/FakeSpeechRecognitionService.cpp',
|
||||
]
|
||||
|
||||
LIBXUL_LIBRARY = True
|
||||
|
|
|
@ -2,8 +2,3 @@
|
|||
# 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/.
|
||||
|
||||
CPP_SOURCES += [
|
||||
'FakeSpeechRecognitionService.cpp',
|
||||
]
|
||||
|
||||
|
|
|
@ -17,7 +17,10 @@
|
|||
#include "mozilla/RefPtr.h"
|
||||
#include "nsIThreadPool.h"
|
||||
#include "nsXPCOMCIDInternal.h"
|
||||
#include "nsComponentManagerUtils.h"
|
||||
#include "mozilla/DebugOnly.h"
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
#include "WMF.h"
|
||||
#include "MediaDecoderReader.h"
|
||||
#include "nsAutoPtr.h"
|
||||
#include "mozilla/RefPtr.h"
|
||||
#include "nsRect.h"
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
#include "nsString.h"
|
||||
#include "nsIObserver.h"
|
||||
#include "nsWeakReference.h"
|
||||
#include "jsapi.h" // nsXBLJSClass derives from JSClass
|
||||
#include "js/Class.h" // nsXBLJSClass derives from JSClass
|
||||
#include "nsTArray.h"
|
||||
|
||||
class nsXBLBinding;
|
||||
|
|
|
@ -763,6 +763,7 @@ nsDocShell::nsDocShell():
|
|||
mInEnsureScriptEnv(false),
|
||||
#endif
|
||||
mAffectPrivateSessionLifetime(true),
|
||||
mDefaultLoadFlags(nsIRequest::LOAD_NORMAL),
|
||||
mFrameType(eFrameTypeRegular),
|
||||
mOwnOrContainingAppId(nsIScriptSecurityManager::UNKNOWN_APP_ID),
|
||||
mParentCharsetSource(0)
|
||||
|
@ -2876,6 +2877,12 @@ nsDocShell::SetDocLoaderParent(nsDocLoader * aParent)
|
|||
SetAllowDNSPrefetch(value);
|
||||
value = parentAsDocShell->GetAffectPrivateSessionLifetime();
|
||||
SetAffectPrivateSessionLifetime(value);
|
||||
uint32_t flags;
|
||||
if (NS_SUCCEEDED(parentAsDocShell->GetDefaultLoadFlags(&flags)))
|
||||
{
|
||||
SetDefaultLoadFlags(flags);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
nsCOMPtr<nsILoadContext> parentAsLoadContext(do_QueryInterface(parent));
|
||||
|
@ -5368,6 +5375,40 @@ nsDocShell::GetSandboxFlags(uint32_t *aSandboxFlags)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDocShell::SetDefaultLoadFlags(uint32_t aDefaultLoadFlags)
|
||||
{
|
||||
mDefaultLoadFlags = aDefaultLoadFlags;
|
||||
|
||||
// Tell the load group to set these flags all requests in the group
|
||||
if (mLoadGroup) {
|
||||
mLoadGroup->SetDefaultLoadFlags(aDefaultLoadFlags);
|
||||
} else {
|
||||
NS_WARNING("nsDocShell::SetDefaultLoadFlags has no loadGroup to propagate the flags to");
|
||||
}
|
||||
|
||||
// Recursively tell all of our children. We *do not* skip
|
||||
// <iframe mozbrowser> children - if someone sticks custom flags in this
|
||||
// docShell then they too get the same flags.
|
||||
nsTObserverArray<nsDocLoader*>::ForwardIterator iter(mChildList);
|
||||
while (iter.HasMore()) {
|
||||
nsCOMPtr<nsIDocShell> docshell = do_QueryObject(iter.GetNext());
|
||||
if (!docshell) {
|
||||
continue;
|
||||
}
|
||||
docshell->SetDefaultLoadFlags(aDefaultLoadFlags);
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDocShell::GetDefaultLoadFlags(uint32_t *aDefaultLoadFlags)
|
||||
{
|
||||
*aDefaultLoadFlags = mDefaultLoadFlags;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDocShell::SetMixedContentChannel(nsIChannel* aMixedContentChannel)
|
||||
{
|
||||
|
@ -7791,6 +7832,9 @@ nsDocShell::RestoreFromHistory()
|
|||
|
||||
bool allowContentRetargeting = childShell->GetAllowContentRetargeting();
|
||||
|
||||
uint32_t defaultLoadFlags;
|
||||
childShell->GetDefaultLoadFlags(&defaultLoadFlags);
|
||||
|
||||
// this.AddChild(child) calls child.SetDocLoaderParent(this), meaning
|
||||
// that the child inherits our state. Among other things, this means
|
||||
// that the child inherits our mIsActive and mInPrivateBrowsing, which
|
||||
|
@ -7805,6 +7849,7 @@ nsDocShell::RestoreFromHistory()
|
|||
childShell->SetAllowMedia(allowMedia);
|
||||
childShell->SetAllowDNSPrefetch(allowDNSPrefetch);
|
||||
childShell->SetAllowContentRetargeting(allowContentRetargeting);
|
||||
childShell->SetDefaultLoadFlags(defaultLoadFlags);
|
||||
|
||||
rv = childShell->BeginRestore(nullptr, false);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
@ -9432,7 +9477,7 @@ nsDocShell::DoURILoad(nsIURI * aURI,
|
|||
uriLoader = do_GetService(NS_URI_LOADER_CONTRACTID, &rv);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
nsLoadFlags loadFlags = nsIRequest::LOAD_NORMAL;
|
||||
nsLoadFlags loadFlags = mDefaultLoadFlags;
|
||||
if (aFirstParty) {
|
||||
// tag first party URL loads
|
||||
loadFlags |= nsIChannel::LOAD_INITIAL_DOCUMENT_URI;
|
||||
|
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче