forked from mirrors/gecko-dev
Merge inbound to mozilla-central. a=merge
This commit is contained in:
commit
6c198262de
80 changed files with 815 additions and 449 deletions
1
Cargo.lock
generated
1
Cargo.lock
generated
|
|
@ -1878,7 +1878,6 @@ version = "0.19.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"cssparser 0.24.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"cssparser 0.24.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"fnv 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
|
||||||
"fxhash 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"fxhash 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"log 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"log 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"matches 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
"matches 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
|
|
||||||
|
|
@ -311,11 +311,8 @@ else
|
||||||
ifneq ($(CC_TYPE),msvc)
|
ifneq ($(CC_TYPE),msvc)
|
||||||
maybe_clobber_profiledbuild: clean
|
maybe_clobber_profiledbuild: clean
|
||||||
ifneq (,$(findstring clang,$(CC_TYPE)))
|
ifneq (,$(findstring clang,$(CC_TYPE)))
|
||||||
# 32-bit Windows PGO is currently blocked by bug 1479800
|
|
||||||
ifneq ($(CC_TYPE)_$(CPU_ARCH),clang-cl_x86)
|
|
||||||
$(LLVM_PROFDATA) merge -o $(DEPTH)/merged.profdata $(DEPTH)/*.profraw
|
$(LLVM_PROFDATA) merge -o $(DEPTH)/merged.profdata $(DEPTH)/*.profraw
|
||||||
endif
|
endif
|
||||||
endif
|
|
||||||
else
|
else
|
||||||
maybe_clobber_profiledbuild:
|
maybe_clobber_profiledbuild:
|
||||||
$(RM) $(DIST)/bin/*.pgc
|
$(RM) $(DIST)/bin/*.pgc
|
||||||
|
|
|
||||||
|
|
@ -149,6 +149,7 @@ support-files =
|
||||||
run-if = e10s
|
run-if = e10s
|
||||||
[browser_urlHighlight.js]
|
[browser_urlHighlight.js]
|
||||||
[browser_urlOverflow.js]
|
[browser_urlOverflow.js]
|
||||||
|
skip-if = true # Bug 1482557
|
||||||
[browser_wyciwyg_urlbarCopying.js]
|
[browser_wyciwyg_urlbarCopying.js]
|
||||||
subsuite = clipboard
|
subsuite = clipboard
|
||||||
support-files =
|
support-files =
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,6 @@
|
||||||
|
|
||||||
/* globals ExtensionAPI */
|
/* globals ExtensionAPI */
|
||||||
|
|
||||||
const STYLESHEET_URI = "chrome://formautofill/content/formautofill.css";
|
|
||||||
const CACHED_STYLESHEETS = new WeakMap();
|
const CACHED_STYLESHEETS = new WeakMap();
|
||||||
|
|
||||||
ChromeUtils.import("resource://gre/modules/Services.jsm");
|
ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||||
|
|
@ -44,7 +43,9 @@ function onMaybeOpenPopup(evt) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
insertStyleSheet(domWindow, STYLESHEET_URI);
|
insertStyleSheet(domWindow, "chrome://formautofill/content/formautofill.css");
|
||||||
|
insertStyleSheet(domWindow, "resource://formautofill/autocomplete-item-shared.css");
|
||||||
|
insertStyleSheet(domWindow, "resource://formautofill/autocomplete-item.css");
|
||||||
}
|
}
|
||||||
|
|
||||||
function isAvailable() {
|
function isAvailable() {
|
||||||
|
|
|
||||||
|
|
@ -72,6 +72,8 @@ add_task(async function test_phishing_warning_single_category() {
|
||||||
ok(warningBox, "Got phishing warning box");
|
ok(warningBox, "Got phishing warning box");
|
||||||
|
|
||||||
await expectWarningText(browser, "Autofills phone");
|
await expectWarningText(browser, "Autofills phone");
|
||||||
|
is(warningBox.ownerGlobal.getComputedStyle(warningBox).backgroundColor,
|
||||||
|
"rgba(248, 232, 28, 0.2)", "Check warning text background color");
|
||||||
|
|
||||||
await closePopup(browser);
|
await closePopup(browser);
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -63,6 +63,14 @@ def import_clang_tidy(source_dir):
|
||||||
def build_package(package_build_dir, cmake_args):
|
def build_package(package_build_dir, cmake_args):
|
||||||
if not os.path.exists(package_build_dir):
|
if not os.path.exists(package_build_dir):
|
||||||
os.mkdir(package_build_dir)
|
os.mkdir(package_build_dir)
|
||||||
|
# If CMake has already been run, it may have been run with different
|
||||||
|
# arguments, so we need to re-run it. Make sure the cached copy of the
|
||||||
|
# previous CMake run is cleared before running it again.
|
||||||
|
if os.path.exists(package_build_dir + "/CMakeCache.txt"):
|
||||||
|
os.remove(package_build_dir + "/CMakeCache.txt")
|
||||||
|
if os.path.exists(package_build_dir + "/CMakeFiles"):
|
||||||
|
shutil.rmtree(package_build_dir + "/CMakeFiles")
|
||||||
|
|
||||||
run_in(package_build_dir, ["cmake"] + cmake_args)
|
run_in(package_build_dir, ["cmake"] + cmake_args)
|
||||||
run_in(package_build_dir, ["ninja", "install"])
|
run_in(package_build_dir, ["ninja", "install"])
|
||||||
|
|
||||||
|
|
@ -176,66 +184,70 @@ def is_windows():
|
||||||
def build_one_stage(cc, cxx, asm, ld, ar, ranlib, libtool,
|
def build_one_stage(cc, cxx, asm, ld, ar, ranlib, libtool,
|
||||||
src_dir, stage_dir, build_libcxx,
|
src_dir, stage_dir, build_libcxx,
|
||||||
osx_cross_compile, build_type, assertions,
|
osx_cross_compile, build_type, assertions,
|
||||||
python_path, gcc_dir, libcxx_include_dir):
|
python_path, gcc_dir, libcxx_include_dir,
|
||||||
|
is_final_stage=False):
|
||||||
if not os.path.exists(stage_dir):
|
if not os.path.exists(stage_dir):
|
||||||
os.mkdir(stage_dir)
|
os.mkdir(stage_dir)
|
||||||
|
|
||||||
build_dir = stage_dir + "/build"
|
build_dir = stage_dir + "/build"
|
||||||
inst_dir = stage_dir + "/clang"
|
inst_dir = stage_dir + "/clang"
|
||||||
|
|
||||||
# If CMake has already been run, it may have been run with different
|
|
||||||
# arguments, so we need to re-run it. Make sure the cached copy of the
|
|
||||||
# previous CMake run is cleared before running it again.
|
|
||||||
if os.path.exists(build_dir + "/CMakeCache.txt"):
|
|
||||||
os.remove(build_dir + "/CMakeCache.txt")
|
|
||||||
if os.path.exists(build_dir + "/CMakeFiles"):
|
|
||||||
shutil.rmtree(build_dir + "/CMakeFiles")
|
|
||||||
|
|
||||||
# cmake doesn't deal well with backslashes in paths.
|
# cmake doesn't deal well with backslashes in paths.
|
||||||
def slashify_path(path):
|
def slashify_path(path):
|
||||||
return path.replace('\\', '/')
|
return path.replace('\\', '/')
|
||||||
|
|
||||||
cmake_args = ["-GNinja",
|
def cmake_base_args(cc, cxx, asm, ld, ar, ranlib, libtool, inst_dir):
|
||||||
"-DCMAKE_C_COMPILER=%s" % slashify_path(cc[0]),
|
cmake_args = [
|
||||||
"-DCMAKE_CXX_COMPILER=%s" % slashify_path(cxx[0]),
|
"-GNinja",
|
||||||
"-DCMAKE_ASM_COMPILER=%s" % slashify_path(asm[0]),
|
"-DCMAKE_C_COMPILER=%s" % slashify_path(cc[0]),
|
||||||
"-DCMAKE_LINKER=%s" % slashify_path(ld[0]),
|
"-DCMAKE_CXX_COMPILER=%s" % slashify_path(cxx[0]),
|
||||||
"-DCMAKE_AR=%s" % slashify_path(ar),
|
"-DCMAKE_ASM_COMPILER=%s" % slashify_path(asm[0]),
|
||||||
"-DCMAKE_C_FLAGS=%s" % ' '.join(cc[1:]),
|
"-DCMAKE_LINKER=%s" % slashify_path(ld[0]),
|
||||||
"-DCMAKE_CXX_FLAGS=%s" % ' '.join(cxx[1:]),
|
"-DCMAKE_AR=%s" % slashify_path(ar),
|
||||||
"-DCMAKE_ASM_FLAGS=%s" % ' '.join(asm[1:]),
|
"-DCMAKE_C_FLAGS=%s" % ' '.join(cc[1:]),
|
||||||
"-DCMAKE_EXE_LINKER_FLAGS=%s" % ' '.join(ld[1:]),
|
"-DCMAKE_CXX_FLAGS=%s" % ' '.join(cxx[1:]),
|
||||||
"-DCMAKE_SHARED_LINKER_FLAGS=%s" % ' '.join(ld[1:]),
|
"-DCMAKE_ASM_FLAGS=%s" % ' '.join(asm[1:]),
|
||||||
"-DCMAKE_BUILD_TYPE=%s" % build_type,
|
"-DCMAKE_EXE_LINKER_FLAGS=%s" % ' '.join(ld[1:]),
|
||||||
"-DLLVM_TARGETS_TO_BUILD=X86;ARM;AArch64",
|
"-DCMAKE_SHARED_LINKER_FLAGS=%s" % ' '.join(ld[1:]),
|
||||||
"-DLLVM_ENABLE_ASSERTIONS=%s" % ("ON" if assertions else "OFF"),
|
"-DCMAKE_BUILD_TYPE=%s" % build_type,
|
||||||
"-DPYTHON_EXECUTABLE=%s" % slashify_path(python_path),
|
"-DCMAKE_INSTALL_PREFIX=%s" % inst_dir,
|
||||||
"-DCMAKE_INSTALL_PREFIX=%s" % inst_dir,
|
"-DLLVM_TARGETS_TO_BUILD=X86;ARM;AArch64",
|
||||||
"-DLLVM_TOOL_LIBCXX_BUILD=%s" % ("ON" if build_libcxx else "OFF"),
|
"-DLLVM_ENABLE_ASSERTIONS=%s" % ("ON" if assertions else "OFF"),
|
||||||
"-DLIBCXX_LIBCPPABI_VERSION=\"\"",
|
"-DPYTHON_EXECUTABLE=%s" % slashify_path(python_path),
|
||||||
src_dir]
|
"-DLLVM_TOOL_LIBCXX_BUILD=%s" % ("ON" if build_libcxx else "OFF"),
|
||||||
if is_windows():
|
"-DLIBCXX_LIBCPPABI_VERSION=\"\"",
|
||||||
cmake_args.insert(-1, "-DLLVM_EXPORT_SYMBOLS_FOR_PLUGINS=ON")
|
]
|
||||||
cmake_args.insert(-1, "-DLLVM_USE_CRT_RELEASE=MT")
|
if is_windows():
|
||||||
if ranlib is not None:
|
cmake_args.insert(-1, "-DLLVM_EXPORT_SYMBOLS_FOR_PLUGINS=ON")
|
||||||
cmake_args += ["-DCMAKE_RANLIB=%s" % slashify_path(ranlib)]
|
cmake_args.insert(-1, "-DLLVM_USE_CRT_RELEASE=MT")
|
||||||
if libtool is not None:
|
if ranlib is not None:
|
||||||
cmake_args += ["-DCMAKE_LIBTOOL=%s" % slashify_path(libtool)]
|
cmake_args += ["-DCMAKE_RANLIB=%s" % slashify_path(ranlib)]
|
||||||
if osx_cross_compile:
|
if libtool is not None:
|
||||||
cmake_args += ["-DCMAKE_SYSTEM_NAME=Darwin",
|
cmake_args += ["-DCMAKE_LIBTOOL=%s" % slashify_path(libtool)]
|
||||||
"-DCMAKE_SYSTEM_VERSION=10.10",
|
if osx_cross_compile:
|
||||||
"-DLLVM_ENABLE_THREADS=OFF",
|
cmake_args += [
|
||||||
"-DLIBCXXABI_LIBCXX_INCLUDES=%s" % libcxx_include_dir,
|
"-DCMAKE_SYSTEM_NAME=Darwin",
|
||||||
"-DCMAKE_OSX_SYSROOT=%s" % slashify_path(os.getenv("CROSS_SYSROOT")),
|
"-DCMAKE_SYSTEM_VERSION=10.10",
|
||||||
"-DCMAKE_FIND_ROOT_PATH=%s" % slashify_path(os.getenv("CROSS_CCTOOLS_PATH")), # noqa
|
"-DLLVM_ENABLE_THREADS=OFF",
|
||||||
"-DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER",
|
"-DLIBCXXABI_LIBCXX_INCLUDES=%s" % libcxx_include_dir,
|
||||||
"-DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY",
|
"-DCMAKE_OSX_SYSROOT=%s" % slashify_path(os.getenv("CROSS_SYSROOT")),
|
||||||
"-DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY",
|
"-DCMAKE_FIND_ROOT_PATH=%s" % slashify_path(os.getenv("CROSS_CCTOOLS_PATH")), # noqa
|
||||||
"-DCMAKE_MACOSX_RPATH=ON",
|
"-DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER",
|
||||||
"-DCMAKE_OSX_ARCHITECTURES=x86_64",
|
"-DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY",
|
||||||
"-DDARWIN_osx_ARCHS=x86_64",
|
"-DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY",
|
||||||
"-DDARWIN_osx_SYSROOT=%s" % slashify_path(os.getenv("CROSS_SYSROOT")),
|
"-DCMAKE_MACOSX_RPATH=ON",
|
||||||
"-DLLVM_DEFAULT_TARGET_TRIPLE=x86_64-apple-darwin11"]
|
"-DCMAKE_OSX_ARCHITECTURES=x86_64",
|
||||||
|
"-DDARWIN_osx_ARCHS=x86_64",
|
||||||
|
"-DDARWIN_osx_SYSROOT=%s" % slashify_path(os.getenv("CROSS_SYSROOT")),
|
||||||
|
"-DLLVM_DEFAULT_TARGET_TRIPLE=x86_64-apple-darwin11"
|
||||||
|
]
|
||||||
|
return cmake_args
|
||||||
|
|
||||||
|
cmake_args = cmake_base_args(
|
||||||
|
cc, cxx, asm, ld, ar, ranlib, libtool, inst_dir)
|
||||||
|
cmake_args += [
|
||||||
|
src_dir
|
||||||
|
]
|
||||||
build_package(build_dir, cmake_args)
|
build_package(build_dir, cmake_args)
|
||||||
|
|
||||||
if is_linux():
|
if is_linux():
|
||||||
|
|
@ -243,6 +255,44 @@ def build_one_stage(cc, cxx, asm, ld, ar, ranlib, libtool,
|
||||||
# For some reasons the import library clang.lib of clang.exe is not
|
# For some reasons the import library clang.lib of clang.exe is not
|
||||||
# installed, so we copy it by ourselves.
|
# installed, so we copy it by ourselves.
|
||||||
if is_windows():
|
if is_windows():
|
||||||
|
# The compiler-rt cmake scripts don't allow to build it for multiple
|
||||||
|
# targets at once on Windows, so manually build the 32-bits compiler-rt
|
||||||
|
# during the final stage.
|
||||||
|
build_32_bit = False
|
||||||
|
if is_final_stage:
|
||||||
|
# Only build the 32-bits compiler-rt when we originally built for
|
||||||
|
# 64-bits, which we detect through the contents of the LIB
|
||||||
|
# environment variable, which we also adjust for a 32-bits build
|
||||||
|
# at the same time.
|
||||||
|
old_lib = os.environ['LIB']
|
||||||
|
new_lib = []
|
||||||
|
for l in old_lib.split(os.pathsep):
|
||||||
|
if l.endswith('x64'):
|
||||||
|
l = l[:-3] + 'x86'
|
||||||
|
build_32_bit = True
|
||||||
|
elif l.endswith('amd64'):
|
||||||
|
l = l[:-5]
|
||||||
|
build_32_bit = True
|
||||||
|
new_lib.append(l)
|
||||||
|
if build_32_bit:
|
||||||
|
os.environ['LIB'] = os.pathsep.join(new_lib)
|
||||||
|
compiler_rt_build_dir = stage_dir + '/compiler-rt'
|
||||||
|
compiler_rt_inst_dir = inst_dir + '/lib/clang/'
|
||||||
|
subdirs = os.listdir(compiler_rt_inst_dir)
|
||||||
|
assert len(subdirs) == 1
|
||||||
|
compiler_rt_inst_dir += subdirs[0]
|
||||||
|
cmake_args = cmake_base_args(
|
||||||
|
[os.path.join(inst_dir, 'bin', 'clang-cl.exe'), '-m32'] + cc[1:],
|
||||||
|
[os.path.join(inst_dir, 'bin', 'clang-cl.exe'), '-m32'] + cxx[1:],
|
||||||
|
[os.path.join(inst_dir, 'bin', 'clang-cl.exe'), '-m32'] + asm[1:],
|
||||||
|
ld, ar, ranlib, libtool, compiler_rt_inst_dir)
|
||||||
|
cmake_args += [
|
||||||
|
'-DLLVM_CONFIG_PATH=%s' % slashify_path(
|
||||||
|
os.path.join(inst_dir, 'bin', 'llvm-config')),
|
||||||
|
os.path.join(src_dir, 'projects', 'compiler-rt'),
|
||||||
|
]
|
||||||
|
build_package(compiler_rt_build_dir, cmake_args)
|
||||||
|
os.environ['LIB'] = old_lib
|
||||||
install_import_library(build_dir, inst_dir)
|
install_import_library(build_dir, inst_dir)
|
||||||
install_asan_symbols(build_dir, inst_dir)
|
install_asan_symbols(build_dir, inst_dir)
|
||||||
|
|
||||||
|
|
@ -615,7 +665,8 @@ if __name__ == "__main__":
|
||||||
[ld] + extra_ldflags,
|
[ld] + extra_ldflags,
|
||||||
ar, ranlib, libtool,
|
ar, ranlib, libtool,
|
||||||
llvm_source_dir, stage2_dir, build_libcxx, osx_cross_compile,
|
llvm_source_dir, stage2_dir, build_libcxx, osx_cross_compile,
|
||||||
build_type, assertions, python_path, gcc_dir, libcxx_include_dir)
|
build_type, assertions, python_path, gcc_dir, libcxx_include_dir,
|
||||||
|
stages == 2)
|
||||||
|
|
||||||
if stages > 2:
|
if stages > 2:
|
||||||
stage3_dir = build_dir + '/stage3'
|
stage3_dir = build_dir + '/stage3'
|
||||||
|
|
@ -630,7 +681,8 @@ if __name__ == "__main__":
|
||||||
[ld] + extra_ldflags,
|
[ld] + extra_ldflags,
|
||||||
ar, ranlib, libtool,
|
ar, ranlib, libtool,
|
||||||
llvm_source_dir, stage3_dir, build_libcxx, osx_cross_compile,
|
llvm_source_dir, stage3_dir, build_libcxx, osx_cross_compile,
|
||||||
build_type, assertions, python_path, gcc_dir, libcxx_include_dir)
|
build_type, assertions, python_path, gcc_dir, libcxx_include_dir,
|
||||||
|
stages == 3)
|
||||||
|
|
||||||
package_name = "clang"
|
package_name = "clang"
|
||||||
if build_clang_tidy:
|
if build_clang_tidy:
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,7 @@
|
||||||
"patches": [
|
"patches": [
|
||||||
"r318309.patch",
|
"r318309.patch",
|
||||||
"r320462.patch",
|
"r320462.patch",
|
||||||
|
"r327876.patch",
|
||||||
"loosen-msvc-detection.patch",
|
"loosen-msvc-detection.patch",
|
||||||
"fflush-before-unlocking.patch"
|
"fflush-before-unlocking.patch"
|
||||||
]
|
]
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,7 @@
|
||||||
"ml": "ml64.exe",
|
"ml": "ml64.exe",
|
||||||
"patches": [
|
"patches": [
|
||||||
"loosen-msvc-detection.patch",
|
"loosen-msvc-detection.patch",
|
||||||
"r339636.patch"
|
"r339636.patch",
|
||||||
|
"workaround-issue38586.patch"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
39
build/build-clang/r327876.patch
Normal file
39
build/build-clang/r327876.patch
Normal file
|
|
@ -0,0 +1,39 @@
|
||||||
|
From 522a892efc2ff22a2fd421b1ef4d9d9739d78b2e Mon Sep 17 00:00:00 2001
|
||||||
|
From: Vitaly Buka <vitalybuka@google.com>
|
||||||
|
Date: Mon, 19 Mar 2018 18:22:35 +0000
|
||||||
|
Subject: [PATCH] Fix CMake/MSVC when compiler-rt and llvm are built separately
|
||||||
|
|
||||||
|
Summary:
|
||||||
|
For some reason CMake can't find the `append` macro if LLVM is built separately and imported via `LLVM_CONFIG_PATH`.
|
||||||
|
|
||||||
|
Patch by Loo Rong Jie
|
||||||
|
|
||||||
|
Reviewers: rnk, vitalybuka
|
||||||
|
|
||||||
|
Reviewed By: rnk, vitalybuka
|
||||||
|
|
||||||
|
Subscribers: dberris, mgorny, llvm-commits, #sanitizers
|
||||||
|
|
||||||
|
Differential Revision: https://reviews.llvm.org/D43458
|
||||||
|
|
||||||
|
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@327876 91177308-0d34-0410-b5e6-96231b3b80d8
|
||||||
|
---
|
||||||
|
CMakeLists.txt | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/compiler-rt/CMakeLists.txt b/compiler-rt/CMakeLists.txt
|
||||||
|
index 4b953b212..a02ef9532 100644
|
||||||
|
--- a/compiler-rt/CMakeLists.txt
|
||||||
|
+++ b/compiler-rt/CMakeLists.txt
|
||||||
|
@@ -339,7 +339,7 @@ if (CMAKE_LINKER MATCHES "link.exe$")
|
||||||
|
# it, but CMake doesn't seem to have a way to set linker flags for
|
||||||
|
# individual static libraries, so we enable the suppression flag for
|
||||||
|
# the whole compiler-rt project.
|
||||||
|
- append("/IGNORE:4221" CMAKE_STATIC_LINKER_FLAGS)
|
||||||
|
+ set(CMAKE_STATIC_LINKER_FLAGS "${CMAKE_STATIC_LINKER_FLAGS} /IGNORE:4221")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
add_subdirectory(include)
|
||||||
|
--
|
||||||
|
2.18.0
|
||||||
|
|
||||||
31
build/build-clang/workaround-issue38586.patch
Normal file
31
build/build-clang/workaround-issue38586.patch
Normal file
|
|
@ -0,0 +1,31 @@
|
||||||
|
diff --git a/compiler-rt/CMakeLists.txt b/compiler-rt/CMakeLists.txt
|
||||||
|
index 86ca2b3ef..f6ddd24eb 100644
|
||||||
|
--- a/compiler-rt/CMakeLists.txt
|
||||||
|
+++ b/compiler-rt/CMakeLists.txt
|
||||||
|
@@ -284,6 +284,26 @@ if(MSVC)
|
||||||
|
# warning from the MS linker complaining that it can't find the 'vc140.pdb'
|
||||||
|
# file used by our object library compilations.
|
||||||
|
list(APPEND SANITIZER_COMMON_CFLAGS /Z7)
|
||||||
|
+
|
||||||
|
+# Copied from llvm/cmake/modules/LLVMProcessSources.cmake
|
||||||
|
+function(llvm_replace_compiler_option var old new)
|
||||||
|
+ # Replaces a compiler option or switch `old' in `var' by `new'.
|
||||||
|
+ # If `old' is not in `var', appends `new' to `var'.
|
||||||
|
+ # Example: llvm_replace_compiler_option(CMAKE_CXX_FLAGS_RELEASE "-O3" "-O2")
|
||||||
|
+ # If the option already is on the variable, don't add it:
|
||||||
|
+ if( "${${var}}" MATCHES "(^| )${new}($| )" )
|
||||||
|
+ set(n "")
|
||||||
|
+ else()
|
||||||
|
+ set(n "${new}")
|
||||||
|
+ endif()
|
||||||
|
+ if( "${${var}}" MATCHES "(^| )${old}($| )" )
|
||||||
|
+ string( REGEX REPLACE "(^| )${old}($| )" " ${n} " ${var} "${${var}}" )
|
||||||
|
+ else()
|
||||||
|
+ set( ${var} "${${var}} ${n}" )
|
||||||
|
+ endif()
|
||||||
|
+ set( ${var} "${${var}}" PARENT_SCOPE )
|
||||||
|
+endfunction(llvm_replace_compiler_option)
|
||||||
|
+
|
||||||
|
llvm_replace_compiler_option(CMAKE_CXX_FLAGS "/Z[i7I]" "/Z7")
|
||||||
|
llvm_replace_compiler_option(CMAKE_CXX_FLAGS_DEBUG "/Z[i7I]" "/Z7")
|
||||||
|
llvm_replace_compiler_option(CMAKE_CXX_FLAGS_RELWITHDEBINFO "/Z[i7I]" "/Z7")
|
||||||
|
|
@ -1262,9 +1262,10 @@ def pgo_flags(compiler, build_env, target):
|
||||||
if compiler.type in ('clang-cl', 'clang'):
|
if compiler.type in ('clang-cl', 'clang'):
|
||||||
profdata = os.path.join(topobjdir, 'merged.profdata')
|
profdata = os.path.join(topobjdir, 'merged.profdata')
|
||||||
if compiler.type == 'clang-cl':
|
if compiler.type == 'clang-cl':
|
||||||
# 32-bit PGO is currently blocked by bug 1479800
|
|
||||||
if target.cpu == 'x86_64':
|
if target.cpu == 'x86_64':
|
||||||
gen_ldflags = ['clang_rt.profile-x86_64.lib']
|
gen_ldflags = ['clang_rt.profile-x86_64.lib']
|
||||||
|
elif target.cpu == 'x86':
|
||||||
|
gen_ldflags = ['clang_rt.profile-i386.lib']
|
||||||
else:
|
else:
|
||||||
gen_ldflags = None
|
gen_ldflags = None
|
||||||
else:
|
else:
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,10 @@
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
|
const { AddonManager } = require("resource://gre/modules/AddonManager.jsm");
|
||||||
const { BrowserToolboxProcess } =
|
const { BrowserToolboxProcess } =
|
||||||
require("resource://devtools/client/framework/ToolboxProcess.jsm");
|
require("resource://devtools/client/framework/ToolboxProcess.jsm");
|
||||||
|
const { Cc, Ci } = require("chrome");
|
||||||
const { DebuggerClient } = require("devtools/shared/client/debugger-client");
|
const { DebuggerClient } = require("devtools/shared/client/debugger-client");
|
||||||
const { DebuggerServer } = require("devtools/server/main");
|
const { DebuggerServer } = require("devtools/server/main");
|
||||||
|
|
||||||
|
|
@ -87,6 +89,59 @@ function inspectDebugTarget(type, id) {
|
||||||
return () => {};
|
return () => {};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function installTemporaryExtension() {
|
||||||
|
const fp = Cc["@mozilla.org/filepicker;1"].createInstance(Ci.nsIFilePicker);
|
||||||
|
fp.init(window, "Select Manifest File or Package (.xpi)", Ci.nsIFilePicker.modeOpen);
|
||||||
|
fp.open(async res => {
|
||||||
|
if (res == Ci.nsIFilePicker.returnCancel || !fp.file) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
let file = fp.file;
|
||||||
|
|
||||||
|
// AddonManager.installTemporaryAddon accepts either
|
||||||
|
// addon directory or final xpi file.
|
||||||
|
if (!file.isDirectory() &&
|
||||||
|
!file.leafName.endsWith(".xpi") && !file.leafName.endsWith(".zip")) {
|
||||||
|
file = file.parent;
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
await AddonManager.installTemporaryAddon(file);
|
||||||
|
} catch (e) {
|
||||||
|
console.error(e);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
return () => {};
|
||||||
|
}
|
||||||
|
|
||||||
|
function reloadTemporaryExtension(actor) {
|
||||||
|
return async (_, getState) => {
|
||||||
|
const client = getState().runtime.client;
|
||||||
|
|
||||||
|
try {
|
||||||
|
await client.request({ to: actor, type: "reload" });
|
||||||
|
} catch (e) {
|
||||||
|
console.error(e);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
function removeTemporaryExtension(id) {
|
||||||
|
return async () => {
|
||||||
|
try {
|
||||||
|
const addon = await AddonManager.getAddonByID(id);
|
||||||
|
|
||||||
|
if (addon) {
|
||||||
|
await addon.uninstall();
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
console.error(e);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
function requestTabs() {
|
function requestTabs() {
|
||||||
return async (dispatch, getState) => {
|
return async (dispatch, getState) => {
|
||||||
dispatch({ type: REQUEST_TABS_START });
|
dispatch({ type: REQUEST_TABS_START });
|
||||||
|
|
@ -130,6 +185,9 @@ module.exports = {
|
||||||
connectRuntime,
|
connectRuntime,
|
||||||
disconnectRuntime,
|
disconnectRuntime,
|
||||||
inspectDebugTarget,
|
inspectDebugTarget,
|
||||||
|
installTemporaryExtension,
|
||||||
|
reloadTemporaryExtension,
|
||||||
|
removeTemporaryExtension,
|
||||||
requestTabs,
|
requestTabs,
|
||||||
requestExtensions,
|
requestExtensions,
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,8 @@ const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
|
||||||
|
|
||||||
const ExtensionDetail = createFactory(require("./debugtarget/ExtensionDetail"));
|
const ExtensionDetail = createFactory(require("./debugtarget/ExtensionDetail"));
|
||||||
const TabDetail = createFactory(require("./debugtarget/TabDetail"));
|
const TabDetail = createFactory(require("./debugtarget/TabDetail"));
|
||||||
|
const TemporaryExtensionAction =
|
||||||
|
createFactory(require("./debugtarget/TemporaryExtensionAction"));
|
||||||
|
|
||||||
const Actions = require("../actions/index");
|
const Actions = require("../actions/index");
|
||||||
const { DEBUG_TARGETS } = require("../constants");
|
const { DEBUG_TARGETS } = require("../constants");
|
||||||
|
|
@ -30,6 +32,23 @@ class DebugTargetItem extends PureComponent {
|
||||||
dispatch(Actions.inspectDebugTarget(target.type, target.id));
|
dispatch(Actions.inspectDebugTarget(target.type, target.id));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
renderAction() {
|
||||||
|
const { dispatch, target } = this.props;
|
||||||
|
|
||||||
|
return dom.div(
|
||||||
|
{},
|
||||||
|
dom.button(
|
||||||
|
{
|
||||||
|
onClick: e => this.inspect(),
|
||||||
|
className: "aboutdebugging-button",
|
||||||
|
},
|
||||||
|
"Inspect"
|
||||||
|
),
|
||||||
|
target.details.temporarilyInstalled
|
||||||
|
? TemporaryExtensionAction({ dispatch, target }) : null,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
renderDetail() {
|
renderDetail() {
|
||||||
const { target } = this.props;
|
const { target } = this.props;
|
||||||
|
|
||||||
|
|
@ -69,16 +88,6 @@ class DebugTargetItem extends PureComponent {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
renderInspectButton() {
|
|
||||||
return dom.button(
|
|
||||||
{
|
|
||||||
onClick: e => this.inspect(),
|
|
||||||
className: "aboutdebugging-button",
|
|
||||||
},
|
|
||||||
"Inspect"
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return dom.li(
|
return dom.li(
|
||||||
{
|
{
|
||||||
|
|
@ -86,7 +95,7 @@ class DebugTargetItem extends PureComponent {
|
||||||
},
|
},
|
||||||
this.renderIcon(),
|
this.renderIcon(),
|
||||||
this.renderInfo(),
|
this.renderInfo(),
|
||||||
this.renderInspectButton(),
|
this.renderAction(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,8 @@ const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
|
||||||
|
|
||||||
const DebugTargetPane = createFactory(require("./DebugTargetPane"));
|
const DebugTargetPane = createFactory(require("./DebugTargetPane"));
|
||||||
const RuntimeInfo = createFactory(require("./RuntimeInfo"));
|
const RuntimeInfo = createFactory(require("./RuntimeInfo"));
|
||||||
|
const TemporaryExtensionInstaller =
|
||||||
|
createFactory(require("./debugtarget/TemporaryExtensionInstaller"));
|
||||||
|
|
||||||
const Services = require("Services");
|
const Services = require("Services");
|
||||||
|
|
||||||
|
|
@ -36,6 +38,7 @@ class RuntimePage extends PureComponent {
|
||||||
name: Services.appinfo.name,
|
name: Services.appinfo.name,
|
||||||
version: Services.appinfo.version,
|
version: Services.appinfo.version,
|
||||||
}),
|
}),
|
||||||
|
TemporaryExtensionInstaller({ dispatch }),
|
||||||
DebugTargetPane({
|
DebugTargetPane({
|
||||||
dispatch,
|
dispatch,
|
||||||
name: "Temporary Extensions",
|
name: "Temporary Extensions",
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ class ExtensionDetail extends PureComponent {
|
||||||
|
|
||||||
renderUUID() {
|
renderUUID() {
|
||||||
const { target } = this.props;
|
const { target } = this.props;
|
||||||
const { manifestURL, uuid } = target;
|
const { manifestURL, uuid } = target.details;
|
||||||
|
|
||||||
const value = [
|
const value = [
|
||||||
uuid,
|
uuid,
|
||||||
|
|
@ -52,7 +52,8 @@ class ExtensionDetail extends PureComponent {
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { target } = this.props;
|
const { target } = this.props;
|
||||||
const { id, location, uuid } = target;
|
const { id, details } = target;
|
||||||
|
const { location, uuid } = details;
|
||||||
|
|
||||||
return dom.dl(
|
return dom.dl(
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ class TabDetail extends PureComponent {
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return dom.div({ className: "ellipsis-text" }, this.props.target.url);
|
return dom.div({ className: "ellipsis-text" }, this.props.target.details.url);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,54 @@
|
||||||
|
/* 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/. */
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
const { PureComponent } = require("devtools/client/shared/vendor/react");
|
||||||
|
const dom = require("devtools/client/shared/vendor/react-dom-factories");
|
||||||
|
const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
|
||||||
|
|
||||||
|
const Actions = require("../../actions/index");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This component provides components that reload/remove temporary extension.
|
||||||
|
*/
|
||||||
|
class TemporaryExtensionAction extends PureComponent {
|
||||||
|
static get propTypes() {
|
||||||
|
return {
|
||||||
|
dispatch: PropTypes.func.isRequired,
|
||||||
|
target: PropTypes.object.isRequired,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
reload() {
|
||||||
|
const { dispatch, target } = this.props;
|
||||||
|
dispatch(Actions.reloadTemporaryExtension(target.details.actor));
|
||||||
|
}
|
||||||
|
|
||||||
|
remove() {
|
||||||
|
const { dispatch, target } = this.props;
|
||||||
|
dispatch(Actions.removeTemporaryExtension(target.id));
|
||||||
|
}
|
||||||
|
|
||||||
|
render() {
|
||||||
|
return [
|
||||||
|
dom.button(
|
||||||
|
{
|
||||||
|
className: "aboutdebugging-button",
|
||||||
|
onClick: e => this.reload()
|
||||||
|
},
|
||||||
|
"Reload",
|
||||||
|
),
|
||||||
|
dom.button(
|
||||||
|
{
|
||||||
|
className: "aboutdebugging-button",
|
||||||
|
onClick: e => this.remove()
|
||||||
|
},
|
||||||
|
"Remove",
|
||||||
|
),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = TemporaryExtensionAction;
|
||||||
|
|
@ -0,0 +1,38 @@
|
||||||
|
/* 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/. */
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
const { PureComponent } = require("devtools/client/shared/vendor/react");
|
||||||
|
const dom = require("devtools/client/shared/vendor/react-dom-factories");
|
||||||
|
const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
|
||||||
|
|
||||||
|
const Actions = require("../../actions/index");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This component provides an installer for temporary extension.
|
||||||
|
*/
|
||||||
|
class TemporaryExtensionInstaller extends PureComponent {
|
||||||
|
static get propTypes() {
|
||||||
|
return {
|
||||||
|
dispatch: PropTypes.func.isRequired,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
install() {
|
||||||
|
this.props.dispatch(Actions.installTemporaryExtension());
|
||||||
|
}
|
||||||
|
|
||||||
|
render() {
|
||||||
|
return dom.button(
|
||||||
|
{
|
||||||
|
className: "aboutdebugging-button",
|
||||||
|
onClick: e => this.install()
|
||||||
|
},
|
||||||
|
"Load Temporary Add-on…"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = TemporaryExtensionInstaller;
|
||||||
|
|
@ -6,4 +6,6 @@ DevToolsModules(
|
||||||
'ExtensionDetail.css',
|
'ExtensionDetail.css',
|
||||||
'ExtensionDetail.js',
|
'ExtensionDetail.js',
|
||||||
'TabDetail.js',
|
'TabDetail.js',
|
||||||
|
'TemporaryExtensionAction.js',
|
||||||
|
'TemporaryExtensionInstaller.js',
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -70,11 +70,23 @@ function getExtensionFilePath(extension) {
|
||||||
function toExtensionComponentData(extensions) {
|
function toExtensionComponentData(extensions) {
|
||||||
return extensions.map(extension => {
|
return extensions.map(extension => {
|
||||||
const type = DEBUG_TARGETS.EXTENSION;
|
const type = DEBUG_TARGETS.EXTENSION;
|
||||||
const { iconURL, id, manifestURL, name } = extension;
|
const { actor, iconURL, id, manifestURL, name, temporarilyInstalled } = extension;
|
||||||
const icon = iconURL || "chrome://mozapps/skin/extensions/extensionGeneric.svg";
|
const icon = iconURL || "chrome://mozapps/skin/extensions/extensionGeneric.svg";
|
||||||
const location = getExtensionFilePath(extension);
|
const location = getExtensionFilePath(extension);
|
||||||
const uuid = manifestURL ? /moz-extension:\/\/([^/]*)/.exec(manifestURL)[1] : null;
|
const uuid = manifestURL ? /moz-extension:\/\/([^/]*)/.exec(manifestURL)[1] : null;
|
||||||
return { type, id, icon, location, manifestURL, name, uuid };
|
return {
|
||||||
|
name,
|
||||||
|
icon,
|
||||||
|
id,
|
||||||
|
type,
|
||||||
|
details: {
|
||||||
|
actor,
|
||||||
|
location,
|
||||||
|
manifestURL,
|
||||||
|
temporarilyInstalled,
|
||||||
|
uuid,
|
||||||
|
},
|
||||||
|
};
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -87,7 +99,15 @@ function toTabComponentData(tabs) {
|
||||||
: "chrome://devtools/skin/images/globe.svg";
|
: "chrome://devtools/skin/images/globe.svg";
|
||||||
const name = tab.title || tab.url;
|
const name = tab.title || tab.url;
|
||||||
const url = tab.url;
|
const url = tab.url;
|
||||||
return { type, id, icon, name, url };
|
return {
|
||||||
|
name,
|
||||||
|
icon,
|
||||||
|
id,
|
||||||
|
type,
|
||||||
|
details: {
|
||||||
|
url,
|
||||||
|
},
|
||||||
|
};
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -216,7 +216,12 @@ async function getFileForBinary() {
|
||||||
!await extractFiles()) {
|
!await extractFiles()) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
return new FileUtils.File(ADB_BINARY_PATH);
|
|
||||||
|
const file = new FileUtils.File(ADB_BINARY_PATH);
|
||||||
|
if (!file.exists()) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return file;
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.getFileForBinary = getFileForBinary;
|
exports.getFileForBinary = getFileForBinary;
|
||||||
|
|
|
||||||
|
|
@ -101,9 +101,7 @@ add_task(async function testNoAdbJSON() {
|
||||||
await extension.unload();
|
await extension.unload();
|
||||||
});
|
});
|
||||||
|
|
||||||
add_task({
|
add_task(async function testNoTargetBinaries() {
|
||||||
skip_if: () => mozinfo.os == "win" // bug 1482008
|
|
||||||
}, async function testNoTargetBinaries() {
|
|
||||||
const extension = ExtensionTestUtils.loadExtension({
|
const extension = ExtensionTestUtils.loadExtension({
|
||||||
manifest: {
|
manifest: {
|
||||||
version: (extension_version++).toString(),
|
version: (extension_version++).toString(),
|
||||||
|
|
@ -146,7 +144,7 @@ add_task(async function testExtract() {
|
||||||
await extension.startup();
|
await extension.startup();
|
||||||
|
|
||||||
const adbBinary = await getFileForBinary();
|
const adbBinary = await getFileForBinary();
|
||||||
ok(await adbBinary.exists);
|
ok(await adbBinary.exists());
|
||||||
|
|
||||||
await extension.unload();
|
await extension.unload();
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -1275,7 +1275,8 @@ Element::AttachShadowWithoutNameChecks(ShadowRootMode aMode)
|
||||||
void
|
void
|
||||||
Element::UnattachShadow()
|
Element::UnattachShadow()
|
||||||
{
|
{
|
||||||
if (!GetShadowRoot()) {
|
RefPtr<ShadowRoot> shadowRoot = GetShadowRoot();
|
||||||
|
if (!shadowRoot) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1290,6 +1291,12 @@ Element::UnattachShadow()
|
||||||
|
|
||||||
// Simply unhook the shadow root from the element.
|
// Simply unhook the shadow root from the element.
|
||||||
MOZ_ASSERT(!GetShadowRoot()->HasSlots(), "Won't work when shadow root has slots!");
|
MOZ_ASSERT(!GetShadowRoot()->HasSlots(), "Won't work when shadow root has slots!");
|
||||||
|
for (nsIContent* child = shadowRoot->GetFirstChild(); child;
|
||||||
|
child = child->GetNextSibling()) {
|
||||||
|
child->UnbindFromTree(true, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
shadowRoot->SetIsComposedDocParticipant(false);
|
||||||
SetShadowRoot(nullptr);
|
SetShadowRoot(nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -160,21 +160,21 @@ IndexedDBHelper.prototype = {
|
||||||
stores = txn.objectStore(store_name);
|
stores = txn.objectStore(store_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
txn.oncomplete = function (event) {
|
txn.oncomplete = function () {
|
||||||
if (DEBUG) debug("Transaction complete. Returning to callback.");
|
if (DEBUG) debug("Transaction complete. Returning to callback.");
|
||||||
if (successCb) {
|
if (successCb) {
|
||||||
successCb(txn.result);
|
if ("result" in txn) {
|
||||||
|
successCb(txn.result);
|
||||||
|
} else {
|
||||||
|
successCb();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
txn.onabort = function (event) {
|
txn.onabort = function () {
|
||||||
if (DEBUG) debug("Caught error on transaction");
|
if (DEBUG) debug("Caught error on transaction");
|
||||||
/*
|
|
||||||
* event.target.error may be null
|
|
||||||
* if txn was aborted by calling txn.abort()
|
|
||||||
*/
|
|
||||||
if (failureCb) {
|
if (failureCb) {
|
||||||
failureCb(getErrorName(event.target.error));
|
failureCb(getErrorName(txn.error));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
callback(txn, stores);
|
callback(txn, stores);
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,6 @@ support-files =
|
||||||
[include:xpcshell-shared.ini]
|
[include:xpcshell-shared.ini]
|
||||||
|
|
||||||
[test_bad_origin_directory.js]
|
[test_bad_origin_directory.js]
|
||||||
skip-if = release_or_beta
|
|
||||||
[test_obsoleteOriginAttributesUpgrade.js]
|
[test_obsoleteOriginAttributesUpgrade.js]
|
||||||
[test_blob_file_backed.js]
|
[test_blob_file_backed.js]
|
||||||
[test_bug1056939.js]
|
[test_bug1056939.js]
|
||||||
|
|
|
||||||
|
|
@ -687,8 +687,6 @@ interface nsIDOMWindowUtils : nsISupports {
|
||||||
* non-debug builds. Available to all callers in debug builds.
|
* non-debug builds. Available to all callers in debug builds.
|
||||||
*
|
*
|
||||||
* @param aListener listener that receives information about the CC graph
|
* @param aListener listener that receives information about the CC graph
|
||||||
* (see @mozilla.org/cycle-collector-logger;1 for a logger
|
|
||||||
* component)
|
|
||||||
*/
|
*/
|
||||||
void garbageCollect([optional] in nsICycleCollectorListener aListener);
|
void garbageCollect([optional] in nsICycleCollectorListener aListener);
|
||||||
|
|
||||||
|
|
@ -699,8 +697,6 @@ interface nsIDOMWindowUtils : nsISupports {
|
||||||
* non-debug builds. Available to all callers in debug builds.
|
* non-debug builds. Available to all callers in debug builds.
|
||||||
*
|
*
|
||||||
* @param aListener listener that receives information about the CC graph
|
* @param aListener listener that receives information about the CC graph
|
||||||
* (see @mozilla.org/cycle-collector-logger;1 for a logger
|
|
||||||
* component)
|
|
||||||
*/
|
*/
|
||||||
void cycleCollect([optional] in nsICycleCollectorListener aListener);
|
void cycleCollect([optional] in nsICycleCollectorListener aListener);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2031,52 +2031,6 @@ EnsureDirectory(nsIFile* aDirectory, bool* aCreated)
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
nsresult
|
|
||||||
EnsureOriginDirectory(nsIFile* aDirectory, bool* aCreated)
|
|
||||||
{
|
|
||||||
AssertIsOnIOThread();
|
|
||||||
|
|
||||||
nsresult rv;
|
|
||||||
|
|
||||||
#ifndef RELEASE_OR_BETA
|
|
||||||
bool exists;
|
|
||||||
rv = aDirectory->Exists(&exists);
|
|
||||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
|
||||||
return rv;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!exists) {
|
|
||||||
nsString leafName;
|
|
||||||
nsresult rv = aDirectory->GetLeafName(leafName);
|
|
||||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
|
||||||
return rv;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!leafName.EqualsLiteral(kChromeOrigin)) {
|
|
||||||
nsCString spec;
|
|
||||||
OriginAttributes attrs;
|
|
||||||
OriginParser::ResultType result =
|
|
||||||
OriginParser::ParseOrigin(NS_ConvertUTF16toUTF8(leafName),
|
|
||||||
spec,
|
|
||||||
&attrs);
|
|
||||||
if (NS_WARN_IF(result != OriginParser::ValidOrigin)) {
|
|
||||||
QM_WARNING("Preventing creation of a new origin directory which is not "
|
|
||||||
"supported by our origin parser or is obsolete!");
|
|
||||||
|
|
||||||
return NS_ERROR_FAILURE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
rv = EnsureDirectory(aDirectory, aCreated);
|
|
||||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
|
||||||
return rv;
|
|
||||||
}
|
|
||||||
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
enum FileFlag {
|
enum FileFlag {
|
||||||
kTruncateFileFlag,
|
kTruncateFileFlag,
|
||||||
kUpdateFileFlag,
|
kUpdateFileFlag,
|
||||||
|
|
@ -5477,6 +5431,43 @@ QuotaManager::EnsureTemporaryStorageIsInitialized()
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
nsresult
|
||||||
|
QuotaManager::EnsureOriginDirectory(nsIFile* aDirectory,
|
||||||
|
bool* aCreated)
|
||||||
|
{
|
||||||
|
AssertIsOnIOThread();
|
||||||
|
MOZ_ASSERT(aDirectory);
|
||||||
|
MOZ_ASSERT(aCreated);
|
||||||
|
|
||||||
|
bool exists;
|
||||||
|
nsresult rv = aDirectory->Exists(&exists);
|
||||||
|
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||||
|
return rv;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!exists) {
|
||||||
|
nsString leafName;
|
||||||
|
rv = aDirectory->GetLeafName(leafName);
|
||||||
|
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||||
|
return rv;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!leafName.EqualsLiteral(kChromeOrigin) &&
|
||||||
|
!IsSanitizedOriginValid(NS_ConvertUTF16toUTF8(leafName))) {
|
||||||
|
QM_WARNING("Preventing creation of a new origin directory which is not "
|
||||||
|
"supported by our origin parser or is obsolete!");
|
||||||
|
return NS_ERROR_FAILURE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
rv = EnsureDirectory(aDirectory, aCreated);
|
||||||
|
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||||
|
return rv;
|
||||||
|
}
|
||||||
|
|
||||||
|
return NS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
QuotaManager::OriginClearCompleted(PersistenceType aPersistenceType,
|
QuotaManager::OriginClearCompleted(PersistenceType aPersistenceType,
|
||||||
const nsACString& aOrigin)
|
const nsACString& aOrigin)
|
||||||
|
|
@ -6035,6 +6026,29 @@ QuotaManager::GetDirectoryLockTable(PersistenceType aPersistenceType)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool
|
||||||
|
QuotaManager::IsSanitizedOriginValid(const nsACString& aSanitizedOrigin)
|
||||||
|
{
|
||||||
|
AssertIsOnIOThread();
|
||||||
|
MOZ_ASSERT(!aSanitizedOrigin.Equals(kChromeOrigin));
|
||||||
|
|
||||||
|
bool valid;
|
||||||
|
if (auto entry = mValidOrigins.LookupForAdd(aSanitizedOrigin)) {
|
||||||
|
// We already parsed this sanitized origin string.
|
||||||
|
valid = entry.Data();
|
||||||
|
} else {
|
||||||
|
nsCString spec;
|
||||||
|
OriginAttributes attrs;
|
||||||
|
OriginParser::ResultType result =
|
||||||
|
OriginParser::ParseOrigin(aSanitizedOrigin, spec, &attrs);
|
||||||
|
|
||||||
|
valid = result == OriginParser::ValidOrigin;
|
||||||
|
entry.OrInsert([valid]() { return valid; });
|
||||||
|
}
|
||||||
|
|
||||||
|
return valid;
|
||||||
|
}
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Local class implementations
|
* Local class implementations
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
@ -7937,7 +7951,7 @@ PersistOp::DoDirectoryWork(QuotaManager* aQuotaManager)
|
||||||
}
|
}
|
||||||
|
|
||||||
bool created;
|
bool created;
|
||||||
rv = EnsureOriginDirectory(directory, &created);
|
rv = aQuotaManager->EnsureOriginDirectory(directory, &created);
|
||||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -301,6 +301,10 @@ public:
|
||||||
nsresult
|
nsresult
|
||||||
EnsureTemporaryStorageIsInitialized();
|
EnsureTemporaryStorageIsInitialized();
|
||||||
|
|
||||||
|
nsresult
|
||||||
|
EnsureOriginDirectory(nsIFile* aDirectory,
|
||||||
|
bool* aCreated);
|
||||||
|
|
||||||
void
|
void
|
||||||
OriginClearCompleted(PersistenceType aPersistenceType,
|
OriginClearCompleted(PersistenceType aPersistenceType,
|
||||||
const nsACString& aOrigin);
|
const nsACString& aOrigin);
|
||||||
|
|
@ -522,6 +526,9 @@ private:
|
||||||
DirectoryLockTable&
|
DirectoryLockTable&
|
||||||
GetDirectoryLockTable(PersistenceType aPersistenceType);
|
GetDirectoryLockTable(PersistenceType aPersistenceType);
|
||||||
|
|
||||||
|
bool
|
||||||
|
IsSanitizedOriginValid(const nsACString& aSanitizedOrigin);
|
||||||
|
|
||||||
static void
|
static void
|
||||||
ShutdownTimerCallback(nsITimer* aTimer, void* aClosure);
|
ShutdownTimerCallback(nsITimer* aTimer, void* aClosure);
|
||||||
|
|
||||||
|
|
@ -545,10 +552,15 @@ private:
|
||||||
// A timer that gets activated at shutdown to ensure we close all storages.
|
// A timer that gets activated at shutdown to ensure we close all storages.
|
||||||
nsCOMPtr<nsITimer> mShutdownTimer;
|
nsCOMPtr<nsITimer> mShutdownTimer;
|
||||||
|
|
||||||
// A list of all successfully initialized origins. This list isn't protected
|
// A list of all successfully initialized persistent origins. This list isn't
|
||||||
// by any mutex but it is only ever touched on the IO thread.
|
// protected by any mutex but it is only ever touched on the IO thread.
|
||||||
nsTArray<nsCString> mInitializedOrigins;
|
nsTArray<nsCString> mInitializedOrigins;
|
||||||
|
|
||||||
|
// A hash table that is used to cache origin parser results for given
|
||||||
|
// sanitized origin strings. This hash table isn't protected by any mutex but
|
||||||
|
// it is only ever touched on the IO thread.
|
||||||
|
nsDataHashtable<nsCStringHashKey, bool> mValidOrigins;
|
||||||
|
|
||||||
// This array is populated at initialization time and then never modified, so
|
// This array is populated at initialization time and then never modified, so
|
||||||
// it can be iterated on any thread.
|
// it can be iterated on any thread.
|
||||||
AutoTArray<RefPtr<Client>, Client::TYPE_MAX> mClients;
|
AutoTArray<RefPtr<Client>, Client::TYPE_MAX> mClients;
|
||||||
|
|
|
||||||
|
|
@ -518,7 +518,7 @@ var interfaceNamesInGlobalScope =
|
||||||
// IMPORTANT: Do not change this list without review from a DOM peer!
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
||||||
{name: "HTMLSelectElement", insecureContext: true},
|
{name: "HTMLSelectElement", insecureContext: true},
|
||||||
// IMPORTANT: Do not change this list without review from a DOM peer!
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
||||||
{name: "HTMLSlotElement", insecureContext: true, disabled: true},
|
{name: "HTMLSlotElement", insecureContext: true},
|
||||||
// IMPORTANT: Do not change this list without review from a DOM peer!
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
||||||
{name: "HTMLSourceElement", insecureContext: true},
|
{name: "HTMLSourceElement", insecureContext: true},
|
||||||
// IMPORTANT: Do not change this list without review from a DOM peer!
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
||||||
|
|
@ -872,7 +872,7 @@ var interfaceNamesInGlobalScope =
|
||||||
// IMPORTANT: Do not change this list without review from a DOM peer!
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
||||||
{name: "ScopedCredentialInfo", insecureContext: true, disabled: true},
|
{name: "ScopedCredentialInfo", insecureContext: true, disabled: true},
|
||||||
// IMPORTANT: Do not change this list without review from a DOM peer!
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
||||||
{name: "ShadowRoot", insecureContext: true, disabled: true},
|
{name: "ShadowRoot", insecureContext: true},
|
||||||
// IMPORTANT: Do not change this list without review from a DOM peer!
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
||||||
{name: "SharedWorker", insecureContext: true},
|
{name: "SharedWorker", insecureContext: true},
|
||||||
// IMPORTANT: Do not change this list without review from a DOM peer!
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
||||||
|
|
|
||||||
|
|
@ -63,3 +63,15 @@ non262/extensions/regress-477187.js
|
||||||
non262/regress/regress-452498-052-a.js
|
non262/regress/regress-452498-052-a.js
|
||||||
non262/extensions/clone-complex-object.js
|
non262/extensions/clone-complex-object.js
|
||||||
non262/extensions/clone-object-deep.js
|
non262/extensions/clone-object-deep.js
|
||||||
|
test262/built-ins/RegExp/CharacterClassEscapes/character-class-word-class-escape-flags-u.js
|
||||||
|
test262/built-ins/RegExp/CharacterClassEscapes/character-class-non-digit-class-escape-plus-quantifier-flags-u.js
|
||||||
|
test262/built-ins/RegExp/CharacterClassEscapes/character-class-non-digit-class-escape-flags-u.js
|
||||||
|
test262/built-ins/RegExp/CharacterClassEscapes/character-class-whitespace-class-escape-flags-u.js
|
||||||
|
test262/built-ins/RegExp/CharacterClassEscapes/character-class-non-whitespace-class-escape-plus-quantifier-flags-u.js
|
||||||
|
test262/built-ins/RegExp/CharacterClassEscapes/character-class-digit-class-escape-flags-u.js
|
||||||
|
test262/built-ins/RegExp/CharacterClassEscapes/character-class-non-word-class-escape-plus-quantifier-flags-u.js
|
||||||
|
test262/built-ins/RegExp/CharacterClassEscapes/character-class-digit-class-escape-plus-quantifier-flags-u.js
|
||||||
|
test262/built-ins/RegExp/CharacterClassEscapes/character-class-word-class-escape-plus-quantifier-flags-u.js
|
||||||
|
test262/built-ins/RegExp/CharacterClassEscapes/character-class-whitespace-class-escape-plus-quantifier-flags-u.js
|
||||||
|
test262/built-ins/RegExp/CharacterClassEscapes/character-class-non-whitespace-class-escape-flags-u.js
|
||||||
|
test262/built-ins/RegExp/CharacterClassEscapes/character-class-non-word-class-escape-flags-u.js
|
||||||
|
|
|
||||||
|
|
@ -296,6 +296,14 @@ interface nsIXPCComponents_Utils : nsISupports
|
||||||
*/
|
*/
|
||||||
void forceCC([optional] in nsICycleCollectorListener aListener);
|
void forceCC([optional] in nsICycleCollectorListener aListener);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* To be called from JS only. C++ callers should use the
|
||||||
|
* nsCycleCollector_createLogger() function instead.
|
||||||
|
*
|
||||||
|
* Create an instance of the built-in cycle collector logger object.
|
||||||
|
*/
|
||||||
|
nsICycleCollectorListener createCCLogger();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* To be called from JS only.
|
* To be called from JS only.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,7 @@
|
||||||
#include "mozilla/Scheduler.h"
|
#include "mozilla/Scheduler.h"
|
||||||
#include "nsZipArchive.h"
|
#include "nsZipArchive.h"
|
||||||
#include "nsWindowMemoryReporter.h"
|
#include "nsWindowMemoryReporter.h"
|
||||||
|
#include "nsICycleCollectorListener.h"
|
||||||
#include "nsIException.h"
|
#include "nsIException.h"
|
||||||
#include "nsIScriptError.h"
|
#include "nsIScriptError.h"
|
||||||
#include "nsISimpleEnumerator.h"
|
#include "nsISimpleEnumerator.h"
|
||||||
|
|
@ -2317,6 +2318,16 @@ nsXPCComponents_Utils::ForceCC(nsICycleCollectorListener* listener)
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
NS_IMETHODIMP
|
||||||
|
nsXPCComponents_Utils::CreateCCLogger(nsICycleCollectorListener** aListener)
|
||||||
|
{
|
||||||
|
NS_ENSURE_ARG_POINTER(aListener);
|
||||||
|
nsCOMPtr<nsICycleCollectorListener> logger =
|
||||||
|
nsCycleCollector_createLogger();
|
||||||
|
logger.forget(aListener);
|
||||||
|
return NS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsXPCComponents_Utils::FinishCC()
|
nsXPCComponents_Utils::FinishCC()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,7 @@
|
||||||
|
|
||||||
#include "nsDOMMutationObserver.h"
|
#include "nsDOMMutationObserver.h"
|
||||||
#include "nsICycleCollectorListener.h"
|
#include "nsICycleCollectorListener.h"
|
||||||
|
#include "nsCycleCollector.h"
|
||||||
#include "nsIObjectInputStream.h"
|
#include "nsIObjectInputStream.h"
|
||||||
#include "nsIObjectOutputStream.h"
|
#include "nsIObjectOutputStream.h"
|
||||||
#include "nsScriptSecurityManager.h"
|
#include "nsScriptSecurityManager.h"
|
||||||
|
|
@ -1111,12 +1112,8 @@ DumpJSStack()
|
||||||
MOZ_EXPORT void
|
MOZ_EXPORT void
|
||||||
DumpCompleteHeap()
|
DumpCompleteHeap()
|
||||||
{
|
{
|
||||||
nsCOMPtr<nsICycleCollectorListener> listener =
|
nsCOMPtr<nsICycleCollectorListener> listener = nsCycleCollector_createLogger();
|
||||||
do_CreateInstance("@mozilla.org/cycle-collector-logger;1");
|
MOZ_ASSERT(listener);
|
||||||
if (!listener) {
|
|
||||||
NS_WARNING("Failed to create CC logger");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
nsCOMPtr<nsICycleCollectorListener> alltracesListener;
|
nsCOMPtr<nsICycleCollectorListener> alltracesListener;
|
||||||
listener->AllTraces(getter_AddRefs(alltracesListener));
|
listener->AllTraces(getter_AddRefs(alltracesListener));
|
||||||
|
|
|
||||||
|
|
@ -12,12 +12,6 @@
|
||||||
# SUBDIRECTORY: Reftests for paginated flex containers
|
# SUBDIRECTORY: Reftests for paginated flex containers
|
||||||
include pagination/reftest.list
|
include pagination/reftest.list
|
||||||
|
|
||||||
# XXXdholbert These tests should move to w3c-css/submitted once we've closed
|
|
||||||
# out bug 1207698 and updated these tests' expectations & alignment keyword
|
|
||||||
# usage accordingly:
|
|
||||||
== flexbox-align-content-horizrev-001.xhtml flexbox-align-content-horizrev-001-ref.xhtml
|
|
||||||
== flexbox-align-content-vertrev-001.xhtml flexbox-align-content-vertrev-001-ref.xhtml
|
|
||||||
|
|
||||||
# Tests for cross-axis alignment (align-self / align-items properties)
|
# Tests for cross-axis alignment (align-self / align-items properties)
|
||||||
fails == flexbox-align-self-baseline-horiz-2.xhtml flexbox-align-self-baseline-horiz-2-ref.xhtml # bug 793456, and possibly others
|
fails == flexbox-align-self-baseline-horiz-2.xhtml flexbox-align-self-baseline-horiz-2-ref.xhtml # bug 793456, and possibly others
|
||||||
# This one fails on windows R (but not Ru, strangely) and GTK.
|
# This one fails on windows R (but not Ru, strangely) and GTK.
|
||||||
|
|
|
||||||
|
|
@ -144,13 +144,13 @@
|
||||||
<div class="a"/>
|
<div class="a"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="flexbox">
|
<div class="flexbox">
|
||||||
<div class="b"><div class="fixedSizeChild"/></div>
|
|
||||||
<div class="a"/>
|
<div class="a"/>
|
||||||
|
<div class="b"><div class="fixedSizeChild"/></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="flexbox">
|
<div class="flexbox">
|
||||||
<div class="c"/>
|
|
||||||
<div class="b"><div class="fixedSizeChild"/></div>
|
|
||||||
<div class="a"/>
|
<div class="a"/>
|
||||||
|
<div class="b"><div class="fixedSizeChild"/></div>
|
||||||
|
<div class="c"/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- end -->
|
<!-- end -->
|
||||||
|
|
@ -158,13 +158,13 @@
|
||||||
<div class="a" style="margin-top: 190px"/>
|
<div class="a" style="margin-top: 190px"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="flexbox">
|
<div class="flexbox">
|
||||||
<div class="b" style="margin-top: 160px"><div class="fixedSizeChild"/></div>
|
<div class="a" style="margin-top: 160px"/>
|
||||||
<div class="a"/>
|
<div class="b"><div class="fixedSizeChild"/></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="flexbox">
|
<div class="flexbox">
|
||||||
<div class="c" style="margin-top: 120px"/>
|
<div class="a" style="margin-top: 120px"/>
|
||||||
<div class="b"><div class="fixedSizeChild"/></div>
|
<div class="b"><div class="fixedSizeChild"/></div>
|
||||||
<div class="a"/>
|
<div class="c"/>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -149,28 +149,28 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- start -->
|
<!-- start -->
|
||||||
<div class="flexbox" style="align-content: start; flex-wrap: wrap-reverse">
|
<div class="flexbox" style="align-content: start">
|
||||||
<div class="a"/>
|
<div class="a"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="flexbox" style="align-content: start; flex-wrap: wrap-reverse">
|
<div class="flexbox" style="align-content: start">
|
||||||
<div class="a"/>
|
<div class="a"/>
|
||||||
<div class="b"><div class="fixedSizeChild"/></div>
|
<div class="b"><div class="fixedSizeChild"/></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="flexbox" style="align-content: start; flex-wrap: wrap-reverse">
|
<div class="flexbox" style="align-content: start">
|
||||||
<div class="a"/>
|
<div class="a"/>
|
||||||
<div class="b"><div class="fixedSizeChild"/></div>
|
<div class="b"><div class="fixedSizeChild"/></div>
|
||||||
<div class="c"/>
|
<div class="c"/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- end -->
|
<!-- end -->
|
||||||
<div class="flexbox" style="align-content: end; flex-wrap: wrap-reverse">
|
<div class="flexbox" style="align-content: end">
|
||||||
<div class="a"/>
|
<div class="a"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="flexbox" style="align-content: end; flex-wrap: wrap-reverse">
|
<div class="flexbox" style="align-content: end">
|
||||||
<div class="a"/>
|
<div class="a"/>
|
||||||
<div class="b"><div class="fixedSizeChild"/></div>
|
<div class="b"><div class="fixedSizeChild"/></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="flexbox" style="align-content: end; flex-wrap: wrap-reverse">
|
<div class="flexbox" style="align-content: end">
|
||||||
<div class="a"/>
|
<div class="a"/>
|
||||||
<div class="b"><div class="fixedSizeChild"/></div>
|
<div class="b"><div class="fixedSizeChild"/></div>
|
||||||
<div class="c"/>
|
<div class="c"/>
|
||||||
|
|
|
||||||
|
|
@ -150,28 +150,28 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- start -->
|
<!-- start -->
|
||||||
<div class="flexbox" style="align-content: start; flex-wrap: wrap-reverse">
|
<div class="flexbox" style="align-content: start">
|
||||||
<div class="a"/>
|
<div class="a"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="flexbox" style="align-content: start; flex-wrap: wrap-reverse">
|
<div class="flexbox" style="align-content: start">
|
||||||
<div class="a"/>
|
<div class="a"/>
|
||||||
<div class="b"><div class="fixedSizeChild"/></div>
|
<div class="b"><div class="fixedSizeChild"/></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="flexbox" style="align-content: start; flex-wrap: wrap-reverse">
|
<div class="flexbox" style="align-content: start">
|
||||||
<div class="a"/>
|
<div class="a"/>
|
||||||
<div class="b"><div class="fixedSizeChild"/></div>
|
<div class="b"><div class="fixedSizeChild"/></div>
|
||||||
<div class="c"/>
|
<div class="c"/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- end -->
|
<!-- end -->
|
||||||
<div class="flexbox" style="align-content: end; flex-wrap: wrap-reverse">
|
<div class="flexbox" style="align-content: end">
|
||||||
<div class="a"/>
|
<div class="a"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="flexbox" style="align-content: end; flex-wrap: wrap-reverse">
|
<div class="flexbox" style="align-content: end">
|
||||||
<div class="a"/>
|
<div class="a"/>
|
||||||
<div class="b"><div class="fixedSizeChild"/></div>
|
<div class="b"><div class="fixedSizeChild"/></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="flexbox" style="align-content: end; flex-wrap: wrap-reverse">
|
<div class="flexbox" style="align-content: end">
|
||||||
<div class="a"/>
|
<div class="a"/>
|
||||||
<div class="b"><div class="fixedSizeChild"/></div>
|
<div class="b"><div class="fixedSizeChild"/></div>
|
||||||
<div class="c"/>
|
<div class="c"/>
|
||||||
|
|
|
||||||
|
|
@ -138,5 +138,33 @@
|
||||||
<div class="b" style="margin-top: 30px"><div class="fixedSizeChild"/></div>
|
<div class="b" style="margin-top: 30px"><div class="fixedSizeChild"/></div>
|
||||||
<div class="a" style="margin-top: 30px"/>
|
<div class="a" style="margin-top: 30px"/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- start -->
|
||||||
|
<div class="flexbox">
|
||||||
|
<div class="a"/>
|
||||||
|
</div>
|
||||||
|
<div class="flexbox">
|
||||||
|
<div class="b"><div class="fixedSizeChild"/></div>
|
||||||
|
<div class="a"/>
|
||||||
|
</div>
|
||||||
|
<div class="flexbox">
|
||||||
|
<div class="c"/>
|
||||||
|
<div class="b"><div class="fixedSizeChild"/></div>
|
||||||
|
<div class="a"/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- end -->
|
||||||
|
<div class="flexbox">
|
||||||
|
<div class="a" style="margin-top: 190px"/>
|
||||||
|
</div>
|
||||||
|
<div class="flexbox">
|
||||||
|
<div class="b" style="margin-top: 160px"><div class="fixedSizeChild"/></div>
|
||||||
|
<div class="a"/>
|
||||||
|
</div>
|
||||||
|
<div class="flexbox">
|
||||||
|
<div class="c" style="margin-top: 120px"/>
|
||||||
|
<div class="b"><div class="fixedSizeChild"/></div>
|
||||||
|
<div class="a"/>
|
||||||
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
@ -10,7 +10,7 @@
|
||||||
<title>CSS Test: Testing 'align-content' in a row wrap-reverse flex container</title>
|
<title>CSS Test: Testing 'align-content' in a row wrap-reverse flex container</title>
|
||||||
<link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com"/>
|
<link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com"/>
|
||||||
<link rel="help" href="http://www.w3.org/TR/css-flexbox-1/#align-content-property"/>
|
<link rel="help" href="http://www.w3.org/TR/css-flexbox-1/#align-content-property"/>
|
||||||
<link rel="match" href="flexbox-align-content-horizrev-001-ref.xhtml"/>
|
<link rel="match" href="flexbox-align-content-horiz-002-ref.xhtml"/>
|
||||||
<style>
|
<style>
|
||||||
div.flexbox {
|
div.flexbox {
|
||||||
width: 20px; /* Skinny, to force us to wrap */
|
width: 20px; /* Skinny, to force us to wrap */
|
||||||
|
|
@ -147,5 +147,33 @@
|
||||||
<div class="b"><div class="fixedSizeChild"/></div>
|
<div class="b"><div class="fixedSizeChild"/></div>
|
||||||
<div class="c"/>
|
<div class="c"/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- start -->
|
||||||
|
<div class="flexbox" style="align-content: start">
|
||||||
|
<div class="a"/>
|
||||||
|
</div>
|
||||||
|
<div class="flexbox" style="align-content: start">
|
||||||
|
<div class="a"/>
|
||||||
|
<div class="b"><div class="fixedSizeChild"/></div>
|
||||||
|
</div>
|
||||||
|
<div class="flexbox" style="align-content: start">
|
||||||
|
<div class="a"/>
|
||||||
|
<div class="b"><div class="fixedSizeChild"/></div>
|
||||||
|
<div class="c"/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- end -->
|
||||||
|
<div class="flexbox" style="align-content: end">
|
||||||
|
<div class="a"/>
|
||||||
|
</div>
|
||||||
|
<div class="flexbox" style="align-content: end">
|
||||||
|
<div class="a"/>
|
||||||
|
<div class="b"><div class="fixedSizeChild"/></div>
|
||||||
|
</div>
|
||||||
|
<div class="flexbox" style="align-content: end">
|
||||||
|
<div class="a"/>
|
||||||
|
<div class="b"><div class="fixedSizeChild"/></div>
|
||||||
|
<div class="c"/>
|
||||||
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
@ -147,13 +147,13 @@
|
||||||
<div class="a"/>
|
<div class="a"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="flexbox">
|
<div class="flexbox">
|
||||||
<div class="b"><div class="fixedSizeChild"/></div>
|
|
||||||
<div class="a"/>
|
<div class="a"/>
|
||||||
|
<div class="b"><div class="fixedSizeChild"/></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="flexbox">
|
<div class="flexbox">
|
||||||
<div class="c"/>
|
|
||||||
<div class="b"><div class="fixedSizeChild"/></div>
|
|
||||||
<div class="a"/>
|
<div class="a"/>
|
||||||
|
<div class="b"><div class="fixedSizeChild"/></div>
|
||||||
|
<div class="c"/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- end -->
|
<!-- end -->
|
||||||
|
|
@ -161,13 +161,13 @@
|
||||||
<div class="a" style="margin-left: 190px"/>
|
<div class="a" style="margin-left: 190px"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="flexbox">
|
<div class="flexbox">
|
||||||
<div class="b" style="margin-left: 160px"><div class="fixedSizeChild"/></div>
|
<div class="a" style="margin-left: 160px"/>
|
||||||
<div class="a"/>
|
<div class="b"><div class="fixedSizeChild"/></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="flexbox">
|
<div class="flexbox">
|
||||||
<div class="c" style="margin-left: 120px"/>
|
<div class="a" style="margin-left: 120px"/>
|
||||||
<div class="b"><div class="fixedSizeChild"/></div>
|
<div class="b"><div class="fixedSizeChild"/></div>
|
||||||
<div class="a"/>
|
<div class="c"/>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -149,28 +149,28 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- start -->
|
<!-- start -->
|
||||||
<div class="flexbox" style="align-content: start; flex-wrap: wrap-reverse">
|
<div class="flexbox" style="align-content: start">
|
||||||
<div class="a"/>
|
<div class="a"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="flexbox" style="align-content: start; flex-wrap: wrap-reverse">
|
<div class="flexbox" style="align-content: start">
|
||||||
<div class="a"/>
|
<div class="a"/>
|
||||||
<div class="b"><div class="fixedSizeChild"/></div>
|
<div class="b"><div class="fixedSizeChild"/></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="flexbox" style="align-content: start; flex-wrap: wrap-reverse">
|
<div class="flexbox" style="align-content: start">
|
||||||
<div class="a"/>
|
<div class="a"/>
|
||||||
<div class="b"><div class="fixedSizeChild"/></div>
|
<div class="b"><div class="fixedSizeChild"/></div>
|
||||||
<div class="c"/>
|
<div class="c"/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- end -->
|
<!-- end -->
|
||||||
<div class="flexbox" style="align-content: end; flex-wrap: wrap-reverse">
|
<div class="flexbox" style="align-content: end">
|
||||||
<div class="a"/>
|
<div class="a"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="flexbox" style="align-content: end; flex-wrap: wrap-reverse">
|
<div class="flexbox" style="align-content: end">
|
||||||
<div class="a"/>
|
<div class="a"/>
|
||||||
<div class="b"><div class="fixedSizeChild"/></div>
|
<div class="b"><div class="fixedSizeChild"/></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="flexbox" style="align-content: end; flex-wrap: wrap-reverse">
|
<div class="flexbox" style="align-content: end">
|
||||||
<div class="a"/>
|
<div class="a"/>
|
||||||
<div class="b"><div class="fixedSizeChild"/></div>
|
<div class="b"><div class="fixedSizeChild"/></div>
|
||||||
<div class="c"/>
|
<div class="c"/>
|
||||||
|
|
|
||||||
|
|
@ -150,28 +150,28 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- start -->
|
<!-- start -->
|
||||||
<div class="flexbox" style="align-content: start; flex-wrap: wrap-reverse">
|
<div class="flexbox" style="align-content: start">
|
||||||
<div class="a"/>
|
<div class="a"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="flexbox" style="align-content: start; flex-wrap: wrap-reverse">
|
<div class="flexbox" style="align-content: start">
|
||||||
<div class="a"/>
|
<div class="a"/>
|
||||||
<div class="b"><div class="fixedSizeChild"/></div>
|
<div class="b"><div class="fixedSizeChild"/></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="flexbox" style="align-content: start; flex-wrap: wrap-reverse">
|
<div class="flexbox" style="align-content: start">
|
||||||
<div class="a"/>
|
<div class="a"/>
|
||||||
<div class="b"><div class="fixedSizeChild"/></div>
|
<div class="b"><div class="fixedSizeChild"/></div>
|
||||||
<div class="c"/>
|
<div class="c"/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- end -->
|
<!-- end -->
|
||||||
<div class="flexbox" style="align-content: end; flex-wrap: wrap-reverse">
|
<div class="flexbox" style="align-content: end">
|
||||||
<div class="a"/>
|
<div class="a"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="flexbox" style="align-content: end; flex-wrap: wrap-reverse">
|
<div class="flexbox" style="align-content: end">
|
||||||
<div class="a"/>
|
<div class="a"/>
|
||||||
<div class="b"><div class="fixedSizeChild"/></div>
|
<div class="b"><div class="fixedSizeChild"/></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="flexbox" style="align-content: end; flex-wrap: wrap-reverse">
|
<div class="flexbox" style="align-content: end">
|
||||||
<div class="a"/>
|
<div class="a"/>
|
||||||
<div class="b"><div class="fixedSizeChild"/></div>
|
<div class="b"><div class="fixedSizeChild"/></div>
|
||||||
<div class="c"/>
|
<div class="c"/>
|
||||||
|
|
|
||||||
|
|
@ -141,5 +141,33 @@
|
||||||
<div class="b" style="margin-right: 30px"><div class="fixedSizeChild"/></div>
|
<div class="b" style="margin-right: 30px"><div class="fixedSizeChild"/></div>
|
||||||
<div class="c" style="margin-right: 30px"/>
|
<div class="c" style="margin-right: 30px"/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- start -->
|
||||||
|
<div class="flexbox">
|
||||||
|
<div class="a" style="margin-right: 190px"/>
|
||||||
|
</div>
|
||||||
|
<div class="flexbox">
|
||||||
|
<div class="a" style="margin-right: 160px"/>
|
||||||
|
<div class="b"><div class="fixedSizeChild"/></div>
|
||||||
|
</div>
|
||||||
|
<div class="flexbox">
|
||||||
|
<div class="a" style="margin-right: 120px"/>
|
||||||
|
<div class="b"><div class="fixedSizeChild"/></div>
|
||||||
|
<div class="c"/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- end -->
|
||||||
|
<div class="flexbox">
|
||||||
|
<div class="a"/>
|
||||||
|
</div>
|
||||||
|
<div class="flexbox">
|
||||||
|
<div class="a"/>
|
||||||
|
<div class="b"><div class="fixedSizeChild"/></div>
|
||||||
|
</div>
|
||||||
|
<div class="flexbox">
|
||||||
|
<div class="a"/>
|
||||||
|
<div class="b"><div class="fixedSizeChild"/></div>
|
||||||
|
<div class="c"/>
|
||||||
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
@ -10,7 +10,7 @@
|
||||||
<title>CSS Test: Testing 'align-content' in a column wrap-reverse flex container</title>
|
<title>CSS Test: Testing 'align-content' in a column wrap-reverse flex container</title>
|
||||||
<link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com"/>
|
<link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com"/>
|
||||||
<link rel="help" href="http://www.w3.org/TR/css-flexbox-1/#align-content-property"/>
|
<link rel="help" href="http://www.w3.org/TR/css-flexbox-1/#align-content-property"/>
|
||||||
<link rel="match" href="flexbox-align-content-vertrev-001-ref.xhtml"/>
|
<link rel="match" href="flexbox-align-content-vert-002-ref.xhtml"/>
|
||||||
<style>
|
<style>
|
||||||
div.flexbox {
|
div.flexbox {
|
||||||
width: 200px;
|
width: 200px;
|
||||||
|
|
@ -147,5 +147,33 @@
|
||||||
<div class="b"><div class="fixedSizeChild"/></div>
|
<div class="b"><div class="fixedSizeChild"/></div>
|
||||||
<div class="c"/>
|
<div class="c"/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- start -->
|
||||||
|
<div class="flexbox" style="align-content: start">
|
||||||
|
<div class="a"/>
|
||||||
|
</div>
|
||||||
|
<div class="flexbox" style="align-content: start">
|
||||||
|
<div class="a"/>
|
||||||
|
<div class="b"><div class="fixedSizeChild"/></div>
|
||||||
|
</div>
|
||||||
|
<div class="flexbox" style="align-content: start">
|
||||||
|
<div class="a"/>
|
||||||
|
<div class="b"><div class="fixedSizeChild"/></div>
|
||||||
|
<div class="c"/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- end -->
|
||||||
|
<div class="flexbox" style="align-content: end">
|
||||||
|
<div class="a"/>
|
||||||
|
</div>
|
||||||
|
<div class="flexbox" style="align-content: end">
|
||||||
|
<div class="a"/>
|
||||||
|
<div class="b"><div class="fixedSizeChild"/></div>
|
||||||
|
</div>
|
||||||
|
<div class="flexbox" style="align-content: end">
|
||||||
|
<div class="a"/>
|
||||||
|
<div class="b"><div class="fixedSizeChild"/></div>
|
||||||
|
<div class="c"/>
|
||||||
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
@ -9,8 +9,10 @@
|
||||||
# Tests for alignment of flex lines (align-content property)
|
# Tests for alignment of flex lines (align-content property)
|
||||||
== flexbox-align-content-horiz-001a.xhtml flexbox-align-content-horiz-001-ref.xhtml
|
== flexbox-align-content-horiz-001a.xhtml flexbox-align-content-horiz-001-ref.xhtml
|
||||||
== flexbox-align-content-horiz-001b.xhtml flexbox-align-content-horiz-001-ref.xhtml
|
== flexbox-align-content-horiz-001b.xhtml flexbox-align-content-horiz-001-ref.xhtml
|
||||||
|
== flexbox-align-content-horiz-002.xhtml flexbox-align-content-horiz-002-ref.xhtml
|
||||||
== flexbox-align-content-vert-001a.xhtml flexbox-align-content-vert-001-ref.xhtml
|
== flexbox-align-content-vert-001a.xhtml flexbox-align-content-vert-001-ref.xhtml
|
||||||
== flexbox-align-content-vert-001b.xhtml flexbox-align-content-vert-001-ref.xhtml
|
== flexbox-align-content-vert-001b.xhtml flexbox-align-content-vert-001-ref.xhtml
|
||||||
|
== flexbox-align-content-vert-002.xhtml flexbox-align-content-vert-002-ref.xhtml
|
||||||
== flexbox-align-content-wmvert-001.xhtml flexbox-align-content-wmvert-001-ref.xhtml
|
== flexbox-align-content-wmvert-001.xhtml flexbox-align-content-wmvert-001-ref.xhtml
|
||||||
|
|
||||||
# Tests for cross-axis alignment (align-self / align-items properties)
|
# Tests for cross-axis alignment (align-self / align-items properties)
|
||||||
|
|
|
||||||
|
|
@ -54,6 +54,7 @@ import android.content.Context;
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
|
import android.content.pm.ApplicationInfo;
|
||||||
import android.content.pm.PackageManager.NameNotFoundException;
|
import android.content.pm.PackageManager.NameNotFoundException;
|
||||||
import android.content.res.Configuration;
|
import android.content.res.Configuration;
|
||||||
import android.graphics.BitmapFactory;
|
import android.graphics.BitmapFactory;
|
||||||
|
|
@ -2240,8 +2241,9 @@ public abstract class GeckoApp extends GeckoActivity
|
||||||
// the res/fonts directory: we no longer need to copy our
|
// the res/fonts directory: we no longer need to copy our
|
||||||
// bundled fonts out of the APK in order to use them.
|
// bundled fonts out of the APK in order to use them.
|
||||||
// See https://bugzilla.mozilla.org/show_bug.cgi?id=878674.
|
// See https://bugzilla.mozilla.org/show_bug.cgi?id=878674.
|
||||||
File dir = new File("res/fonts");
|
final File dataDir = new File(context.getApplicationInfo().dataDir);
|
||||||
if (dir.exists() && dir.isDirectory()) {
|
final File dir = new File(dataDir, "res/fonts");
|
||||||
|
if (dir.exists() && dir.isDirectory() && dir.listFiles() != null) {
|
||||||
for (File file : dir.listFiles()) {
|
for (File file : dir.listFiles()) {
|
||||||
if (file.isFile() && file.getName().endsWith(".ttf")) {
|
if (file.isFile() && file.getName().endsWith(".ttf")) {
|
||||||
file.delete();
|
file.delete();
|
||||||
|
|
|
||||||
|
|
@ -342,7 +342,12 @@ public class GeckoView extends FrameLayout {
|
||||||
if (!mSession.isOpen()) {
|
if (!mSession.isOpen()) {
|
||||||
mSession.open(mRuntime);
|
mSession.open(mRuntime);
|
||||||
}
|
}
|
||||||
mRuntime.orientationChanged();
|
// Temporary solution until we find out why mRuntime can end up as null here. It means we
|
||||||
|
// might miss an orientation change if we were background OOM-killed, but it's better than
|
||||||
|
// crashing. See bug 1484001.
|
||||||
|
if (mRuntime != null) {
|
||||||
|
mRuntime.orientationChanged();
|
||||||
|
}
|
||||||
|
|
||||||
super.onAttachedToWindow();
|
super.onAttachedToWindow();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1379,13 +1379,8 @@ pref("dom.ua_widget.enabled", false);
|
||||||
pref("dom.ua_widget.enabled", false);
|
pref("dom.ua_widget.enabled", false);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef NIGHTLY_BUILD
|
|
||||||
pref("dom.webcomponents.shadowdom.enabled", true);
|
pref("dom.webcomponents.shadowdom.enabled", true);
|
||||||
pref("dom.webcomponents.customelements.enabled", true);
|
pref("dom.webcomponents.customelements.enabled", true);
|
||||||
#else
|
|
||||||
pref("dom.webcomponents.shadowdom.enabled", false);
|
|
||||||
pref("dom.webcomponents.customelements.enabled", false);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
pref("javascript.enabled", true);
|
pref("javascript.enabled", true);
|
||||||
pref("javascript.options.strict", false);
|
pref("javascript.options.strict", false);
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,6 @@ bitflags = "1.0"
|
||||||
matches = "0.1"
|
matches = "0.1"
|
||||||
cssparser = "0.24.0"
|
cssparser = "0.24.0"
|
||||||
log = "0.4"
|
log = "0.4"
|
||||||
fnv = "1.0"
|
|
||||||
fxhash = "0.2"
|
fxhash = "0.2"
|
||||||
phf = "0.7.18"
|
phf = "0.7.18"
|
||||||
precomputed-hash = "0.1"
|
precomputed-hash = "0.1"
|
||||||
|
|
|
||||||
|
|
@ -5,9 +5,7 @@
|
||||||
//! Counting and non-counting Bloom filters tuned for use as ancestor filters
|
//! Counting and non-counting Bloom filters tuned for use as ancestor filters
|
||||||
//! for selector matching.
|
//! for selector matching.
|
||||||
|
|
||||||
use fnv::FnvHasher;
|
|
||||||
use std::fmt::{self, Debug};
|
use std::fmt::{self, Debug};
|
||||||
use std::hash::{Hash, Hasher};
|
|
||||||
|
|
||||||
// The top 8 bits of the 32-bit hash value are not used by the bloom filter.
|
// The top 8 bits of the 32-bit hash value are not used by the bloom filter.
|
||||||
// Consumers may rely on this to pack hashes more efficiently.
|
// Consumers may rely on this to pack hashes more efficiently.
|
||||||
|
|
@ -108,43 +106,27 @@ where
|
||||||
unreachable!()
|
unreachable!()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Inserts an item with a particular hash into the bloom filter.
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn insert_hash(&mut self, hash: u32) {
|
pub fn insert_hash(&mut self, hash: u32) {
|
||||||
self.storage.adjust_first_slot(hash, true);
|
self.storage.adjust_first_slot(hash, true);
|
||||||
self.storage.adjust_second_slot(hash, true);
|
self.storage.adjust_second_slot(hash, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Inserts an item into the bloom filter.
|
/// Removes an item with a particular hash from the bloom filter.
|
||||||
#[inline]
|
|
||||||
pub fn insert<T: Hash>(&mut self, elem: &T) {
|
|
||||||
self.insert_hash(hash(elem))
|
|
||||||
}
|
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn remove_hash(&mut self, hash: u32) {
|
pub fn remove_hash(&mut self, hash: u32) {
|
||||||
self.storage.adjust_first_slot(hash, false);
|
self.storage.adjust_first_slot(hash, false);
|
||||||
self.storage.adjust_second_slot(hash, false);
|
self.storage.adjust_second_slot(hash, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Removes an item from the bloom filter.
|
/// Check whether the filter might contain an item with the given hash.
|
||||||
#[inline]
|
/// This can sometimes return true even if the item is not in the filter,
|
||||||
pub fn remove<T: Hash>(&mut self, elem: &T) {
|
/// but will never return false for items that are actually in the filter.
|
||||||
self.remove_hash(hash(elem))
|
|
||||||
}
|
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn might_contain_hash(&self, hash: u32) -> bool {
|
pub fn might_contain_hash(&self, hash: u32) -> bool {
|
||||||
!self.storage.first_slot_is_empty(hash) && !self.storage.second_slot_is_empty(hash)
|
!self.storage.first_slot_is_empty(hash) && !self.storage.second_slot_is_empty(hash)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Check whether the filter might contain an item. This can
|
|
||||||
/// sometimes return true even if the item is not in the filter,
|
|
||||||
/// but will never return false for items that are actually in the
|
|
||||||
/// filter.
|
|
||||||
#[inline]
|
|
||||||
pub fn might_contain<T: Hash>(&self, elem: &T) -> bool {
|
|
||||||
self.might_contain_hash(hash(elem))
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<S> Debug for CountingBloomFilter<S>
|
impl<S> Debug for CountingBloomFilter<S>
|
||||||
|
|
@ -296,16 +278,6 @@ impl Clone for BloomStorageBool {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn hash<T: Hash>(elem: &T) -> u32 {
|
|
||||||
// We generally use FxHasher in Stylo because it's faster than FnvHasher,
|
|
||||||
// but the increased collision rate has outsized effect on the bloom
|
|
||||||
// filter, so we use FnvHasher instead here.
|
|
||||||
let mut hasher = FnvHasher::default();
|
|
||||||
elem.hash(&mut hasher);
|
|
||||||
let hash: u64 = hasher.finish();
|
|
||||||
(hash >> 32) as u32 ^ (hash as u32)
|
|
||||||
}
|
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
fn hash1(hash: u32) -> u32 {
|
fn hash1(hash: u32) -> u32 {
|
||||||
hash & KEY_MASK
|
hash & KEY_MASK
|
||||||
|
|
@ -318,8 +290,18 @@ fn hash2(hash: u32) -> u32 {
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn create_and_insert_some_stuff() {
|
fn create_and_insert_some_stuff() {
|
||||||
|
use fxhash::FxHasher;
|
||||||
|
use std::hash::{Hash, Hasher};
|
||||||
use std::mem::transmute;
|
use std::mem::transmute;
|
||||||
|
|
||||||
|
fn hash_as_str(i: usize) -> u32 {
|
||||||
|
let mut hasher = FxHasher::default();
|
||||||
|
let s = i.to_string();
|
||||||
|
s.hash(&mut hasher);
|
||||||
|
let hash: u64 = hasher.finish();
|
||||||
|
(hash >> 32) as u32 ^ (hash as u32)
|
||||||
|
}
|
||||||
|
|
||||||
let mut bf = BloomFilter::new();
|
let mut bf = BloomFilter::new();
|
||||||
|
|
||||||
// Statically assert that ARRAY_SIZE is a multiple of 8, which
|
// Statically assert that ARRAY_SIZE is a multiple of 8, which
|
||||||
|
|
@ -329,33 +311,34 @@ fn create_and_insert_some_stuff() {
|
||||||
}
|
}
|
||||||
|
|
||||||
for i in 0_usize..1000 {
|
for i in 0_usize..1000 {
|
||||||
bf.insert(&i);
|
bf.insert_hash(hash_as_str(i));
|
||||||
}
|
}
|
||||||
|
|
||||||
for i in 0_usize..1000 {
|
for i in 0_usize..1000 {
|
||||||
assert!(bf.might_contain(&i));
|
assert!(bf.might_contain_hash(hash_as_str(i)));
|
||||||
}
|
}
|
||||||
|
|
||||||
let false_positives = (1001_usize..2000).filter(|i| bf.might_contain(i)).count();
|
let false_positives =
|
||||||
|
(1001_usize..2000).filter(|i| bf.might_contain_hash(hash_as_str(*i))).count();
|
||||||
|
|
||||||
assert!(false_positives < 160, "{} is not < 160", false_positives); // 16%.
|
assert!(false_positives < 190, "{} is not < 190", false_positives); // 19%.
|
||||||
|
|
||||||
for i in 0_usize..100 {
|
for i in 0_usize..100 {
|
||||||
bf.remove(&i);
|
bf.remove_hash(hash_as_str(i));
|
||||||
}
|
}
|
||||||
|
|
||||||
for i in 100_usize..1000 {
|
for i in 100_usize..1000 {
|
||||||
assert!(bf.might_contain(&i));
|
assert!(bf.might_contain_hash(hash_as_str(i)));
|
||||||
}
|
}
|
||||||
|
|
||||||
let false_positives = (0_usize..100).filter(|i| bf.might_contain(i)).count();
|
let false_positives = (0_usize..100).filter(|i| bf.might_contain_hash(hash_as_str(*i))).count();
|
||||||
|
|
||||||
assert!(false_positives < 20, "{} is not < 20", false_positives); // 20%.
|
assert!(false_positives < 20, "{} is not < 20", false_positives); // 20%.
|
||||||
|
|
||||||
bf.clear();
|
bf.clear();
|
||||||
|
|
||||||
for i in 0_usize..2000 {
|
for i in 0_usize..2000 {
|
||||||
assert!(!bf.might_contain(&i));
|
assert!(!bf.might_contain_hash(hash_as_str(i)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,6 @@
|
||||||
extern crate bitflags;
|
extern crate bitflags;
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate cssparser;
|
extern crate cssparser;
|
||||||
extern crate fnv;
|
|
||||||
extern crate fxhash;
|
extern crate fxhash;
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate log;
|
extern crate log;
|
||||||
|
|
|
||||||
|
|
@ -118,7 +118,7 @@ user_pref("dom.successive_dialog_time_limit", 0);
|
||||||
user_pref("dom.use_xbl_scopes_for_remote_xul", true);
|
user_pref("dom.use_xbl_scopes_for_remote_xul", true);
|
||||||
user_pref("dom.w3c_touch_events.enabled", 1);
|
user_pref("dom.w3c_touch_events.enabled", 1);
|
||||||
user_pref("dom.webcomponents.customelements.enabled", true);
|
user_pref("dom.webcomponents.customelements.enabled", true);
|
||||||
user_pref("dom.webcomponents.shadowdom.enabled", false);
|
user_pref("dom.webcomponents.shadowdom.enabled", true);
|
||||||
user_pref("extensions.autoDisableScopes", 0);
|
user_pref("extensions.autoDisableScopes", 0);
|
||||||
user_pref("extensions.blocklist.detailsURL", "http://{server}/extensions-dummy/blocklistDetailsURL");
|
user_pref("extensions.blocklist.detailsURL", "http://{server}/extensions-dummy/blocklistDetailsURL");
|
||||||
user_pref("extensions.blocklist.itemURL", "http://{server}/extensions-dummy/blocklistItemURL");
|
user_pref("extensions.blocklist.itemURL", "http://{server}/extensions-dummy/blocklistItemURL");
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,6 @@
|
||||||
[all-hosts.html]
|
[all-hosts.html]
|
||||||
[CSS Shadow Parts - All Hosts]
|
[::part with host selector styles in first host]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
[::part with host selector styles in second host]
|
||||||
|
expected: FAIL
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
[complex-matching.html]
|
[complex-matching.html]
|
||||||
[CSS Shadow Parts - Complex Matching]
|
[Complex selector for host works]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
[inner-host.html]
|
[inner-host.html]
|
||||||
[CSS Shadow Parts - Inner Host]
|
[Part in outer host is styled by document style sheet]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
[invalidation-change-part-name.html]
|
[invalidation-change-part-name.html]
|
||||||
[CSS Shadow Parts - Invalidation Change Part Name]
|
[Part in selected host changed color]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
[invalidation-complex-selector.html]
|
[invalidation-complex-selector.html]
|
||||||
[CSS Shadow Parts - Invalidation Complex Selector]
|
[Part in selected host changed color]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
[simple.html]
|
[simple.html]
|
||||||
[CSS Shadow Parts - Simple]
|
[Part in selected host is styled]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +0,0 @@
|
||||||
[transform-origin-in-shadow.html]
|
|
||||||
expected: ERROR
|
|
||||||
['transform-origin' on <svg> being direct descendant of shadow root]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
|
|
@ -1,8 +1,15 @@
|
||||||
[getComputedStyle-detached-subtree.html]
|
[getComputedStyle-detached-subtree.html]
|
||||||
expected: ERROR
|
|
||||||
[getComputedStyle returns no style for detached element]
|
[getComputedStyle returns no style for detached element]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[getComputedStyle returns no style for element in non-rendered iframe (display: none)]
|
[getComputedStyle returns no style for element in non-rendered iframe (display: none)]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
[getComputedStyle returns no style for element outside the flat tree]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[getComputedStyle returns no style for descendant outside the flat tree]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[getComputedStyle returns no style for shadow tree outside of flattened tree]
|
||||||
|
expected: FAIL
|
||||||
|
|
|
||||||
|
|
@ -137,63 +137,6 @@
|
||||||
[Document interface: xmlDoc must inherit property "origin" with the proper type]
|
[Document interface: xmlDoc must inherit property "origin" with the proper type]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[ShadowRoot interface: existence and properties of interface object]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[ShadowRoot interface object length]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[ShadowRoot interface object name]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[ShadowRoot interface: existence and properties of interface prototype object]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[ShadowRoot interface: existence and properties of interface prototype object's "constructor" property]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[ShadowRoot interface: existence and properties of interface prototype object's @@unscopables property]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[ShadowRoot interface: attribute mode]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[ShadowRoot interface: attribute host]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Element interface: attribute slot]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Element interface: operation attachShadow(ShadowRootInit)]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Element interface: attribute shadowRoot]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Element interface: attribute assignedSlot]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Element interface: element must inherit property "slot" with the proper type]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Element interface: element must inherit property "attachShadow(ShadowRootInit)" with the proper type]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Element interface: calling attachShadow(ShadowRootInit) on element with too few arguments must throw TypeError]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Element interface: element must inherit property "shadowRoot" with the proper type]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Element interface: element must inherit property "assignedSlot" with the proper type]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Text interface: attribute assignedSlot]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Text interface: document.createTextNode("abc") must inherit property "assignedSlot" with the proper type]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[AbstractRange interface: existence and properties of interface object]
|
[AbstractRange interface: existence and properties of interface object]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
|
@ -276,63 +219,6 @@
|
||||||
[Document interface: xmlDoc must inherit property "origin" with the proper type]
|
[Document interface: xmlDoc must inherit property "origin" with the proper type]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[ShadowRoot interface: existence and properties of interface object]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[ShadowRoot interface object length]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[ShadowRoot interface object name]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[ShadowRoot interface: existence and properties of interface prototype object]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[ShadowRoot interface: existence and properties of interface prototype object's "constructor" property]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[ShadowRoot interface: existence and properties of interface prototype object's @@unscopables property]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[ShadowRoot interface: attribute mode]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[ShadowRoot interface: attribute host]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Element interface: attribute slot]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Element interface: operation attachShadow(ShadowRootInit)]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Element interface: attribute shadowRoot]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Element interface: attribute assignedSlot]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Element interface: element must inherit property "slot" with the proper type]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Element interface: element must inherit property "attachShadow(ShadowRootInit)" with the proper type]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Element interface: calling attachShadow(ShadowRootInit) on element with too few arguments must throw TypeError]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Element interface: element must inherit property "shadowRoot" with the proper type]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Element interface: element must inherit property "assignedSlot" with the proper type]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Text interface: attribute assignedSlot]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Text interface: document.createTextNode("abc") must inherit property "assignedSlot" with the proper type]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[AbstractRange interface: existence and properties of interface object]
|
[AbstractRange interface: existence and properties of interface object]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +0,0 @@
|
||||||
[rootNode.html]
|
|
||||||
[getRootNode() must return context object's shadow-including root if options's composed is true, and context object's root otherwise]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
|
|
@ -8,9 +8,6 @@
|
||||||
[Element interface: document.createElementNS(null, "test") must inherit property "onfullscreenerror" with the proper type]
|
[Element interface: document.createElementNS(null, "test") must inherit property "onfullscreenerror" with the proper type]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[ShadowRoot interface: attribute fullscreenElement]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Element interface: attribute onfullscreenerror]
|
[Element interface: attribute onfullscreenerror]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,6 @@
|
||||||
[Document interface: operation exitFullscreen()]
|
[Document interface: operation exitFullscreen()]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[ShadowRoot interface: attribute fullscreenElement]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Element interface: operation requestFullscreen()]
|
[Element interface: operation requestFullscreen()]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +0,0 @@
|
||||||
[contentEditable-slotted-inherit.html]
|
|
||||||
[Slotted child of contenteditable host should be editable - slot direct child of shadow root]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Slotted child of contenteditable host should be editable - slot wrapped in shadow tree ancestor]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
|
|
@ -1,7 +0,0 @@
|
||||||
[link-rel-attribute.html]
|
|
||||||
[Untitled]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Removing stylesheet from link rel attribute should remove the stylesheet for shadow DOM]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
|
|
@ -1,4 +0,0 @@
|
||||||
[interfaces.window.html]
|
|
||||||
[ShadowRoot interface: attribute pointerLockElement]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
|
|
@ -219,8 +219,13 @@
|
||||||
"preprocess": "localize"
|
"preprocess": "localize"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
|
||||||
|
"hidden": {
|
||||||
|
"type": "boolean",
|
||||||
|
"optional": true,
|
||||||
|
"default": false
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
"additionalProperties": { "$ref": "UnrecognizedProperty" }
|
"additionalProperties": { "$ref": "UnrecognizedProperty" }
|
||||||
|
|
|
||||||
|
|
@ -8,8 +8,6 @@
|
||||||
|
|
||||||
@import url("chrome://global/content/autocomplete.css");
|
@import url("chrome://global/content/autocomplete.css");
|
||||||
@import url("chrome://global/skin/autocomplete.css");
|
@import url("chrome://global/skin/autocomplete.css");
|
||||||
@import url("resource://formautofill/autocomplete-item-shared.css");
|
|
||||||
@import url("resource://formautofill/autocomplete-item.css");
|
|
||||||
@import url("chrome://global/skin/dialog.css");
|
@import url("chrome://global/skin/dialog.css");
|
||||||
@import url("chrome://global/skin/dropmarker.css");
|
@import url("chrome://global/skin/dropmarker.css");
|
||||||
@import url("chrome://global/skin/groupbox.css");
|
@import url("chrome://global/skin/groupbox.css");
|
||||||
|
|
|
||||||
|
|
@ -116,7 +116,7 @@ const PROP_JSON_FIELDS = ["id", "syncGUID", "version", "type",
|
||||||
"seen", "dependencies", "hasEmbeddedWebExtension",
|
"seen", "dependencies", "hasEmbeddedWebExtension",
|
||||||
"userPermissions", "icons", "iconURL", "icon64URL",
|
"userPermissions", "icons", "iconURL", "icon64URL",
|
||||||
"blocklistState", "blocklistURL", "startupData",
|
"blocklistState", "blocklistURL", "startupData",
|
||||||
"previewImage"];
|
"previewImage", "hidden"];
|
||||||
|
|
||||||
const LEGACY_TYPES = new Set([
|
const LEGACY_TYPES = new Set([
|
||||||
"extension",
|
"extension",
|
||||||
|
|
@ -288,6 +288,7 @@ class AddonInternal {
|
||||||
this.seen = true;
|
this.seen = true;
|
||||||
this.skinnable = false;
|
this.skinnable = false;
|
||||||
this.startupData = null;
|
this.startupData = null;
|
||||||
|
this._hidden = false;
|
||||||
|
|
||||||
this.inDatabase = false;
|
this.inDatabase = false;
|
||||||
|
|
||||||
|
|
@ -416,7 +417,12 @@ class AddonInternal {
|
||||||
}
|
}
|
||||||
|
|
||||||
get hidden() {
|
get hidden() {
|
||||||
return this.location.isSystem;
|
return this.location.isSystem ||
|
||||||
|
(this._hidden && this.signedState == AddonManager.SIGNEDSTATE_PRIVILEGED);
|
||||||
|
}
|
||||||
|
|
||||||
|
set hidden(val) {
|
||||||
|
this._hidden = val;
|
||||||
}
|
}
|
||||||
|
|
||||||
get disabled() {
|
get disabled() {
|
||||||
|
|
@ -577,10 +583,10 @@ class AddonInternal {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.inDatabase) {
|
if (this.inDatabase) {
|
||||||
// hidden and system add-ons should not be user disabled,
|
// System add-ons should not be user disabled, as there is no UI to
|
||||||
// as there is no UI to re-enable them.
|
// re-enable them.
|
||||||
if (this.hidden) {
|
if (this.location.isSystem) {
|
||||||
throw new Error(`Cannot disable hidden add-on ${this.id}`);
|
throw new Error(`Cannot disable system add-on ${this.id}`);
|
||||||
}
|
}
|
||||||
await XPIDatabase.updateAddonDisabledState(this, val);
|
await XPIDatabase.updateAddonDisabledState(this, val);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -466,6 +466,7 @@ async function loadManifestFromWebManifest(aUri, aPackage) {
|
||||||
addon.aboutURL = null;
|
addon.aboutURL = null;
|
||||||
addon.dependencies = Object.freeze(Array.from(extension.dependencies));
|
addon.dependencies = Object.freeze(Array.from(extension.dependencies));
|
||||||
addon.startupData = extension.startupData;
|
addon.startupData = extension.startupData;
|
||||||
|
addon.hidden = manifest.hidden;
|
||||||
|
|
||||||
if (isTheme(addon.type) && await aPackage.hasResource("preview.png")) {
|
if (isTheme(addon.type) && await aPackage.hasResource("preview.png")) {
|
||||||
addon.previewImage = "preview.png";
|
addon.previewImage = "preview.png";
|
||||||
|
|
@ -812,6 +813,9 @@ var loadManifest = async function(aPackage, aLocation, aOldAddon) {
|
||||||
|
|
||||||
let {signedState, cert} = await aPackage.verifySignedState(addon);
|
let {signedState, cert} = await aPackage.verifySignedState(addon);
|
||||||
addon.signedState = signedState;
|
addon.signedState = signedState;
|
||||||
|
if (signedState != AddonManager.SIGNEDSTATE_PRIVILEGED) {
|
||||||
|
addon.hidden = false;
|
||||||
|
}
|
||||||
|
|
||||||
if (isWebExtension && !addon.id) {
|
if (isWebExtension && !addon.id) {
|
||||||
if (cert) {
|
if (cert) {
|
||||||
|
|
|
||||||
51
toolkit/mozapps/extensions/test/xpcshell/test_hidden.js
Normal file
51
toolkit/mozapps/extensions/test/xpcshell/test_hidden.js
Normal file
|
|
@ -0,0 +1,51 @@
|
||||||
|
|
||||||
|
add_task(async function test_hidden() {
|
||||||
|
createAppInfo("xpcshell@tests.mozilla.org", "XPCShell", "1", "2");
|
||||||
|
AddonTestUtils.usePrivilegedSignatures = id => id.startsWith("privileged");
|
||||||
|
|
||||||
|
await promiseStartupManager();
|
||||||
|
|
||||||
|
let xpi1 = createTempWebExtensionFile({
|
||||||
|
manifest: {
|
||||||
|
applications: {
|
||||||
|
gecko: {
|
||||||
|
id: "privileged@tests.mozilla.org",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
name: "Hidden Extension",
|
||||||
|
hidden: true,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
let xpi2 = createTempWebExtensionFile({
|
||||||
|
manifest: {
|
||||||
|
applications: {
|
||||||
|
gecko: {
|
||||||
|
id: "unprivileged@tests.mozilla.org",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
name: "Non-Hidden Extension",
|
||||||
|
hidden: true,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
await promiseInstallAllFiles([xpi1, xpi2]);
|
||||||
|
|
||||||
|
let [addon1, addon2] = await promiseAddonsByIDs(["privileged@tests.mozilla.org",
|
||||||
|
"unprivileged@tests.mozilla.org"]);
|
||||||
|
|
||||||
|
ok(addon1.hidden, "Privileged extension should be hidden");
|
||||||
|
ok(!addon2.hidden, "Unprivileged extension should not be hidden");
|
||||||
|
|
||||||
|
await promiseRestartManager();
|
||||||
|
|
||||||
|
([addon1, addon2] = await promiseAddonsByIDs(["privileged@tests.mozilla.org",
|
||||||
|
"unprivileged@tests.mozilla.org"]));
|
||||||
|
|
||||||
|
ok(addon1.hidden, "Privileged extension should be hidden");
|
||||||
|
ok(!addon2.hidden, "Unprivileged extension should not be hidden");
|
||||||
|
|
||||||
|
await promiseShutdownManager();
|
||||||
|
});
|
||||||
|
|
@ -93,7 +93,7 @@ add_task(async function() {
|
||||||
await addon.disable();
|
await addon.disable();
|
||||||
do_throw("Expected addon.userDisabled on a hidden add-on to throw!");
|
do_throw("Expected addon.userDisabled on a hidden add-on to throw!");
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
Assert.equal(e.message, `Cannot disable hidden add-on ${SYSTEM_ID}`);
|
Assert.equal(e.message, `Cannot disable system add-on ${SYSTEM_ID}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
Assert.notEqual(addon, null);
|
Assert.notEqual(addon, null);
|
||||||
|
|
|
||||||
|
|
@ -134,6 +134,7 @@ tags = blocklist
|
||||||
[test_gmpProvider.js]
|
[test_gmpProvider.js]
|
||||||
skip-if = appname != "firefox"
|
skip-if = appname != "firefox"
|
||||||
[test_harness.js]
|
[test_harness.js]
|
||||||
|
[test_hidden.js]
|
||||||
[test_install.js]
|
[test_install.js]
|
||||||
[test_install_icons.js]
|
[test_install_icons.js]
|
||||||
# Bug 676992: test consistently hangs on Android
|
# Bug 676992: test consistently hangs on Android
|
||||||
|
|
|
||||||
|
|
@ -2050,18 +2050,11 @@ private:
|
||||||
|
|
||||||
NS_IMPL_ISUPPORTS(nsCycleCollectorLogger, nsICycleCollectorListener)
|
NS_IMPL_ISUPPORTS(nsCycleCollectorLogger, nsICycleCollectorListener)
|
||||||
|
|
||||||
nsresult
|
already_AddRefed<nsICycleCollectorListener>
|
||||||
nsCycleCollectorLoggerConstructor(nsISupports* aOuter,
|
nsCycleCollector_createLogger()
|
||||||
const nsIID& aIID,
|
|
||||||
void** aInstancePtr)
|
|
||||||
{
|
{
|
||||||
if (NS_WARN_IF(aOuter)) {
|
nsCOMPtr<nsICycleCollectorListener> logger = new nsCycleCollectorLogger();
|
||||||
return NS_ERROR_NO_AGGREGATION;
|
return logger.forget();
|
||||||
}
|
|
||||||
|
|
||||||
nsISupports* logger = new nsCycleCollectorLogger();
|
|
||||||
|
|
||||||
return logger->QueryInterface(aIID, aInstancePtr);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
|
|
|
||||||
|
|
@ -46,6 +46,7 @@ bool nsCycleCollector_doDeferredDeletion();
|
||||||
bool nsCycleCollector_doDeferredDeletionWithBudget(js::SliceBudget& aBudget);
|
bool nsCycleCollector_doDeferredDeletionWithBudget(js::SliceBudget& aBudget);
|
||||||
|
|
||||||
already_AddRefed<nsICycleCollectorLogSink> nsCycleCollector_createLogSink();
|
already_AddRefed<nsICycleCollectorLogSink> nsCycleCollector_createLogSink();
|
||||||
|
already_AddRefed<nsICycleCollectorListener> nsCycleCollector_createLogger();
|
||||||
|
|
||||||
void nsCycleCollector_collect(nsICycleCollectorListener* aManualListener);
|
void nsCycleCollector_collect(nsICycleCollectorListener* aManualListener);
|
||||||
|
|
||||||
|
|
@ -66,13 +67,4 @@ void nsCycleCollector_forgetJSContext();
|
||||||
void nsCycleCollector_registerNonPrimaryContext(mozilla::CycleCollectedJSContext* aCx);
|
void nsCycleCollector_registerNonPrimaryContext(mozilla::CycleCollectedJSContext* aCx);
|
||||||
void nsCycleCollector_forgetNonPrimaryContext();
|
void nsCycleCollector_forgetNonPrimaryContext();
|
||||||
|
|
||||||
#define NS_CYCLE_COLLECTOR_LOGGER_CID \
|
|
||||||
{ 0x58be81b4, 0x39d2, 0x437c, \
|
|
||||||
{ 0x94, 0xea, 0xae, 0xde, 0x2c, 0x62, 0x08, 0xd3 } }
|
|
||||||
|
|
||||||
extern nsresult
|
|
||||||
nsCycleCollectorLoggerConstructor(nsISupports* aOuter,
|
|
||||||
const nsIID& aIID,
|
|
||||||
void** aInstancePtr);
|
|
||||||
|
|
||||||
#endif // nsCycleCollector_h__
|
#endif // nsCycleCollector_h__
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ interface nsIFile;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A set of interfaces for recording the cycle collector's work. An instance
|
* A set of interfaces for recording the cycle collector's work. An instance
|
||||||
* of @mozilla.org/cycle-collector-logger;1 can be configured to enable various
|
* of nsICycleCollectorListener can be configured to enable various
|
||||||
* options, then passed to the cycle collector when it runs.
|
* options, then passed to the cycle collector when it runs.
|
||||||
* Note that additional logging options are available by setting environment
|
* Note that additional logging options are available by setting environment
|
||||||
* variables, as described at the top of nsCycleCollector.cpp.
|
* variables, as described at the top of nsCycleCollector.cpp.
|
||||||
|
|
@ -24,7 +24,7 @@ interface nsIFile;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* nsICycleCollectorHandler is the interface JS code should implement to
|
* nsICycleCollectorHandler is the interface JS code should implement to
|
||||||
* receive the results logged by a @mozilla.org/cycle-collector-logger;1
|
* receive the results logged by an nsICycleCollectorListener
|
||||||
* instance. Pass an instance of this to the logger's 'processNext' method
|
* instance. Pass an instance of this to the logger's 'processNext' method
|
||||||
* after the collection has run. This will describe the objects the cycle
|
* after the collection has run. This will describe the objects the cycle
|
||||||
* collector visited, the edges it found, and the conclusions it reached
|
* collector visited, the edges it found, and the conclusions it reached
|
||||||
|
|
@ -98,8 +98,10 @@ interface nsICycleCollectorLogSink : nsISupports
|
||||||
*
|
*
|
||||||
* To analyze cycle collection data in JS:
|
* To analyze cycle collection data in JS:
|
||||||
*
|
*
|
||||||
* - Create an instance of @mozilla.org/cycle-collector-logger;1, which
|
* - Create an instance of nsICycleCollectorListener, which implements this
|
||||||
* implements this interface.
|
* interface. In C++, this can be done by calling
|
||||||
|
* nsCycleCollector_createLogger(). In JS, this can be done by calling
|
||||||
|
* Components.utils.createCCLogger().
|
||||||
*
|
*
|
||||||
* - Set its |disableLog| property to true. This prevents the logger from
|
* - Set its |disableLog| property to true. This prevents the logger from
|
||||||
* printing messages about each method call to a temporary log file.
|
* printing messages about each method call to a temporary log file.
|
||||||
|
|
|
||||||
|
|
@ -384,8 +384,7 @@ nsMemoryInfoDumper::DumpGCAndCCLogsToFile(const nsAString& aIdentifier,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
nsCOMPtr<nsICycleCollectorListener> logger =
|
nsCOMPtr<nsICycleCollectorListener> logger = nsCycleCollector_createLogger();
|
||||||
do_CreateInstance("@mozilla.org/cycle-collector-logger;1");
|
|
||||||
|
|
||||||
if (aDumpAllTraces) {
|
if (aDumpAllTraces) {
|
||||||
nsCOMPtr<nsICycleCollectorListener> allTracesLogger;
|
nsCOMPtr<nsICycleCollectorListener> allTracesLogger;
|
||||||
|
|
@ -412,8 +411,7 @@ NS_IMETHODIMP
|
||||||
nsMemoryInfoDumper::DumpGCAndCCLogsToSink(bool aDumpAllTraces,
|
nsMemoryInfoDumper::DumpGCAndCCLogsToSink(bool aDumpAllTraces,
|
||||||
nsICycleCollectorLogSink* aSink)
|
nsICycleCollectorLogSink* aSink)
|
||||||
{
|
{
|
||||||
nsCOMPtr<nsICycleCollectorListener> logger =
|
nsCOMPtr<nsICycleCollectorListener> logger = nsCycleCollector_createLogger();
|
||||||
do_CreateInstance("@mozilla.org/cycle-collector-logger;1");
|
|
||||||
|
|
||||||
if (aDumpAllTraces) {
|
if (aDumpAllTraces) {
|
||||||
nsCOMPtr<nsICycleCollectorListener> allTracesLogger;
|
nsCOMPtr<nsICycleCollectorListener> allTracesLogger;
|
||||||
|
|
|
||||||
|
|
@ -72,5 +72,4 @@
|
||||||
COMPONENT_M(MEMORY_REPORTER_MANAGER, nsMemoryReporterManagerConstructor, Module::ALLOW_IN_GPU_PROCESS)
|
COMPONENT_M(MEMORY_REPORTER_MANAGER, nsMemoryReporterManagerConstructor, Module::ALLOW_IN_GPU_PROCESS)
|
||||||
COMPONENT(MEMORY_INFO_DUMPER, nsMemoryInfoDumperConstructor)
|
COMPONENT(MEMORY_INFO_DUMPER, nsMemoryInfoDumperConstructor)
|
||||||
COMPONENT(IOUTIL, nsIOUtilConstructor)
|
COMPONENT(IOUTIL, nsIOUtilConstructor)
|
||||||
COMPONENT(CYCLE_COLLECTOR_LOGGER, nsCycleCollectorLoggerConstructor)
|
|
||||||
COMPONENT(MESSAGE_LOOP, nsMessageLoopConstructor)
|
COMPONENT(MESSAGE_LOOP, nsMessageLoopConstructor)
|
||||||
|
|
|
||||||
|
|
@ -76,11 +76,6 @@
|
||||||
*/
|
*/
|
||||||
#define NS_MEMORY_INFO_DUMPER_CONTRACTID "@mozilla.org/memory-info-dumper;1"
|
#define NS_MEMORY_INFO_DUMPER_CONTRACTID "@mozilla.org/memory-info-dumper;1"
|
||||||
|
|
||||||
/**
|
|
||||||
* Cycle collector logger contract id
|
|
||||||
*/
|
|
||||||
#define NS_CYCLE_COLLECTOR_LOGGER_CONTRACTID "@mozilla.org/cycle-collector-logger;1"
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* nsMessageLoop contract id
|
* nsMessageLoop contract id
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue