Compare commits

..
Author SHA1 Message Date
Moonchild 9edf1b7bea Issue #1896 - Port GetNativePath changes from GRE. 2022-05-09 22:38:16 +00:00
5753 changed files with 392979 additions and 664568 deletions

No files matched your search

+1 -1
View File
@@ -22,4 +22,4 @@
# changes to stick? As of bug 928195, this shouldn't be necessary! Please
# don't change CLOBBER for WebIDL changes any more.
Issue #1971 - Update to ICU 63 requires clobber
Clobber for NSS update
+38 -2
View File
@@ -137,10 +137,16 @@ default:: $(BUILD_BACKEND_FILES)
endif
install_manifests := \
$(addprefix dist/,branding bin idl include public private sdk xpi-stage) \
$(addprefix dist/,branding idl include public private sdk xpi-stage) \
_tests \
$(NULL)
# Skip the dist/bin install manifest when using the hybrid
# FasterMake/RecursiveMake backend. This is a hack until bug 1241744 moves
# xpidl handling to FasterMake in that case, mechanically making the dist/bin
# install manifest non-existent (non-existent manifests being skipped)
ifeq (,$(filter FasterMake+RecursiveMake,$(BUILD_BACKENDS)))
install_manifests += dist/bin
endif
install_manifest_depends = \
CLOBBER \
$(configure_dir)/configure \
@@ -160,6 +166,27 @@ endif
.PHONY: install-manifests
install-manifests: $(addprefix install-,$(install_manifests))
# If we're using the hybrid FasterMake/RecursiveMake backend, we want
# to recurse in the faster/ directory in parallel of install manifests.
# But dist/idl needs to happen before (cf. dependencies in
# config/faster/rules.mk)
ifneq (,$(filter FasterMake+RecursiveMake,$(BUILD_BACKENDS)))
install-manifests: faster
.PHONY: faster
faster: install-dist/idl
$(MAKE) -C faster FASTER_RECURSIVE_MAKE=1
endif
.PHONY: tup
tup:
$(call BUILDSTATUS,TIERS make tup)
$(call BUILDSTATUS,TIER_START make)
$(MAKE) install-manifests buildid.h source-repo.h
$(call BUILDSTATUS,TIER_FINISH make)
$(call BUILDSTATUS,TIER_START tup)
@$(TUP) $(if $(findstring s,$(filter-out --%,$(MAKEFLAGS))),,--verbose)
$(call BUILDSTATUS,TIER_FINISH tup)
# process_install_manifest needs to be invoked with --no-remove when building
# js as standalone because automated builds are building nspr separately and
# that would remove the resulting files.
@@ -171,8 +198,17 @@ endif
.PHONY: $(addprefix install-,$(subst /,_,$(install_manifests)))
$(addprefix install-,$(install_manifests)): install-%: $(install_manifest_depends)
ifneq (,$(filter FasterMake+RecursiveMake,$(BUILD_BACKENDS)))
@# If we're using the hybrid FasterMake/RecursiveMake backend, we want
@# to ensure the FasterMake end doesn't have install manifests for the
@# same directory, because that would blow up
$(if $(wildcard _build_manifests/install/$(subst /,_,$*)),$(if $(wildcard faster/install_$(subst /,_,$*)*),$(error FasterMake and RecursiveMake ends of the hybrid build system want to handle $*)))
endif
$(addprefix $(call py_action,process_install_manifest,$(if $(NO_REMOVE),--no-remove )$*) ,$(wildcard _build_manifests/install/$(subst /,_,$*)))
# Dummy wrapper rule to allow the faster backend to piggy back
$(addprefix install-,$(subst /,_,$(filter dist/%,$(install_manifests)))): install-dist_%: install-dist/% ;
.PHONY: install-tests
install-tests: install-test-files
Vendored
+1
View File
@@ -25,6 +25,7 @@ builtin(include, build/autoconf/zlib.m4)dnl
builtin(include, build/autoconf/icu.m4)dnl
builtin(include, build/autoconf/clang-plugin.m4)dnl
builtin(include, build/autoconf/alloc.m4)dnl
builtin(include, build/autoconf/ios.m4)dnl
builtin(include, build/autoconf/sanitize.m4)dnl
MOZ_PROG_CHECKMSYS()
+129
View File
@@ -0,0 +1,129 @@
import java.util.regex.Pattern
allprojects {
// Expose the per-object-directory configuration to all projects.
ext {
mozconfig = gradle.mozconfig
topsrcdir = gradle.mozconfig.topsrcdir
topobjdir = gradle.mozconfig.topobjdir
}
repositories {
if (gradle.mozconfig.substs.GRADLE_MAVEN_REPOSITORY) {
maven {
url gradle.mozconfig.substs.GRADLE_MAVEN_REPOSITORY
}
}
}
}
buildDir "${topobjdir}/gradle/build"
buildscript {
repositories {
if (gradle.mozconfig.substs.GRADLE_MAVEN_REPOSITORY) {
maven {
url gradle.mozconfig.substs.GRADLE_MAVEN_REPOSITORY
}
}
// For android-sdk-manager SNAPSHOT releases.
maven {
url "file://${gradle.mozconfig.topsrcdir}/mobile/android/gradle/m2repo"
}
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.3'
classpath('com.stanfy.spoon:spoon-gradle-plugin:1.0.4') {
// Without these, we get errors linting.
exclude module: 'guava'
}
// Provided in tree.
classpath 'com.jakewharton.sdkmanager:gradle-plugin:1.5.0-SNAPSHOT'
}
}
task generateCodeAndResources(type:Exec) {
workingDir "${topobjdir}"
commandLine mozconfig.substs.GMAKE
args '-C'
args "${topobjdir}/mobile/android/base"
args 'gradle-targets'
// Only show the output if something went wrong.
ignoreExitValue = true
standardOutput = new ByteArrayOutputStream()
errorOutput = standardOutput
doLast {
if (execResult.exitValue != 0) {
throw new GradleException("Process '${commandLine}' finished with non-zero exit value ${execResult.exitValue}:\n\n${standardOutput.toString()}")
}
}
}
// Skip unit test for all build variants, unless if it was specifically requested by user.
// The enabled property for the unit test tasks is reset based on the command line task names just before the task execution.
// I bet there is a easier/cleaner way to do this, but this gets the job done for now.
Pattern pattern = Pattern.compile('.*test(.+UnitTest)?.*')
boolean startTasksIncludeTest = gradle.startParameter.taskNames.any {
taskName ->
taskName.matches(pattern)
}
gradle.taskGraph.beforeTask {
Task task ->
if (task.name.matches(pattern)) {
task.enabled = startTasksIncludeTest
}
}
afterEvaluate {
subprojects {
if (!hasProperty('android')) {
return
}
android.applicationVariants.all {
preBuild.dependsOn rootProject.generateCodeAndResources
}
android.libraryVariants.all {
preBuild.dependsOn rootProject.generateCodeAndResources
}
}
}
apply plugin: 'idea'
idea {
project {
languageLevel = '1.7'
}
module {
// Object directories take a huge amount of time for IntelliJ to index.
// Exclude them. Convention is that object directories start with obj.
// IntelliJ is clever and will not exclude the parts of the object
// directory that are referenced, if there are any. In practice,
// indexing the entirety of the tree is taking too long, so exclude all
// but mobile/.
def topsrcdirURI = file(topsrcdir).toURI()
excludeDirs += files(file(topsrcdir)
.listFiles({it.isDirectory()} as FileFilter)
.collect({topsrcdirURI.relativize(it.toURI()).toString()}) // Relative paths.
.findAll({!it.equals('mobile/')}))
// If topobjdir is below topsrcdir, hide only some portions of that tree.
def topobjdirURI = file(topobjdir).toURI()
if (!topsrcdirURI.relativize(topobjdirURI).isAbsolute()) {
excludeDirs -= file(topobjdir)
excludeDirs += files(file(topobjdir).listFiles())
excludeDirs -= file("${topobjdir}/gradle")
}
if (!mozconfig.substs.MOZ_INSTALL_TRACKING) {
excludeDirs += file("${topsrcdir}/mobile/android/thirdparty/com/adjust")
}
}
}
task wrapper(type: Wrapper) {
}
+108
View File
@@ -0,0 +1,108 @@
dnl This Source Code Form is subject to the terms of the Mozilla Public
dnl License, v. 2.0. If a copy of the MPL was not distributed with this
dnl file, You can obtain one at http://mozilla.org/MPL/2.0/.
AC_DEFUN([MOZ_IOS_PATH_PROG],
[
changequote({,})
_prog_name=ifelse($2, {}, `echo $1 | tr "[:upper:]" "[:lower:]"`, $2)
changequote([,])
AC_CACHE_CHECK([for $_prog_name in iOS SDK],
ac_cv_ios_path_$1,
[
_path=`xcrun --sdk $ios_sdk --find $_prog_name 2>/dev/null`
_res=$?
if test $_res -ne 0; then
AC_MSG_ERROR([Could not find '$_prog_name' in the iOS SDK])
fi
ac_cv_ios_path_$1=$_path
])
$1="${ac_cv_ios_path_$1}$3"
])
AC_DEFUN([MOZ_IOS_SDK],
[
MOZ_ARG_WITH_STRING(ios-sdk,
[ --with-ios-sdk=TYPE
Type of iOS SDK to use (iphonesimulator, iphoneos)
and optionally version (like iphoneos8.2)],
ios_sdk=$withval)
MOZ_ARG_ENABLE_STRING(ios-target,
[ --enable-ios-target=VER (default=8.0)
Set the minimum iOS version needed at runtime],
[_IOS_TARGET=$enableval])
_IOS_TARGET_DEFAULT=8.0
case "$target" in
arm*-apple-darwin*)
if test -z "$ios_sdk" -o "$ios_sdk" = "yes"; then
ios_sdk=iphoneos
fi
case "$ios_sdk" in
iphoneos*)
ios_target_arg="-miphoneos-version-min"
;;
*)
AC_MSG_ERROR([Only 'iphoneos' SDKs are valid when targeting iOS device, don't know what to do with '$ios_sdk'.])
;;
esac
;;
*-apple-darwin*)
ios_target_arg="-mios-simulator-version-min"
case "$ios_sdk" in
# Empty SDK is okay, this might be an OS X desktop build.
""|iphonesimulator*)
;;
# Default to iphonesimulator
yes)
ios_sdk=iphonesimulator
;;
*)
AC_MSG_ERROR([Only 'iphonesimulator' SDKs are valid when targeting iOS simulator.])
;;
esac
;;
esac
if test -n "$ios_sdk"; then
if test -z "$_IOS_TARGET"; then
_IOS_TARGET=$_IOS_TARGET_DEFAULT
ios_target_arg="${ios_target_arg}=${_IOS_TARGET}"
fi
# Ensure that xcrun knows where this SDK is.
ios_sdk_path=`xcrun --sdk $ios_sdk --show-sdk-path 2>/dev/null`
_ret=$?
if test $_ret -ne 0; then
AC_MSG_ERROR([iOS SDK '$ios_sdk' could not be found.])
fi
MOZ_IOS=1
export HOST_CC=clang
export HOST_CXX=clang++
# Add isysroot, arch, and ios target arguments
case "$target_cpu" in
arm*)
ARGS="-arch armv7"
;;
*)
# Unfortunately simulator builds need this.
export CROSS_COMPILE=1
;;
esac
ARGS=" $ARGS -isysroot $ios_sdk_path $ios_target_arg"
# Now find our tools
MOZ_IOS_PATH_PROG(CC, clang, $ARGS)
MOZ_IOS_PATH_PROG(CXX, clang++, $ARGS)
export CPP="$CC -E"
export LD="$CXX"
MOZ_IOS_PATH_PROG(AR)
MOZ_IOS_PATH_PROG(AS, as, $ARGS)
MOZ_IOS_PATH_PROG(OTOOL)
MOZ_IOS_PATH_PROG(STRIP)
export PKG_CONFIG_PATH=${ios_sdk_path}/usr/lib/pkgconfig/
fi
AC_SUBST(MOZ_IOS)
])
-3
View File
@@ -27,9 +27,6 @@ fi
if test "`echo | $AS -o conftest.out -v 2>&1 | grep -c GNU`" != "0"; then
GNU_AS=1
fi
if test "`echo | $AS -o conftest.out -v 2>&1 | grep -c Apple`" != "0"; then
GNU_AS=1
fi
rm -f conftest.out
if test "`echo | $LD -v 2>&1 | grep -c GNU`" != "0"; then
GNU_LD=1
+58
View File
@@ -0,0 +1,58 @@
# 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/.
# Imports
from __future__ import print_function, unicode_literals
import os
import sys
# Sanity check
if not len(sys.argv) > 1:
print("Incorrect number of arguments")
sys.exit(1)
# Vars
listConfigure = sys.argv[1:]
listConfig = []
strBrandingDirectory = ""
listViolations = []
# Build a list of set configure variables
for _value in listConfigure:
_splitString = _value.split("=")
if _splitString[1] == "1":
listConfig += [ _splitString[0] ]
elif _splitString[0] == "MOZ_BRANDING_DIRECTORY":
strBrandingDirectory = _splitString[1]
# Only applies if using Official Branding or specific branding directories
if ('MOZ_OFFICIAL_BRANDING' in listConfig) or (strBrandingDirectory.endswith("branding/official")) or (strBrandingDirectory.endswith("branding/unstable")):
# Applies to Pale Moon and Basilisk
if ('MC_BASILISK' in listConfig) or ('MC_PALEMOON' in listConfig):
listViolations += [
'MOZ_SYSTEM_JPEG',
'MOZ_SYSTEM_ZLIB',
'MOZ_SYSTEM_BZ2',
'MOZ_SYSTEM_JEMALLOC'
]
# Applies to Pale Moon Only
if 'MC_PALEMOON' in listConfig:
listViolations += [
'MOZ_EME',
'MOZ_WEBRTC'
]
# Iterate through enabled violations and output 1 to DIRECTIVE4 if any are found
for _value in listViolations:
if _value in listConfig:
sys.stdout.write("1")
sys.exit(1)
# Exit outputting nothing to DIRECTIVE4 being empty because there are no violations
sys.exit(0)
+54
View File
@@ -0,0 +1,54 @@
.. _build_cppeclipse:
=====================
Cpp Eclipse Projects
=====================
For additional information on using Eclipse CDT see
`the MDN page
<https://developer.mozilla.org/en-US/docs/Eclipse_CDT>`_.
The build system contains alpha support for generating C++ Eclipse
project files to aid with development.
Please report bugs to bugzilla and make them depend on bug 973770.
To generate a C++ Eclipse project files, you'll need to have a fully
built tree::
mach build
Then, simply generate the Eclipse build backend::
mach build-backend -b CppEclipse
If all goes well, the path to the generated workspace should be
printed.
To use the generated Eclipse project files, you'll need to
have a Eclipse CDT 8.3 (We plan to follow the latest Eclipse release)
`Eclipse CDT plugin
<https://www.eclipse.org/cdt/>`_
installed. You can then import all the projects into Eclipse using
*File > Import ... > General > Existing Projects into Workspace*
-only- if you have not ran the background indexer.
Updating Project Files
======================
As you pull and update the source tree, your C++ Eclipse files may
fall out of sync with the build configuration. The tree should still
build fine from within Eclipse, but source files may be missing and in
rare circumstances Eclipse's index may not have the proper build
configuration.
To account for this, you'll want to periodically regenerate the
Eclipse project files. You can do this by running ``mach build
&& mach build-backend -b CppEclipse`` from the
command line.
Currently, regeneration rewrites the original project files. **If
you've made any customizations to the projects, they will likely get
overwritten.** We would like to improve this user experience in the
future.
+8
View File
@@ -28,6 +28,14 @@ Important Concepts
locales
rust
integrated development environment (IDE)
========================================
.. toctree::
:maxdepth: 1
cppeclipse
visualstudio
mozbuild
========
+21 -21
View File
@@ -5,44 +5,41 @@ Supported Configurations
========================
This page attempts to document supported build configurations.
For more up-to-date information please go to http://developer.palemoon.org/
Windows
=======
We support building on Windows 7 and newer operating systems using
Visual Studio 2015 U3.
We support building on Windows XP and newer operating systems using
Visual Studio 2010 and newer.
The following are not fully supported (but may work):
The following are not fully supported by Mozilla (but may work):
* Building with a *MozillaBuild* Windows development
environment not mentioned on the developer documentation site.
* Building without the latest *MozillaBuild* Windows development
environment
* Building with Mingw or any other non-Visual Studio toolchain.
OS X
====
(This section needs updating)
We support building on OS X 10.8 and newer with the OS X 10.8 SDK.
We support building on OS X 10.6 and newer with the OS X 10.6 SDK.
The tree should build with the following OS X releases and SDK versions:
* 10.6 Snow Leopard
* 10.7 Lion
* 10.8 Mountain Lion
* 10.9 Mavericks
* 10.10 Yosemite
* 10.11 El Capitan
* 10.12 Sierra
* 10.13 High Sierra
* 10.14 Mojave
* 10.15 Catalina
* 11 Big Sur (Including Apple ARM SoC)
The tree requires building with Apple's Clang 4.2 that ships with Xcode.
This corresponds to Xcode 4.6 and newer. Xcode 4.6 only runs on OS X 10.7.4
and newer.
The tree requires building with Clang 3.3 and newer. This corresponds to
version of 4.2 of Apple's Clang that ships with Xcode. This corresponds
to Xcode 4.6 and newer. Xcode 4.6 only runs on OS X 10.7.4 and newer.
So, OS X 10.6 users will need to install a non-Apple toolchain. Running
``mach bootstrap`` should install an appropriate toolchain from Homebrew
or MacPorts automatically.
The tree should build with GCC 7.1 and newer on OS X. However, this
The tree should build with GCC 4.4 and newer on OS X. However, this
build configuration isn't as widely used (and differs from what Mozilla
uses to produce OS X builds).
uses to produce OS X builds), so it's recommended to stick with Clang.
Linux
=====
@@ -50,6 +47,9 @@ Linux
Linux 2.6 and later kernels are supported.
Most distributions are supported as long as the proper package
dependencies are in place. ``configure`` will typically
dependencies are in place. Running ``mach bootstrap`` should install
packages for popular Linux distributions. ``configure`` will typically
detect missing dependencies and inform you how to disable features to
work around unsatisfied dependencies.
Clang 3.3 or GCC 4.4 is required to build the tree.
+100
View File
@@ -0,0 +1,100 @@
.. _build_visualstudio:
======================
Visual Studio Projects
======================
The build system contains alpha support for generating Visual Studio
project files to aid with development.
To generate Visual Studio project files, you'll need to have a configured tree::
mach configure
(If you have built recently, your tree is already configured.)
Then, simply generate the Visual Studio build backend::
mach build-backend -b VisualStudio
If all goes well, the path to the generated Solution (``.sln``) file should be
printed. You should be able to open that solution with Visual Studio 2010 or
newer.
Currently, output is hard-coded to the Visual Studio 2010 format. If you open
the solution in a newer Visual Studio release, you will be prompted to upgrade
projects. Simply click through the wizard to do that.
Structure of Solution
=====================
The Visual Studio solution consists of hundreds of projects spanning thousands
of files. To help with organization, the solution is divided into the following
trees/folders:
Build Targets
This folder contains common build targets. The *full* project is used to
perform a full build. The *binaries* project is used to build just binaries.
The *visual-studio* project can be built to regenerate the Visual Studio
project files.
Performing the *clean* action on any of these targets will clean the
*entire* build output.
Binaries
This folder contains common binaries that can be executed from within
Visual Studio. If you are building the Firefox desktop application,
the *firefox* project will launch firefox.exe. You probably want one of
these set to your startup project.
Libraries
This folder contains entries for each static library that is produced as
part of the build. These roughly correspond to each directory in the tree
containing C/C++. e.g. code from ``dom/base`` will be contained in the
``dom_base`` project.
These projects don't do anything when built. If you build a project here,
the *binaries* build target project is built.
Updating Project Files
======================
As you pull and update the source tree, your Visual Studio files may fall out
of sync with the build configuration. The tree should still build fine from
within Visual Studio. But source files may be missing and IntelliSense may not
have the proper build configuration.
To account for this, you'll want to periodically regenerate the Visual Studio
project files. You can do this within Visual Studio by building the
``Build Targets :: visual-studio`` project or by running
``mach build-backend -b VisualStudio`` from the command line.
Currently, regeneration rewrites the original project files. **If you've made
any customizations to the solution or projects, they will likely get
overwritten.** We would like to improve this user experience in the
future.
Moving Project Files Around
===========================
The produced Visual Studio solution and project files should be portable.
If you want to move them to a non-default directory, they should continue
to work from wherever they are. If they don't, please file a bug.
Invoking mach through Visual Studio
===================================
It's possible to build the tree via Visual Studio. There is some light magic
involved here.
Alongside the Visual Studio project files is a batch script named ``mach.bat``.
This batch script sets the environment variables present in your *MozillaBuild*
development environment at the time of Visual Studio project generation
and invokes *mach* inside an msys shell with the arguments specified to the
batch script. This script essentially allows you to invoke mach commands
inside the MozillaBuild environment without having to load MozillaBuild.
While projects currently only utilize the ``mach build`` command, the batch
script does not limit it's use: any mach command can be invoked. Developers
may abuse this fact to add custom projects and commands that invoke other
mach commands.
+1 -1
View File
@@ -16,7 +16,7 @@ if os == 'WINNT':
flavors = {
'WINNT': 'win',
'Linux': 'linux',
'Darwin': 'mac',
'Darwin': 'mac' if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa' else 'ios',
'SunOS': 'solaris',
'GNU/kFreeBSD': 'freebsd',
'DragonFly': 'dragonfly',
+1
View File
@@ -100,6 +100,7 @@ MACH_MODULES = [
'python/mach/mach/commands/settings.py',
'python/compare-locales/mach_commands.py',
'python/mozbuild/mozbuild/mach_commands.py',
'python/mozbuild/mozbuild/backend/mach_commands.py',
'python/mozbuild/mozbuild/compilation/codecomplete.py',
'python/mozbuild/mozbuild/frontend/mach_commands.py',
'services/common/tests/mach_commands.py',
+7
View File
@@ -97,3 +97,10 @@ if CONFIG['MOZ_VALGRIND']:
'valgrind/i386-redhat-linux-gnu.sup',
'valgrind/x86_64-redhat-linux-gnu.sup',
]
if CONFIG['MOZ_ARTIFACT_BUILDS']:
# Ensure a pre-built interfaces.xpt installed to the objdir by the artifact
# code is included by the top-level chrome.manifest.
EXTRA_COMPONENTS += [
'prebuilt-interfaces.manifest',
]
+7
View File
@@ -321,6 +321,9 @@ def split_triplet(triplet):
elif os.startswith('darwin'):
canonical_kernel = 'Darwin'
canonical_os = 'OSX'
elif os.startswith('ios'):
canonical_kernel = 'Darwin'
canonical_os = 'iOS'
elif os.startswith('dragonfly'):
canonical_os = canonical_kernel = 'DragonFly'
elif os.startswith('freebsd'):
@@ -452,6 +455,10 @@ add_old_configure_arg(host_for_old_configure)
@depends(host, target)
def target_for_old_configure(host, target):
target_alias = target.alias
# old-configure does plenty of tests against $target and $target_os
# and expects darwin for iOS, so make it happy.
if target.os == 'iOS':
target_alias = target_alias.replace('-ios', '-darwin')
return '--target=%s' % target_alias
add_old_configure_arg(target_for_old_configure)
+38 -46
View File
@@ -383,65 +383,57 @@ def check_compiler(compiler, language, target):
)
@imports(_from='__builtin__', _import='open')
@imports('json')
@imports('subprocess')
@imports('sys')
def get_vc_paths(topsrcdir):
def vswhere(args):
encoding = 'mbcs' if sys.platform == 'win32' else 'utf-8'
return json.loads(subprocess.check_output([os.path.join(topsrcdir, 'build/win32/vswhere.exe'), '-format', 'json'] + args).decode(encoding, 'replace'))
# Can't pass -requires with -legacy, so query each separately.
# Legacy versions first (VS2015)
for install in vswhere(['-legacy', '-version', '[14.0,15.0)']):
version = Version(install['installationVersion'])
# Skip anything older than VS2015.
if version < '14':
continue
path = install['installationPath']
yield (Version(install['installationVersion']), {
'x64': [os.path.join(path, r'VC\bin\amd64')],
# The x64->x86 cross toolchain requires DLLs from the native x64 toolchain.
'x86': [os.path.join(path, r'VC\bin\amd64_x86'), os.path.join (path, r'VC\bin\amd64')],
})
# Then VS2017 and newer.
for install in vswhere(['-requires', 'Microsoft.VisualStudio.Component.VC.Tools.x86.x64']):
path = install['installationPath']
tools_version = open(os.path.join(path, r'VC\Auxiliary\Build\Microsoft.VCToolsVersion.default.txt'), 'rb').read().strip()
tools_path = os.path.join(path, r'VC\Tools\MSVC', tools_version, r'bin\HostX64')
yield (Version(install['installationVersion']), {
'x64': [os.path.join(tools_path, 'x64')],
# The x64->x86 cross toolchain requires DLLs from the native x64 toolchain.
'x86': [os.path.join(tools_path, 'x86'), os.path.join(tools_path, 'x64')],
})
@depends(host, target, check_build_environment)
@imports(_from='collections', _import='defaultdict')
@imports(_from='__builtin__', _import='sorted')
@imports(_from='operator', _import='itemgetter')
def get_vc_paths(base):
vc = defaultdict(lambda: defaultdict(dict))
subkey = r'Microsoft\VisualStudio\VC\*\*\*\Compiler'
for v, h, t, p in get_registry_values(base + '\\' + subkey):
vc[v][h][t] = p
if not vc:
return
version, data = sorted(vc.iteritems(), key=lambda x: Version(x[0]))[-1]
return data
@depends(host)
@imports('platform')
def vc_compiler_path(host, target, env):
def vc_compiler_path(host):
if host.kernel != 'WINNT':
return
vc_host = {
'x86': 'x86',
'AMD64': 'x64',
}.get(platform.machine())
if vc_host is None:
return
vc_target = {
'x86': 'x86',
'x86_64': 'x64',
'arm': 'arm',
}.get(target.cpu)
}.get(host.cpu)
if vc_target is None:
return
all_versions = sorted(get_vc_paths(env.topsrcdir), key=itemgetter(0))
if not all_versions:
base_key = r'HKEY_LOCAL_MACHINE\SOFTWARE'
data = get_vc_paths(base_key)
if not data:
data = get_vc_paths(base_key + r'\Wow6432Node')
if not data:
return
# Choose the newest version.
data = all_versions[-1][1]
paths = data.get(vc_target)
if not paths:
path = data.get(vc_host, {}).get(vc_target)
if not path and vc_host == 'x64':
vc_host = 'x86'
path = data.get(vc_host, {}).get(vc_target)
if not path:
return
return paths
path = os.path.dirname(path)
if vc_host != vc_target:
other_path = data.get(vc_host, {}).get(vc_host)
if other_path:
return (path, os.path.dirname(other_path))
return (path,)
@depends(vc_compiler_path)
+19 -32
View File
@@ -261,17 +261,13 @@ def vc_path(c_compiler):
break
return result
@depends_win(vc_path, c_compiler)
@depends_win(vc_path)
@checking('for the Debug Interface Access SDK', lambda x: x or 'not found')
@imports(_from='os.path', _import='isdir')
def dia_sdk_dir(vc_path, c_compiler):
def dia_sdk_dir(vc_path):
if vc_path:
if c_compiler.version < '19.10':
path = os.path.join(os.path.dirname(vc_path), 'DIA SDK')
else:
# This would be easier if we had the installationPath that
# get_vc_paths works with, since 'DIA SDK' is relative to that.
path = os.path.normpath(os.path.join(vc_path, r'..\..\..\..\DIA SDK'))
path = os.path.join(os.path.dirname(vc_path), 'DIA SDK')
if isdir(path):
return path
@@ -313,36 +309,29 @@ def include_path(vc_path, windows_sdk_dir, ucrt_sdk_dir, dia_sdk_dir):
set_config('INCLUDE', include_path)
@depends_win(target, c_compiler, vc_path, valid_windows_sdk_dir, valid_ucrt_sdk_dir, dia_sdk_dir)
@depends_win(target, vc_path, valid_windows_sdk_dir, valid_ucrt_sdk_dir, dia_sdk_dir)
@imports('os')
def lib_path(target, c_compiler, vc_path, windows_sdk_dir, ucrt_sdk_dir, dia_sdk_dir):
def lib_path(target, vc_path, windows_sdk_dir, ucrt_sdk_dir, dia_sdk_dir):
if not vc_path:
return
vc_target = {
'x86': '',
'x86_64': 'amd64',
'arm': 'arm',
}.get(target.cpu)
if vc_target is None:
return
# As vc_target can be '', and os.path.join will happily use the empty
# string, leading to a string ending with a backslash, that Make will
# interpret as a "string continues on next line" indicator, use variable
# args.
vc_target = (vc_target,) if vc_target else ()
sdk_target = {
'x86': 'x86',
'x86_64': 'x64',
'arm': 'arm',
}.get(target.cpu)
old_target = {
'x86': '',
'x86_64': 'amd64',
'arm': 'arm',
}.get(target.cpu)
if old_target is None:
return
# As old_target can be '', and os.path.join will happily use the empty
# string, leading to a string ending with a backslash, that Make will
# interpret as a "string continues on next line" indicator, use variable
# args.
old_target = (old_target,) if old_target else ()
if c_compiler.version < '19.10':
# MSVC2015
vc_target = old_target
else:
# MSVC2017 switched to use the same target naming as the sdk.
vc_target = (sdk_target,)
atlmfc_dir = os.path.join(vc_path, 'atlmfc', 'lib', *vc_target)
if not os.path.isdir(atlmfc_dir):
die('Cannot find the ATL/MFC libraries in the Visual C++ directory (%s). '
@@ -360,9 +349,7 @@ def lib_path(target, c_compiler, vc_path, windows_sdk_dir, ucrt_sdk_dir, dia_sdk
os.path.join(ucrt_sdk_dir.lib, 'ucrt', sdk_target),
))
if dia_sdk_dir:
# For some reason the DIA SDK still uses the old-style targets
# even in a newer MSVC.
libs.append(os.path.join(dia_sdk_dir, 'lib', *old_target))
libs.append(os.path.join(dia_sdk_dir, 'lib', *vc_target))
# Set in the environment for old-configure
libs = os.pathsep.join(libs)
os.environ['LIB'] = libs
Binary file not shown.
@@ -58,6 +58,7 @@ const URLs = new Map([
["data:text/html,Hi", true, false, true],
["view-source:data:text/html,Hi", false, false, true],
["javascript:alert('hi')", true, false, true],
["moz://a", false, false, true],
["about:test-chrome-privs", false, false, true],
["about:test-unknown-unlinkable", false, false, true],
["about:test-content-unlinkable", false, false, true],
@@ -79,6 +80,7 @@ const URLs = new Map([
["data:text/html,Hi", true, false, true],
["view-source:data:text/html,Hi", false, false, true],
["javascript:alert('hi')", true, false, true],
["moz://a", false, false, true],
["about:test-chrome-privs", false, false, true],
["about:test-unknown-unlinkable", false, false, true],
["about:test-content-unlinkable", false, false, true],
@@ -100,6 +102,7 @@ const URLs = new Map([
["data:text/html,Hi", true, false, true],
["view-source:data:text/html,Hi", true, false, true],
["javascript:alert('hi')", true, false, true],
["moz://a", false, false, true],
["about:test-chrome-privs", false, false, true],
["about:test-unknown-unlinkable", false, false, true],
["about:test-content-unlinkable", false, false, true],
+1 -1
View File
@@ -160,7 +160,7 @@ nsChromeProtocolHandler::NewChannel2(nsIURI* aURI,
file->Exists(&exists);
if (!exists) {
nsAutoCString path;
file->GetNativePath(path);
file->GetPersistentDescriptor(path);
printf("Chrome file doesn't exist: %s\n", path.get());
}
}
+1 -1
View File
@@ -45,7 +45,7 @@ endif # WINNT
ifndef INCLUDED_AUTOCONF_MK
default::
else
TIERS := pre-export export $(if $(COMPILE_ENVIRONMENT),compile )misc libs tools
TIERS := $(if $(MOZ_ARTIFACT_BUILDS),artifact )pre-export export $(if $(COMPILE_ENVIRONMENT),compile )misc libs tools
endif
# These defines are used to support the twin-topsrcdir model for comm-central.
+1 -3
View File
@@ -86,14 +86,12 @@ included_inclnames_to_ignore = set([
'unicode/ucol.h', # ICU
'unicode/udat.h', # ICU
'unicode/udatpg.h', # ICU
'unicode/udisplaycontext.h',# ICU
'unicode/uenum.h', # ICU
'unicode/uniset.h', # ICU
'unicode/unorm2.h', # ICU
'unicode/unorm.h', # ICU
'unicode/unum.h', # ICU
'unicode/unumsys.h', # ICU
'unicode/upluralrules.h', # ICU
'unicode/ureldatefmt.h', # ICU
'unicode/ustring.h', # ICU
'unicode/utypes.h', # ICU
'vtune/VTuneWrapper.h' # VTune
+2 -14
View File
@@ -377,20 +377,8 @@ endif # WINNT
ifdef _MSC_VER
ifeq ($(CPU_ARCH),x86_64)
# Normal operation on 64-bit Windows needs 2 MB of stack. (Bug 582910)
# ASAN requires 6 MB of stack.
# Setting the stack to 8 MB to match the capability of other systems
# to deal with frame construction for unreasonably deep DOM trees
# with worst-case styling. This uses address space unnecessarily for
# non-main threads, but that should be tolerable on 64-bit systems.
WIN32_EXE_LDFLAGS += -STACK:8388608
else
# Since this setting affects the default stack size for non-main
# threads, too, to avoid burning the address space, increase only
# 512 KB over the default. Just enough to be able to deal with
# reasonable styling applied to DOM trees whose depth is near what
# Blink's HTML parser can output.
WIN32_EXE_LDFLAGS += -STACK:1572864
# set stack to 2MB on x64 build. See bug 582910
WIN32_EXE_LDFLAGS += -STACK:2097152
endif
endif
-2
View File
@@ -121,8 +121,6 @@ else:
DEFINES['SYMBOL_UNDERSCORE'] = True
else:
ffi_srcs = ('ffi.c', 'darwin.S', 'ffi64.c', 'darwin64.S')
elif CONFIG['FFI_TARGET'] == 'AARCH64_DARWIN':
ffi_srcs = ('sysv.S', 'ffi.c')
SOURCES += [
'/js/src/ctypes/libffi/src/%s/%s' % (CONFIG['FFI_TARGET_DIR'], s)
+52 -63
View File
@@ -4,28 +4,26 @@ SOURCES += [
'/intl/icu/source/common/bmpset.cpp',
'/intl/icu/source/common/brkeng.cpp',
'/intl/icu/source/common/brkiter.cpp',
'/intl/icu/source/common/bytesinkutil.cpp',
'/intl/icu/source/common/bytestream.cpp',
'/intl/icu/source/common/bytestrie.cpp',
'/intl/icu/source/common/bytestriebuilder.cpp',
'/intl/icu/source/common/bytestrieiterator.cpp',
'/intl/icu/source/common/caniter.cpp',
'/intl/icu/source/common/characterproperties.cpp',
'/intl/icu/source/common/chariter.cpp',
'/intl/icu/source/common/charstr.cpp',
'/intl/icu/source/common/cmemory.cpp',
'/intl/icu/source/common/cmemory.c',
'/intl/icu/source/common/cstr.cpp',
'/intl/icu/source/common/cstring.cpp',
'/intl/icu/source/common/cwchar.cpp',
'/intl/icu/source/common/cstring.c',
'/intl/icu/source/common/cwchar.c',
'/intl/icu/source/common/dictbe.cpp',
'/intl/icu/source/common/dictionarydata.cpp',
'/intl/icu/source/common/dtintrv.cpp',
'/intl/icu/source/common/edits.cpp',
'/intl/icu/source/common/errorcode.cpp',
'/intl/icu/source/common/filteredbrk.cpp',
'/intl/icu/source/common/filterednormalizer2.cpp',
'/intl/icu/source/common/icudataver.cpp',
'/intl/icu/source/common/icudataver.c',
'/intl/icu/source/common/icuplug.cpp',
'/intl/icu/source/common/listformatter.cpp',
'/intl/icu/source/common/loadednormalizer2impl.cpp',
'/intl/icu/source/common/locavailable.cpp',
'/intl/icu/source/common/locbased.cpp',
@@ -33,7 +31,7 @@ SOURCES += [
'/intl/icu/source/common/locdspnm.cpp',
'/intl/icu/source/common/locid.cpp',
'/intl/icu/source/common/loclikely.cpp',
'/intl/icu/source/common/locmap.cpp',
'/intl/icu/source/common/locmap.c',
'/intl/icu/source/common/locresdata.cpp',
'/intl/icu/source/common/locutil.cpp',
'/intl/icu/source/common/messagepattern.cpp',
@@ -44,11 +42,10 @@ SOURCES += [
'/intl/icu/source/common/patternprops.cpp',
'/intl/icu/source/common/pluralmap.cpp',
'/intl/icu/source/common/propname.cpp',
'/intl/icu/source/common/propsvec.cpp',
'/intl/icu/source/common/propsvec.c',
'/intl/icu/source/common/punycode.cpp',
'/intl/icu/source/common/putil.cpp',
'/intl/icu/source/common/rbbi.cpp',
'/intl/icu/source/common/rbbi_cache.cpp',
'/intl/icu/source/common/rbbidata.cpp',
'/intl/icu/source/common/rbbinode.cpp',
'/intl/icu/source/common/rbbirb.cpp',
@@ -70,70 +67,68 @@ SOURCES += [
'/intl/icu/source/common/servslkf.cpp',
'/intl/icu/source/common/sharedobject.cpp',
'/intl/icu/source/common/simpleformatter.cpp',
'/intl/icu/source/common/static_unicode_sets.cpp',
'/intl/icu/source/common/stringpiece.cpp',
'/intl/icu/source/common/stringtriebuilder.cpp',
'/intl/icu/source/common/uarrsort.cpp',
'/intl/icu/source/common/ubidi.cpp',
'/intl/icu/source/common/ubidi_props.cpp',
'/intl/icu/source/common/ubidiln.cpp',
'/intl/icu/source/common/ubiditransform.cpp',
'/intl/icu/source/common/ubidiwrt.cpp',
'/intl/icu/source/common/uarrsort.c',
'/intl/icu/source/common/ubidi.c',
'/intl/icu/source/common/ubidi_props.c',
'/intl/icu/source/common/ubidiln.c',
'/intl/icu/source/common/ubiditransform.c',
'/intl/icu/source/common/ubidiwrt.c',
'/intl/icu/source/common/ubrk.cpp',
'/intl/icu/source/common/ucase.cpp',
'/intl/icu/source/common/ucasemap.cpp',
'/intl/icu/source/common/ucasemap_titlecase_brkiter.cpp',
'/intl/icu/source/common/ucat.cpp',
'/intl/icu/source/common/uchar.cpp',
'/intl/icu/source/common/ucat.c',
'/intl/icu/source/common/uchar.c',
'/intl/icu/source/common/ucharstrie.cpp',
'/intl/icu/source/common/ucharstriebuilder.cpp',
'/intl/icu/source/common/ucharstrieiterator.cpp',
'/intl/icu/source/common/uchriter.cpp',
'/intl/icu/source/common/ucln_cmn.cpp',
'/intl/icu/source/common/ucmndata.cpp',
'/intl/icu/source/common/ucnv.cpp',
'/intl/icu/source/common/ucmndata.c',
'/intl/icu/source/common/ucnv.c',
'/intl/icu/source/common/ucnv2022.cpp',
'/intl/icu/source/common/ucnv_bld.cpp',
'/intl/icu/source/common/ucnv_cb.cpp',
'/intl/icu/source/common/ucnv_cnv.cpp',
'/intl/icu/source/common/ucnv_ct.cpp',
'/intl/icu/source/common/ucnv_err.cpp',
'/intl/icu/source/common/ucnv_cb.c',
'/intl/icu/source/common/ucnv_cnv.c',
'/intl/icu/source/common/ucnv_ct.c',
'/intl/icu/source/common/ucnv_err.c',
'/intl/icu/source/common/ucnv_ext.cpp',
'/intl/icu/source/common/ucnv_io.cpp',
'/intl/icu/source/common/ucnv_lmb.cpp',
'/intl/icu/source/common/ucnv_set.cpp',
'/intl/icu/source/common/ucnv_u16.cpp',
'/intl/icu/source/common/ucnv_u32.cpp',
'/intl/icu/source/common/ucnv_u7.cpp',
'/intl/icu/source/common/ucnv_u8.cpp',
'/intl/icu/source/common/ucnv_lmb.c',
'/intl/icu/source/common/ucnv_set.c',
'/intl/icu/source/common/ucnv_u16.c',
'/intl/icu/source/common/ucnv_u32.c',
'/intl/icu/source/common/ucnv_u7.c',
'/intl/icu/source/common/ucnv_u8.c',
'/intl/icu/source/common/ucnvbocu.cpp',
'/intl/icu/source/common/ucnvdisp.cpp',
'/intl/icu/source/common/ucnvhz.cpp',
'/intl/icu/source/common/ucnvisci.cpp',
'/intl/icu/source/common/ucnvlat1.cpp',
'/intl/icu/source/common/ucnvdisp.c',
'/intl/icu/source/common/ucnvhz.c',
'/intl/icu/source/common/ucnvisci.c',
'/intl/icu/source/common/ucnvlat1.c',
'/intl/icu/source/common/ucnvmbcs.cpp',
'/intl/icu/source/common/ucnvscsu.cpp',
'/intl/icu/source/common/ucnvscsu.c',
'/intl/icu/source/common/ucnvsel.cpp',
'/intl/icu/source/common/ucol_swp.cpp',
'/intl/icu/source/common/ucptrie.cpp',
'/intl/icu/source/common/ucurr.cpp',
'/intl/icu/source/common/udata.cpp',
'/intl/icu/source/common/udatamem.cpp',
'/intl/icu/source/common/udataswp.cpp',
'/intl/icu/source/common/uenum.cpp',
'/intl/icu/source/common/uhash.cpp',
'/intl/icu/source/common/udatamem.c',
'/intl/icu/source/common/udataswp.c',
'/intl/icu/source/common/uenum.c',
'/intl/icu/source/common/uhash.c',
'/intl/icu/source/common/uhash_us.cpp',
'/intl/icu/source/common/uidna.cpp',
'/intl/icu/source/common/uinit.cpp',
'/intl/icu/source/common/uinvchar.cpp',
'/intl/icu/source/common/uinvchar.c',
'/intl/icu/source/common/uiter.cpp',
'/intl/icu/source/common/ulist.cpp',
'/intl/icu/source/common/ulist.c',
'/intl/icu/source/common/ulistformatter.cpp',
'/intl/icu/source/common/uloc.cpp',
'/intl/icu/source/common/uloc_keytype.cpp',
'/intl/icu/source/common/uloc_tag.cpp',
'/intl/icu/source/common/umapfile.cpp',
'/intl/icu/source/common/umath.cpp',
'/intl/icu/source/common/umutablecptrie.cpp',
'/intl/icu/source/common/uloc_tag.c',
'/intl/icu/source/common/umapfile.c',
'/intl/icu/source/common/umath.c',
'/intl/icu/source/common/umutex.cpp',
'/intl/icu/source/common/unames.cpp',
'/intl/icu/source/common/unifiedcache.cpp',
@@ -153,11 +148,11 @@ SOURCES += [
'/intl/icu/source/common/unormcmp.cpp',
'/intl/icu/source/common/uobject.cpp',
'/intl/icu/source/common/uprops.cpp',
'/intl/icu/source/common/ures_cnv.cpp',
'/intl/icu/source/common/ures_cnv.c',
'/intl/icu/source/common/uresbund.cpp',
'/intl/icu/source/common/uresdata.cpp',
'/intl/icu/source/common/usc_impl.cpp',
'/intl/icu/source/common/uscript.cpp',
'/intl/icu/source/common/usc_impl.c',
'/intl/icu/source/common/uscript.c',
'/intl/icu/source/common/uscript_props.cpp',
'/intl/icu/source/common/uset.cpp',
'/intl/icu/source/common/uset_props.cpp',
@@ -171,24 +166,23 @@ SOURCES += [
'/intl/icu/source/common/ustrcase.cpp',
'/intl/icu/source/common/ustrcase_locale.cpp',
'/intl/icu/source/common/ustrenum.cpp',
'/intl/icu/source/common/ustrfmt.cpp',
'/intl/icu/source/common/ustrfmt.c',
'/intl/icu/source/common/ustring.cpp',
'/intl/icu/source/common/ustrtrns.cpp',
'/intl/icu/source/common/utext.cpp',
'/intl/icu/source/common/utf_impl.cpp',
'/intl/icu/source/common/utf_impl.c',
'/intl/icu/source/common/util.cpp',
'/intl/icu/source/common/util_props.cpp',
'/intl/icu/source/common/utrace.cpp',
'/intl/icu/source/common/utrace.c',
'/intl/icu/source/common/utrie.cpp',
'/intl/icu/source/common/utrie2.cpp',
'/intl/icu/source/common/utrie2_builder.cpp',
'/intl/icu/source/common/utrie_swap.cpp',
'/intl/icu/source/common/uts46.cpp',
'/intl/icu/source/common/utypes.cpp',
'/intl/icu/source/common/utypes.c',
'/intl/icu/source/common/uvector.cpp',
'/intl/icu/source/common/uvectr32.cpp',
'/intl/icu/source/common/uvectr64.cpp',
'/intl/icu/source/common/wintz.cpp',
'/intl/icu/source/common/wintz.c',
]
EXPORTS.unicode += [
@@ -198,19 +192,17 @@ EXPORTS.unicode += [
'/intl/icu/source/common/unicode/bytestrie.h',
'/intl/icu/source/common/unicode/bytestriebuilder.h',
'/intl/icu/source/common/unicode/caniter.h',
'/intl/icu/source/common/unicode/casemap.h',
'/intl/icu/source/common/unicode/char16ptr.h',
'/intl/icu/source/common/unicode/chariter.h',
'/intl/icu/source/common/unicode/dbbi.h',
'/intl/icu/source/common/unicode/docmain.h',
'/intl/icu/source/common/unicode/dtintrv.h',
'/intl/icu/source/common/unicode/edits.h',
'/intl/icu/source/common/unicode/enumset.h',
'/intl/icu/source/common/unicode/errorcode.h',
'/intl/icu/source/common/unicode/filteredbrk.h',
'/intl/icu/source/common/unicode/icudataver.h',
'/intl/icu/source/common/unicode/icuplug.h',
'/intl/icu/source/common/unicode/idna.h',
'/intl/icu/source/common/unicode/listformatter.h',
'/intl/icu/source/common/unicode/localpointer.h',
'/intl/icu/source/common/unicode/locdspnm.h',
'/intl/icu/source/common/unicode/locid.h',
@@ -229,7 +221,6 @@ EXPORTS.unicode += [
'/intl/icu/source/common/unicode/simpleformatter.h',
'/intl/icu/source/common/unicode/std_string.h',
'/intl/icu/source/common/unicode/strenum.h',
'/intl/icu/source/common/unicode/stringoptions.h',
'/intl/icu/source/common/unicode/stringpiece.h',
'/intl/icu/source/common/unicode/stringtriebuilder.h',
'/intl/icu/source/common/unicode/symtable.h',
@@ -248,8 +239,6 @@ EXPORTS.unicode += [
'/intl/icu/source/common/unicode/ucnv_err.h',
'/intl/icu/source/common/unicode/ucnvsel.h',
'/intl/icu/source/common/unicode/uconfig.h',
'/intl/icu/source/common/unicode/ucpmap.h',
'/intl/icu/source/common/unicode/ucptrie.h',
'/intl/icu/source/common/unicode/ucurr.h',
'/intl/icu/source/common/unicode/udata.h',
'/intl/icu/source/common/unicode/udisplaycontext.h',
@@ -257,10 +246,10 @@ EXPORTS.unicode += [
'/intl/icu/source/common/unicode/uidna.h',
'/intl/icu/source/common/unicode/uiter.h',
'/intl/icu/source/common/unicode/uldnames.h',
'/intl/icu/source/common/unicode/ulistformatter.h',
'/intl/icu/source/common/unicode/uloc.h',
'/intl/icu/source/common/unicode/umachine.h',
'/intl/icu/source/common/unicode/umisc.h',
'/intl/icu/source/common/unicode/umutablecptrie.h',
'/intl/icu/source/common/unicode/unifilt.h',
'/intl/icu/source/common/unicode/unifunct.h',
'/intl/icu/source/common/unicode/unimatch.h',
+1
View File
@@ -14,6 +14,7 @@ DEFINES.update(
UCONFIG_NO_LEGACY_CONVERSION = True,
UCONFIG_NO_TRANSLITERATION = True,
UCONFIG_NO_REGULAR_EXPRESSIONS = True,
UCONFIG_NO_BREAK_ITERATION = True,
# We don't need to pass data to and from legacy char* APIs.
U_CHARSET_IS_UTF8 = True,
+19 -57
View File
@@ -1,5 +1,6 @@
# THIS FILE IS GENERATED BY /intl/icu_sources_data.py DO NOT EDIT
SOURCES += [
'/intl/icu/source/i18n/affixpatternparser.cpp',
'/intl/icu/source/i18n/alphaindex.cpp',
'/intl/icu/source/i18n/anytrans.cpp',
'/intl/icu/source/i18n/astro.cpp',
@@ -52,22 +53,23 @@ SOURCES += [
'/intl/icu/source/i18n/datefmt.cpp',
'/intl/icu/source/i18n/dayperiodrules.cpp',
'/intl/icu/source/i18n/dcfmtsym.cpp',
'/intl/icu/source/i18n/decContext.cpp',
'/intl/icu/source/i18n/decContext.c',
'/intl/icu/source/i18n/decfmtst.cpp',
'/intl/icu/source/i18n/decimalformatpattern.cpp',
'/intl/icu/source/i18n/decimfmt.cpp',
'/intl/icu/source/i18n/decNumber.cpp',
'/intl/icu/source/i18n/double-conversion-bignum-dtoa.cpp',
'/intl/icu/source/i18n/double-conversion-bignum.cpp',
'/intl/icu/source/i18n/double-conversion-cached-powers.cpp',
'/intl/icu/source/i18n/double-conversion-diy-fp.cpp',
'/intl/icu/source/i18n/double-conversion-fast-dtoa.cpp',
'/intl/icu/source/i18n/double-conversion-strtod.cpp',
'/intl/icu/source/i18n/double-conversion.cpp',
'/intl/icu/source/i18n/decimfmtimpl.cpp',
'/intl/icu/source/i18n/decNumber.c',
'/intl/icu/source/i18n/digitaffix.cpp',
'/intl/icu/source/i18n/digitaffixesandpadding.cpp',
'/intl/icu/source/i18n/digitformatter.cpp',
'/intl/icu/source/i18n/digitgrouping.cpp',
'/intl/icu/source/i18n/digitinterval.cpp',
'/intl/icu/source/i18n/digitlst.cpp',
'/intl/icu/source/i18n/dtfmtsym.cpp',
'/intl/icu/source/i18n/dtitvfmt.cpp',
'/intl/icu/source/i18n/dtitvinf.cpp',
'/intl/icu/source/i18n/dtptngen.cpp',
'/intl/icu/source/i18n/dtrule.cpp',
'/intl/icu/source/i18n/erarules.cpp',
'/intl/icu/source/i18n/esctrn.cpp',
'/intl/icu/source/i18n/ethpccal.cpp',
'/intl/icu/source/i18n/fmtable.cpp',
@@ -84,7 +86,6 @@ SOURCES += [
'/intl/icu/source/i18n/inputext.cpp',
'/intl/icu/source/i18n/islamcal.cpp',
'/intl/icu/source/i18n/japancal.cpp',
'/intl/icu/source/i18n/listformatter.cpp',
'/intl/icu/source/i18n/measfmt.cpp',
'/intl/icu/source/i18n/measunit.cpp',
'/intl/icu/source/i18n/measure.cpp',
@@ -94,50 +95,15 @@ SOURCES += [
'/intl/icu/source/i18n/nfrule.cpp',
'/intl/icu/source/i18n/nfsubs.cpp',
'/intl/icu/source/i18n/nortrans.cpp',
'/intl/icu/source/i18n/nounit.cpp',
'/intl/icu/source/i18n/nultrans.cpp',
'/intl/icu/source/i18n/number_affixutils.cpp',
'/intl/icu/source/i18n/number_asformat.cpp',
'/intl/icu/source/i18n/number_capi.cpp',
'/intl/icu/source/i18n/number_compact.cpp',
'/intl/icu/source/i18n/number_currencysymbols.cpp',
'/intl/icu/source/i18n/number_decimalquantity.cpp',
'/intl/icu/source/i18n/number_decimfmtprops.cpp',
'/intl/icu/source/i18n/number_fluent.cpp',
'/intl/icu/source/i18n/number_formatimpl.cpp',
'/intl/icu/source/i18n/number_grouping.cpp',
'/intl/icu/source/i18n/number_integerwidth.cpp',
'/intl/icu/source/i18n/number_longnames.cpp',
'/intl/icu/source/i18n/number_mapper.cpp',
'/intl/icu/source/i18n/number_modifiers.cpp',
'/intl/icu/source/i18n/number_multiplier.cpp',
'/intl/icu/source/i18n/number_notation.cpp',
'/intl/icu/source/i18n/number_padding.cpp',
'/intl/icu/source/i18n/number_patternmodifier.cpp',
'/intl/icu/source/i18n/number_patternstring.cpp',
'/intl/icu/source/i18n/number_rounding.cpp',
'/intl/icu/source/i18n/number_scientific.cpp',
'/intl/icu/source/i18n/number_skeletons.cpp',
'/intl/icu/source/i18n/number_stringbuilder.cpp',
'/intl/icu/source/i18n/number_utils.cpp',
'/intl/icu/source/i18n/numfmt.cpp',
'/intl/icu/source/i18n/numparse_affixes.cpp',
'/intl/icu/source/i18n/numparse_compositions.cpp',
'/intl/icu/source/i18n/numparse_currency.cpp',
'/intl/icu/source/i18n/numparse_decimal.cpp',
'/intl/icu/source/i18n/numparse_impl.cpp',
'/intl/icu/source/i18n/numparse_parsednumber.cpp',
'/intl/icu/source/i18n/numparse_scientific.cpp',
'/intl/icu/source/i18n/numparse_stringsegment.cpp',
'/intl/icu/source/i18n/numparse_symbols.cpp',
'/intl/icu/source/i18n/numparse_validators.cpp',
'/intl/icu/source/i18n/numrange_fluent.cpp',
'/intl/icu/source/i18n/numrange_impl.cpp',
'/intl/icu/source/i18n/numsys.cpp',
'/intl/icu/source/i18n/olsontz.cpp',
'/intl/icu/source/i18n/persncal.cpp',
'/intl/icu/source/i18n/pluralaffix.cpp',
'/intl/icu/source/i18n/plurfmt.cpp',
'/intl/icu/source/i18n/plurrule.cpp',
'/intl/icu/source/i18n/precision.cpp',
'/intl/icu/source/i18n/quant.cpp',
'/intl/icu/source/i18n/quantityformatter.cpp',
'/intl/icu/source/i18n/rbnf.cpp',
@@ -164,6 +130,7 @@ SOURCES += [
'/intl/icu/source/i18n/selfmt.cpp',
'/intl/icu/source/i18n/sharedbreakiterator.cpp',
'/intl/icu/source/i18n/simpletz.cpp',
'/intl/icu/source/i18n/smallintformatter.cpp',
'/intl/icu/source/i18n/smpdtfmt.cpp',
'/intl/icu/source/i18n/smpdtfst.cpp',
'/intl/icu/source/i18n/sortkey.cpp',
@@ -200,8 +167,7 @@ SOURCES += [
'/intl/icu/source/i18n/udatpg.cpp',
'/intl/icu/source/i18n/ufieldpositer.cpp',
'/intl/icu/source/i18n/uitercollationiterator.cpp',
'/intl/icu/source/i18n/ulistformatter.cpp',
'/intl/icu/source/i18n/ulocdata.cpp',
'/intl/icu/source/i18n/ulocdata.c',
'/intl/icu/source/i18n/umsg.cpp',
'/intl/icu/source/i18n/unesctrn.cpp',
'/intl/icu/source/i18n/uni2name.cpp',
@@ -218,8 +184,10 @@ SOURCES += [
'/intl/icu/source/i18n/uspoof_impl.cpp',
'/intl/icu/source/i18n/utf16collationiterator.cpp',
'/intl/icu/source/i18n/utf8collationiterator.cpp',
'/intl/icu/source/i18n/utmscale.cpp',
'/intl/icu/source/i18n/utmscale.c',
'/intl/icu/source/i18n/utrans.cpp',
'/intl/icu/source/i18n/valueformatter.cpp',
'/intl/icu/source/i18n/visibledigits.cpp',
'/intl/icu/source/i18n/vtzone.cpp',
'/intl/icu/source/i18n/vzone.cpp',
'/intl/icu/source/i18n/windtfmt.cpp',
@@ -255,14 +223,10 @@ EXPORTS.unicode += [
'/intl/icu/source/i18n/unicode/fpositer.h',
'/intl/icu/source/i18n/unicode/gender.h',
'/intl/icu/source/i18n/unicode/gregocal.h',
'/intl/icu/source/i18n/unicode/listformatter.h',
'/intl/icu/source/i18n/unicode/measfmt.h',
'/intl/icu/source/i18n/unicode/measunit.h',
'/intl/icu/source/i18n/unicode/measure.h',
'/intl/icu/source/i18n/unicode/msgfmt.h',
'/intl/icu/source/i18n/unicode/nounit.h',
'/intl/icu/source/i18n/unicode/numberformatter.h',
'/intl/icu/source/i18n/unicode/numberrangeformatter.h',
'/intl/icu/source/i18n/unicode/numfmt.h',
'/intl/icu/source/i18n/unicode/numsys.h',
'/intl/icu/source/i18n/unicode/plurfmt.h',
@@ -299,12 +263,10 @@ EXPORTS.unicode += [
'/intl/icu/source/i18n/unicode/ufieldpositer.h',
'/intl/icu/source/i18n/unicode/uformattable.h',
'/intl/icu/source/i18n/unicode/ugender.h',
'/intl/icu/source/i18n/unicode/ulistformatter.h',
'/intl/icu/source/i18n/unicode/ulocdata.h',
'/intl/icu/source/i18n/unicode/umsg.h',
'/intl/icu/source/i18n/unicode/unirepl.h',
'/intl/icu/source/i18n/unicode/unum.h',
'/intl/icu/source/i18n/unicode/unumberformatter.h',
'/intl/icu/source/i18n/unicode/unumsys.h',
'/intl/icu/source/i18n/unicode/upluralrules.h',
'/intl/icu/source/i18n/unicode/uregex.h',
+1 -1
View File
@@ -9,4 +9,4 @@
Library('icustubdata')
SOURCES += ['/intl/icu/source/stubdata/stubdata.cpp']
SOURCES += ['/intl/icu/source/stubdata/stubdata.c']
+110
View File
@@ -0,0 +1,110 @@
# 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/.
# /!\ Please make sure to update the following comment when you touch this
# file. Thank you /!\
# The traditional Mozilla build system relied on going through the entire
# build tree a number of times with different targets, and many of the
# things happening at each step required other things happening in previous
# steps without any documentation of those dependencies.
#
# This new build system tries to start afresh by establishing what files or
# operations are needed for the build, and applying the necessary rules to
# have those in place, relying on make dependencies to get them going.
#
# As of writing, only building non-compiled parts of Firefox is supported
# here (a few other things are also left out). This is a starting point, with
# the intent to grow this build system to make it more complete.
#
# This file contains rules and dependencies to get things working. The intent
# is for a Makefile to define some dependencies and variables, and include
# this file. What needs to be defined there, and ends up being generated by
# python/mozbuild/mozbuild/backend/fastermake.py is the following:
# - TOPSRCDIR/TOPOBJDIR, respectively the top source directory and the top
# object directory
# - PYTHON, the path to the python executable
# - ACDEFINES, which contains a set of -Dvar=name to be used during
# preprocessing
# - INSTALL_MANIFESTS, which defines the list of base directories handled
# by install manifests, see further below
#
# A convention used between this file and the Makefile including it is that
# global Make variables names are uppercase, while "local" Make variables
# applied to specific targets are lowercase.
# Targets to be triggered for a default build
default: $(addprefix install-,$(INSTALL_MANIFESTS))
ifndef NO_XPIDL
# Targets from the recursive make backend to be built for a default build
default: $(TOPOBJDIR)/config/makefiles/xpidl/xpidl
endif
# Mac builds require to copy things in dist/bin/*.app
# TODO: remove the MOZ_WIDGET_TOOLKIT and MOZ_BUILD_APP variables from
# faster/Makefile and python/mozbuild/mozbuild/test/backend/test_build.py
# when this is not required anymore.
# We however don't need to do this when using the hybrid
# FasterMake/RecursiveMake backend (FASTER_RECURSIVE_MAKE is set when
# recursing from the RecursiveMake backend)
ifndef FASTER_RECURSIVE_MAKE
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
default:
$(MAKE) -C $(TOPOBJDIR)/$(MOZ_BUILD_APP)/app repackage
endif
endif
.PHONY: FORCE
# Extra define to trigger some workarounds. We should strive to limit the
# use of those. As of writing the only ones are in
# toolkit/content/buildconfig.html and browser/locales/jar.mn.
ACDEFINES += -DBUILD_FASTER
# Files under the faster/ sub-directory, however, are not meant to use the
# fallback
$(TOPOBJDIR)/faster/%: ;
# Generic rule to fall back to the recursive make backend.
# This needs to stay after other $(TOPOBJDIR)/* rules because GNU Make
# <3.82 apply pattern rules in definition order, not stem length like
# modern GNU Make.
$(TOPOBJDIR)/%: FORCE
$(MAKE) -C $(dir $@) $(notdir $@)
# Install files using install manifests
#
# The list of base directories is given in INSTALL_MANIFESTS. The
# corresponding install manifests are named correspondingly, with forward
# slashes replaced with underscores, and prefixed with `install_`. That is,
# the install manifest for `dist/bin` would be `install_dist_bin`.
$(addprefix install-,$(INSTALL_MANIFESTS)): install-%: $(addprefix $(TOPOBJDIR)/,buildid.h source-repo.h)
@# For now, force preprocessed files to be reprocessed every time.
@# The overhead is not that big, and this avoids waiting for proper
@# support for defines tracking in process_install_manifest.
@touch install_$(subst /,_,$*)
@# BOOKMARKS_INCLUDE_DIR is for bookmarks.html only.
$(PYTHON) -m mozbuild.action.process_install_manifest \
--track install_$(subst /,_,$*).track \
$(TOPOBJDIR)/$* \
-DAB_CD=en-US \
-DBOOKMARKS_INCLUDE_DIR=$(TOPSRCDIR)/browser/locales/en-US/profile \
$(ACDEFINES) \
install_$(subst /,_,$*)
# ============================================================================
# Below is a set of additional dependencies and variables used to build things
# that are not supported by data in moz.build.
# The xpidl target in config/makefiles/xpidl requires the install manifest for
# dist/idl to have been processed. When using the hybrid
# FasterMake/RecursiveMake backend, this dependency is handled in the top-level
# Makefile.
ifndef FASTER_RECURSIVE_MAKE
$(TOPOBJDIR)/config/makefiles/xpidl/xpidl: $(TOPOBJDIR)/install-dist_idl
endif
# It also requires all the install manifests for dist/bin to have been processed
# because it adds interfaces.manifest references with buildlist.py.
$(TOPOBJDIR)/config/makefiles/xpidl/xpidl: $(addprefix install-,$(filter dist/bin%,$(INSTALL_MANIFESTS)))
+1 -1
View File
@@ -8,4 +8,4 @@
# Referenced by milestone.py.
#--------------------------------------------------------
5.2.1
5.1.0+
+6
View File
@@ -19,6 +19,12 @@
# define MOZ_INCLUDE_MOZALLOC_H_FROM_${HEADER}
#endif
// Code built with !_HAS_EXCEPTIONS calls std::_Throw(), but the win2k
// CRT doesn't export std::_Throw(). So we define it.
#ifndef mozilla_Throw_h
# include "mozilla/throw_msvc.h"
#endif
#ifdef _DEBUG
// From
// http://msdn.microsoft.com/en-us/library/aa985982%28VS.80%29.aspx
@@ -20,11 +20,6 @@
* code by having a tag called "padding" and a property
* value called "margin".
*/
const { PrefObserver } = require("devtools/client/shared/prefs");
const PREF_ENABLE_MDN_DOCS_TOOLTIP =
"devtools.inspector.mdnDocsTooltip.enabled";
const TEST_URI = `
<html>
<head>
@@ -40,50 +35,12 @@ const TEST_URI = `
`;
add_task(function* () {
info("Ensure the pref is true to begin with");
let initial = Services.prefs.getBoolPref(PREF_ENABLE_MDN_DOCS_TOOLTIP);
if (initial != true) {
yield setBooleanPref(PREF_ENABLE_MDN_DOCS_TOOLTIP, true);
}
yield addTab("data:text/html;charset=utf8," + encodeURIComponent(TEST_URI));
let {inspector, view} = yield openRuleView();
yield selectNode("padding", inspector);
yield testMdnContextMenuItemVisibility(view);
info("Ensure the pref is reset to its initial value");
let eventual = Services.prefs.getBoolPref(PREF_ENABLE_MDN_DOCS_TOOLTIP);
if (eventual != initial) {
yield setBooleanPref(PREF_ENABLE_MDN_DOCS_TOOLTIP, initial);
}
});
/**
* Set a boolean pref, and wait for the pref observer to
* trigger, so that code listening for the pref change
* has had a chance to update itself.
*
* @param pref {string} Name of the pref to change
* @param state {boolean} Desired value of the pref.
*
* Note that if the pref already has the value in `state`,
* then the prefObserver will not trigger. So you should only
* call this function if you know the pref's current value is
* not `state`.
*/
function* setBooleanPref(pref, state) {
let oncePrefChanged = defer();
let prefObserver = new PrefObserver("devtools.");
prefObserver.on(pref, oncePrefChanged.resolve);
info("Set the pref " + pref + " to: " + state);
Services.prefs.setBoolPref(pref, state);
info("Wait for prefObserver to call back so the UI can update");
yield oncePrefChanged.promise;
prefObserver.off(pref, oncePrefChanged.resolve);
}
/**
* Tests that the MDN context menu item is shown when it should be,
* and hidden when it should be.
@@ -32,7 +32,7 @@ add_task(function* () {
info("Ensure the pref is true to begin with");
let initial = Services.prefs.getBoolPref(PREF_ENABLE_MDN_DOCS_TOOLTIP);
if (initial != true) {
yield setBooleanPref(PREF_ENABLE_MDN_DOCS_TOOLTIP, true);
setBooleanPref(PREF_ENABLE_MDN_DOCS_TOOLTIP, true);
}
yield addTab("data:text/html;charset=utf8," + encodeURIComponent(TEST_DOC));
@@ -58,7 +58,7 @@ add_task(function* () {
info("Ensure the pref is reset to its initial value");
let eventual = Services.prefs.getBoolPref(PREF_ENABLE_MDN_DOCS_TOOLTIP);
if (eventual != initial) {
yield setBooleanPref(PREF_ENABLE_MDN_DOCS_TOOLTIP, initial);
setBooleanPref(PREF_ENABLE_MDN_DOCS_TOOLTIP, initial);
}
});
+1 -1
View File
@@ -59,7 +59,7 @@ pref("devtools.inspector.showUserAgentStyles", false);
// Show all native anonymous content (like controls in <video> tags)
pref("devtools.inspector.showAllAnonymousContent", false);
// Enable the MDN docs tooltip
pref("devtools.inspector.mdnDocsTooltip.enabled", false);
pref("devtools.inspector.mdnDocsTooltip.enabled", true);
// Enable the Font Inspector
pref("devtools.fontinspector.enabled", true);
+1 -1
View File
@@ -1032,7 +1032,7 @@ OutputPanel.prototype._resize = function () {
break;
}
this.document.body.style.width = "max-content";
this.document.body.style.width = "-moz-max-content";
let style = this._frame.contentWindow.getComputedStyle(this.document.body);
let frameWidth = parseInt(style.width, 10);
let width = Math.min(maxWidth, frameWidth);
+1 -3
View File
@@ -1462,9 +1462,7 @@ DebuggerServerConnection.prototype = {
},
send(packet) {
if (this.transport) {
this.transport.send(packet);
}
this.transport.send(packet);
},
/**
+28 -30
View File
@@ -2209,13 +2209,13 @@ exports.CSS_PROPERTIES = {
"-moz-available",
"-moz-calc",
"-moz-fit-content",
"-moz-max-content",
"-moz-min-content",
"auto",
"calc",
"content",
"inherit",
"initial",
"max-content",
"min-content",
"unset"
]
},
@@ -2232,13 +2232,13 @@ exports.CSS_PROPERTIES = {
"-moz-available",
"-moz-calc",
"-moz-fit-content",
"-moz-max-content",
"-moz-min-content",
"auto",
"calc",
"content",
"inherit",
"initial",
"max-content",
"min-content",
"unset"
]
},
@@ -3304,7 +3304,9 @@ exports.CSS_PROPERTIES = {
"-moz-mac-source-list-selection",
"-moz-mac-vibrancy-dark",
"-moz-mac-vibrancy-light",
"-moz-max-content",
"-moz-middle-with-baseline",
"-moz-min-content",
"-moz-none",
"-moz-popup",
"-moz-pre-space",
@@ -3360,7 +3362,6 @@ exports.CSS_PROPERTIES = {
"bottom",
"bottom-outside",
"break-all",
"break-spaces",
"break-word",
"butt",
"button",
@@ -3492,7 +3493,6 @@ exports.CSS_PROPERTIES = {
"margin-box",
"match-source",
"mathematical",
"max-content",
"medium",
"menuarrow",
"menubar",
@@ -3510,7 +3510,6 @@ exports.CSS_PROPERTIES = {
"meterbar",
"meterchunk",
"middle",
"min-content",
"miter",
"mixed",
"multiply",
@@ -6001,13 +6000,13 @@ exports.CSS_PROPERTIES = {
"-moz-available",
"-moz-calc",
"-moz-fit-content",
"-moz-max-content",
"-moz-min-content",
"auto",
"calc",
"content",
"inherit",
"initial",
"max-content",
"min-content",
"unset"
]
},
@@ -6024,13 +6023,13 @@ exports.CSS_PROPERTIES = {
"-moz-available",
"-moz-calc",
"-moz-fit-content",
"-moz-max-content",
"-moz-min-content",
"auto",
"calc",
"content",
"inherit",
"initial",
"max-content",
"min-content",
"unset"
]
},
@@ -6817,12 +6816,12 @@ exports.CSS_PROPERTIES = {
"-moz-available",
"-moz-calc",
"-moz-fit-content",
"-moz-max-content",
"-moz-min-content",
"auto",
"calc",
"inherit",
"initial",
"max-content",
"min-content",
"unset"
]
},
@@ -6904,12 +6903,12 @@ exports.CSS_PROPERTIES = {
"-moz-available",
"-moz-calc",
"-moz-fit-content",
"-moz-max-content",
"-moz-min-content",
"auto",
"calc",
"inherit",
"initial",
"max-content",
"min-content",
"unset"
]
},
@@ -7652,11 +7651,11 @@ exports.CSS_PROPERTIES = {
"-moz-available",
"-moz-calc",
"-moz-fit-content",
"-moz-max-content",
"-moz-min-content",
"calc",
"inherit",
"initial",
"max-content",
"min-content",
"none",
"unset"
]
@@ -7674,11 +7673,11 @@ exports.CSS_PROPERTIES = {
"-moz-available",
"-moz-calc",
"-moz-fit-content",
"-moz-max-content",
"-moz-min-content",
"calc",
"inherit",
"initial",
"max-content",
"min-content",
"none",
"unset"
]
@@ -7696,11 +7695,11 @@ exports.CSS_PROPERTIES = {
"-moz-available",
"-moz-calc",
"-moz-fit-content",
"-moz-max-content",
"-moz-min-content",
"calc",
"inherit",
"initial",
"max-content",
"min-content",
"none",
"unset"
]
@@ -7736,12 +7735,12 @@ exports.CSS_PROPERTIES = {
"-moz-available",
"-moz-calc",
"-moz-fit-content",
"-moz-max-content",
"-moz-min-content",
"auto",
"calc",
"inherit",
"initial",
"max-content",
"min-content",
"unset"
]
},
@@ -7758,12 +7757,12 @@ exports.CSS_PROPERTIES = {
"-moz-available",
"-moz-calc",
"-moz-fit-content",
"-moz-max-content",
"-moz-min-content",
"auto",
"calc",
"inherit",
"initial",
"max-content",
"min-content",
"unset"
]
},
@@ -7780,12 +7779,12 @@ exports.CSS_PROPERTIES = {
"-moz-available",
"-moz-calc",
"-moz-fit-content",
"-moz-max-content",
"-moz-min-content",
"auto",
"calc",
"inherit",
"initial",
"max-content",
"min-content",
"unset"
]
},
@@ -9520,7 +9519,6 @@ exports.CSS_PROPERTIES = {
"supports": [],
"values": [
"-moz-pre-space",
"break-spaces",
"inherit",
"initial",
"normal",
@@ -9544,12 +9542,12 @@ exports.CSS_PROPERTIES = {
"-moz-available",
"-moz-calc",
"-moz-fit-content",
"-moz-max-content",
"-moz-min-content",
"auto",
"calc",
"inherit",
"initial",
"max-content",
"min-content",
"unset"
]
},
+5 -2
View File
@@ -36,6 +36,11 @@ EXPORTS.mozilla += [
]
UNIFIED_SOURCES += [
'KeyframeEffect.cpp',
'KeyframeEffectReadOnly.cpp',
]
SOURCES += [
'Animation.cpp',
'AnimationEffectReadOnly.cpp',
'AnimationEffectTiming.cpp',
@@ -49,9 +54,7 @@ UNIFIED_SOURCES += [
'DocumentTimeline.cpp',
'EffectCompositor.cpp',
'EffectSet.cpp',
'KeyframeEffect.cpp',
'KeyframeEffectParams.cpp',
'KeyframeEffectReadOnly.cpp',
'KeyframeUtils.cpp',
'PendingAnimationTracker.cpp',
'TimingParams.cpp',
+1 -1
View File
@@ -15,7 +15,7 @@ EXPORTS += [
'AudioChannelService.h',
]
UNIFIED_SOURCES += [
SOURCES += [
'AudioChannelAgent.cpp',
'AudioChannelService.cpp',
]
+401 -1168
View File
File diff suppressed because it is too large. Load diff
+179 -39
View File
@@ -35,81 +35,221 @@ namespace dom {
struct EventSourceInit;
class EventSourceImpl;
class EventSource final : public DOMEventTargetHelper
, public nsIObserver
, public nsIStreamListener
, public nsIChannelEventSink
, public nsIInterfaceRequestor
, public nsSupportsWeakReference
{
friend class EventSourceImpl;
public:
explicit EventSource(nsPIDOMWindowInner* aOwnerWindow);
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(EventSource, DOMEventTargetHelper)
virtual bool IsCertainlyAliveForCC() const override;
NS_DECL_CYCLE_COLLECTION_SKIPPABLE_SCRIPT_HOLDER_CLASS_INHERITED(
EventSource, DOMEventTargetHelper)
// EventTarget
void DisconnectFromOwner() override
{
DOMEventTargetHelper::DisconnectFromOwner();
Close();
}
NS_DECL_NSIOBSERVER
NS_DECL_NSISTREAMLISTENER
NS_DECL_NSIREQUESTOBSERVER
NS_DECL_NSICHANNELEVENTSINK
NS_DECL_NSIINTERFACEREQUESTOR
JSObject* WrapObject(JSContext* aCx,
JS::Handle<JSObject*> aGivenProto) override;
// nsWrapperCache
virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
// WebIDL
nsPIDOMWindowInner*
GetParentObject() const
{
return GetOwner();
}
static already_AddRefed<EventSource>
Constructor(const GlobalObject& aGlobal, const nsAString& aURL,
const EventSourceInit& aEventSourceInitDict, ErrorResult& aRv);
const EventSourceInit& aEventSourceInitDict,
ErrorResult& aRv);
void GetUrl(nsAString& aURL) const
{
AssertIsOnTargetThread();
aURL = mOriginalURL;
}
bool WithCredentials() const
{
AssertIsOnTargetThread();
return mWithCredentials;
}
enum {
CONNECTING = 0U,
OPEN = 1U,
CLOSED = 2U
};
uint16_t ReadyState() const
{
AssertIsOnTargetThread();
return mReadyState;
}
IMPL_EVENT_HANDLER(open)
IMPL_EVENT_HANDLER(message)
IMPL_EVENT_HANDLER(error)
void Close();
private:
EventSource(nsPIDOMWindowInner* aOwnerWindow, bool aWithCredentials);
virtual void DisconnectFromOwner() override;
protected:
virtual ~EventSource();
// prevent bad usage
EventSource(const EventSource& x) = delete;
EventSource& operator=(const EventSource& x) = delete;
void AssertIsOnTargetThread() const
{
MOZ_ASSERT(NS_IsMainThread() == mIsMainThread);
}
MOZ_IS_CLASS_INIT
nsresult Init(nsISupports* aOwner,
const nsAString& aURL,
bool aWithCredentials);
nsresult CreateAndDispatchSimpleEvent(const nsAString& aName);
nsresult GetBaseURI(nsIURI **aBaseURI);
// Raw pointer because this EventSourceImpl is created, managed and destroyed
// by EventSource.
EventSourceImpl* mImpl;
nsString mOriginalURL;
uint16_t mReadyState;
void SetupHttpChannel();
nsresult SetupReferrerPolicy();
nsresult InitChannelAndRequestEventSource();
nsresult ResetConnection();
nsresult DispatchFailConnection();
nsresult SetReconnectionTimeout();
void AnnounceConnection();
void DispatchAllMessageEvents();
void ReestablishConnection();
void FailConnection();
nsresult Thaw();
nsresult Freeze();
static void TimerCallback(nsITimer *aTimer, void *aClosure);
nsresult PrintErrorOnConsole(const char *aBundleURI,
const char16_t *aError,
const char16_t **aFormatStrings,
uint32_t aFormatStringsLen);
nsresult ConsoleError();
static nsresult StreamReaderFunc(nsIInputStream *aInputStream,
void *aClosure,
const char *aFromRawSegment,
uint32_t aToOffset,
uint32_t aCount,
uint32_t *aWriteCount);
nsresult SetFieldAndClear();
nsresult ClearFields();
nsresult ResetEvent();
nsresult DispatchCurrentMessageEvent();
nsresult ParseCharacter(char16_t aChr);
nsresult CheckHealthOfRequestCallback(nsIRequest *aRequestCallback);
nsresult OnRedirectVerifyCallback(nsresult result);
nsCOMPtr<nsIURI> mSrc;
nsString mLastEventID;
uint32_t mReconnectionTime; // in ms
struct Message {
nsString mEventName;
nsString mLastEventID;
nsString mData;
};
nsDeque mMessagesToDispatch;
Message mCurrentMessage;
/**
* A simple state machine used to manage the event-source's line buffer
*
* PARSE_STATE_OFF -> PARSE_STATE_BEGIN_OF_STREAM
*
* PARSE_STATE_BEGIN_OF_STREAM -> PARSE_STATE_BOM_WAS_READ |
* PARSE_STATE_CR_CHAR |
* PARSE_STATE_BEGIN_OF_LINE |
* PARSE_STATE_COMMENT |
* PARSE_STATE_FIELD_NAME
*
* PARSE_STATE_BOM_WAS_READ -> PARSE_STATE_CR_CHAR |
* PARSE_STATE_BEGIN_OF_LINE |
* PARSE_STATE_COMMENT |
* PARSE_STATE_FIELD_NAME
*
* PARSE_STATE_CR_CHAR -> PARSE_STATE_CR_CHAR |
* PARSE_STATE_COMMENT |
* PARSE_STATE_FIELD_NAME |
* PARSE_STATE_BEGIN_OF_LINE
*
* PARSE_STATE_COMMENT -> PARSE_STATE_CR_CHAR |
* PARSE_STATE_BEGIN_OF_LINE
*
* PARSE_STATE_FIELD_NAME -> PARSE_STATE_CR_CHAR |
* PARSE_STATE_BEGIN_OF_LINE |
* PARSE_STATE_FIRST_CHAR_OF_FIELD_VALUE
*
* PARSE_STATE_FIRST_CHAR_OF_FIELD_VALUE -> PARSE_STATE_FIELD_VALUE |
* PARSE_STATE_CR_CHAR |
* PARSE_STATE_BEGIN_OF_LINE
*
* PARSE_STATE_FIELD_VALUE -> PARSE_STATE_CR_CHAR |
* PARSE_STATE_BEGIN_OF_LINE
*
* PARSE_STATE_BEGIN_OF_LINE -> PARSE_STATE_CR_CHAR |
* PARSE_STATE_COMMENT |
* PARSE_STATE_FIELD_NAME |
* PARSE_STATE_BEGIN_OF_LINE
*
* Whenever the parser find an empty line or the end-of-file
* it dispatches the stacked event.
*
*/
enum ParserStatus {
PARSE_STATE_OFF,
PARSE_STATE_BEGIN_OF_STREAM,
PARSE_STATE_BOM_WAS_READ,
PARSE_STATE_CR_CHAR,
PARSE_STATE_COMMENT,
PARSE_STATE_FIELD_NAME,
PARSE_STATE_FIRST_CHAR_OF_FIELD_VALUE,
PARSE_STATE_FIELD_VALUE,
PARSE_STATE_BEGIN_OF_LINE
};
ParserStatus mStatus;
bool mFrozen;
bool mErrorLoadOnRedirect;
bool mGoingToDispatchAllMessages;
bool mWithCredentials;
bool mIsMainThread;
// This is used to keep EventSourceImpl instance when there is a connection.
bool mKeepingAlive;
bool mWaitingForOnStopRequest;
void UpdateMustKeepAlive();
void UpdateDontKeepAlive();
// used while reading the input streams
nsCOMPtr<nsIUnicodeDecoder> mUnicodeDecoder;
nsresult mLastConvertionResult;
nsString mLastFieldName;
nsString mLastFieldValue;
nsCOMPtr<nsILoadGroup> mLoadGroup;
nsCOMPtr<nsIHttpChannel> mHttpChannel;
nsCOMPtr<nsITimer> mTimer;
uint16_t mReadyState;
nsString mOriginalURL;
nsCOMPtr<nsIPrincipal> mPrincipal;
nsString mOrigin;
// Event Source owner information:
// - the script file name
// - source code line number and column number where the Event Source object
// was constructed.
// - the ID of the inner window where the script lives. Note that this may not
// be the same as the Event Source owner window.
// These attributes are used for error reporting.
nsString mScriptFile;
uint32_t mScriptLine;
uint32_t mScriptColumn;
uint64_t mInnerWindowID;
private:
EventSource(const EventSource& x); // prevent bad usage
EventSource& operator=(const EventSource& x);
};
} // namespace dom
+3 -2
View File
@@ -1390,8 +1390,9 @@ Navigator::GetPlatform(nsAString& aPlatform, bool aUsePrefOverriddenValue)
aPlatform.AssignLiteral("Win32");
#elif defined(XP_MACOSX) && defined(__ppc__)
aPlatform.AssignLiteral("MacPPC");
#elif defined(XP_MACOSX)
// Always return "MacIntel", even on ARM64 macOS like Safari does.
#elif defined(XP_MACOSX) && defined(__i386__)
aPlatform.AssignLiteral("MacIntel");
#elif defined(XP_MACOSX) && defined(__x86_64__)
aPlatform.AssignLiteral("MacIntel");
#else
// XXX Communicator uses compiled-in build-time string defines
+26 -6
View File
@@ -1402,6 +1402,32 @@ WebSocket::ConstructorCommon(const GlobalObject& aGlobal,
NS_IMPL_CYCLE_COLLECTION_CLASS(WebSocket)
NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_BEGIN(WebSocket)
bool isBlack = tmp->IsBlack();
if (isBlack || tmp->mKeepingAlive) {
if (tmp->mListenerManager) {
tmp->mListenerManager->MarkForCC();
}
if (!isBlack && tmp->PreservingWrapper()) {
// This marks the wrapper black.
tmp->GetWrapper();
}
return true;
}
NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_END
NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_IN_CC_BEGIN(WebSocket)
return tmp->IsBlack();
NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_IN_CC_END
NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_THIS_BEGIN(WebSocket)
return tmp->IsBlack();
NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_THIS_END
NS_IMPL_CYCLE_COLLECTION_TRACE_BEGIN_INHERITED(WebSocket,
DOMEventTargetHelper)
NS_IMPL_CYCLE_COLLECTION_TRACE_END
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(WebSocket,
DOMEventTargetHelper)
if (tmp->mImpl) {
@@ -1418,12 +1444,6 @@ NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(WebSocket,
}
NS_IMPL_CYCLE_COLLECTION_UNLINK_END
bool
WebSocket::IsCertainlyAliveForCC() const
{
return mKeepingAlive;
}
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(WebSocket)
NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper)
+2 -2
View File
@@ -45,8 +45,8 @@ public:
public:
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(WebSocket, DOMEventTargetHelper)
virtual bool IsCertainlyAliveForCC() const override;
NS_DECL_CYCLE_COLLECTION_SKIPPABLE_SCRIPT_HOLDER_CLASS_INHERITED(
WebSocket, DOMEventTargetHelper)
// EventTarget
virtual void EventListenerAdded(nsIAtom* aType) override;
+3 -4
View File
@@ -222,7 +222,7 @@ EXPORTS.mozilla.dom += [
'WindowOrientationObserver.h',
]
UNIFIED_SOURCES += [
SOURCES += [
'AnonymousContent.cpp',
'Attr.cpp',
'BarProps.cpp',
@@ -238,6 +238,7 @@ UNIFIED_SOURCES += [
'DirectionalityUtils.cpp',
'DocGroup.cpp',
'DocumentFragment.cpp',
'DocumentOrShadowRoot.cpp',
'DocumentType.cpp',
'DOMCursor.cpp',
'DOMError.cpp',
@@ -372,14 +373,12 @@ UNIFIED_SOURCES += [
]
if CONFIG['MOZ_WEBRTC']:
UNIFIED_SOURCES += [
SOURCES += [
'nsDOMDataChannel.cpp',
]
# these files couldn't be in UNIFIED_SOURCES for now for reasons given below:
SOURCES += [
# DocumentOrShadowRoot conflicts with mozilla::dom::ShadowRoot
'DocumentOrShadowRoot.cpp',
# Several conflicts with other bindings.
'DOMIntersectionObserver.cpp',
# Because of OS X headers.
+1 -15
View File
@@ -2504,21 +2504,6 @@ nsDocument::InitCSP(nsIChannel* aChannel)
return NS_OK;
}
// If this is explicitly loaded as a data document, no need to set a CSP.
if (mLoadedAsData) {
return NS_OK;
}
// If this is an image, no need to set a CSP.
// If we don't do this, SVG images will be parsed as normal XML documents and
// subject to served CSPs, which might block internally applied inline styles.
// See UXP issue #1959.
nsCOMPtr<nsILoadInfo> loadInfo = aChannel->GetLoadInfo();
if (loadInfo->GetExternalContentPolicyType() ==
nsIContentPolicy::TYPE_IMAGE) {
return NS_OK;
}
nsAutoCString tCspHeaderValue, tCspROHeaderValue;
nsCOMPtr<nsIHttpChannel> httpChannel;
@@ -2547,6 +2532,7 @@ nsDocument::InitCSP(nsIChannel* aChannel)
// Check if this is a signed content to apply default CSP.
bool applySignedContentCSP = false;
nsCOMPtr<nsILoadInfo> loadInfo = aChannel->GetLoadInfo();
if (loadInfo && loadInfo->GetVerifySignedContent()) {
applySignedContentCSP = true;
}
+3 -15
View File
@@ -1185,8 +1185,7 @@ nsTreeSanitizer::SanitizeAttributes(mozilla::dom::Element* aElement,
continue;
}
if (IsURL(aURLs, attrLocal)) {
bool fragmentOnly = aElement->IsSVGElement(nsGkAtoms::use);
if (SanitizeURL(aElement, attrNs, attrLocal, fragmentOnly)) {
if (SanitizeURL(aElement, attrNs, attrLocal)) {
// in case the attribute removal shuffled the attribute order, start
// the loop again.
--ac;
@@ -1240,8 +1239,7 @@ nsTreeSanitizer::SanitizeAttributes(mozilla::dom::Element* aElement,
// else not allowed
} else if (aAllowXLink && kNameSpaceID_XLink == attrNs) {
if (nsGkAtoms::href == attrLocal) {
bool fragmentOnly = aElement->IsSVGElement(nsGkAtoms::use);
if (SanitizeURL(aElement, attrNs, attrLocal, fragmentOnly)) {
if (SanitizeURL(aElement, attrNs, attrLocal)) {
// in case the attribute removal shuffled the attribute order, start
// the loop again.
--ac;
@@ -1275,8 +1273,7 @@ nsTreeSanitizer::SanitizeAttributes(mozilla::dom::Element* aElement,
bool
nsTreeSanitizer::SanitizeURL(mozilla::dom::Element* aElement,
int32_t aNamespace,
nsIAtom* aLocalName,
bool aFragmentOnly)
nsIAtom* aLocalName)
{
nsAutoString value;
aElement->GetAttr(aNamespace, aLocalName, value);
@@ -1285,15 +1282,6 @@ nsTreeSanitizer::SanitizeURL(mozilla::dom::Element* aElement,
static const char* kWhitespace = "\n\r\t\b";
const nsAString& v =
nsContentUtils::TrimCharsInSet(kWhitespace, value);
// Fragment-only url cannot be harmful.
if (!v.IsEmpty() && v.First() == u'#') {
return false;
}
// if we allow only same-document fragment URLs, stop and remove here
if (aFragmentOnly) {
aElement->UnsetAttr(aNamespace, aLocalName, false);
return true;
}
nsIScriptSecurityManager* secMan = nsContentUtils::GetSecurityManager();
uint32_t flags = nsIScriptSecurityManager::DISALLOW_INHERIT_PRINCIPAL;
+1 -3
View File
@@ -143,13 +143,11 @@ class MOZ_STACK_CLASS nsTreeSanitizer {
* @param aElement the element whose attribute to possibly modify
* @param aNamespace the namespace of the URL attribute
* @param aLocalName the local name of the URL attribute
* @param aFragmentOnly allows same-document references only
* @return true if the attribute was removed and false otherwise
*/
bool SanitizeURL(mozilla::dom::Element* aElement,
int32_t aNamespace,
nsIAtom* aLocalName,
bool aFragmentOnly = false);
nsIAtom* aLocalName);
/**
* Checks a style rule for the presence of the 'binding' CSS property and
+1 -1
View File
@@ -682,7 +682,7 @@ DefineUnforgeableAttributes(JSContext* cx, JS::Handle<JSObject*> obj,
// funToString ObjectOps member for interface objects.
JSString*
InterfaceObjectToString(JSContext* aCx, JS::Handle<JSObject*> aObject,
bool /* isToSource */)
unsigned /* indent */)
{
const js::Class* clasp = js::GetObjectClass(aObject);
MOZ_ASSERT(IsDOMIfaceAndProtoClass(clasp));
+4
View File
@@ -170,6 +170,10 @@ DOMInterfaces = {
'headerFile': 'Crypto.h'
},
'CSS': {
'concrete': False,
},
'CSS2Properties': {
'nativeType': 'nsDOMCSSDeclaration'
},
+12 -3
View File
@@ -50,12 +50,21 @@ struct GCPolicy<mozilla::OwningNonNull<T>>
} // namespace JS
namespace js {
template<typename T, typename Wrapper>
struct WrappedPtrOperations<mozilla::OwningNonNull<T>, Wrapper>
template<typename T>
struct RootedBase<mozilla::OwningNonNull<T>>
{
typedef mozilla::OwningNonNull<T> SmartPtrType;
operator SmartPtrType& () const
{
auto& self = *static_cast<const JS::Rooted<SmartPtrType>*>(this);
return self.get();
}
operator T& () const
{
return static_cast<const Wrapper*>(this)->get();
auto& self = *static_cast<const JS::Rooted<SmartPtrType>*>(this);
return self.get();
}
};
} // namespace js
+10 -3
View File
@@ -38,12 +38,19 @@ struct GCPolicy<RefPtr<T>>
} // namespace JS
namespace js {
template<typename T, typename Wrapper>
struct WrappedPtrOperations<RefPtr<T>, Wrapper>
template<typename T>
struct RootedBase<RefPtr<T>>
{
operator RefPtr<T>& () const
{
auto& self = *static_cast<const JS::Rooted<RefPtr<T>>*>(this);
return self.get();
}
operator T*() const
{
return static_cast<const Wrapper*>(this)->get();
auto& self = *static_cast<const JS::Rooted<RefPtr<T>>*>(this);
return self.get();
}
};
} // namespace js
+1 -1
View File
@@ -84,7 +84,7 @@ LOCAL_INCLUDES += [
'/media/webrtc/signaling/src/peerconnection',
]
UNIFIED_SOURCES += [
SOURCES += [
'BindingUtils.cpp',
'CallbackInterface.cpp',
'CallbackObject.cpp',
+2 -8
View File
@@ -248,14 +248,8 @@ class IDLScope(IDLObject):
return self.QName()
def QName(self):
# It's possible for us to be called before __init__ has been called, for
# the IDLObjectWithScope case. In that case, self._name won't be set yet.
if hasattr(self, "_name"):
name = self._name
else:
name = None
if name:
return name.QName() + "::"
if self._name:
return self._name.QName() + "::"
return "::"
def ensureUnique(self, identifier, object):
+1 -1
View File
@@ -7,7 +7,7 @@ EXPORTS.mozilla.dom += [
'BroadcastChannel.h',
]
UNIFIED_SOURCES += [
SOURCES += [
'BroadcastChannel.cpp',
'BroadcastChannelChild.cpp',
'BroadcastChannelParent.cpp',
+1 -1
View File
@@ -37,7 +37,7 @@ EXPORTS.mozilla.dom.cache += [
'TypeUtils.h',
]
UNIFIED_SOURCES += [
SOURCES += [
'Action.cpp',
'ActorChild.cpp',
'AutoUtils.cpp',
+10 -21
View File
@@ -5752,18 +5752,6 @@ inline uint8_t PoisonValue(uint8_t v)
return v + rand() %3 -1;
}
static IntRect ClipImageDataTransfer(IntRect& aSrc,
const IntPoint& aDestOffset,
const IntSize& aDestBounds)
{
IntRect dest = aSrc;
dest.SafeMoveBy(aDestOffset);
dest = IntRect(IntPoint(0, 0), aDestBounds).SafeIntersect(dest);
aSrc = aSrc.SafeIntersect(dest - aDestOffset);
return aSrc + aDestOffset;
}
nsresult
CanvasRenderingContext2D::GetImageDataArray(JSContext* aCx,
int32_t aX,
@@ -5804,11 +5792,9 @@ CanvasRenderingContext2D::GetImageDataArray(JSContext* aCx,
return NS_OK;
}
IntRect dstWriteRect(0, 0, aWidth, aHeight);
IntRect srcReadRect = ClipImageDataTransfer(dstWriteRect,
IntPoint(aX, aY),
IntSize(mWidth, mHeight));
IntRect srcRect(0, 0, mWidth, mHeight);
IntRect destRect(aX, aY, aWidth, aHeight);
IntRect srcReadRect = srcRect.Intersect(destRect);
RefPtr<DataSourceSurface> readback;
DataSourceSurface::MappedSurface rawData;
if (!srcReadRect.IsEmpty()) {
@@ -5836,6 +5822,9 @@ CanvasRenderingContext2D::GetImageDataArray(JSContext* aCx,
}
}
IntRect dstWriteRect = srcReadRect;
dstWriteRect.MoveBy(-aX, -aY);
JS::AutoCheckCannotGC nogc;
bool isShared;
uint8_t* data = JS_GetUint8ClampedArrayData(darray, &isShared, nogc);
@@ -6036,10 +6025,10 @@ CanvasRenderingContext2D::PutImageData_explicit(int32_t aX, int32_t aY, uint32_t
dirtyRect = imageDataRect;
}
IntRect srcRect = dirtyRect;
dirtyRect = ClipImageDataTransfer(srcRect, IntPoint(aX, aY),
IntSize(mWidth, mHeight));
if (dirtyRect.IsEmpty()) {
dirtyRect.MoveBy(IntPoint(aX, aY));
dirtyRect = IntRect(0, 0, mWidth, mHeight).Intersect(dirtyRect);
if (dirtyRect.Width() <= 0 || dirtyRect.Height() <= 0) {
return NS_OK;
}
+3
View File
@@ -6,6 +6,9 @@
#include "ImageBitmapColorUtils.h"
#include "js/LegacyIntTypes.h"
#include <cmath>
namespace mozilla {
namespace dom {
+2 -2
View File
@@ -41,7 +41,7 @@ EXPORTS.mozilla.dom += [
]
# Canvas 2D and common sources
UNIFIED_SOURCES += [
SOURCES += [
'CanvasImageCache.cpp',
'CanvasRenderingContext2D.cpp',
'CanvasRenderingContextHelper.cpp',
@@ -59,7 +59,7 @@ SOURCES += [
]
# WebGL Sources
UNIFIED_SOURCES += [
SOURCES += [
'TexUnpackBlob.cpp',
'WebGL1Context.cpp',
'WebGL1ContextUniforms.cpp',
+1 -1
View File
@@ -21,7 +21,7 @@ EXPORTS.mozilla.dom += [
'Console.h',
]
UNIFIED_SOURCES += [
SOURCES += [
'Console.cpp',
'ConsoleReportCollector.cpp',
]
+1 -1
View File
@@ -12,7 +12,7 @@ EXPORTS.mozilla.dom += [
'WebCryptoThreadPool.h'
]
UNIFIED_SOURCES += [
SOURCES += [
'CryptoBuffer.cpp',
'CryptoKey.cpp',
'KeyAlgorithmProxy.cpp',
+1 -1
View File
@@ -10,7 +10,7 @@ EXPORTS.mozilla.dom += [
'TextEncoder.h',
]
UNIFIED_SOURCES += [
SOURCES += [
'EncodingUtils.cpp',
'FallbackEncoding.cpp',
'TextDecoder.cpp',
+2 -3
View File
@@ -52,12 +52,11 @@ NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(DOMEventTargetHelper)
NS_IMPL_CYCLE_COLLECTION_UNLINK_END
NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_BEGIN(DOMEventTargetHelper)
bool isBlack = tmp->IsBlack();
if (isBlack || tmp->IsCertainlyAliveForCC()) {
if (tmp->IsBlack() || tmp->IsCertainlyAliveForCC()) {
if (tmp->mListenerManager) {
tmp->mListenerManager->MarkForCC();
}
if (!isBlack && tmp->PreservingWrapper()) {
if (!tmp->IsBlack() && tmp->PreservingWrapper()) {
// This marks the wrapper black.
tmp->GetWrapper();
}
+10 -5
View File
@@ -639,11 +639,16 @@ DataTransfer::PrincipalMaySetData(const nsAString& aType,
return false;
}
// Don't allow adding internal types of the form */x-moz-*, but
// special-case the url types as they are simple variations of urls.
if (FindInReadable(NS_LITERAL_STRING(kInternal_Mimetype_Prefix), aType) &&
!StringBeginsWith(aType, NS_LITERAL_STRING("text/x-moz-url"))) {
NS_WARNING("Disallowing adding requested internal type to DataTransfer");
if (aType.EqualsASCII(kFileMime) ||
aType.EqualsASCII(kFilePromiseMime)) {
NS_WARNING("Disallowing adding x-moz-file or x-moz-file-promize types to DataTransfer");
return false;
}
// Disallow content from creating x-moz-place flavors, so that it cannot
// create fake Places smart queries exposing user data.
if (StringBeginsWith(aType, NS_LITERAL_STRING("text/x-moz-place"))) {
NS_WARNING("Disallowing adding moz-place types to DataTransfer");
return false;
}
}
-4
View File
@@ -751,8 +751,6 @@ EventListenerManager::SetEventHandler(nsIAtom* aName,
bool aPermitUntrustedEvents,
Element* aElement)
{
auto removeEventHandler = MakeScopeExit([&] { RemoveEventHandler(aName, EmptyString()); });
nsCOMPtr<nsIDocument> doc;
nsCOMPtr<nsIScriptGlobalObject> global =
GetScriptGlobalAndDocument(getter_AddRefs(doc));
@@ -827,8 +825,6 @@ EventListenerManager::SetEventHandler(nsIAtom* aName,
NS_ENSURE_TRUE(context, NS_ERROR_FAILURE);
NS_ENSURE_STATE(global->GetGlobalJSObject());
removeEventHandler.release();
Listener* listener = SetEventHandlerInternal(aName,
EmptyString(),
TypedEventHandler(),
+2 -6
View File
@@ -73,7 +73,7 @@ EXPORTS.mozilla.dom += [
'XULCommandEvent.h',
]
UNIFIED_SOURCES += [
SOURCES += [
'AnimationEvent.cpp',
'AsyncEventDispatcher.cpp',
'BeforeAfterKeyboardEvent.cpp',
@@ -95,6 +95,7 @@ UNIFIED_SOURCES += [
'EventDispatcher.cpp',
'EventListenerManager.cpp',
'EventListenerService.cpp',
'EventStateManager.cpp',
'EventTarget.cpp',
'FocusEvent.cpp',
'ImageCaptureError.cpp',
@@ -124,11 +125,6 @@ UNIFIED_SOURCES += [
'XULCommandEvent.cpp',
]
# nsEventStateManager.cpp should be built separately because of Mac OS X headers.
SOURCES += [
'EventStateManager.cpp',
]
include('/ipc/chromium/chromium-config.mozbuild')
FINAL_LIBRARY = 'xul'
+1
View File
@@ -13,6 +13,7 @@
#include "nsIUnicodeDecoder.h"
#include "nsIUnicodeEncoder.h"
#include "nsCharSeparatedTokenizer.h"
#include "nsDOMString.h"
#include "nsNetUtil.h"
#include "nsReadableUtils.h"
+6 -3
View File
@@ -19,9 +19,14 @@ EXPORTS.mozilla.dom += [
]
UNIFIED_SOURCES += [
'ChannelInfo.cpp',
'Fetch.cpp',
'FetchConsumer.cpp',
'Request.cpp',
'Response.cpp',
]
SOURCES += [
'ChannelInfo.cpp',
'FetchDriver.cpp',
'FetchObserver.cpp',
'FetchUtil.cpp',
@@ -29,8 +34,6 @@ UNIFIED_SOURCES += [
'InternalHeaders.cpp',
'InternalRequest.cpp',
'InternalResponse.cpp',
'Request.cpp',
'Response.cpp',
]
IPDL_SOURCES += [
+1 -1
View File
@@ -17,7 +17,7 @@ EXPORTS.mozilla.dom += [
'MutableFileBase.h',
]
UNIFIED_SOURCES += [
SOURCES += [
'ActorsChild.cpp',
'ActorsParent.cpp',
'FileHandleBase.cpp',
+1
View File
@@ -9,6 +9,7 @@
#include "GetFilesTask.h"
#include "WorkerPrivate.h"
#include "nsCharSeparatedTokenizer.h"
#include "nsString.h"
#include "mozilla/dom/DirectoryBinding.h"
#include "mozilla/dom/FileSystemBase.h"
+1
View File
@@ -5,6 +5,7 @@
#include "mozilla/dom/FileSystemBase.h"
#include "nsCharSeparatedTokenizer.h"
#include "FileSystemUtils.h"
#include "OSFileSystem.h"
+1 -1
View File
@@ -18,7 +18,7 @@ EXPORTS.mozilla.dom += [
'OSFileSystem.h',
]
UNIFIED_SOURCES += [
SOURCES += [
'Directory.cpp',
'FileSystemBase.cpp',
'FileSystemRequestParent.cpp',
+5 -5
View File
@@ -30,7 +30,7 @@ if CONFIG['MOZ_GAMEPAD']:
'ipc/GamepadTestChannelParent.h'
]
UNIFIED_SOURCES = [
SOURCES = [
'Gamepad.cpp',
'GamepadButton.cpp',
'GamepadManager.cpp',
@@ -45,19 +45,19 @@ if CONFIG['MOZ_GAMEPAD']:
]
if CONFIG['MOZ_GAMEPAD_BACKEND'] == 'stub':
UNIFIED_SOURCES += [
SOURCES += [
'fallback/FallbackGamepad.cpp'
]
elif CONFIG['MOZ_GAMEPAD_BACKEND'] == 'cocoa':
UNIFIED_SOURCES += [
SOURCES += [
'cocoa/CocoaGamepad.cpp'
]
elif CONFIG['MOZ_GAMEPAD_BACKEND'] == 'windows':
UNIFIED_SOURCES += [
SOURCES += [
'windows/WindowsGamepad.cpp'
]
elif CONFIG['MOZ_GAMEPAD_BACKEND'] == 'linux':
UNIFIED_SOURCES += [
SOURCES += [
'linux/LinuxGamepad.cpp'
]
+1 -1
View File
@@ -12,7 +12,7 @@ SOURCES += [
'nsGeolocation.cpp',
]
UNIFIED_SOURCES += [
SOURCES += [
'MLSFallback.cpp',
'nsGeoPosition.cpp',
]
+1 -1
View File
@@ -15,7 +15,7 @@ EXPORTS.mozilla.dom += [
'GridTracks.h',
]
UNIFIED_SOURCES += [
SOURCES += [
'Grid.cpp',
'GridArea.cpp',
'GridDimension.cpp',
+1 -2
View File
@@ -1721,8 +1721,7 @@ HTMLFormElement::GetActionURL(nsIURI** aActionURL,
// policy - do *not* consult default-src, see:
// http://www.w3.org/TR/CSP2/#directive-default-src
rv = csp->Permits(actionURL, nsIContentSecurityPolicy::FORM_ACTION_DIRECTIVE,
true /*aSpecific */, true /* aSendViolationReports */,
&permitsFormAction);
true, &permitsFormAction);
NS_ENSURE_SUCCESS(rv, rv);
if (!permitsFormAction) {
return NS_ERROR_CSP_FORM_ACTION_VIOLATION;
-4
View File
@@ -13,10 +13,6 @@
#include "nsIFrame.h"
#include "nsIFormControlFrame.h"
#if defined(MOZ_X11)
#include "X11UndefineNone.h"
#endif
NS_IMPL_NS_NEW_HTML_ELEMENT(OptGroup)
namespace mozilla {
+1 -2
View File
@@ -191,8 +191,7 @@ SetBaseURIUsingFirstBaseWithHref(nsIDocument* aDocument, nsIContent* aMustMatch)
// http://www.w3.org/TR/CSP2/#directive-default-src
bool cspPermitsBaseURI = true;
rv = csp->Permits(newBaseURI, nsIContentSecurityPolicy::BASE_URI_DIRECTIVE,
true /* aSpecific */, true /* aSendViolationReports */,
&cspPermitsBaseURI);
true, &cspPermitsBaseURI);
if (NS_FAILED(rv) || !cspPermitsBaseURI) {
newBaseURI = nullptr;
}
+2 -6
View File
@@ -120,7 +120,7 @@ EXPORTS.mozilla.dom += [
'ValidityState.h',
]
UNIFIED_SOURCES += [
SOURCES += [
'HTMLAllCollection.cpp',
'HTMLAnchorElement.cpp',
'HTMLAreaElement.cpp',
@@ -203,6 +203,7 @@ UNIFIED_SOURCES += [
'nsIConstraintValidation.cpp',
'nsRadioVisitor.cpp',
'nsTextEditorState.cpp',
'PluginDocument.cpp',
'RadioNodeList.cpp',
'TextTrackManager.cpp',
'TimeRanges.cpp',
@@ -210,11 +211,6 @@ UNIFIED_SOURCES += [
'VideoDocument.cpp',
]
SOURCES += [
# Includes npapi.h.
'PluginDocument.cpp',
]
EXTRA_COMPONENTS += [
'htmlMenuBuilder.js',
'htmlMenuBuilder.manifest'
+1 -1
View File
@@ -44,7 +44,7 @@ EXPORTS.mozilla.dom.indexedDB += [
'SerializationHelpers.h',
]
UNIFIED_SOURCES += [
SOURCES += [
'ActorsChild.cpp',
'FileInfo.cpp',
'FileSnapshot.cpp',
@@ -252,6 +252,9 @@ interface nsIContentSecurityPolicy : nsISerializable
/**
* Checks if a specific directive permits loading of a URI.
*
* NOTE: Calls to this may trigger violation reports when queried, so the
* return value should not be cached.
*
* @param aURI
* The URI about to be loaded or used.
* @param aDir
@@ -263,17 +266,11 @@ interface nsIContentSecurityPolicy : nsISerializable
* "false" allows CSP to fall back to default-src. This function
* behaves the same for both values of canUseDefault when querying
* directives that don't fall-back.
* @param aSendViolationReports
* If `true` and the uri is not allowed then trigger violation reports.
* This should be `false` for caching or preloads.
* @return
* Whether or not the provided URI is allowed by CSP under the given
* directive. (block the pending operation if false).
*/
boolean permits(in nsIURI aURI,
in CSPDirective aDir,
in boolean aSpecific,
in boolean aSendViolationReports);
boolean permits(in nsIURI aURI, in CSPDirective aDir, in boolean aSpecific);
/**
* Delegate method called by the service when sub-elements of the protected
+1 -1
View File
@@ -160,7 +160,7 @@
#include "mozilla/dom/time/DateCacheCleaner.h"
#include "mozilla/net/NeckoMessageUtils.h"
#include "mozilla/widget/PuppetBidiKeyboard.h"
#include "mozilla/mozSpellChecker.h"
#include "mozilla/RemoteSpellCheckEngineChild.h"
#include "GMPServiceChild.h"
#include "gfxPlatform.h"
#include "nscore.h" // for NS_FREE_PERMANENT_DATA
+4 -9
View File
@@ -43,11 +43,13 @@ EXPORTS.mozilla += [
'ProcessPriorityManager.h',
]
UNIFIED_SOURCES += [
SOURCES += [
'AppProcessChecker.cpp',
'Blob.cpp',
'ColorPickerParent.cpp',
'ContentBridgeChild.cpp',
'ContentBridgeParent.cpp',
'ContentChild.cpp',
'ContentParent.cpp',
'ContentProcess.cpp',
'ContentProcessManager.cpp',
@@ -56,6 +58,7 @@ UNIFIED_SOURCES += [
'nsIContentParent.cpp',
'PermissionMessageUtils.cpp',
'PreallocatedProcessManager.cpp',
'ProcessHangMonitor.cpp',
'ProcessPriorityManager.cpp',
'ScreenManagerParent.cpp',
'StructuredCloneData.cpp',
@@ -65,14 +68,6 @@ UNIFIED_SOURCES += [
'TabParent.cpp',
]
# Blob.cpp cannot be compiled in unified mode because it triggers a fatal gcc warning.
# ContentChild.cpp cannot be compiled in unified mode on linux due to Time conflict
SOURCES += [
'Blob.cpp',
'ContentChild.cpp',
'ProcessHangMonitor.cpp',
]
IPDL_SOURCES += [
'BlobTypes.ipdlh',
'DOMTypes.ipdlh',
+1 -3
View File
@@ -5,9 +5,7 @@
EXPORTS += ['nsJSON.h']
UNIFIED_SOURCES += [
'nsJSON.cpp',
]
SOURCES += ['nsJSON.cpp']
LOCAL_INCLUDES += ['/dom/base']
+1 -1
View File
@@ -7,7 +7,7 @@ EXPORTS += [
'nsJSProtocolHandler.h',
]
UNIFIED_SOURCES += [
SOURCES += [
'nsJSProtocolHandler.cpp',
]
+1 -1
View File
@@ -3,7 +3,7 @@
# 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/.
UNIFIED_SOURCES += [
SOURCES += [
'nsMathMLElement.cpp',
'nsMathMLElementFactory.cpp',
]
+8 -12
View File
@@ -278,21 +278,18 @@ DecoderTraits::CanHandleContentType(const MediaContentType& aContentType,
bool DecoderTraits::ShouldHandleMediaType(const char* aMIMEType,
DecoderDoctorDiagnostics* aDiagnostics)
{
// Prior to Issue #1977, we always pop-up the download prompt when
// wave files are opened directly. This was considered inconsistent
// since we play wave files when they're inside an HTML5 audio tag
// anyway. However, there may be users who depended on this old
// behavior, where they use their helper apps to open WAV audio
// instead. We should allow this old behavior behind a pref for
// those who want it.
if (!Preferences::GetBool("media.wave.play-stand-alone", true) &&
IsWaveSupportedType(nsDependentCString(aMIMEType))) {
if (IsWaveSupportedType(nsDependentCString(aMIMEType))) {
// 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
// we should allow those to be handled by plugins or helper apps.
// Furthermore people can play Wave files on most platforms by other
// means.
return false;
}
// If an external plugin which can handle quicktime video is available
// (and not disabled), prefer it over native playback as there are
// several codecs found in the wild that we do not handle.
// (and not disabled), prefer it over native playback as there several
// codecs found in the wild that we do not handle.
if (nsDependentCString(aMIMEType).EqualsASCII("video/quicktime")) {
RefPtr<nsPluginHost> pluginHost = nsPluginHost::GetInst();
if (pluginHost &&
@@ -417,7 +414,6 @@ bool DecoderTraits::IsSupportedInVideoDocument(const nsACString& aType)
#endif
IsMP3SupportedType(aType) ||
IsAACSupportedType(aType) ||
IsWaveSupportedType(aType) ||
IsFlacSupportedType(aType) ||
false;
}
+1
View File
@@ -31,6 +31,7 @@
#include "nsTArray.h"
#include "GeckoProfiler.h"
#include "nsContentTypeParser.h"
#include "nsCharSeparatedTokenizer.h"
#ifdef LOG
#undef LOG
+1 -1
View File
@@ -588,7 +588,7 @@ RTCPeerConnection.prototype = {
throw new this._win.DOMException(msg + " - improper scheme: " + url.scheme,
"SyntaxError");
}
if (url.scheme in { stuns:1 }) {
if (url.scheme in { stuns:1, turns:1 }) {
this.logWarning(url.scheme.toUpperCase() + " is not yet supported.");
}
});
+1 -1
View File
@@ -22,7 +22,7 @@ EXPORTS.mozilla += [
'EMEUtils.h',
]
UNIFIED_SOURCES += [
SOURCES += [
'CDMCaps.cpp',
'DetailedPromise.cpp',
'EMEUtils.cpp',
+2 -2
View File
@@ -15,7 +15,7 @@ EXPORTS += [
'TrackMetadataBase.h',
]
UNIFIED_SOURCES += [
SOURCES += [
'MediaEncoder.cpp',
'OpusTrackEncoder.cpp',
'TrackEncoder.cpp',
@@ -25,7 +25,7 @@ if CONFIG['MOZ_WEBM_ENCODER']:
EXPORTS += ['VP8TrackEncoder.h',
]
UNIFIED_SOURCES += ['VP8TrackEncoder.cpp',
SOURCES += ['VP8TrackEncoder.cpp',
]
LOCAL_INCLUDES += ['/media/libyuv/include']
+1 -1
View File
@@ -9,7 +9,7 @@ EXPORTS += [
'FlacFrameParser.h',
]
UNIFIED_SOURCES += [
SOURCES += [
'FlacDecoder.cpp',
'FlacDemuxer.cpp',
'FlacFrameParser.cpp',
+2 -5
View File
@@ -9,13 +9,10 @@ EXPORTS += [
'MP4Stream.h',
]
UNIFIED_SOURCES += [
SOURCES += [
'MP4Decoder.cpp',
'MP4Demuxer.cpp',
'MP4Stream.cpp',
]
SOURCES += [
'MP4Demuxer.cpp',
]
FINAL_LIBRARY = 'xul'
+2 -3
View File
@@ -1018,12 +1018,11 @@ GeckoMediaPluginServiceParent::PluginTerminated(const RefPtr<GMPParent>& aPlugin
MOZ_ASSERT(NS_GetCurrentThread() == mGMPThread);
if (aPlugin->IsMarkedForDeletion()) {
nsCString path8;
nsString path;
RefPtr<nsIFile> dir = aPlugin->GetDirectory();
nsresult rv = dir->GetNativePath(path8);
nsresult rv = dir->GetPath(path);
NS_ENSURE_SUCCESS_VOID(rv);
nsString path = NS_ConvertUTF8toUTF16(path8);
if (mPluginsWaitingForDeletion.Contains(path)) {
RemoveOnGMPThread(path, true /* delete */, true /* can defer */);
}
+2 -2
View File
@@ -76,7 +76,7 @@ if CONFIG['MOZ_EME']:
'GMPCDMProxy.h',
]
UNIFIED_SOURCES += [
SOURCES += [
'GMPAudioDecoderChild.cpp',
'GMPAudioDecoderParent.cpp',
'GMPAudioHost.cpp',
@@ -112,7 +112,7 @@ UNIFIED_SOURCES += [
]
if CONFIG['MOZ_EME']:
UNIFIED_SOURCES += [
SOURCES += [
'GMPCDMCallbackProxy.cpp',
'GMPCDMProxy.cpp',
]
+1 -1
View File
@@ -7,7 +7,7 @@ EXPORTS.mozilla.dom += [
'ImageCapture.h'
]
UNIFIED_SOURCES += [
SOURCES += [
'CaptureTask.cpp',
'ImageCapture.cpp',
]
+1 -1
View File
@@ -3,7 +3,7 @@
# 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/.
UNIFIED_SOURCES += [
SOURCES += [
'AudioSinkWrapper.cpp',
'DecodedAudioDataSink.cpp',
'DecodedStream.cpp',
+3 -5
View File
@@ -465,12 +465,10 @@ MediaSourceTrackDemuxer::DoGetSamples(int32_t aNumSamples)
}
RefPtr<SamplesHolder> samples = new SamplesHolder;
samples->mSamples.AppendElement(sample);
{
if (mNextRandomAccessPoint.ToMicroseconds() <= sample->mTime) {
MonitorAutoLock mon(mMonitor);
if (mNextRandomAccessPoint.ToMicroseconds() <= sample->mTime) {
mNextRandomAccessPoint =
mManager->GetNextRandomAccessPoint(mType, MediaSourceDemuxer::EOS_FUZZ);
}
mNextRandomAccessPoint =
mManager->GetNextRandomAccessPoint(mType, MediaSourceDemuxer::EOS_FUZZ);
}
return SamplesPromise::CreateAndResolve(samples, __func__);
}
@@ -22,15 +22,15 @@
extern mozilla::LogModule* GetMediaSourceLog();
#define MSE_DEBUG(arg, ...) MOZ_LOG(GetMediaSourceLog(), mozilla::LogLevel::Debug, ("TrackBuffersManager(%p)::%s: " arg, this,__func__, ##__VA_ARGS__))
#define MSE_DEBUGV(arg, ...) MOZ_LOG(GetMediaSourceLog(), mozilla::LogLevel::Verbose, ("TrackBuffersManager(%p)::%s: " arg, this, __func__, ##__VA_ARGS__))
#define MSE_DEBUG(arg, ...) MOZ_LOG(GetMediaSourceLog(), mozilla::LogLevel::Debug, ("TrackBuffersManager(%p:%s)::%s: " arg, this, mType.get(), __func__, ##__VA_ARGS__))
#define MSE_DEBUGV(arg, ...) MOZ_LOG(GetMediaSourceLog(), mozilla::LogLevel::Verbose, ("TrackBuffersManager(%p:%s)::%s: " arg, this, mType.get(), __func__, ##__VA_ARGS__))
mozilla::LogModule* GetMediaSourceSamplesLog()
{
static mozilla::LazyLogModule sLogModule("MediaSourceSamples");
return sLogModule;
}
#define SAMPLE_DEBUG(arg, ...) MOZ_LOG(GetMediaSourceSamplesLog(), mozilla::LogLevel::Debug, ("TrackBuffersManager(%p)::%s: " arg, this, __func__, ##__VA_ARGS__))
#define SAMPLE_DEBUG(arg, ...) MOZ_LOG(GetMediaSourceSamplesLog(), mozilla::LogLevel::Debug, ("TrackBuffersManager(%p:%s)::%s: " arg, this, mType.get(), __func__, ##__VA_ARGS__))
namespace mozilla {
Loaded 100 of 5753 files, more files were not shown because too many files have changed in this diff. Show more