Merge mozilla-central to inbound. a=merge CLOSED TREE

This commit is contained in:
shindli 2018-03-03 01:18:17 +02:00
Родитель 7908c68484 73e569944b
Коммит b1ab6c8442
248 изменённых файлов: 11020 добавлений и 8770 удалений

5
.gitignore поставляемый
Просмотреть файл

@ -104,9 +104,8 @@ mobile/android/gradle/.gradle
embedding/ios/GeckoEmbed/GeckoEmbed.xcodeproj/project.xcworkspace/xcuserdata
embedding/ios/GeckoEmbed/GeckoEmbed.xcodeproj/xcuserdata
# Rust port of mozbase are libraries
testing/mozbase/rust/*/target
testing/mozbase/rust/*/Cargo.lock
# Rust/Cargo output from running `cargo` directly
/target/
# Ignore mozharness execution files
testing/mozharness/.tox/

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

@ -111,9 +111,8 @@ GPATH
^embedding/ios/GeckoEmbed/GeckoEmbed.xcodeproj/project.xcworkspace/xcuserdata
^embedding/ios/GeckoEmbed/GeckoEmbed.xcodeproj/xcuserdata
# Rust port of mozbase are Rust libraries
^testing/mozbase/rust/.*/target
^testing/mozbase/rust/.*/Cargo.lock
# Rust/Cargo output from running `cargo` directly
^target/
# Ignore mozharness execution files
^testing/mozharness/.tox/

536
toolkit/library/rust/Cargo.lock → Cargo.lock сгенерированный
Просмотреть файл

@ -1,3 +1,8 @@
[[package]]
name = "adler32"
version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "aho-corasick"
version = "0.6.3"
@ -96,6 +101,15 @@ dependencies = [
"tokio-uds 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "base64"
version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"safemem 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "binary-space-partition"
version = "0.1.2"
@ -122,16 +136,16 @@ dependencies = [
[[package]]
name = "bindgen"
version = "0.32.2"
version = "0.33.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"cexpr 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"clang-sys 0.21.1 (registry+https://github.com/rust-lang/crates.io-index)",
"clap 2.29.0 (registry+https://github.com/rust-lang/crates.io-index)",
"env_logger 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
"env_logger 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"peeking_take_while 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)",
"regex 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
@ -145,7 +159,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "bitflags"
version = "1.0.0"
version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
@ -158,6 +172,11 @@ name = "boxfnonce"
version = "0.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "build_const"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "byteorder"
version = "1.2.1"
@ -172,6 +191,24 @@ dependencies = [
"iovec 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "bzip2"
version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"bzip2-sys 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "bzip2-sys"
version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"cc 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "cc"
version = "1.0.4"
@ -190,6 +227,15 @@ name = "cfg-if"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "chrono"
version = "0.2.25"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"num 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)",
"time 0.1.38 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "clang-sys"
version = "0.21.1"
@ -207,8 +253,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"ansi_term 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)",
"atty 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"bitflags 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"strsim 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
"term_size 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"textwrap 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
"unicode-width 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
"vec_map 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
@ -222,6 +269,14 @@ dependencies = [
"cc 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "cookie"
version = "0.10.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"time 0.1.38 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "core-foundation"
version = "0.5.1"
@ -252,7 +307,7 @@ name = "core-graphics"
version = "0.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"bitflags 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"core-foundation 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
"foreign-types 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
@ -285,6 +340,14 @@ dependencies = [
"cose 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "crc"
version = "1.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"build_const 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "crossbeam-deque"
version = "0.2.0"
@ -382,7 +445,7 @@ name = "cubeb-core"
version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"bitflags 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"cubeb-sys 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
@ -510,6 +573,18 @@ dependencies = [
"regex 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "env_logger"
version = "0.5.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"atty 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"humantime 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"regex 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"termcolor 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "error-chain"
version = "0.11.0"
@ -532,6 +607,15 @@ dependencies = [
"smallvec 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "flate2"
version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
"miniz_oxide_c_api 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "fnv"
version = "1.0.5"
@ -612,6 +696,25 @@ dependencies = [
"winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "geckodriver"
version = "0.19.1"
dependencies = [
"chrono 0.2.25 (registry+https://github.com/rust-lang/crates.io-index)",
"clap 2.29.0 (registry+https://github.com/rust-lang/crates.io-index)",
"hyper 0.10.13 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"mozprofile 0.3.0",
"mozrunner 0.5.0",
"mozversion 0.1.2",
"regex 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)",
"uuid 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)",
"webdriver 0.34.0",
"zip 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "geckoservo"
version = "0.0.1"
@ -640,6 +743,16 @@ dependencies = [
"stylo_tests 0.0.1",
]
[[package]]
name = "gkrust-gtest"
version = "0.1.0"
dependencies = [
"gkrust-shared 0.1.0",
"mp4parse-gtest 0.1.0",
"nsstring-gtest 0.1.0",
"xpcom-gtest 0.1.0",
]
[[package]]
name = "gkrust-shared"
version = "0.1.0"
@ -696,6 +809,37 @@ dependencies = [
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "httparse"
version = "1.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "humantime"
version = "1.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"quick-error 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "hyper"
version = "0.10.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"base64 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
"httparse 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
"language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
"mime 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
"num_cpus 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"time 0.1.38 (registry+https://github.com/rust-lang/crates.io-index)",
"traitobject 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"typeable 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"unicase 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
"url 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "ident_case"
version = "1.0.0"
@ -733,6 +877,21 @@ name = "itoa"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "js"
version = "0.1.4"
dependencies = [
"bindgen 0.33.1 (registry+https://github.com/rust-lang/crates.io-index)",
"cmake 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)",
"env_logger 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
"glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
"mozjs_sys 0.0.0",
"num-traits 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "kernel32-sys"
version = "0.2.2"
@ -747,6 +906,11 @@ name = "khronos_api"
version = "2.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "language-tags"
version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "lazy_static"
version = "0.2.11"
@ -794,6 +958,17 @@ dependencies = [
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "libz-sys"
version = "1.0.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"gcc 0.3.54 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
"pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
"vcpkg 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "log"
version = "0.3.8"
@ -860,6 +1035,34 @@ name = "memoffset"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "mime"
version = "0.2.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "miniz_oxide"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"adler32 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "miniz_oxide_c_api"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"cc 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
"crc 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
"miniz_oxide 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "mio"
version = "0.6.9"
@ -901,6 +1104,40 @@ name = "moz_cbor"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "mozjs_sys"
version = "0.0.0"
dependencies = [
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
"libz-sys 1.0.16 (registry+https://github.com/rust-lang/crates.io-index)",
"num_cpus 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "mozprofile"
version = "0.3.0"
dependencies = [
"tempdir 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "mozrunner"
version = "0.5.0"
dependencies = [
"log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"mozprofile 0.3.0",
"winreg 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "mozversion"
version = "0.1.2"
dependencies = [
"regex 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"rust-ini 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)",
"semver 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "mp4parse"
version = "0.10.0"
@ -912,6 +1149,10 @@ dependencies = [
"num-traits 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "mp4parse-gtest"
version = "0.1.0"
[[package]]
name = "mp4parse_capi"
version = "0.10.0"
@ -927,6 +1168,16 @@ name = "mp4parse_fallible"
version = "0.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "msdos_time"
version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"time 0.1.38 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "net2"
version = "0.2.31"
@ -968,7 +1219,24 @@ dependencies = [
name = "nsstring"
version = "0.1.0"
dependencies = [
"bitflags 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "nsstring-gtest"
version = "0.1.0"
dependencies = [
"nsstring 0.1.0",
]
[[package]]
name = "num"
version = "0.1.40"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"num-integer 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)",
"num-iter 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)",
"num-traits 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@ -979,6 +1247,15 @@ dependencies = [
"num-traits 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "num-iter"
version = "0.1.34"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"num-integer 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)",
"num-traits 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "num-traits"
version = "0.1.41"
@ -1096,6 +1373,11 @@ dependencies = [
"num-traits 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "podio"
version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "precomputed-hash"
version = "0.1.1"
@ -1122,7 +1404,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
name = "pulse"
version = "0.2.0"
dependencies = [
"bitflags 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"pulse-ffi 0.1.0",
]
@ -1133,6 +1415,11 @@ dependencies = [
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "quick-error"
version = "1.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "quote"
version = "0.3.15"
@ -1189,7 +1476,7 @@ dependencies = [
"aho-corasick 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)",
"memchr 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
"regex-syntax 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"thread_local 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
"thread_local 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
"utf8-ranges 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
@ -1211,6 +1498,14 @@ name = "runloop"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "rust-ini"
version = "0.10.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "rust_url_capi"
version = "0.0.1"
@ -1221,6 +1516,16 @@ dependencies = [
"url 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "rustc-serialize"
version = "0.3.24"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "safemem"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "same-file"
version = "0.1.3"
@ -1244,7 +1549,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
name = "selectors"
version = "0.19.0"
dependencies = [
"bitflags 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"cssparser 0.23.2 (registry+https://github.com/rust-lang/crates.io-index)",
"fnv 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
@ -1350,8 +1655,8 @@ dependencies = [
"app_units 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
"arrayvec 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
"atomic_refcell 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"bindgen 0.32.2 (registry+https://github.com/rust-lang/crates.io-index)",
"bitflags 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"bindgen 0.33.1 (registry+https://github.com/rust-lang/crates.io-index)",
"bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"cssparser 0.23.2 (registry+https://github.com/rust-lang/crates.io-index)",
@ -1408,7 +1713,7 @@ name = "style_traits"
version = "0.0.1"
dependencies = [
"app_units 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
"bitflags 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"cssparser 0.23.2 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)",
"malloc_size_of 0.0.1",
@ -1477,11 +1782,38 @@ dependencies = [
"unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "tempdir"
version = "0.3.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"rand 0.3.18 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "term_size"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "termcolor"
version = "0.3.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"wincolor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "textwrap"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"term_size 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"unicode-width 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
]
@ -1496,11 +1828,11 @@ dependencies = [
[[package]]
name = "thread_local"
version = "0.3.3"
version = "0.3.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"thread-id 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"unreachable 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
"unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@ -1565,11 +1897,21 @@ name = "toml"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "traitobject"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "typeable"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "u2fhid"
version = "0.1.0"
dependencies = [
"bitflags 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"boxfnonce 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
"core-foundation-sys 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
"env_logger 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
@ -1589,6 +1931,14 @@ dependencies = [
"arrayvec 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "unicase"
version = "1.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"version_check 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "unicode-bidi"
version = "0.3.4"
@ -1630,6 +1980,14 @@ dependencies = [
"void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "unreachable"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "url"
version = "1.6.0"
@ -1645,11 +2003,30 @@ name = "utf8-ranges"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "uuid"
version = "0.1.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"rand 0.3.18 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "vcpkg"
version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "vec_map"
version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "version_check"
version = "0.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "void"
version = "1.0.2"
@ -1665,13 +2042,26 @@ dependencies = [
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "webdriver"
version = "0.34.0"
dependencies = [
"cookie 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)",
"hyper 0.10.13 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"regex 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)",
"time 0.1.38 (registry+https://github.com/rust-lang/crates.io-index)",
"url 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "webrender"
version = "0.57.0"
dependencies = [
"app_units 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
"bincode 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)",
"bitflags 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"core-foundation 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
"core-graphics 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)",
@ -1700,7 +2090,7 @@ version = "0.57.0"
dependencies = [
"app_units 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
"bincode 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)",
"bitflags 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"core-foundation 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
"core-graphics 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)",
@ -1741,11 +2131,46 @@ name = "winapi"
version = "0.2.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "winapi"
version = "0.3.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "winapi-build"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "winapi-i686-pc-windows-gnu"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "winapi-x86_64-pc-windows-gnu"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "wincolor"
version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "winreg"
version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "ws2_32-sys"
version = "0.2.1"
@ -1760,7 +2185,7 @@ name = "xml-rs"
version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"bitflags 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@ -1773,6 +2198,15 @@ dependencies = [
"xpcom_macros 0.1.0",
]
[[package]]
name = "xpcom-gtest"
version = "0.1.0"
dependencies = [
"nserror 0.1.0",
"nsstring 0.1.0",
"xpcom 0.1.0",
]
[[package]]
name = "xpcom_macros"
version = "0.1.0"
@ -1782,29 +2216,48 @@ dependencies = [
"syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "zip"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"bzip2 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
"flate2 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"msdos_time 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"podio 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"time 0.1.38 (registry+https://github.com/rust-lang/crates.io-index)",
]
[metadata]
"checksum adler32 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6cbd0b9af8587c72beadc9f72d35b9fbb070982c9e6203e46e93f10df25f8f45"
"checksum aho-corasick 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "500909c4f87a9e52355b26626d890833e9e1d53ac566db76c36faa984b889699"
"checksum ansi_term 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6b3568b48b7cefa6b8ce125f9bb4989e52fbcc29ebea88df04cc7c5f12f70455"
"checksum app_units 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "29069a9b483f7780aebb55dafb360c6225eefdc1f98c8d336a65148fd10c37b1"
"checksum arrayvec 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2f0ef4a9820019a0c91d918918c93dc71d469f581a49b47ddc1d285d4270bbe2"
"checksum atomic_refcell 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fb2dcb6e6d35f20276943cc04bb98e538b348d525a04ac79c10021561d202f21"
"checksum atty 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d912da0db7fa85514874458ca3651fe2cddace8d0b0505571dbdcd41ab490159"
"checksum base64 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "96434f987501f0ed4eb336a411e0631ecd1afa11574fe148587adc4ff96143c9"
"checksum binary-space-partition 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "88ceb0d16c4fd0e42876e298d7d3ce3780dd9ebdcbe4199816a32c77e08597ff"
"checksum bincode 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e103c8b299b28a9c6990458b7013dc4a8356a9b854c51b9883241f5866fac36e"
"checksum bincode 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9d3fb369af639822830328794eba2501b3479652fcd021b2aeb1ed4984202afd"
"checksum bindgen 0.32.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6ed9557522980fcdb4986097c2ea9d2504eafa7e5818f393110205b5325a52ce"
"checksum bindgen 0.33.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1657d607dd7a8e10b3181149f60f3b27ea0eac81058c09a1c791b8f6ead91f19"
"checksum bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "aad18937a628ec6abcd26d1489012cc0e18c21798210f491af69ded9b881106d"
"checksum bitflags 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f5cde24d1b2e2216a726368b2363a273739c91f4e3eb4e0dd12d672d396ad989"
"checksum bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b3c30d3802dfb7281680d6285f2ccdaa8c2d8fee41f93805dba5c4cf50dc23cf"
"checksum bitreader 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "80b13e2ab064ff3aa0bdbf1eff533f9822dc37899821f5f98c67f263eab51707"
"checksum boxfnonce 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8380105befe91099e6f69206164072c05bc92427ff6aa8a5171388317346dd75"
"checksum build_const 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e90dc84f5e62d2ebe7676b83c22d33b6db8bd27340fb6ffbff0a364efa0cb9c9"
"checksum byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "652805b7e73fada9d85e9a6682a4abd490cb52d96aeecc12e33a0de34dfd0d23"
"checksum bytes 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "d828f97b58cc5de3e40c421d0cf2132d6b2da4ee0e11b8632fa838f0f9333ad6"
"checksum bzip2 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c3eafc42c44e0d827de6b1c131175098fe7fb53b8ce8a47e65cb3ea94688be24"
"checksum bzip2-sys 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2c5162604199bbb17690ede847eaa6120a3f33d5ab4dcc8e7c25b16d849ae79b"
"checksum cc 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "deaf9ec656256bb25b404c51ef50097207b9cbb29c933d31f92cae5a8a0ffee0"
"checksum cexpr 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "393a5f0088efbe41f9d1fcd062f24e83c278608420e62109feb2c8abee07de7d"
"checksum cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d4c819a1287eb618df47cc647173c5c4c66ba19d888a6e50d605672aed3140de"
"checksum chrono 0.2.25 (registry+https://github.com/rust-lang/crates.io-index)" = "9213f7cd7c27e95c2b57c49f0e69b1ea65b27138da84a170133fd21b07659c00"
"checksum clang-sys 0.21.1 (registry+https://github.com/rust-lang/crates.io-index)" = "00048189ee171715296dfe3b2fcfd439563c7bfec0d98d3976ce3402d62c8f07"
"checksum clap 2.29.0 (registry+https://github.com/rust-lang/crates.io-index)" = "110d43e343eb29f4f51c1db31beb879d546db27998577e5715270a54bcf41d3f"
"checksum cmake 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)" = "56d741ea7a69e577f6d06b36b7dff4738f680593dc27a701ffa8506b73ce28bb"
"checksum cookie 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "746858cae4eae40fff37e1998320068df317bc247dc91a67c6cfa053afdc2abb"
"checksum core-foundation 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "286e0b41c3a20da26536c6000a280585d519fd07b3956b43aed8a79e9edce980"
"checksum core-foundation-sys 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "41115a6aa5d3e1e5ef98148373f25971d1fad53818553f216495f9e67e90a624"
"checksum core-foundation-sys 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "716c271e8613ace48344f723b60b900a93150271e5be206212d052bbc0883efa"
@ -1812,6 +2265,7 @@ dependencies = [
"checksum core-text 9.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2bd581c37283d0c23311d179aefbb891f2324ee0405da58a26e8594ab76e5748"
"checksum cose 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "72fa26cb151d3ae4b70f63d67d0fed57ce04220feafafbae7f503bef7aae590d"
"checksum cose-c 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "49726015ab0ca765144fcca61e4a7a543a16b795a777fa53f554da2fffff9a94"
"checksum crc 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bd5d02c0aac6bd68393ed69e00bbc2457f3e89075c6349db7189618dc4ddc1d7"
"checksum crossbeam-deque 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f739f8c5363aca78cfb059edf753d8f0d36908c348f3d8d1503f03d8b75d9cf3"
"checksum crossbeam-epoch 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "59796cc6cbbdc6bb319161349db0c3250ec73ec7fcb763a51065ec4e2e158552"
"checksum crossbeam-utils 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2760899e32a1d58d5abb31129f8fae5de75220bc2176e77ff7c627ae45c918d9"
@ -1834,8 +2288,10 @@ dependencies = [
"checksum encoding_c 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "93ec52324ca72f423237a413ca0e1c60654c8b3d0934fcd5fd888508dfcc4ba7"
"checksum encoding_rs 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "98fd0f24d1fb71a4a6b9330c8ca04cbd4e7cc5d846b54ca74ff376bc7c9f798d"
"checksum env_logger 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3ddf21e73e016298f5cb37d6ef8e8da8e39f91f9ec8b0df44b7deb16a9f8cd5b"
"checksum env_logger 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)" = "f3cc21490995c841d68e00276eba02071ebb269ec24011d5728bd00eabd39e31"
"checksum error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ff511d5dc435d703f4971bc399647c9bc38e20cb41452e3b9feb4765419ed3f3"
"checksum euclid 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b2744c002882c67d0f6d6e8cfdf16eae729dc27744d312745132e62218b7de5c"
"checksum flate2 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9fac2277e84e5e858483756647a9d0aa8d9a2b7cba517fd84325a0aaa69a0909"
"checksum fnv 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "6cc484842f1e2884faf56f529f960cc12ad8c71ce96cc7abba0a067c98fee344"
"checksum foreign-types 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5ebc04f19019fff1f2d627b5581574ead502f80c48c88900575a46e0840fe5d0"
"checksum freetype 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "398b8a11884898184d55aca9806f002b3cf68f0e860e0cbb4586f834ee39b0e7"
@ -1850,6 +2306,9 @@ dependencies = [
"checksum gl_generator 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4f5c19cde55637681450c92f7a05ea16c78e2b6d0587e601ec1ebdab6960854b"
"checksum gleam 0.4.20 (registry+https://github.com/rust-lang/crates.io-index)" = "959c818d9bbe9f7b7db55dce0bc44673c4da4f4ee122536c40550f984c3b8017"
"checksum glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "8be18de09a56b60ed0edf84bc9df007e30040691af7acd1c41874faac5895bfb"
"checksum httparse 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "af2f2dd97457e8fb1ae7c5a420db346af389926e36f43768b96f101546b04a07"
"checksum humantime 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0484fda3e7007f2a4a0d9c3a703ca38c71c54c55602ce4660c419fd32e188c9e"
"checksum hyper 0.10.13 (registry+https://github.com/rust-lang/crates.io-index)" = "368cb56b2740ebf4230520e2b90ebb0461e69034d85d1945febd9b3971426db2"
"checksum ident_case 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3c9826188e666f2ed92071d2dadef6edc430b11b158b5b2b3f4babbcc891eaaa"
"checksum idna 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "014b298351066f1512874135335d62a789ffe78a9974f94b43ed5621951eaf7d"
"checksum iovec 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "29d062ee61fccdf25be172e70f34c9f6efc597e1fb8f6526e8437b2046ab26be"
@ -1857,27 +2316,35 @@ dependencies = [
"checksum itoa 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "eb2f404fbc66fd9aac13e998248505e7ecb2ad8e44ab6388684c5fb11c6c251c"
"checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d"
"checksum khronos_api 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d867c645cfeb8a7fec503731679eac03ac11b7105aa5a71cb8f8ee5271636add"
"checksum language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a91d884b6667cd606bb5a69aa0c99ba811a115fc68915e7056ec08a46e93199a"
"checksum lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "76f033c7ad61445c5b347c7382dd1237847eb1bce590fe50365dcb33d546be73"
"checksum lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c8f31047daa365f19be14b47c29df4f7c3b581832407daabe6ae77397619237d"
"checksum lazycell 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ce12306c4739d86ee97c23139f3a34ddf0387bbf181bc7929d287025a8c3ef6b"
"checksum libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)" = "5ba3df4dcb460b9dfbd070d41c94c19209620c191b0340b929ce748a2bcd42d2"
"checksum libloading 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "be99f814beb3e9503a786a592c909692bb6d4fc5a695f6ed7987223acfbd5194"
"checksum libudev 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ea626d3bdf40a1c5aee3bcd4f40826970cae8d80a8fec934c82a63840094dcfe"
"checksum libz-sys 1.0.16 (registry+https://github.com/rust-lang/crates.io-index)" = "3fdd64ef8ee652185674455c1d450b83cbc8ad895625d543b5324d923f82e4d8"
"checksum log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "880f77541efa6e5cc74e76910c9884d9859683118839d6a1dc3b11e63512565b"
"checksum log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "89f010e843f2b1a31dbd316b3b8d443758bc634bed37aabade59c686d644e0a2"
"checksum matches 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "100aabe6b8ff4e4a7e32c1c13523379802df0772b82466207ac25b013f193376"
"checksum memchr 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "148fab2e51b4f1cfc66da2a7c32981d1d3c083a803978268bb11fe4b86925e7a"
"checksum memmap 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "46f3c7359028b31999287dae4e5047ddfe90a23b7dca2282ce759b491080c99b"
"checksum memoffset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0f9dc261e2b62d7a622bf416ea3c5245cdd5d9a7fcc428c0d06804dfce1775b3"
"checksum mime 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "ba626b8a6de5da682e1caa06bdb42a335aee5a84db8e5046a3e8ab17ba0a3ae0"
"checksum miniz_oxide 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "aaa2d3ad070f428fffbd7d3ca2ea20bb0d8cffe9024405c44e1840bc1418b398"
"checksum miniz_oxide_c_api 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "92d98fdbd6145645828069b37ea92ca3de225e000d80702da25c20d3584b38a5"
"checksum mio 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)" = "9e965267d4d58496fc4f740e9861118367f13570cadf66316ed2c3f2f14d87c7"
"checksum mio-uds 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)" = "1731a873077147b626d89cc6c2a0db6288d607496c5d10c0cfcf3adc697ec673"
"checksum miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919"
"checksum moz_cbor 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "20c82a57087fd5990d7122dbff1607c3b20c3d2958e9d9ad9765aab415e2c91c"
"checksum mp4parse_fallible 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "6626c2aef76eb8f984eef02e475883d3fe9112e114720446c5810fc5f045cd30"
"checksum msdos_time 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "65ba9d75bcea84e07812618fedf284a64776c2f2ea0cad6bca7f69739695a958"
"checksum net2 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)" = "3a80f842784ef6c9a958b68b7516bc7e35883c614004dd94959a4dca1b716c09"
"checksum nodrop 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "9a2228dca57108069a5262f2ed8bd2e82496d2e074a06d1ccc7ce1687b6ae0a2"
"checksum nom 1.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "a5b8c256fd9471521bcb84c3cdba98921497f1a331cbc15b8030fc63b82050ce"
"checksum num 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)" = "a311b77ebdc5dd4cf6449d81e4135d9f0e3b153839ac90e648a8ef538f923525"
"checksum num-integer 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)" = "d1452e8b06e448a07f0e6ebb0bb1d92b8890eea63288c0b627331d53514d0fba"
"checksum num-iter 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)" = "7485fcc84f85b4ecd0ea527b14189281cf27d60e583ae65ebc9c088b13dffe01"
"checksum num-traits 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)" = "cacfcab5eb48250ee7d0c7896b51a2c5eec99c1feea5f32025635f5ae4b00070"
"checksum num-traits 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e7de20f146db9d920c45ee8ed8f71681fd9ade71909b48c3acbd766aa504cf10"
"checksum num_cpus 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "514f0d73e64be53ff320680ca671b64fe3fb91da01e1ae2ddc99eb51d453b20d"
@ -1893,9 +2360,11 @@ dependencies = [
"checksum phf_shared 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)" = "07e24b0ca9643bdecd0632f2b3da6b1b89bbb0030e0b992afc1113b23a7bc2f2"
"checksum pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "3a8b4c6b8165cd1a1cd4b9b120978131389f64bdaf456435caa41e630edba903"
"checksum plane-split 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "69c557e11e3a1533bc969fa596e5011e1d9f76dd61cd102ef942c9f8654b17a2"
"checksum podio 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "e5422a1ee1bc57cc47ae717b0137314258138f38fd5f3cea083f43a9725383a0"
"checksum precomputed-hash 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c"
"checksum proc-macro2 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d1cb7aaaa4bf022ec2b14ff2f2ba1643a22f3cee88df014a85e14b392282c61d"
"checksum procedural-masquerade 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9f566249236c6ca4340f7ca78968271f0ed2b0f234007a61b66f9ecd0af09260"
"checksum quick-error 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "eda5fe9b71976e62bc81b781206aaa076401769b2143379d3eb2118388babac4"
"checksum quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6e920b65c65f10b2ae65c831a81a073a89edd28c7cce89475bff467ab4167a"
"checksum quote 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1eca14c727ad12702eb4b6bfb5a232287dcf8385cb8ca83a3eeaf6519c44c408"
"checksum rand 0.3.18 (registry+https://github.com/rust-lang/crates.io-index)" = "6475140dfd8655aeb72e1fd4b7a1cc1c202be65d71669476e392fe62532b9edd"
@ -1906,6 +2375,9 @@ dependencies = [
"checksum regex-syntax 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ad890a5eef7953f55427c50575c680c42841653abd2b028b68cd223d157f62db"
"checksum ron 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "da06feaa07f69125ab9ddc769b11de29090122170b402547f64b86fe16ebc399"
"checksum runloop 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5d79b4b604167921892e84afbbaad9d5ad74e091bf6c511d9dbfb0593f09fabd"
"checksum rust-ini 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)" = "22dab655e8122ccb15db25a56852ce62506f1486cdefd37e86371bf34ea8f601"
"checksum rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)" = "dcf128d1287d2ea9d80910b5f1120d0b8eede3fbf1abe91c40d39ea7d51e6fda"
"checksum safemem 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e27a8b19b835f7aea908818e871f5cc3a5a186550c30773be987e155e8163d8f"
"checksum same-file 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "d931a44fdaa43b8637009e7632a02adc4f2b2e0733c08caa4cf00e8da4a117a7"
"checksum scoped-tls 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f417c22df063e9450888a7561788e9bd46d3bb3c1466435b4eccb903807f147d"
"checksum scopeguard 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c79eb2c3ac4bc2507cda80e7f3ac5b88bd8eae4c0914d5663e6a8933994be918"
@ -1925,16 +2397,22 @@ dependencies = [
"checksum syn 0.12.12 (registry+https://github.com/rust-lang/crates.io-index)" = "9e1c669ed757c0ebd04337f6a5bb972d05e0c08fe2540dd3ee3dd9e4daf1604c"
"checksum synom 0.11.2 (registry+https://github.com/rust-lang/crates.io-index)" = "27e31aa4b09b9f4cb12dff3c30ba503e17b1a624413d764d32dab76e3920e5bc"
"checksum synstructure 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "010366096045d8250555904c58da03377289e7f4b2ce7a5b1027e2b532f41000"
"checksum tempdir 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "87974a6f5c1dfb344d733055601650059a3363de2a6104819293baff662132d6"
"checksum term_size 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e2b6b55df3198cc93372e85dd2ed817f0e38ce8cc0f22eb32391bfad9c4bf209"
"checksum termcolor 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "56c456352e44f9f91f774ddeeed27c1ec60a2455ed66d692059acfb1d731bda1"
"checksum textwrap 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c0b59b6b4b44d867f1370ef1bd91bfb262bf07bf0ae65c202ea2fbc16153b693"
"checksum thread-id 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8df7875b676fddfadffd96deea3b1124e5ede707d4884248931077518cf1f773"
"checksum thread_local 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c85048c6260d17cf486ceae3282d9fb6b90be220bf5b28c400f5485ffc29f0c7"
"checksum thread_local 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "1697c4b57aeeb7a536b647165a2825faddffb1d3bad386d507709bd51a90bb14"
"checksum thread_profiler 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cf947d192a9be60ef5131cc7a4648886ba89d712f16700ebbf80c8a69d05d48f"
"checksum time 0.1.38 (registry+https://github.com/rust-lang/crates.io-index)" = "d5d788d3aa77bc0ef3e9621256885555368b47bd495c13dd2e7413c89f845520"
"checksum tokio-core 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "febd81b3e2ef615c6c8077347b33f3f3deec3d708ecd08194c9707b7a1eccfc9"
"checksum tokio-io 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "b4ab83e7adb5677e42e405fa4ceff75659d93c4d7d7dd22f52fcec59ee9f02af"
"checksum tokio-uds 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "65ae5d255ce739e8537221ed2942e0445f4b3b813daebac1c0050ddaaa3587f9"
"checksum toml 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "736b60249cb25337bc196faa43ee12c705e426f3d55c214d73a4e7be06f92cb4"
"checksum traitobject 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "efd1f82c56340fdf16f2a953d7bda4f8fdffba13d93b00844c25572110b26079"
"checksum typeable 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1410f6f91f21d1612654e7cc69193b0334f909dcf2c790c4826254fbb86f8887"
"checksum uluru 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "519130f0ea964ba540a9d8af1373738c2226f1d465eda07e61db29feb5479db9"
"checksum unicase 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7f4765f83163b74f957c797ad9253caf97f103fb064d3999aea9568d09fc8a33"
"checksum unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5"
"checksum unicode-normalization 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "51ccda9ef9efa3f7ef5d91e8f9b83bbe6955f9bf86aec89d5cce2c874625920f"
"checksum unicode-segmentation 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "18127285758f0e2c6cf325bb3f3d138a12fee27de4f23e146cd6a179f26c2cf3"
@ -1942,13 +2420,23 @@ dependencies = [
"checksum unicode-xid 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f860d7d29cf02cb2f3f359fd35991af3d30bac52c57d265a3c461074cb4dc"
"checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc"
"checksum unreachable 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1f2ae5ddb18e1c92664717616dd9549dde73f539f01bd7b77c2edb2446bdff91"
"checksum unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "382810877fe448991dfc7f0dd6e3ae5d58088fd0ea5e35189655f84e6814fa56"
"checksum url 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fa35e768d4daf1d85733418a49fb42e10d7f633e394fccab4ab7aba897053fe2"
"checksum utf8-ranges 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "662fab6525a98beff2921d7f61a39e7d59e0b425ebc7d0d9e66d316e55124122"
"checksum uuid 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)" = "78c590b5bd79ed10aad8fb75f078a59d8db445af6c743e55c4a53227fc01c13f"
"checksum vcpkg 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9e0a7d8bed3178a8fb112199d466eeca9ed09a14ba8ad67718179b4fd5487d0b"
"checksum vec_map 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "887b5b631c2ad01628bbbaa7dd4c869f80d3186688f8d0b6f58774fbe324988c"
"checksum version_check 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "6b772017e347561807c1aa192438c5fd74242a670a6cffacc40f2defd1dc069d"
"checksum void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d"
"checksum walkdir 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)" = "bb08f9e670fab86099470b97cd2b252d6527f0b3cc1401acdb595ffc9dd288ff"
"checksum which 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "4be6cfa54dab45266e98b5d7be2f8ce959ddd49abd141a05d52dce4b07f803bb"
"checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a"
"checksum winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "04e3bd221fcbe8a271359c04f21a76db7d0c6028862d1bb5512d85e1e2eb5bb3"
"checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc"
"checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
"checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
"checksum wincolor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "eeb06499a3a4d44302791052df005d5232b927ed1a9658146d842165c4de7767"
"checksum winreg 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9338067aba07889a38beaad4dbb77fa2e62e87c423b770824b3bdf412874bd2c"
"checksum ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e"
"checksum xml-rs 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3c1cb601d29fe2c2ac60a2b2e5e293994d87a1f6fa9687a31a15270f909be9c2"
"checksum zip 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "10931e278527cea65682696481e6d840371d581079df529ebfee186e0eaad719"

55
Cargo.toml Normal file
Просмотреть файл

@ -0,0 +1,55 @@
[workspace]
# These are the "root" crates, which we build and test as top-level targets.
# Their transitive dependencies and dev-dependencies are included automatically
# and do not need to be listed here. Their external dependencies are vendored
# into `third_party/rust` by `mach vendor rust`.
members = [
"js/src",
"js/rust",
"testing/geckodriver",
"toolkit/library/gtest/rust",
"toolkit/library/rust/",
]
# Excluded crates may be built as dependencies, but won't be considered members
# of the workspace and their dev-dependencies won't be included.
exclude = [
# Exclude third-party code vendored into mozilla-central.
"gfx/webrender",
"gfx/webrender_api",
"gfx/webrender_bindings",
"servo",
"third_party/rust",
# Excluded because these crates have their own Cargo workspaces so they can't
# be included in the top-level one.
"media/audioipc",
"media/cubeb-rs",
# Excluded because they are used only as dependencies, not top-level targets,
# so we don't need to vendor their dev-dependencies.
"dom/webauthn/u2f-hid-rs",
"media/mp4parse-rust/mp4parse",
"media/mp4parse-rust/mp4parse_capi",
"media/mp4parse-rust/mp4parse_fallible",
]
# Explicitly specify what our profiles use.
[profile.dev]
opt-level = 1
rpath = false
lto = false
debug-assertions = true
panic = "abort"
[profile.release]
opt-level = 2
rpath = false
debug-assertions = false
panic = "abort"
codegen-units = 1
[patch.crates-io]
libudev-sys = { path = "dom/webauthn/libudev-sys" }
serde_derive = { git = "https://github.com/gankro/serde", branch = "deserialize_from_enums4" }

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

@ -86,6 +86,28 @@ XULMAP(
}
)
XULMAP(
panel,
[](nsIContent* aContent, Accessible* aContext) -> Accessible* {
static const Element::AttrValuesArray sIgnoreTypeVals[] =
{ &nsGkAtoms::autocomplete_richlistbox, &nsGkAtoms::autocomplete, nullptr };
if (!aContent->IsElement() ||
aContent->AsElement()->FindAttrValueIn(kNameSpaceID_None, nsGkAtoms::type,
sIgnoreTypeVals, eIgnoreCase) >= 0) {
return nullptr;
}
if (aContent->AsElement()->AttrValueIs(kNameSpaceID_None,
nsGkAtoms::noautofocus,
nsGkAtoms::_true, eCaseMatters)) {
return new XULAlertAccessible(aContent, aContext->Document());
}
return new EnumRoleAccessible<roles::PANE>(aContent, aContext->Document());
}
)
XULMAP(
popup,
[](nsIContent* aContent, Accessible* aContext) {

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

@ -322,8 +322,8 @@ static const HTMLMarkupMapInfo sHTMLMarkupMapList[] = {
#undef MARKUPMAP
#ifdef MOZ_XUL
#define XULMAP(atom, new_func) \
{ &nsGkAtoms::atom, new_func },
#define XULMAP(atom, ...) \
{ &nsGkAtoms::atom, __VA_ARGS__ },
#define XULMAP_TYPE(atom, new_type) \
XULMAP( \
@ -1487,15 +1487,6 @@ nsAccessibilityService::CreateAccessibleByType(nsIContent* aContent,
} else if (role.EqualsLiteral("xul:link")) {
accessible = new XULLinkAccessible(aContent, aDoc);
} else if (role.EqualsLiteral("xul:panel")) {
if (aContent->IsElement() &&
aContent->AsElement()->AttrValueIs(kNameSpaceID_None,
nsGkAtoms::noautofocus,
nsGkAtoms::_true, eCaseMatters))
accessible = new XULAlertAccessible(aContent, aDoc);
else
accessible = new EnumRoleAccessible<roles::PANE>(aContent, aDoc);
} else if (role.EqualsLiteral("xul:text")) {
accessible = new XULLabelAccessible(aContent, aDoc);

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

@ -7,7 +7,6 @@
#include "Accessible-inl.h"
#include "nsAccUtils.h"
#include "nsCoreUtils.h"
#include "DocAccessible.h"
#include "Role.h"
#include "States.h"
@ -135,10 +134,7 @@ XULColorPickerAccessible::AreItemsOperable() const
bool
XULColorPickerAccessible::IsAcceptableChild(nsIContent* aEl) const
{
nsAutoString role;
nsCoreUtils::XBLBindingRole(aEl, role);
return role.EqualsLiteral("xul:panel") &&
aEl->IsElement() &&
return aEl->IsXULElement(nsGkAtoms::panel) &&
aEl->AsElement()->AttrValueIs(kNameSpaceID_None, nsGkAtoms::noautofocus,
nsGkAtoms::_true, eCaseMatters);
}

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

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?>
<blocklist lastupdate="1519429178266" xmlns="http://www.mozilla.org/2006/addons-blocklist">
<blocklist lastupdate="1519826648080" xmlns="http://www.mozilla.org/2006/addons-blocklist">
<emItems>
<emItem blockID="i334" id="{0F827075-B026-42F3-885D-98981EE7B1AE}">
<prefs/>
@ -2211,6 +2211,10 @@
<prefs/>
<versionRange minVersion="0" maxVersion="*" severity="3"/>
</emItem>
<emItem blockID="48b14881-5f6b-4e48-afc5-3d9a7fae26a3" id="/{0c9970a2-6874-483b-a486-2296cfe251c2}|{01c9a4a4-06dd-426b-9500-2ea6fe841b88}|{1c981c7c-30e0-4ed2-955d-6b370e0a9d19}|{2aa275f8-fabc-4766-95b2-ecfc73db310b}|{2cac0be1-10a2-4a0d-b8c5-787837ea5955}|{2eb66f6c-94b3-44f5-9de2-22371236ec99}|{2f8aade6-8717-4277-b8b1-55172d364903}|{3c27c34f-8775-491a-a1c9-fcb15beb26d3}|{3f4dea3e-dbfc-428f-a88b-36908c459e20}|{3f4191fa-8f16-47d2-9414-36bfc9e0c2bf}|{4c140bc5-c2ad-41c3-a407-749473530904}|{05a21129-af2a-464c-809f-f2df4addf209}|{5da81d3d-5db1-432a-affc-4a2fe9a70749}|{5f4e63e4-351f-4a21-a8e5-e50dc72b5566}|{7c1df23b-1fd8-42b9-8752-71fff2b979de}|{7d5e24a1-7bef-4d09-a952-b9519ec00d20}|{7d932012-b4dd-42cc-8a78-b15ca82d0e61}|{7f8bc48d-1c7c-41a0-8534-54adc079338f}|{8a61507d-dc2f-4507-a9b7-7e33b8cbc31b}|{09c8fa16-4eec-4f78-b19d-9b24b1b57e1e}|{9ce2a636-0e49-4b8e-ad17-d0c156c963b0}|{11df9391-dba5-4fe2-bd48-37a9182b796d}|{23c65153-c21e-430a-a2dc-0793410a870d}|{36a4269e-4eef-4538-baea-9dafbf6a8e2f}|{37f8e483-c782-40ed-82e9-36f101b9e41f}|{63df223d-51cf-4f76-aad8-bbc94c895ed2}|{72c1ca96-c05d-46a7-bce1-c507ec3db4ea}|{76ce213c-8e57-4a14-b60a-67a5519bd7a7}|{79db6c96-d65a-4a64-a892-3d26bd02d2d9}|{81ac42f3-3d17-4cff-85af-8b7f89c8826b}|{83d38ac3-121b-4f28-bf9c-1220bd3c643b}|{86d98522-5d42-41d5-83c2-fc57f260a3d9}|{0111c475-01e6-42ea-a9b4-27bed9eb6092}|{214cb48a-ce31-4e48-82cf-a55061f1b766}|{216e0bcc-8a23-4069-8b63-d9528b437258}|{226b0fe6-f80f-48f1-9d8d-0b7a1a04e537}|{302ef84b-2feb-460e-85ca-f5397a77aa6a}|{408a506b-2336-4671-a490-83a1094b4097}|{419be4e9-c981-478e-baa0-937cf1eea1e8}|{0432b92a-bfcf-41b9-b5f0-df9629feece1}|{449e185a-dd91-4f7b-a23a-bbf6c1ca9435}|{591d1b73-5eae-47f4-a41f-8081d58d49bf}|{869b5825-e344-4375-839b-085d3c09ab9f}|{919fed43-3961-48d9-b0ef-893054f4f6f1}|{01166e60-d740-440c-b640-6bf964504b3c}|{2134e327-8060-441c-ba68-b167b82ff5bc}|{02328ee7-a82b-4983-a5f7-d0fc353698f0}|{6072a2a8-f1bc-4c9c-b836-7ac53e3f51e4}|{28044ca8-8e90-435e-bc63-a757af2fb6be}|{28092fa3-9c52-4a41-996d-c43e249c5f08}|{31680d42-c80d-4f8a-86d3-cd4930620369}|{92111c8d-0850-4606-904a-783d273a2059}|{446122cd-cd92-4d0c-9426-4ee0d28f6dca}|{829827cd-03be-4fed-af96-dd5997806fb4}|{4479446e-40f3-48af-ab85-7e3bb4468227}|{9263519f-ca57-4178-b743-2553a40a4bf1}|{71639610-9cc3-47e0-86ed-d5b99eaa41d5}|{84406197-6d37-437c-8d82-ae624b857355}|{93017064-dfd4-425e-a700-353f332ede37}|{a0ab16af-3384-4dbe-8722-476ce3947873}|{a0c54bd8-7817-4a40-b657-6dc7d59bd961}|{a2de96bc-e77f-4805-92c0-95c9a2023c6a}|{a3fbc8be-dac2-4971-b76a-908464cfa0e0}|{a42e5d48-6175-49e3-9e40-0188cde9c5c6}|{a893296e-5f54-43f9-a849-f12dcdee2c98}|{ac296b47-7c03-486f-a1d6-c48b24419749}|{b26bf964-7aa6-44f4-a2a9-d55af4b4eec0}|{be981b5e-1d9d-40dc-bd4f-47a7a027611c}|{be37931c-af60-4337-8708-63889f36445d}|{bfd92dfd-b293-4828-90c1-66af2ac688e6}|{c5cf4d08-0a33-4aa3-a40d-d4911bcc1da7}|{c488a8f5-ea3d-408d-809e-44e82c06ad9d}|{c661c2dc-00f9-4dc1-a9f6-bb2b7e1a4f8d}|{cd28aa38-d2f1-45a3-96c3-6cfd4702ef51}|{cd89045b-2e06-46bb-9e34-48e8799e5ef2}|{cf9d96ff-5997-439a-b32b-98214c621eee}|{d14acee6-f32b-4aa3-a802-6616003fc6a8}|{d97223b8-44e5-46c7-8ab5-e1d8986daf44}|{ddae89bd-6793-45d8-8ec9-7f4fb7212378}|{de3b1909-d4da-45e9-8da5-7d36a30e2fc6}|{df09f268-3c92-49db-8c31-6a25a6643896}|{e5bc3951-c837-4c98-9643-3c113fc8cf5e}|{e9ccb1f2-a8ba-4346-b43b-0d5582bce414}|{e341ed12-a703-47fe-b8dd-5948c38070e4}|{e2139287-2b0d-4f54-b3b1-c9a06c597223}|{ed352072-ddf0-4cb4-9cb6-d8aa3741c2de}|{f0b809eb-be22-432f-b26f-b1cadd1755b9}|{f1bce8e4-9936-495b-bf48-52850c7250ab}|{f01c3add-dc6d-4f35-a498-6b4279aa2ffa}|{f9e1ad25-5961-4cc5-8d66-5496c438a125}|{f4262989-6de0-4604-918f-663b85fad605}|{fc0d55bd-3c50-4139-9409-7df7c1114a9d}/">
<prefs/>
<versionRange minVersion="0" maxVersion="*" severity="3"/>
</emItem>
</emItems>
<pluginItems>
<pluginItem blockID="p332">

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

@ -13,6 +13,10 @@
%brandDTD;
<!ENTITY % aboutDialogDTD SYSTEM "chrome://browser/locale/aboutDialog.dtd" >
%aboutDialogDTD;
#ifdef XP_MACOSX
<!ENTITY % baseMenuOverlayDTD SYSTEM "chrome://browser/locale/baseMenuOverlay.dtd">
%baseMenuOverlayDTD;
#endif
]>
#ifdef XP_MACOSX

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

@ -1,124 +0,0 @@
<?xml version="1.0"?>
# 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/.
<!DOCTYPE overlay [
<!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd">
%brandDTD;
<!ENTITY % baseMenuOverlayDTD SYSTEM "chrome://browser/locale/baseMenuOverlay.dtd">
%baseMenuOverlayDTD;
<!ENTITY % reportphishDTD SYSTEM "chrome://browser/locale/safebrowsing/report-phishing.dtd">
%reportphishDTD;
<!ENTITY % safebrowsingDTD SYSTEM "chrome://browser/locale/safebrowsing/phishing-afterload-warning-message.dtd">
%safebrowsingDTD;
]>
<overlay id="baseMenuOverlay"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<script type="application/javascript" src="chrome://browser/content/utilityOverlay.js"/>
#ifdef XP_MACOSX
<!-- nsMenuBarX hides these and uses them to build the Application menu.
When using Carbon widgets for Mac OS X widgets, some of these are not
used as they only apply to Cocoa widget builds. All version of Firefox
through Firefox 2 will use Carbon widgets. -->
<menupopup id="menu_ToolsPopup">
<menuitem id="menu_preferences" label="&preferencesCmdMac.label;" key="key_preferencesCmdMac" oncommand="openPreferences(undefined, {origin: 'commandLineLegacy'});"/>
<menuitem id="menu_mac_services" label="&servicesMenuMac.label;"/>
<menuitem id="menu_mac_hide_app" label="&hideThisAppCmdMac2.label;" key="key_hideThisAppCmdMac"/>
<menuitem id="menu_mac_hide_others" label="&hideOtherAppsCmdMac.label;" key="key_hideOtherAppsCmdMac"/>
<menuitem id="menu_mac_show_all" label="&showAllAppsCmdMac.label;"/>
</menupopup>
<!-- Mac window menu -->
#include ../../../toolkit/content/macWindowMenu.inc
#endif
#ifdef XP_WIN
<menu id="helpMenu"
label="&helpMenuWin.label;"
accesskey="&helpMenuWin.accesskey;">
#else
<menu id="helpMenu"
label="&helpMenu.label;"
accesskey="&helpMenu.accesskey;">
#endif
<menupopup id="menu_HelpPopup" onpopupshowing="buildHelpMenu();">
<menuitem id="menu_openHelp"
oncommand="openHelpLink('firefox-help')"
onclick="checkForMiddleClick(this, event);"
label="&productHelp2.label;"
accesskey="&productHelp2.accesskey;"
#ifdef XP_MACOSX
key="key_openHelpMac"/>
#else
/>
#endif
<menuitem id="menu_openTour"
oncommand="openTourPage();"
label="&helpShowTour2.label;"
accesskey="&helpShowTour2.accesskey;"/>
<menuitem id="menu_keyboardShortcuts"
oncommand="openHelpLink('keyboard-shortcuts')"
onclick="checkForMiddleClick(this, event);"
label="&helpKeyboardShortcuts.label;"
accesskey="&helpKeyboardShortcuts.accesskey;"/>
<menuitem id="troubleShooting"
accesskey="&helpTroubleshootingInfo.accesskey;"
label="&helpTroubleshootingInfo.label;"
oncommand="openTroubleshootingPage()"
onclick="checkForMiddleClick(this, event);"/>
<menuitem id="feedbackPage"
accesskey="&helpFeedbackPage.accesskey;"
label="&helpFeedbackPage.label;"
oncommand="openFeedbackPage()"
onclick="checkForMiddleClick(this, event);"/>
<menuitem id="helpSafeMode"
accesskey="&helpSafeMode.accesskey;"
label="&helpSafeMode.label;"
stopaccesskey="&helpSafeMode.stop.accesskey;"
stoplabel="&helpSafeMode.stop.label;"
oncommand="safeModeRestart();"/>
<menuitem id="menu_HelpPopup_reportPhishingtoolmenu"
label="&reportDeceptiveSiteMenu.title;"
accesskey="&reportDeceptiveSiteMenu.accesskey;"
observes="reportPhishingBroadcaster"
oncommand="openUILink(gSafeBrowsing.getReportURL('Phish'), event);"
onclick="checkForMiddleClick(this, event);"
hidden="true"/>
<menuitem id="menu_HelpPopup_reportPhishingErrortoolmenu"
label="&safeb.palm.notdeceptive.label;"
accesskey="&safeb.palm.notdeceptive.accesskey;"
observes="reportPhishingErrorBroadcaster"
oncommand="ReportFalseDeceptiveSite();"
onclick="checkForMiddleClick(this, event);"
hidden="true"/>
<menuseparator id="aboutSeparator"/>
<menuitem id="aboutName"
accesskey="&aboutProduct2.accesskey;"
label="&aboutProduct2.label;"
oncommand="openAboutDialog();"/>
</menupopup>
</menu>
<keyset id="baseMenuKeyset">
#ifdef XP_MACOSX
<key id="key_openHelpMac"
oncommand="openHelpLink('firefox-osxkey');"
key="&helpMac.commandkey;"
modifiers="accel"/>
<!-- These are used to build the Application menu under Cocoa widgets -->
<key id="key_preferencesCmdMac"
key="&preferencesCmdMac.commandkey;"
modifiers="accel"/>
<key id="key_hideThisAppCmdMac"
key="&hideThisAppCmdMac2.commandkey;"
modifiers="accel"/>
<key id="key_hideOtherAppsCmdMac"
key="&hideOtherAppsCmdMac.commandkey;"
modifiers="accel,alt"/>
#endif
</keyset>
</overlay>

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

@ -19,5 +19,7 @@
%aboutHomeDTD;
<!ENTITY % syncBrandDTD SYSTEM "chrome://browser/locale/syncBrand.dtd">
%syncBrandDTD;
<!ENTITY % reportphishDTD SYSTEM "chrome://browser/locale/safebrowsing/report-phishing.dtd">
%reportphishDTD;
]>

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

@ -539,12 +539,97 @@
accesskey="&ldbCmd.accesskey;"
oncommand="toOpenWindowByType('mozapp:layoutdebug',
'chrome://layoutdebug/content/');"/>
#endif
#ifdef XP_MACOSX
<!-- nsMenuBarX hides these and uses them to build the Application menu. -->
<menuitem id="menu_preferences" label="&preferencesCmdMac.label;" key="key_preferencesCmdMac" oncommand="openPreferences(undefined, {origin: 'commandLineLegacy'});"/>
<menuitem id="menu_mac_services" label="&servicesMenuMac.label;"/>
<menuitem id="menu_mac_hide_app" label="&hideThisAppCmdMac2.label;" key="key_hideThisAppCmdMac"/>
<menuitem id="menu_mac_hide_others" label="&hideOtherAppsCmdMac.label;" key="key_hideOtherAppsCmdMac"/>
<menuitem id="menu_mac_show_all" label="&showAllAppsCmdMac.label;"/>
#endif
</menupopup>
</menu>
#ifdef XP_MACOSX
<menu id="windowMenu" />
<menu id="windowMenu"
label="&windowMenu.label;"
onpopupshowing="macWindowMenuDidShow();"
onpopuphidden="macWindowMenuDidHide();"
>
<menupopup id="windowPopup">
<menuitem command="minimizeWindow" key="key_minimizeWindow"/>
<menuitem command="zoomWindow"/>
<!-- decomment when "BringAllToFront" is implemented
<menuseparator/>
<menuitem label="&bringAllToFront.label;" disabled="true"/> -->
<menuseparator id="sep-window-list"/>
</menupopup>
</menu>
#endif
<menu id="helpMenu" />
<menu id="helpMenu"
#ifdef XP_WIN
label="&helpMenuWin.label;"
accesskey="&helpMenuWin.accesskey;"
#else
label="&helpMenu.label;"
accesskey="&helpMenu.accesskey;"
#endif
>
<menupopup id="menu_HelpPopup" onpopupshowing="buildHelpMenu();">
<menuitem id="menu_openHelp"
oncommand="openHelpLink('firefox-help')"
onclick="checkForMiddleClick(this, event);"
label="&productHelp2.label;"
accesskey="&productHelp2.accesskey;"
#ifdef XP_MACOSX
key="key_openHelpMac"/>
#else
/>
#endif
<menuitem id="menu_openTour"
oncommand="openTourPage();"
label="&helpShowTour2.label;"
accesskey="&helpShowTour2.accesskey;"/>
<menuitem id="menu_keyboardShortcuts"
oncommand="openHelpLink('keyboard-shortcuts')"
onclick="checkForMiddleClick(this, event);"
label="&helpKeyboardShortcuts.label;"
accesskey="&helpKeyboardShortcuts.accesskey;"/>
<menuitem id="troubleShooting"
accesskey="&helpTroubleshootingInfo.accesskey;"
label="&helpTroubleshootingInfo.label;"
oncommand="openTroubleshootingPage()"
onclick="checkForMiddleClick(this, event);"/>
<menuitem id="feedbackPage"
accesskey="&helpFeedbackPage.accesskey;"
label="&helpFeedbackPage.label;"
oncommand="openFeedbackPage()"
onclick="checkForMiddleClick(this, event);"/>
<menuitem id="helpSafeMode"
accesskey="&helpSafeMode.accesskey;"
label="&helpSafeMode.label;"
stopaccesskey="&helpSafeMode.stop.accesskey;"
stoplabel="&helpSafeMode.stop.label;"
oncommand="safeModeRestart();"/>
<menuitem id="menu_HelpPopup_reportPhishingtoolmenu"
label="&reportDeceptiveSiteMenu.title;"
accesskey="&reportDeceptiveSiteMenu.accesskey;"
observes="reportPhishingBroadcaster"
oncommand="openUILink(gSafeBrowsing.getReportURL('Phish'), event);"
onclick="checkForMiddleClick(this, event);"
hidden="true"/>
<menuitem id="menu_HelpPopup_reportPhishingErrortoolmenu"
label="&safeb.palm.notdeceptive.label;"
accesskey="&safeb.palm.notdeceptive.accesskey;"
observes="reportPhishingErrorBroadcaster"
oncommand="ReportFalseDeceptiveSite();"
onclick="checkForMiddleClick(this, event);"
hidden="true"/>
<menuseparator id="aboutSeparator"/>
<menuitem id="aboutName"
accesskey="&aboutProduct2.accesskey;"
label="&aboutProduct2.label;"
oncommand="openAboutDialog();"/>
</menupopup>
</menu>
</menubar>

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

@ -105,6 +105,14 @@
#ifdef NIGHTLY_BUILD
<command id="wrCaptureCmd" oncommand="gWebRender.capture();"/>
#endif
#ifdef XP_MACOSX
<command id="minimizeWindow"
label="&minimizeWindow.label;"
oncommand="window.minimize();" />
<command id="zoomWindow"
label="&zoomWindow.label;"
oncommand="zoomWindow();" />
#endif
</commandset>
@ -397,10 +405,24 @@
#endif
command="wrCaptureCmd"/>
#endif
</keyset>
# Used by baseMenuOverlay
#ifdef XP_MACOSX
<commandset id="baseMenuCommandSet" />
<key id="key_minimizeWindow"
command="minimizeWindow"
key="&minimizeWindow.key;"
modifiers="accel"/>
<key id="key_openHelpMac"
oncommand="openHelpLink('firefox-osxkey');"
key="&helpMac.commandkey;"
modifiers="accel"/>
<!-- These are used to build the Application menu -->
<key id="key_preferencesCmdMac"
key="&preferencesCmdMac.commandkey;"
modifiers="accel"/>
<key id="key_hideThisAppCmdMac"
key="&hideThisAppCmdMac2.commandkey;"
modifiers="accel"/>
<key id="key_hideOtherAppsCmdMac"
key="&hideOtherAppsCmdMac.commandkey;"
modifiers="accel,alt"/>
#endif
<keyset id="baseMenuKeyset" />
</keyset>

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

@ -8082,18 +8082,13 @@ var gIdentityHandler = {
classes += " in-use";
// Synchronize control center and identity block blinking animations.
window.promiseDocumentFlushed(() => {}).then(() => {
window.promiseDocumentFlushed(() => {
let sharingIconBlink = document.getElementById("sharing-icon").getAnimations()[0];
if (sharingIconBlink) {
let startTime = sharingIconBlink.startTime;
window.requestAnimationFrame(() => {
// TODO(Bug 1440607): This could cause a style flush, but putting
// the getAnimations() call outside of rAF causes a leak.
let imgBlink = img.getAnimations()[0];
if (imgBlink) {
imgBlink.startTime = startTime;
}
});
return [sharingIconBlink, imgBlink];
}).then(([sharingIconBlink, imgBlink]) => {
if (sharingIconBlink && imgBlink) {
imgBlink.startTime = sharingIconBlink.startTime;
}
});
}

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

@ -16,7 +16,6 @@
<?xml-stylesheet href="chrome://browser/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://browser/content/tabbrowser.css" type="text/css"?>
<?xul-overlay href="chrome://browser/content/baseMenuOverlay.xul"?>
<?xul-overlay href="chrome://browser/content/places/placesOverlay.xul"?>
# All DTD information is stored in a separate file so that it can be shared by

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

@ -1,10 +1,8 @@
<commandset id="mainCommandSet"/>
<commandset id="baseMenuCommandSet"/>
<commandset id="placesCommands"/>
<broadcasterset id="mainBroadcasterSet"/>
<keyset id="mainKeyset"/>
<keyset id="baseMenuKeyset"/>
<menubar id="main-menubar"/>

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

@ -24,6 +24,9 @@ for (let script of [
"chrome://browser/content/browser-sidebar.js",
"chrome://browser/content/browser-tabsintitlebar.js",
"chrome://browser/content/browser-trackingprotection.js",
#ifdef XP_MACOSX
"chrome://global/content/macWindowMenu.js",
#endif
#ifdef MOZ_DATA_REPORTING
"chrome://browser/content/browser-data-submission-info-bar.js",
#endif

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

@ -9,6 +9,11 @@
<?xul-overlay href="chrome://browser/content/macBrowserOverlay.xul"?>
<?xml-stylesheet href="chrome://browser/skin/webRTC-indicator.css" type="text/css"?>
<!DOCTYPE window [
<!ENTITY % baseMenuOverlayDTD SYSTEM "chrome://browser/locale/baseMenuOverlay.dtd">
%baseMenuOverlayDTD;
]>
<window id="main-window"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">

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

@ -10,7 +10,6 @@
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://browser/content/places/places.css" type="text/css"?>
<?xul-overlay href="chrome://browser/content/baseMenuOverlay.xul"?>
<?xul-overlay href="chrome://browser/content/places/placesOverlay.xul"?>
# All DTD information is stored in a separate file so that it can be shared by

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

@ -9,6 +9,10 @@
<!DOCTYPE window [
<!ENTITY % pageInfoDTD SYSTEM "chrome://browser/locale/pageInfo.dtd">
%pageInfoDTD;
#ifdef XP_MACOSX
<!ENTITY % baseMenuOverlayDTD SYSTEM "chrome://browser/locale/baseMenuOverlay.dtd">
%baseMenuOverlayDTD;
#endif
]>
#ifdef XP_MACOSX

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

@ -125,7 +125,6 @@ browser.jar:
* content/browser/web-panels.xul (content/web-panels.xul)
content/browser/webext-panels.js (content/webext-panels.js)
* content/browser/webext-panels.xul (content/webext-panels.xul)
* content/browser/baseMenuOverlay.xul (content/baseMenuOverlay.xul)
content/browser/nsContextMenu.js (content/nsContextMenu.js)
# XXX: We should exclude this one as well (bug 71895)
* content/browser/hiddenWindow.xul (content/hiddenWindow.xul)

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

@ -6,40 +6,35 @@
"description": "Block access to the Add-ons Mananger (about:addons).",
"first_available": "60.0",
"type": "boolean",
"enum": [true]
"type": "boolean"
},
"BlockAboutConfig": {
"description": "Blocks access to the about:config page.",
"first_available": "60.0",
"type": "boolean",
"enum": [true]
"type": "boolean"
},
"BlockAboutProfiles": {
"description": "Blocks access to the about:profiles page.",
"first_available": "60.0",
"type": "boolean",
"enum": [true]
"type": "boolean"
},
"BlockAboutSupport": {
"description": "Blocks access to the about:support page.",
"first_available": "60.0",
"type": "boolean",
"enum": [true]
"type": "boolean"
},
"BlockSetDesktopBackground": {
"description": "Prevents usage of the \"Set Image as Desktop Background\" feature.",
"first_available": "60.0",
"type": "boolean",
"enum": [true]
"type": "boolean"
},
"Bookmarks": {
@ -110,8 +105,7 @@
"first_available": "60.0",
"enterprise_only": true,
"type": "boolean",
"enum": [true]
"type": "boolean"
},
"DisableDeveloperTools": {
@ -125,32 +119,28 @@
"description": "Prevents usage of the Firefox Screenshots feature.",
"first_available": "60.0",
"type": "boolean",
"enum": [true]
"type": "boolean"
},
"DisableFirefoxStudies": {
"description": "Prevents Firefox from running studies.",
"first_available": "60.0",
"type": "boolean",
"enum": [true]
"type": "boolean"
},
"DisableFormHistory": {
"description": "Don't remember search and form history.",
"first_available": "60.0",
"type": "boolean",
"enum": [true]
"type": "boolean"
},
"DisablePocket": {
"description": "Prevents ability to save webpages to Pocket.",
"first_available": "60.0",
"type": "boolean",
"enum": [true]
"type": "boolean"
},
"DisablePrivateBrowsing": {
@ -165,24 +155,21 @@
"description": "Causes the bookmarks toolbar to be displayed by default.",
"first_available": "60.0",
"type": "boolean",
"enum": [true]
"type": "boolean"
},
"DisplayMenuBar": {
"description": "Causes the menu bar to be displayed by default.",
"first_available": "60.0",
"type": "boolean",
"enum": [true]
"type": "boolean"
},
"DontCheckDefaultBrowser": {
"description": "Don't check for the default browser on startup.",
"first_available": "60.0",
"type": "boolean",
"enum": [true]
"type": "boolean"
},
"FlashPlugin": {

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

@ -84,7 +84,7 @@ class ParentDevToolsPanel {
this.toolbox.addAdditionalTool({
id: this.id,
url: "about:blank",
url: "chrome://browser/content/webext-panels.xul",
icon: icon,
label: title,
tooltip: `DevTools Panel added by "${extensionName}" add-on.`,
@ -216,14 +216,29 @@ class ParentDevToolsPanel {
const {url} = this.panelOptions;
const {document} = window;
// TODO Bug 1442601: Refactor ext-devtools-panels.js to reuse the helpers
// functions defined in webext-panels.xul (e.g. create the browser element
// using an helper function defined in webext-panels.js and shared with the
// extension sidebar pages).
let stack = document.getElementById("webext-panels-stack");
if (!stack) {
stack = document.createElementNS(XUL_NS, "stack");
stack.setAttribute("flex", "1");
stack.setAttribute("id", "webext-panels-stack");
document.documentElement.appendChild(stack);
}
const browser = document.createElementNS(XUL_NS, "browser");
browser.setAttribute("id", "webext-panels-browser");
browser.setAttribute("type", "content");
browser.setAttribute("disableglobalhistory", "true");
browser.setAttribute("style", "width: 100%; height: 100%;");
browser.setAttribute("transparent", "true");
browser.setAttribute("flex", "1");
browser.setAttribute("class", "webextension-devtoolsPanel-browser");
browser.setAttribute("webextension-view-type", "devtools_panel");
browser.setAttribute("flex", "1");
// TODO Bug 1442604: Add additional tests for the select and autocompletion
// popups used in an extension devtools panels (in oop and non-oop mode).
browser.setAttribute("selectmenulist", "ContentSelectDropdown");
browser.setAttribute("autocompletepopup", "PopupAutoComplete");
// Ensure that the devtools panel browser is going to run in the same
// process of the other extension pages from the same addon.
@ -254,8 +269,7 @@ class ParentDevToolsPanel {
}
});
document.body.setAttribute("style", "margin: 0; padding: 0;");
document.body.appendChild(browser);
stack.appendChild(browser);
extensions.emit("extension-browser-inserted", browser, {
devtoolsToolboxInfo: {

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

@ -16,7 +16,6 @@
#ifdef XP_MACOSX
<?xul-overlay href="chrome://browser/content/macBrowserOverlay.xul"?>
#else
<?xul-overlay href="chrome://browser/content/baseMenuOverlay.xul"?>
<?xul-overlay href="chrome://browser/content/places/placesOverlay.xul"?>
#endif
@ -27,6 +26,10 @@
%editMenuOverlayDTD;
<!ENTITY % browserDTD SYSTEM "chrome://browser/locale/browser.dtd">
%browserDTD;
#ifdef XP_MACOSX
<!ENTITY % baseMenuOverlayDTD SYSTEM "chrome://browser/locale/baseMenuOverlay.dtd">
%baseMenuOverlayDTD;
#endif
]>
<window id="places"

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

@ -31,7 +31,42 @@ add_task(async function copy_toolbar_shortcut() {
Ci.nsINavHistoryResultNode.RESULT_TYPE_FOLDER_SHORTCUT,
"copy is still a folder shortcut");
PlacesUtils.bookmarks.removeItem(toolbarCopyNode.itemId);
await PlacesUtils.bookmarks.remove(toolbarCopyNode.bookmarkGuid);
library.PlacesOrganizer.selectLeftPaneBuiltIn("BookmarksToolbar");
is(library.PlacesOrganizer._places.selectedNode.type,
Ci.nsINavHistoryResultNode.RESULT_TYPE_FOLDER_SHORTCUT,
"original is still a folder shortcut");
});
add_task(async function copy_mobile_shortcut() {
SpecialPowers.pushPrefEnv({ set: [["browser.bookmarks.showMobileBookmarks", true]]});
await promisePlacesInitComplete();
let library = await promiseLibrary();
registerCleanupFunction(async () => {
library.close();
await PlacesUtils.bookmarks.eraseEverything();
});
library.PlacesOrganizer.selectLeftPaneContainerByHierarchy([
PlacesUIUtils.leftPaneQueries.AllBookmarks,
PlacesUtils.bookmarks.virtualMobileGuid,
]);
await promiseClipboard(function() { library.PlacesOrganizer._places.controller.copy(); },
PlacesUtils.TYPE_X_MOZ_PLACE);
library.PlacesOrganizer.selectLeftPaneBuiltIn("UnfiledBookmarks");
await library.ContentTree.view.controller.paste();
let mobileCopyNode = library.ContentTree.view.view.nodeForTreeIndex(0);
is(mobileCopyNode.type,
Ci.nsINavHistoryResultNode.RESULT_TYPE_FOLDER_SHORTCUT,
"copy is still a folder shortcut");
await PlacesUtils.bookmarks.remove(mobileCopyNode.bookmarkGuid);
library.PlacesOrganizer.selectLeftPaneBuiltIn("BookmarksToolbar");
is(library.PlacesOrganizer._places.selectedNode.type,
Ci.nsINavHistoryResultNode.RESULT_TYPE_FOLDER_SHORTCUT,
@ -54,7 +89,7 @@ add_task(async function copy_history_query() {
Ci.nsINavHistoryResultNode.RESULT_TYPE_QUERY,
"copy is still a query");
PlacesUtils.bookmarks.removeItem(historyCopyNode.itemId);
await PlacesUtils.bookmarks.remove(historyCopyNode.bookmarkGuid);
library.PlacesOrganizer.selectLeftPaneBuiltIn("History");
is(library.PlacesOrganizer._places.selectedNode.type,
Ci.nsINavHistoryResultNode.RESULT_TYPE_QUERY,

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

@ -231,9 +231,9 @@
<hbox>
<button id="siteDataSettings"
class="accessory-button"
label="&siteDataSettings.label;"
accesskey="&siteDataSettings.accesskey;"
searchkeywords="&window1.title;
label="&siteDataSettings1.label;"
accesskey="&siteDataSettings1.accesskey;"
searchkeywords="&window2.title;
&hostCol.label;
&cookiesCol.label;
&usageCol.label;"/>

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

@ -12,7 +12,7 @@
<!DOCTYPE dialog SYSTEM "chrome://browser/locale/preferences/siteDataSettings.dtd" >
<window id="SiteDataSettingsDialog" windowtype="Browser:SiteDataSettings"
class="windowDialog" title="&window1.title;"
class="windowDialog" title="&window2.title;"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
style="width: 45em;"
onload="gSiteDataSettings.init();"

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

@ -7,7 +7,15 @@
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://browser/skin/setDesktopBackground.css" type="text/css"?>
<!DOCTYPE dialog SYSTEM "chrome://browser/locale/setDesktopBackground.dtd">
<!DOCTYPE dialog [
<!ENTITY % setDesktopBackgroundDTD SYSTEM "chrome://browser/locale/setDesktopBackground.dtd">
%setDesktopBackgroundDTD;
#ifdef XP_MACOSX
<!ENTITY % baseMenuOverlayDTD SYSTEM "chrome://browser/locale/baseMenuOverlay.dtd">
%baseMenuOverlayDTD;
#endif
]>
#ifdef XP_MACOSX
<?xul-overlay href="chrome://browser/content/macBrowserOverlay.xul"?>

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

@ -82,6 +82,12 @@ static const MimeTypeAssociation appTypes[] = {
#define kDesktopDrawBGGSKey "draw-background"
#define kDesktopColorGSKey "primary-color"
static bool
IsRunningAsASnap()
{
return (PR_GetEnv("SNAP") != nullptr);
}
nsresult
nsGNOMEShellService::Init()
{
@ -207,6 +213,28 @@ nsGNOMEShellService::IsDefaultBrowser(bool aStartupCheck,
{
*aIsDefaultBrowser = false;
if (IsRunningAsASnap()) {
const gchar *argv[] = { "xdg-settings", "check", "default-web-browser",
"firefox_firefox.desktop", nullptr };
GSpawnFlags flags = static_cast<GSpawnFlags>(G_SPAWN_SEARCH_PATH |
G_SPAWN_STDERR_TO_DEV_NULL);
gchar *output = nullptr;
gint exit_status = 0;
if (!g_spawn_sync(nullptr, (gchar **) argv, nullptr, flags, nullptr,
nullptr, &output, nullptr, &exit_status, nullptr)) {
return NS_OK;
}
if (exit_status != 0) {
g_free(output);
return NS_OK;
}
if (strcmp(output, "yes\n") == 0) {
*aIsDefaultBrowser = true;
}
g_free(output);
return NS_OK;
}
nsCOMPtr<nsIGConfService> gconf = do_GetService(NS_GCONFSERVICE_CONTRACTID);
nsCOMPtr<nsIGIOService> giovfs = do_GetService(NS_GIOSERVICE_CONTRACTID);
@ -257,6 +285,17 @@ nsGNOMEShellService::SetDefaultBrowser(bool aClaimAllTypes,
NS_WARNING("Setting the default browser for all users is not yet supported");
#endif
if (IsRunningAsASnap()) {
const gchar *argv[] = { "xdg-settings", "set", "default-web-browser",
"firefox_firefox.desktop", nullptr };
GSpawnFlags flags = static_cast<GSpawnFlags>(G_SPAWN_SEARCH_PATH |
G_SPAWN_STDOUT_TO_DEV_NULL |
G_SPAWN_STDERR_TO_DEV_NULL);
g_spawn_sync(nullptr, (gchar **) argv, nullptr, flags, nullptr, nullptr,
nullptr, nullptr, nullptr, nullptr);
return NS_OK;
}
nsCOMPtr<nsIGConfService> gconf = do_GetService(NS_GCONFSERVICE_CONTRACTID);
nsCOMPtr<nsIGIOService> giovfs = do_GetService(NS_GIOSERVICE_CONTRACTID);
if (gconf) {

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

@ -35,8 +35,8 @@ available. -->
<!ENTITY siteData1.label "Cookies and Site Data">
<!ENTITY clearSiteData1.label "Clear Data…">
<!ENTITY clearSiteData1.accesskey "l">
<!ENTITY siteDataSettings.label "Settings…">
<!ENTITY siteDataSettings.accesskey "i">
<!ENTITY siteDataSettings1.label "Manage Data…">
<!ENTITY siteDataSettings1.accesskey "M">
<!ENTITY siteDataLearnMoreLink.label "Learn more">
<!ENTITY updateTab.label "Update">

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

@ -2,7 +2,7 @@
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<!ENTITY window1.title "Settings - Cookies and Site Data">
<!ENTITY window2.title "Manage Cookies and Site Data">
<!ENTITY hostCol.label "Site">
<!ENTITY cookiesCol.label "Cookies">
<!ENTITY usageCol.label "Storage">

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

@ -14,13 +14,21 @@ Linking Rust Crates into libxul
Rust crates that you want to link into libxul should be listed in the
``dependencies`` section of `toolkit/library/rust/shared/Cargo.toml <https://dxr.mozilla.org/mozilla-central/source/toolkit/library/rust/shared/Cargo.toml>`_.
After adding your crate, execute ``cargo update -p gkrust-shared`` in
``toolkit/library/rust`` to update the Cargo.lock file. You'll also
After adding your crate, execute ``cargo update -p gkrust-shared``
to update the ``Cargo.lock`` file. You'll also
need to add an ``extern crate`` reference to
`toolkit/library/rust/shared/lib.rs <https://dxr.mozilla.org/mozilla-central/source/toolkit/library/rust/shared/lib.rs>`_.
This ensures that the Rust code will be linked properly into libxul as well
as the copy of libxul used for gtests.
By default, all Cargo packages in the mozilla-central repository are part of
the same `workspace <https://dxr.mozilla.org/mozilla-central/source/toolkit/library/rust/shared/lib.rs>`_
and will share the ``Cargo.lock`` file and ``target`` directory in the root of
the repository. You can change this behavior by adding a path to the
``excludes`` list in the top-level ``Cargo.toml`` file. You may want to do
this if your package's development workflow includes dev-dependencies that
aren't needed by general Firefox developers or test infrastructure.
Linking Rust Crates into something else
=======================================

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

@ -171,7 +171,6 @@ skip-if = true # Bug 1437807
[browser_console_clear_method.js]
skip-if = true # Bug 1437843
[browser_console_consolejsm_output.js]
skip-if = true # Bug 1437844
[browser_console_context_menu_entries.js]
[browser_console_dead_objects.js]
[browser_console_error_source_click.js]

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

@ -3,20 +3,13 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
// Test that Console.jsm outputs messages to the Browser Console, bug 851231.
/* import-globals-from head.js */
// Test that Console.jsm outputs messages to the Browser Console.
"use strict";
function onNewMessage(aNewMessages) {
for (let msg of aNewMessages) {
// Messages that shouldn't be output contain the substring FAIL_TEST
if (msg.node.textContent.includes("FAIL_TEST")) {
ok(false, "Message shouldn't have been output: " + msg.node.textContent);
}
}
}
add_task(function* () {
add_task(async function testCategoryLogs() {
let consoleStorage = Cc["@mozilla.org/consoleAPI-storage;1"];
let storage = consoleStorage.getService(Ci.nsIConsoleAPIStorage);
storage.clearEvents();
@ -24,17 +17,9 @@ add_task(function* () {
let {console} = ChromeUtils.import("resource://gre/modules/Console.jsm", {});
console.log("bug861338-log-cached");
let hud = yield HUDService.toggleBrowserConsole();
let hud = await HUDService.toggleBrowserConsole();
yield waitForMessages({
webconsole: hud,
messages: [{
name: "cached console.log message",
text: "bug861338-log-cached",
category: CATEGORY_WEBDEV,
severity: SEVERITY_LOG,
}],
});
await checkMessageExists(hud, "bug861338-log-cached");
hud.jsterm.clearOutput(true);
@ -56,236 +41,52 @@ add_task(function* () {
info("wait for the Console.jsm messages");
let results = yield waitForMessages({
webconsole: hud,
messages: [
{
name: "console.log output",
text: "bug851231-log",
category: CATEGORY_WEBDEV,
severity: SEVERITY_LOG,
},
{
name: "console.info output",
text: "bug851231-info",
category: CATEGORY_WEBDEV,
severity: SEVERITY_INFO,
},
{
name: "console.warn output",
text: "bug851231-warn",
category: CATEGORY_WEBDEV,
severity: SEVERITY_WARNING,
},
{
name: "console.error output",
text: /\bbug851231-error\b.+\{\s*bug851231prop:\s"bug851231value"\s*\}/,
category: CATEGORY_WEBDEV,
severity: SEVERITY_ERROR,
objects: true,
},
{
name: "console.debug output",
text: "bug851231-debug",
category: CATEGORY_WEBDEV,
severity: SEVERITY_LOG,
},
{
name: "console.trace output",
consoleTrace: {
file: "browser_console_consolejsm_output.js",
fn: "testTrace",
},
},
{
name: "console.dir output",
consoleDir: /XULDocument\s+.+\s+chrome:\/\/.+\/browser\.xul/,
},
{
name: "console.time output",
consoleTime: "foobarTimer",
},
{
name: "console.timeEnd output",
consoleTimeEnd: "foobarTimer",
},
],
});
await checkMessageExists(hud, "bug851231-log");
await checkMessageExists(hud, "bug851231-info");
await checkMessageExists(hud, "bug851231-warn");
await checkMessageExists(hud, "bug851231-error");
await checkMessageExists(hud, "bug851231-debug");
await checkMessageExists(hud, "XULDocument");
await checkMessageExists(hud, "console.trace()");
await checkMessageExists(hud, "foobarTimer");
let consoleErrorMsg = results[3];
ok(consoleErrorMsg, "console.error message element found");
let clickable = consoleErrorMsg.clickableElements[0];
ok(clickable, "clickable object found for console.error");
let deferred = defer();
let onFetch = (aVar) => {
// Skip the notification from console.dir variablesview-fetched.
if (aVar._variablesView != hud.jsterm._variablesView) {
return;
}
hud.jsterm.off("variablesview-fetched", onFetch);
deferred.resolve(aVar);
};
hud.jsterm.on("variablesview-fetched", onFetch);
clickable.scrollIntoView(false);
info("wait for variablesview-fetched");
executeSoon(() =>
EventUtils.synthesizeMouse(clickable, 2, 2, {}, hud.iframeWindow));
let varView = yield deferred.promise;
ok(varView, "object inspector opened on click");
yield findVariableViewProperties(varView, [{
name: "bug851231prop",
value: "bug851231value",
}], { webconsole: hud });
yield HUDService.toggleBrowserConsole();
hud.jsterm.clearOutput(true);
await HUDService.toggleBrowserConsole();
});
add_task(function* testPrefix() {
add_task(async function testFilter() {
let consoleStorage = Cc["@mozilla.org/consoleAPI-storage;1"];
let storage = consoleStorage.getService(Ci.nsIConsoleAPIStorage);
storage.clearEvents();
let {ConsoleAPI} = ChromeUtils.import("resource://gre/modules/Console.jsm", {});
let consoleOptions = {
maxLogLevel: "error",
prefix: "Log Prefix",
};
let console2 = new ConsoleAPI(consoleOptions);
console2.error("Testing a prefix");
console2.log("FAIL_TEST: Below the maxLogLevel");
let console2 = new ConsoleAPI();
let hud = await HUDService.toggleBrowserConsole();
let hud = yield HUDService.toggleBrowserConsole();
hud.ui.on("new-messages", onNewMessage);
yield waitForMessages({
webconsole: hud,
messages: [{
name: "cached console.error message",
prefix: "Log Prefix:",
severity: SEVERITY_ERROR,
text: "Testing a prefix",
}],
// Enable the error category and disable the log category.
await setFilterState(hud, {
error: true,
log: false
});
let shouldBeVisible = "Should be visible";
let shouldBeHidden = "Should be hidden";
console2.log(shouldBeHidden);
console2.error(shouldBeVisible);
await checkMessageExists(hud, shouldBeVisible);
// Here we can safely assert that the log message is not visible, since the
// error message was logged after and is visible.
await checkMessageHidden(hud, shouldBeHidden);
await resetFilters(hud);
hud.jsterm.clearOutput(true);
hud.ui.off("new-messages", onNewMessage);
yield HUDService.toggleBrowserConsole();
await HUDService.toggleBrowserConsole();
});
add_task(function* testMaxLogLevelPrefMissing() {
let consoleStorage = Cc["@mozilla.org/consoleAPI-storage;1"];
let storage = consoleStorage.getService(Ci.nsIConsoleAPIStorage);
storage.clearEvents();
let {ConsoleAPI} = ChromeUtils.import("resource://gre/modules/Console.jsm", {});
let consoleOptions = {
maxLogLevel: "error",
maxLogLevelPref: "testing.maxLogLevel",
};
let console = new ConsoleAPI(consoleOptions);
is(Services.prefs.getPrefType(consoleOptions.maxLogLevelPref),
Services.prefs.PREF_INVALID,
"Check log level pref is missing");
// Since the maxLogLevelPref doesn't exist, we should fallback to the passed
// maxLogLevel of "error".
console.warn("FAIL_TEST: Below the maxLogLevel");
console.error("Error should be shown");
let hud = yield HUDService.toggleBrowserConsole();
hud.ui.on("new-messages", onNewMessage);
yield waitForMessages({
webconsole: hud,
messages: [{
name: "defaulting to error level",
severity: SEVERITY_ERROR,
text: "Error should be shown",
}],
});
hud.jsterm.clearOutput(true);
hud.ui.off("new-messages", onNewMessage);
yield HUDService.toggleBrowserConsole();
});
add_task(function* testMaxLogLevelPref() {
let consoleStorage = Cc["@mozilla.org/consoleAPI-storage;1"];
let storage = consoleStorage.getService(Ci.nsIConsoleAPIStorage);
storage.clearEvents();
let {ConsoleAPI} = ChromeUtils.import("resource://gre/modules/Console.jsm", {});
let consoleOptions = {
maxLogLevel: "error",
maxLogLevelPref: "testing.maxLogLevel",
};
info("Setting the pref to warn");
Services.prefs.setCharPref(consoleOptions.maxLogLevelPref, "Warn");
let console = new ConsoleAPI(consoleOptions);
is(console.maxLogLevel, "warn", "Check pref was read at initialization");
console.info("FAIL_TEST: info is below the maxLogLevel");
console.error("Error should be shown");
console.warn("Warn should be shown due to the initial pref value");
info("Setting the pref to info");
Services.prefs.setCharPref(consoleOptions.maxLogLevelPref, "INFO");
is(console.maxLogLevel, "info", "Check pref was lowercased");
console.info("info should be shown due to the pref change being observed");
info("Clearing the pref");
Services.prefs.clearUserPref(consoleOptions.maxLogLevelPref);
console.warn("FAIL_TEST: Shouldn't be shown due to defaulting to error");
console.error("Should be shown due to defaulting to error");
let hud = yield HUDService.toggleBrowserConsole();
hud.ui.on("new-messages", onNewMessage);
yield waitForMessages({
webconsole: hud,
messages: [{
name: "error > warn",
severity: SEVERITY_ERROR,
text: "Error should be shown",
},
{
name: "warn is the inital pref value",
severity: SEVERITY_WARNING,
text: "Warn should be shown due to the initial pref value",
},
{
name: "pref changed to info",
severity: SEVERITY_INFO,
text: "info should be shown due to the pref change being observed",
},
{
name: "default to intial maxLogLevel if pref is removed",
severity: SEVERITY_ERROR,
text: "Should be shown due to defaulting to error",
}],
});
hud.jsterm.clearOutput(true);
hud.ui.off("new-messages", onNewMessage);
yield HUDService.toggleBrowserConsole();
});
// Test that console.profile/profileEnd trigger the right events
add_task(function* testProfile() {
// Test that console.profile / profileEnd trigger the right events
add_task(async function testProfile() {
let consoleStorage = Cc["@mozilla.org/consoleAPI-storage;1"];
let storage = consoleStorage.getService(Ci.nsIConsoleAPIStorage);
let { console } = ChromeUtils.import("resource://gre/modules/Console.jsm", {});
@ -320,3 +121,15 @@ add_task(function* testProfile() {
is(profilerEvents[1].action, "profileEnd", "Second event has the right action");
is(profilerEvents[1].name, "test", "Second event has the right name");
});
async function checkMessageExists(hud, msg) {
info(`Checking "${msg}" was logged`);
let message = await waitFor(() => findMessage(hud, msg));
ok(message, `"${msg}" was logged`);
}
async function checkMessageHidden(hud, msg) {
info(`Checking "${msg}" was not logged`);
await waitFor(() => findMessage(hud, msg) == null);
ok(true, `"${msg}" was not logged`);
}

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

@ -659,7 +659,7 @@ async function setFilterState(hud, settings) {
const filterBar = await setFilterBarVisible(hud, true);
for (let category in settings) {
let check = settings[category];
let setActive = settings[category];
let button = filterBar.querySelector(`.${category}`);
if (!button) {
@ -667,23 +667,15 @@ async function setFilterState(hud, settings) {
`which doesn't exist.`);
}
info(`Setting the ${category} category to ${check ? "checked" : "disabled"}`);
info(`Setting the ${category} category to ${setActive ? "checked" : "disabled"}`);
let checked = button.classList.contains("checked");
if (check) {
// Enable filter.
if (checked) {
return;
}
let isChecked = button.classList.contains("checked");
if (setActive !== isChecked) {
button.click();
await waitFor(() => {
return button.classList.contains("checked");
});
} else if (checked) {
// Disable filter.
button.click();
await waitFor(() => {
return !button.classList.contains("checked");
return button.classList.contains("checked") === setActive;
});
}
}

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

@ -155,6 +155,7 @@ GK_ATOM(aural, "aural")
GK_ATOM(_auto, "auto")
GK_ATOM(autocheck, "autocheck")
GK_ATOM(autocomplete, "autocomplete")
GK_ATOM(autocomplete_richlistbox, "autocomplete-richlistbox")
GK_ATOM(autofocus, "autofocus")
GK_ATOM(autoplay, "autoplay")
GK_ATOM(autorepeatbutton, "autorepeatbutton")

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

@ -279,7 +279,7 @@ public:
// nsWrapperCache
virtual JSObject *WrapObject(JSContext *cx, JS::Handle<JSObject*> aGivenProto) override
{
MOZ_CRASH("We should never get here!");
return GetWrapper();
}
// nsIGlobalJSObjectHolder

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

@ -43,4 +43,7 @@ partial interface WorkerGlobalScope {
// XXXbz no spec for this yet, because the webperf WG is a bit dysfunctional
[Constant, Cached]
readonly attribute Performance performance;
[Func="WorkerGlobalScope::IsInAutomation", Throws]
object getJSTestingFunctions();
};

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

@ -2617,6 +2617,7 @@ WorkerPrivate::WorkerPrivate(WorkerPrivate* aParent,
, mParentFrozen(false)
, mIsSecureContext(false)
, mDebuggerRegistered(false)
, mIsInAutomation(false)
{
MOZ_ASSERT_IF(!IsDedicatedWorker(), NS_IsMainThread());
mLoadInfo.StealFrom(aLoadInfo);
@ -2632,6 +2633,8 @@ WorkerPrivate::WorkerPrivate(WorkerPrivate* aParent,
mIsSecureContext = aParent->IsSecureContext();
MOZ_ASSERT_IF(mIsChromeWorker, mIsSecureContext);
mIsInAutomation = aParent->IsInAutomation();
MOZ_ASSERT(IsDedicatedWorker());
if (aParent->mParentFrozen) {
@ -2665,6 +2668,8 @@ WorkerPrivate::WorkerPrivate(WorkerPrivate* aParent,
.creationOptions().setSecureContext(true);
}
mIsInAutomation = xpc::IsInAutomation();
// Our parent can get suspended after it initiates the async creation
// of a new worker thread. In this case suspend the new worker as well.
if (mLoadInfo.mWindow && mLoadInfo.mWindow->IsSuspended()) {

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

@ -633,6 +633,12 @@ public:
return mIsSecureContext;
}
// Check whether we're running in automation.
bool IsInAutomation() const
{
return mIsInAutomation;
}
TimeStamp CreationTimeStamp() const
{
return mCreationTimeStamp;
@ -1479,6 +1485,10 @@ private:
bool mIsSecureContext;
bool mDebuggerRegistered;
// mIsInAutomation is true when we're running in test automation.
// We expose some extra testing functions in that case.
bool mIsInAutomation;
};
class AutoSyncLoopHolder

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

@ -7,6 +7,7 @@
#include "WorkerScope.h"
#include "jsapi.h"
#include "jsfriendapi.h"
#include "mozilla/EventListenerManager.h"
#include "mozilla/dom/BindingDeclarations.h"
#include "mozilla/dom/Clients.h"
@ -400,6 +401,26 @@ WorkerGlobalScope::GetPerformance()
return mPerformance;
}
bool
WorkerGlobalScope::IsInAutomation(JSContext* aCx, JSObject* /* unused */)
{
return GetWorkerPrivateFromContext(aCx)->IsInAutomation();
}
void
WorkerGlobalScope::GetJSTestingFunctions(JSContext* aCx,
JS::MutableHandle<JSObject*> aFunctions,
ErrorResult& aRv)
{
JSObject* obj = js::GetTestingFunctions(aCx);
if (!obj) {
aRv.Throw(NS_ERROR_OUT_OF_MEMORY);
return;
}
aFunctions.set(obj);
}
already_AddRefed<Promise>
WorkerGlobalScope::Fetch(const RequestOrUSVString& aInput,
const RequestInit& aInit,

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

@ -161,6 +161,11 @@ public:
return mPerformance;
}
static bool IsInAutomation(JSContext* aCx, JSObject* /* unused */);
void GetJSTestingFunctions(JSContext* aCx,
JS::MutableHandle<JSObject*> aFunctions,
ErrorResult& aRv);
already_AddRefed<Promise>
Fetch(const RequestOrUSVString& aInput, const RequestInit& aInit,
CallerType aCallerType, ErrorResult& aRv);

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

@ -76,11 +76,7 @@ var ecmaGlobals =
{name: "URIError", insecureContext: true},
{name: "WeakMap", insecureContext: true},
{name: "WeakSet", insecureContext: true},
// WebAssembly is not supported on some hardware configurations,
// but we have no way to check that from here. Just give up for
// now and don't check for it at all. Do NOT add any other uses
// of "optional"!
{name: "WebAssembly", insecureContext: true, optional: true},
{name: "WebAssembly", insecureContext: true, disabled: !getJSTestingFunctions().wasmIsSupportedByHardware()},
];
// IMPORTANT: Do not change the list above without review from
// a JavaScript Engine peer!
@ -291,8 +287,6 @@ function createInterfaceMap(version, userAgent) {
(isInsecureContext && !Boolean(entry.insecureContext)) ||
entry.disabled) {
interfaceMap[entry.name] = false;
} else if (entry.optional) {
interfaceMap[entry.name] = "optional";
} else {
interfaceMap[entry.name] = true;
}
@ -313,23 +307,19 @@ function runTest(version, userAgent) {
if (!/^[A-Z]/.test(name)) {
continue;
}
ok(interfaceMap[name] === "optional" || interfaceMap[name],
ok(interfaceMap[name],
"If this is failing: DANGER, are you sure you want to expose the new interface " + name +
" to all webpages as a property on the worker? Do not make a change to this file without a " +
" review from a DOM peer for that specific change!!! (or a JS peer for changes to ecmaGlobals)");
delete interfaceMap[name];
}
for (var name of Object.keys(interfaceMap)) {
if (interfaceMap[name] === "optional") {
delete interfaceMap[name];
} else {
ok(name in self === interfaceMap[name],
name + " should " + (interfaceMap[name] ? "" : " NOT") + " be defined on the global scope");
if (!interfaceMap[name]) {
delete interfaceMap[name];
}
}
}
is(Object.keys(interfaceMap).length, 0,
"The following interface(s) are not enumerated: " + Object.keys(interfaceMap).join(", "));
}

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

@ -999,12 +999,6 @@ GPUProcessManager::CreateContentVideoDecoderManager(base::ProcessId aOtherProces
*aOutEndpoint = Move(childPipe);
}
already_AddRefed<IAPZCTreeManager>
GPUProcessManager::GetAPZCTreeManagerForLayers(uint64_t aLayersId)
{
return CompositorBridgeParent::GetAPZCTreeManager(aLayersId);
}
void
GPUProcessManager::MapLayerTreeId(uint64_t aLayersId, base::ProcessId aOwningId)
{

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

@ -107,10 +107,6 @@ public:
mozilla::ipc::Endpoint<dom::PVideoDecoderManagerChild>* aOutVideoManager,
nsTArray<uint32_t>* aNamespaces);
// This returns a reference to the APZCTreeManager to which
// pan/zoom-related events can be sent.
already_AddRefed<IAPZCTreeManager> GetAPZCTreeManagerForLayers(uint64_t aLayersId);
// Maps the layer tree and process together so that aOwningPID is allowed
// to access aLayersId across process.
void MapLayerTreeId(uint64_t aLayersId, base::ProcessId aOwningId);

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

@ -6,8 +6,6 @@
#include "InProcessCompositorSession.h"
// so we can cast an APZCTreeManager to an IAPZCTreeManager
#include "mozilla/layers/APZCTreeManager.h"
#include "mozilla/layers/IAPZCTreeManager.h"
#include "nsBaseWidget.h"

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

@ -61,14 +61,6 @@ Compositor::EndFrame()
mLastCompositionEndTime = TimeStamp::Now();
}
/* static */ void
Compositor::AssertOnCompositorThread()
{
MOZ_ASSERT(!CompositorThreadHolder::Loop() ||
CompositorThreadHolder::Loop() == MessageLoop::current(),
"Can only call this from the compositor thread!");
}
bool
Compositor::ShouldDrawDiagnostics(DiagnosticFlags aFlags)
{

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

@ -497,12 +497,6 @@ public:
widget::CompositorWidget* GetWidget() const { return mWidget; }
/**
* Debug-build assertion that can be called to ensure code is running on the
* compositor thread.
*/
static void AssertOnCompositorThread();
// Return statistics for the most recent frame we computed statistics for.
virtual void GetFrameStats(GPUStats* aStats);

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

@ -0,0 +1,63 @@
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* 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/. */
#ifndef mozilla_layers_APZSampler_h
#define mozilla_layers_APZSampler_h
#include "mozilla/layers/APZTestData.h"
#include "mozilla/Maybe.h"
namespace mozilla {
namespace layers {
class APZCTreeManager;
class FocusTarget;
class Layer;
class WebRenderScrollData;
/**
* This interface is used to interact with the APZ code from the compositor
* thread. It internally redispatches the functions to the sampler thread
* in the case where the two threads are not the same.
*/
class APZSampler {
NS_INLINE_DECL_THREADSAFE_REFCOUNTING(APZSampler)
public:
explicit APZSampler(const RefPtr<APZCTreeManager>& aApz);
void ClearTree();
void UpdateFocusState(uint64_t aRootLayerTreeId,
uint64_t aOriginatingLayersId,
const FocusTarget& aFocusTarget);
void UpdateHitTestingTree(uint64_t aRootLayerTreeId,
Layer* aRoot,
bool aIsFirstPaint,
uint64_t aOriginatingLayersId,
uint32_t aPaintSequenceNumber);
void UpdateHitTestingTree(uint64_t aRootLayerTreeId,
const WebRenderScrollData& aScrollData,
bool aIsFirstPaint,
uint64_t aOriginatingLayersId,
uint32_t aPaintSequenceNumber);
void NotifyLayerTreeAdopted(uint64_t aLayersId,
const RefPtr<APZSampler>& aOldSampler);
void NotifyLayerTreeRemoved(uint64_t aLayersId);
bool GetAPZTestData(uint64_t aLayersId, APZTestData* aOutData);
protected:
virtual ~APZSampler();
private:
RefPtr<APZCTreeManager> mApz;
};
} // namespace layers
} // namespace mozilla
#endif // mozilla_layers_APZSampler_h

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

@ -9,7 +9,7 @@
#include "gfxPrefs.h" // for gfxPrefs
#include "InputData.h" // for InputData, etc
#include "mozilla/EventStateManager.h" // for WheelPrefs
#include "mozilla/layers/APZThreadUtils.h" // for AssertOnCompositorThread, etc
#include "mozilla/layers/APZThreadUtils.h" // for AssertOnControllerThread, etc
#include "mozilla/MouseEvents.h" // for WidgetMouseEvent
#include "mozilla/TextEvents.h" // for WidgetKeyboardEvent
#include "mozilla/TouchEvents.h" // for WidgetTouchEvent

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

@ -113,7 +113,7 @@ public:
/**
* Kicks an animation to zoom to a rect. This may be either a zoom out or zoom
* in. The actual animation is done on the compositor thread after being set
* in. The actual animation is done on the sampler thread after being set
* up. |aRect| must be given in CSS pixels, relative to the document.
* |aFlags| is a combination of the ZoomToRectBehavior enum values.
*/

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

@ -20,7 +20,7 @@
#include "mozilla/gfx/GPUParent.h" // for GPUParent
#include "mozilla/gfx/Logging.h" // for gfx::TreeLog
#include "mozilla/gfx/Point.h" // for Point
#include "mozilla/layers/APZThreadUtils.h" // for AssertOnCompositorThread, etc
#include "mozilla/layers/APZThreadUtils.h" // for AssertOnControllerThread, etc
#include "mozilla/layers/AsyncCompositionManager.h" // for ViewTransform
#include "mozilla/layers/AsyncDragMetrics.h" // for AsyncDragMetrics
#include "mozilla/layers/CompositorBridgeParent.h" // for CompositorBridgeParent, etc
@ -69,20 +69,25 @@ typedef CompositorBridgeParent::LayerTreeState LayerTreeState;
float APZCTreeManager::sDPI = 160.0;
struct APZCTreeManager::TreeBuildingState {
TreeBuildingState(const LayerTreeState* const aLayerTreeState,
TreeBuildingState(uint64_t aRootLayersId,
bool aIsFirstPaint, uint64_t aOriginatingLayersId,
APZTestData* aTestData, uint32_t aPaintSequence)
: mLayerTreeState(aLayerTreeState)
, mIsFirstPaint(aIsFirstPaint)
: mIsFirstPaint(aIsFirstPaint)
, mOriginatingLayersId(aOriginatingLayersId)
, mPaintLogger(aTestData, aPaintSequence)
{
CompositorBridgeParent::CallWithIndirectShadowTree(aRootLayersId,
[this](LayerTreeState& aState) -> void {
mCompositorController = aState.GetCompositorController();
mInProcessSharingController = aState.InProcessSharingController();
});
}
typedef std::unordered_map<AsyncPanZoomController*, gfx::Matrix4x4> DeferredTransformMap;
// State that doesn't change as we recurse in the tree building
const LayerTreeState* const mLayerTreeState;
RefPtr<CompositorController> mCompositorController;
RefPtr<MetricsSharingController> mInProcessSharingController;
const bool mIsFirstPaint;
const uint64_t mOriginatingLayersId;
const APZPaintLogHelper mPaintLogger;
@ -93,11 +98,6 @@ struct APZCTreeManager::TreeBuildingState {
// This is initialized with all nodes in the old tree, and nodes are removed
// from it as we reuse them in the new tree.
nsTArray<RefPtr<HitTestingTreeNode>> mNodesToDestroy;
// A set of layer trees that are no longer in the hit testing tree. This is
// used to destroy unneeded focus targets at the end of tree building. This
// is needed in addition to mNodesToDestroy because a hit testing node for a
// layer tree can be removed without the whole layer tree being removed.
std::unordered_set<uint64_t> mLayersIdsToDestroy;
// This map is populated as we place APZCs into the new tree. Its purpose is
// to facilitate re-using the same APZC for different layers that scroll
@ -239,7 +239,8 @@ APZCTreeManager::APZCTreeManager(uint64_t aRootLayersId)
mHitResultForInputBlock(CompositorHitTestInfo::eInvisibleToHitTest),
mRetainedTouchIdentifier(-1),
mInScrollbarTouchDrag(false),
mApzcTreeLog("apzctree")
mApzcTreeLog("apzctree"),
mTestDataLock("APZTestDataLock")
{
RefPtr<APZCTreeManager> self(this);
NS_DispatchToMainThread(
@ -264,6 +265,46 @@ APZCTreeManager::InitializeGlobalState()
AsyncPanZoomController::InitializeGlobalState();
}
void
APZCTreeManager::NotifyLayerTreeAdopted(uint64_t aLayersId,
const RefPtr<APZCTreeManager>& aOldApzcTreeManager)
{
APZThreadUtils::AssertOnSamplerThread();
MOZ_ASSERT(aOldApzcTreeManager);
aOldApzcTreeManager->mFocusState.RemoveFocusTarget(aLayersId);
// While we could move the focus target information from the old APZC tree
// manager into this one, it's safer to not do that, as we'll probably have
// that information repopulated soon anyway (on the next layers update).
UniquePtr<APZTestData> adoptedData;
{ // scope lock for removal on oldApzcTreeManager
MutexAutoLock lock(aOldApzcTreeManager->mTestDataLock);
auto it = aOldApzcTreeManager->mTestData.find(aLayersId);
if (it != aOldApzcTreeManager->mTestData.end()) {
adoptedData = Move(it->second);
aOldApzcTreeManager->mTestData.erase(it);
}
}
if (adoptedData) {
MutexAutoLock lock(mTestDataLock);
mTestData[aLayersId] = Move(adoptedData);
}
}
void
APZCTreeManager::NotifyLayerTreeRemoved(uint64_t aLayersId)
{
APZThreadUtils::AssertOnSamplerThread();
mFocusState.RemoveFocusTarget(aLayersId);
{ // scope lock
MutexAutoLock lock(mTestDataLock);
mTestData.erase(aLayersId);
}
}
AsyncPanZoomController*
APZCTreeManager::NewAPZCInstance(uint64_t aLayersId,
GeckoContentController* aController)
@ -292,24 +333,20 @@ APZCTreeManager::UpdateHitTestingTreeImpl(uint64_t aRootLayerTreeId,
uint64_t aOriginatingLayersId,
uint32_t aPaintSequenceNumber)
{
APZThreadUtils::AssertOnCompositorThread();
RecursiveMutexAutoLock lock(mTreeLock);
// For testing purposes, we log some data to the APZTestData associated with
// the layers id that originated this update.
APZTestData* testData = nullptr;
if (gfxPrefs::APZTestLoggingEnabled()) {
if (LayerTreeState* state = CompositorBridgeParent::GetIndirectShadowTree(aOriginatingLayersId)) {
testData = &state->mApzTestData;
MutexAutoLock lock(mTestDataLock);
UniquePtr<APZTestData> ptr = MakeUnique<APZTestData>();
auto result = mTestData.insert(std::make_pair(aOriginatingLayersId, Move(ptr)));
testData = result.first->second.get();
testData->StartNewPaint(aPaintSequenceNumber);
}
}
const LayerTreeState* treeState =
CompositorBridgeParent::GetIndirectShadowTree(aRootLayerTreeId);
MOZ_ASSERT(treeState);
TreeBuildingState state(treeState, aIsFirstPaint, aOriginatingLayersId,
TreeBuildingState state(aRootLayerTreeId, aIsFirstPaint, aOriginatingLayersId,
testData, aPaintSequenceNumber);
// We do this business with collecting the entire tree into an array because otherwise
@ -329,7 +366,6 @@ APZCTreeManager::UpdateHitTestingTreeImpl(uint64_t aRootLayerTreeId,
{
state.mNodesToDestroy.AppendElement(aNode);
});
state.mLayersIdsToDestroy = mFocusState.GetFocusTargetLayerIds();
mRootNode = nullptr;
if (aRoot) {
@ -341,8 +377,6 @@ APZCTreeManager::UpdateHitTestingTreeImpl(uint64_t aRootLayerTreeId,
ancestorTransforms.push(AncestorTransform());
state.mParentHasPerspective.push(false);
state.mLayersIdsToDestroy.erase(aRootLayerTreeId);
mApzcTreeLog << "[start]\n";
mTreeLock.AssertCurrentThreadIn();
@ -383,9 +417,6 @@ APZCTreeManager::UpdateHitTestingTreeImpl(uint64_t aRootLayerTreeId,
// Update the layersId if we have a new one
if (Maybe<uint64_t> newLayersId = aLayerMetrics.GetReferentId()) {
layersId = *newLayersId;
// Mark that this layer tree is being used
state.mLayersIdsToDestroy.erase(layersId);
}
indents.push(gfx::TreeAutoIndent(mApzcTreeLog));
@ -445,11 +476,6 @@ APZCTreeManager::UpdateHitTestingTreeImpl(uint64_t aRootLayerTreeId,
state.mNodesToDestroy[i]->Destroy();
}
// Clear out any focus targets that are no longer needed
for (auto layersId : state.mLayersIdsToDestroy) {
mFocusState.RemoveFocusTarget(layersId);
}
#if ENABLE_APZCTM_LOGGING
// Make the hit-test tree line up with the layer dump
printf_stderr("APZCTreeManager (%p)\n", this);
@ -462,6 +488,8 @@ APZCTreeManager::UpdateFocusState(uint64_t aRootLayerTreeId,
uint64_t aOriginatingLayersId,
const FocusTarget& aFocusTarget)
{
APZThreadUtils::AssertOnSamplerThread();
if (!gfxPrefs::APZKeyboardEnabled()) {
return;
}
@ -478,6 +506,8 @@ APZCTreeManager::UpdateHitTestingTree(uint64_t aRootLayerTreeId,
uint64_t aOriginatingLayersId,
uint32_t aPaintSequenceNumber)
{
APZThreadUtils::AssertOnSamplerThread();
LayerMetricsWrapper root(aRoot);
UpdateHitTestingTreeImpl(aRootLayerTreeId, root, aIsFirstPaint,
aOriginatingLayersId, aPaintSequenceNumber);
@ -490,6 +520,8 @@ APZCTreeManager::UpdateHitTestingTree(uint64_t aRootLayerTreeId,
uint64_t aOriginatingLayersId,
uint32_t aPaintSequenceNumber)
{
APZThreadUtils::AssertOnSamplerThread();
WebRenderScrollDataWrapper wrapper(&aScrollData);
UpdateHitTestingTreeImpl(aRootLayerTreeId, wrapper, aIsFirstPaint,
aOriginatingLayersId, aPaintSequenceNumber);
@ -500,7 +532,7 @@ APZCTreeManager::PushStateToWR(wr::TransactionBuilder& aTxn,
const TimeStamp& aSampleTime,
nsTArray<wr::WrTransformProperty>& aTransformArray)
{
APZThreadUtils::AssertOnCompositorThread();
APZThreadUtils::AssertOnSamplerThread();
RecursiveMutexAutoLock lock(mTreeLock);
@ -533,14 +565,18 @@ APZCTreeManager::PushStateToWR(wr::TransactionBuilder& aTxn,
if (aNode->GetLayersId() != lastLayersId) {
// If we walked into or out of a subtree, we need to get the new
// pipeline id.
const LayerTreeState* state = CompositorBridgeParent::GetIndirectShadowTree(aNode->GetLayersId());
if (!(state && state->mWrBridge)) {
RefPtr<WebRenderBridgeParent> wrBridge;
CompositorBridgeParent::CallWithIndirectShadowTree(aNode->GetLayersId(),
[&wrBridge](LayerTreeState& aState) -> void {
wrBridge = aState.mWrBridge;
});
if (!wrBridge) {
// During shutdown we might have layer tree information for stuff
// that has already been torn down. In that case just skip over
// those layers.
return;
}
lastPipelineId = state->mWrBridge->PipelineId();
lastPipelineId = wrBridge->PipelineId();
lastLayersId = aNode->GetLayersId();
}
@ -609,8 +645,7 @@ APZCTreeManager::PushStateToWR(wr::TransactionBuilder& aTxn,
// Compute the clip region to be used for a layer with an APZC. This function
// is only called for layers which actually have scrollable metrics and an APZC.
template<class ScrollNode> static ParentLayerIntRegion
ComputeClipRegion(GeckoContentController* aController,
const ScrollNode& aLayer)
ComputeClipRegion(const ScrollNode& aLayer)
{
ParentLayerIntRegion clipRegion;
if (aLayer.GetClipRect()) {
@ -785,8 +820,18 @@ APZCTreeManager::PrepareNodeForLayer(const ScrollNode& aLayer,
needsApzc = false;
}
const LayerTreeState* state = CompositorBridgeParent::GetIndirectShadowTree(aLayersId);
if (!(state && state->mController.get())) {
// XXX: As a future optimization we can probably stick these things on the
// TreeBuildingState, and update them as we change layers id during the
// traversal
RefPtr<GeckoContentController> geckoContentController;
RefPtr<MetricsSharingController> crossProcessSharingController;
CompositorBridgeParent::CallWithIndirectShadowTree(aLayersId,
[&](LayerTreeState& lts) -> void {
geckoContentController = lts.mController;
crossProcessSharingController = lts.CrossProcessSharingController();
});
if (!geckoContentController) {
needsApzc = false;
}
@ -881,13 +926,12 @@ APZCTreeManager::PrepareNodeForLayer(const ScrollNode& aLayer,
// a destroyed APZC and so we need to throw that out and make a new one.
bool newApzc = (apzc == nullptr || apzc->IsDestroyed());
if (newApzc) {
MOZ_ASSERT(aState.mLayerTreeState);
apzc = NewAPZCInstance(aLayersId, state->mController);
apzc->SetCompositorController(aState.mLayerTreeState->GetCompositorController());
if (state->mCrossProcessParent) {
apzc->SetMetricsSharingController(state->CrossProcessSharingController());
apzc = NewAPZCInstance(aLayersId, geckoContentController);
apzc->SetCompositorController(aState.mCompositorController.get());
if (crossProcessSharingController) {
apzc->SetMetricsSharingController(crossProcessSharingController);
} else {
apzc->SetMetricsSharingController(aState.mLayerTreeState->InProcessSharingController());
apzc->SetMetricsSharingController(aState.mInProcessSharingController.get());
}
MOZ_ASSERT(node == nullptr);
node = new HitTestingTreeNode(apzc, true, aLayersId);
@ -914,7 +958,7 @@ APZCTreeManager::PrepareNodeForLayer(const ScrollNode& aLayer,
Maybe<ParentLayerIntRegion> clipRegion = parentHasPerspective
? Nothing()
: Some(ComputeClipRegion(state->mController, aLayer));
: Some(ComputeClipRegion(aLayer));
node->SetHitTestData(
GetEventRegions(aLayer),
aLayer.GetVisibleRegion(),
@ -1013,7 +1057,7 @@ APZCTreeManager::PrepareNodeForLayer(const ScrollNode& aLayer,
Maybe<ParentLayerIntRegion> clipRegion = parentHasPerspective
? Nothing()
: Some(ComputeClipRegion(state->mController, aLayer));
: Some(ComputeClipRegion(aLayer));
node->SetHitTestData(
GetEventRegions(aLayer),
aLayer.GetVisibleRegion(),
@ -1133,10 +1177,11 @@ APZCTreeManager::ReceiveInputEvent(InputData& aEvent,
if (apzc) {
if (gfxPrefs::APZTestLoggingEnabled() && mouseInput.mType == MouseInput::MOUSE_HITTEST) {
ScrollableLayerGuid guid = apzc->GetGuid();
CompositorBridgeParent::CallWithIndirectShadowTree(guid.mLayersId,
[&](LayerTreeState& aState) -> void {
aState.mApzTestData.RecordHitResult(mouseInput.mOrigin, hitResult, guid.mScrollId);
});
MutexAutoLock lock(mTestDataLock);
auto it = mTestData.find(guid.mLayersId);
MOZ_ASSERT(it != mTestData.end());
it->second->RecordHitResult(mouseInput.mOrigin, hitResult, guid.mScrollId);
}
TargetConfirmationFlags confFlags{hitResult};
@ -1994,6 +2039,8 @@ APZCTreeManager::AdjustScrollForSurfaceShift(const ScreenPoint& aShift)
void
APZCTreeManager::ClearTree()
{
APZThreadUtils::AssertOnSamplerThread();
// Ensure that no references to APZCs are alive in any lingering input
// blocks. This breaks cycles from InputBlockState::mTargetApzc back to
// the InputQueue.
@ -2937,6 +2984,20 @@ APZCTreeManager::GetContentController(uint64_t aLayersId) const
return controller.forget();
}
bool
APZCTreeManager::GetAPZTestData(uint64_t aLayersId,
APZTestData* aOutData)
{
APZThreadUtils::AssertOnSamplerThread();
MutexAutoLock lock(mTestDataLock);
auto it = mTestData.find(aLayersId);
if (it == mTestData.end()) {
return false;
}
*aOutData = *(it->second);
return true;
}
#if defined(MOZ_WIDGET_ANDROID)
void
APZCTreeManager::InitializeDynamicToolbarAnimator(const int64_t& aRootLayerTreeId)

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

@ -14,13 +14,15 @@
#include "mozilla/gfx/CompositorHitTestInfo.h"
#include "mozilla/gfx/Logging.h" // for gfx::TreeLog
#include "mozilla/gfx/Matrix.h" // for Matrix4x4
#include "mozilla/layers/TouchCounter.h"// for TouchCounter
#include "mozilla/layers/APZTestData.h" // for APZTestData
#include "mozilla/layers/FocusState.h" // for FocusState
#include "mozilla/layers/IAPZCTreeManager.h" // for IAPZCTreeManager
#include "mozilla/layers/KeyboardMap.h" // for KeyboardMap
#include "mozilla/layers/FocusState.h" // for FocusState
#include "mozilla/layers/TouchCounter.h"// for TouchCounter
#include "mozilla/RecursiveMutex.h" // for RecursiveMutex
#include "mozilla/RefPtr.h" // for RefPtr
#include "mozilla/TimeStamp.h" // for mozilla::TimeStamp
#include "mozilla/UniquePtr.h" // for UniquePtr
#include "nsCOMPtr.h" // for already_AddRefed
#if defined(MOZ_WIDGET_ANDROID)
@ -57,12 +59,13 @@ struct AncestorTransform;
/**
* ****************** NOTE ON LOCK ORDERING IN APZ **************************
*
* There are two kinds of locks used by APZ: APZCTreeManager::mTreeLock
* There are two main kinds of locks used by APZ: APZCTreeManager::mTreeLock
* ("the tree lock") and AsyncPanZoomController::mRecursiveMutex ("APZC locks").
* There is also the APZCTreeManager::mTestDataLock ("test lock").
*
* To avoid deadlock, we impose a lock ordering between these locks, which is:
*
* tree lock -> APZC locks
* tree lock -> APZC locks -> test lock
*
* The interpretation of the lock ordering is that if lock A precedes lock B
* in the ordering sequence, then you must NOT wait on A while holding B.
@ -74,7 +77,7 @@ struct AncestorTransform;
* This class manages the tree of AsyncPanZoomController instances. There is one
* instance of this class owned by each CompositorBridgeParent, and it contains as
* many AsyncPanZoomController instances as there are scrollable container layers.
* This class generally lives on the compositor thread, although some functions
* This class generally lives on the sampler thread, although some functions
* may be called from other threads as noted; thread safety is ensured internally.
*
* The bulk of the work of this class happens as part of the UpdateHitTestingTree
@ -117,9 +120,30 @@ public:
*/
static void InitializeGlobalState();
/**
* Notifies this APZCTreeManager that the associated compositor is now
* responsible for managing another layers id, which got moved over from
* some other compositor. That other compositor's APZCTreeManager is also
* provided. This allows APZCTreeManager to transfer any necessary state
* from the old APZCTreeManager related to that layers id.
* This function must be called on the sampler thread.
*/
void NotifyLayerTreeAdopted(uint64_t aLayersId,
const RefPtr<APZCTreeManager>& aOldTreeManager);
/**
* Notifies this APZCTreeManager that a layer tree being managed by the
* associated compositor has been removed/destroyed. Note that this does
* NOT get called during shutdown situations, when the root layer tree is
* also getting destroyed.
* This function must be called on the sampler thread.
*/
void NotifyLayerTreeRemoved(uint64_t aLayersId);
/**
* Rebuild the focus state based on the focus target from the layer tree update
* that just occurred.
* This must be called on the sampler thread.
*
* @param aRootLayerTreeId The layer tree ID of the root layer corresponding
* to this APZCTreeManager
@ -135,7 +159,7 @@ public:
* Preserve nodes and APZC instances where possible, but retire those whose
* layers are no longer in the layer tree.
*
* This must be called on the compositor thread as it walks the layer tree.
* This must be called on the sampler thread as it walks the layer tree.
*
* @param aRootLayerTreeId The layer tree ID of the root layer corresponding
* to this APZCTreeManager
@ -170,7 +194,7 @@ public:
uint32_t aPaintSequenceNumber);
/**
* Called when webrender is enabled, from the compositor thread. This function
* Called when webrender is enabled, from the sampler thread. This function
* walks through the tree of APZC instances and tells webrender about the
* async scroll position. It also advances APZ animations to the specified
* sample time. In effect it is the webrender equivalent of (part of) the
@ -237,7 +261,7 @@ public:
/**
* Kicks an animation to zoom to a rect. This may be either a zoom out or zoom
* in. The actual animation is done on the compositor thread after being set
* in. The actual animation is done on the sampler thread after being set
* up. |aRect| must be given in CSS pixels, relative to the document.
* |aFlags| is a combination of the ZoomToRectBehavior enum values.
*/
@ -313,6 +337,7 @@ public:
* lifetime of this APZCTreeManager, when this APZCTreeManager is no longer
* needed. Failing to call this function may prevent objects from being freed
* properly.
* This must be called on the sampler thread.
*/
void ClearTree();
@ -474,6 +499,8 @@ public:
LayoutDeviceIntPoint aRefPoint,
EventMessage aEventMessage) override;
bool GetAPZTestData(uint64_t aLayersId, APZTestData* aOutData);
protected:
// Protected destructor, to discourage deletion outside of Release():
virtual ~APZCTreeManager();
@ -698,6 +725,11 @@ private:
friend class CheckerboardFlushObserver;
RefPtr<CheckerboardFlushObserver> mFlushObserver;
// Map from layers id to APZTestData. Accesses and mutations must be
// protected by the mTestDataLock.
std::unordered_map<uint64_t, UniquePtr<APZTestData>> mTestData;
mutable mozilla::Mutex mTestDataLock;
static float sDPI;
#if defined(MOZ_WIDGET_ANDROID)

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

@ -0,0 +1,89 @@
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* 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/. */
#include "mozilla/layers/APZSampler.h"
#include "mozilla/layers/APZCTreeManager.h"
#include "mozilla/layers/CompositorThread.h"
namespace mozilla {
namespace layers {
APZSampler::APZSampler(const RefPtr<APZCTreeManager>& aApz)
: mApz(aApz)
{
}
APZSampler::~APZSampler()
{
}
void
APZSampler::ClearTree()
{
MOZ_ASSERT(CompositorThreadHolder::IsInCompositorThread());
mApz->ClearTree();
}
void
APZSampler::UpdateFocusState(uint64_t aRootLayerTreeId,
uint64_t aOriginatingLayersId,
const FocusTarget& aFocusTarget)
{
MOZ_ASSERT(CompositorThreadHolder::IsInCompositorThread());
mApz->UpdateFocusState(aRootLayerTreeId, aOriginatingLayersId, aFocusTarget);
}
void
APZSampler::UpdateHitTestingTree(uint64_t aRootLayerTreeId,
Layer* aRoot,
bool aIsFirstPaint,
uint64_t aOriginatingLayersId,
uint32_t aPaintSequenceNumber)
{
MOZ_ASSERT(CompositorThreadHolder::IsInCompositorThread());
mApz->UpdateHitTestingTree(aRootLayerTreeId, aRoot, aIsFirstPaint,
aOriginatingLayersId, aPaintSequenceNumber);
}
void
APZSampler::UpdateHitTestingTree(uint64_t aRootLayerTreeId,
const WebRenderScrollData& aScrollData,
bool aIsFirstPaint,
uint64_t aOriginatingLayersId,
uint32_t aPaintSequenceNumber)
{
MOZ_ASSERT(CompositorThreadHolder::IsInCompositorThread());
mApz->UpdateHitTestingTree(aRootLayerTreeId, aScrollData, aIsFirstPaint,
aOriginatingLayersId, aPaintSequenceNumber);
}
void
APZSampler::NotifyLayerTreeAdopted(uint64_t aLayersId,
const RefPtr<APZSampler>& aOldSampler)
{
MOZ_ASSERT(CompositorThreadHolder::IsInCompositorThread());
MOZ_ASSERT(aOldSampler);
mApz->NotifyLayerTreeAdopted(aLayersId, aOldSampler->mApz);
}
void
APZSampler::NotifyLayerTreeRemoved(uint64_t aLayersId)
{
MOZ_ASSERT(CompositorThreadHolder::IsInCompositorThread());
mApz->NotifyLayerTreeRemoved(aLayersId);
}
bool
APZSampler::GetAPZTestData(uint64_t aLayersId,
APZTestData* aOutData)
{
MOZ_ASSERT(CompositorThreadHolder::IsInCompositorThread());
return mApz->GetAPZTestData(aLayersId, aOutData);
}
} // namespace layers
} // namespace mozilla

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

@ -834,7 +834,7 @@ AsyncPanZoomController::GetInputQueue() const {
void
AsyncPanZoomController::Destroy()
{
APZThreadUtils::AssertOnCompositorThread();
APZThreadUtils::AssertOnSamplerThread();
CancelAnimation(CancelAnimationFlags::ScrollSnap);
@ -3431,7 +3431,7 @@ AsyncPanZoomController::RequestContentRepaint(const FrameMetrics& aFrameMetrics,
bool AsyncPanZoomController::UpdateAnimation(const TimeStamp& aSampleTime,
nsTArray<RefPtr<Runnable>>* aOutDeferredTasks)
{
APZThreadUtils::AssertOnCompositorThread();
APZThreadUtils::AssertOnSamplerThread();
// This function may get called multiple with the same sample time, because
// there may be multiple layers with this APZC, and each layer invokes this
@ -3490,7 +3490,7 @@ AsyncPanZoomController::GetOverscrollTransform(AsyncTransformConsumer aMode) con
bool AsyncPanZoomController::AdvanceAnimations(const TimeStamp& aSampleTime)
{
APZThreadUtils::AssertOnCompositorThread();
APZThreadUtils::AssertOnSamplerThread();
// Don't send any state-change notifications until the end of the function,
// because we may go through some intermediate states while we finish
@ -3769,7 +3769,7 @@ void AsyncPanZoomController::NotifyLayersUpdated(const ScrollMetadata& aScrollMe
bool aIsFirstPaint,
bool aThisLayerTreeUpdated)
{
APZThreadUtils::AssertOnCompositorThread();
APZThreadUtils::AssertOnSamplerThread();
RecursiveMutexAutoLock lock(mRecursiveMutex);
bool isDefault = mScrollMetadata.IsDefault();
@ -4387,7 +4387,7 @@ void AsyncPanZoomController::UpdateSharedCompositorFrameMetrics()
void AsyncPanZoomController::ShareCompositorFrameMetrics()
{
APZThreadUtils::AssertOnCompositorThread();
APZThreadUtils::AssertOnSamplerThread();
// Only create the shared memory buffer if it hasn't already been created,
// we are using progressive tile painting, and we have a

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

@ -190,7 +190,7 @@ public:
/**
* Kicks an animation to zoom to a rect. This may be either a zoom out or zoom
* in. The actual animation is done on the compositor thread after being set
* in. The actual animation is done on the sampler thread after being set
* up.
*/
void ZoomToRect(CSSRect aRect, const uint32_t aFlags);
@ -213,7 +213,7 @@ public:
void PostDelayedTask(already_AddRefed<Runnable> aTask, int aDelayMs);
// --------------------------------------------------------------------------
// These methods must only be called on the compositor thread.
// These methods must only be called on the sampler thread.
//
/**
@ -776,7 +776,7 @@ protected:
/* Access to the following two fields is protected by the mRefPtrMonitor,
since they are accessed on the UI thread but can be cleared on the
compositor thread. */
sampler thread. */
RefPtr<GeckoContentController> mGeckoContentController;
RefPtr<GestureEventListener> mGestureEventListener;
mutable Monitor mRefPtrMonitor;

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

@ -140,19 +140,6 @@ FocusState::Update(uint64_t aRootLayerTreeId,
}
}
std::unordered_set<uint64_t>
FocusState::GetFocusTargetLayerIds() const
{
std::unordered_set<uint64_t> layersIds;
layersIds.reserve(mFocusTree.size());
for (const auto& focusNode : mFocusTree) {
layersIds.insert(focusNode.first);
}
return layersIds;
}
void
FocusState::RemoveFocusTarget(uint64_t aLayersId)
{

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

@ -106,11 +106,6 @@ public:
uint64_t aOriginatingLayersId,
const FocusTarget& aTarget);
/**
* Collects a set of the layer tree IDs that we have a focus target for.
*/
std::unordered_set<uint64_t> GetFocusTargetLayerIds() const;
/**
* Removes a focus target by its layer tree ID.
*/

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

@ -10,7 +10,7 @@
#include "gfxPrefs.h"
#include "LayersLogging.h" // for Stringify
#include "mozilla/gfx/Point.h" // for Point4D
#include "mozilla/layers/APZThreadUtils.h" // for AssertOnCompositorThread
#include "mozilla/layers/APZThreadUtils.h" // for AssertOnSamplerThread
#include "mozilla/layers/APZUtils.h" // for CompleteAsyncTransform
#include "mozilla/layers/AsyncCompositionManager.h" // for ViewTransform::operator Matrix4x4()
#include "mozilla/layers/AsyncDragMetrics.h" // for AsyncDragMetrics
@ -59,7 +59,7 @@ HitTestingTreeNode::~HitTestingTreeNode()
void
HitTestingTreeNode::Destroy()
{
APZThreadUtils::AssertOnCompositorThread();
APZThreadUtils::AssertOnSamplerThread();
mPrevSibling = nullptr;
mLastChild = nullptr;

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

@ -35,7 +35,7 @@ protected:
// Reference-counted classes cannot have public destructors.
~OverscrollHandoffChain();
public:
// Threadsafe so that the controller and compositor threads can both maintain
// Threadsafe so that the controller and sampler threads can both maintain
// nsRefPtrs to the same handoff chain.
// Mutable so that we can pass around the class by
// RefPtr<const OverscrollHandoffChain> and thus enforce that, once built,

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

@ -6,7 +6,7 @@
#include "mozilla/layers/APZThreadUtils.h"
#include "mozilla/layers/Compositor.h"
#include "mozilla/layers/CompositorThread.h"
namespace mozilla {
namespace layers {
@ -43,10 +43,10 @@ APZThreadUtils::AssertOnControllerThread() {
}
/*static*/ void
APZThreadUtils::AssertOnCompositorThread()
APZThreadUtils::AssertOnSamplerThread()
{
if (GetThreadAssertionsEnabled()) {
Compositor::AssertOnCompositorThread();
MOZ_ASSERT(CompositorThreadHolder::IsInCompositorThread());
}
}

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

@ -42,10 +42,10 @@ public:
/**
* This can be used to assert that the current thread is the
* compositor thread (which applies the async transform).
* sampler thread (which samples the async transform).
* This does nothing if thread assertions are disabled.
*/
static void AssertOnCompositorThread();
static void AssertOnSamplerThread();
/**
* Run the given task on the APZ "controller thread" for this platform. If

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

@ -39,7 +39,8 @@
#include "mozilla/layers/AnimationHelper.h" // for CompositorAnimationStorage
#include "mozilla/layers/APZCTreeManager.h" // for APZCTreeManager
#include "mozilla/layers/APZCTreeManagerParent.h" // for APZCTreeManagerParent
#include "mozilla/layers/APZThreadUtils.h" // for APZCTreeManager
#include "mozilla/layers/APZSampler.h" // for APZSampler
#include "mozilla/layers/APZThreadUtils.h" // for APZThreadUtils
#include "mozilla/layers/AsyncCompositionManager.h"
#include "mozilla/layers/BasicCompositor.h" // for BasicCompositor
#include "mozilla/layers/Compositor.h" // for Compositor
@ -356,6 +357,7 @@ CompositorBridgeParent::InitSameProcess(widget::CompositorWidget* aWidget,
mRootLayerTreeID = aLayerTreeId;
if (mOptions.UseAPZ()) {
mApzcTreeManager = new APZCTreeManager(mRootLayerTreeID);
mApzSampler = new APZSampler(mApzcTreeManager);
}
Initialize();
@ -656,8 +658,10 @@ CompositorBridgeParent::ActorDestroy(ActorDestroyReason why)
mCompositionManager = nullptr;
if (mApzcTreeManager) {
mApzcTreeManager->ClearTree();
MOZ_ASSERT((mApzSampler != nullptr) == (mApzcTreeManager != nullptr));
if (mApzSampler) {
mApzSampler->ClearTree();
mApzSampler = nullptr;
mApzcTreeManager = nullptr;
}
@ -881,11 +885,10 @@ CompositorBridgeParent::NotifyShadowTreeTransaction(uint64_t aId, bool aIsFirstP
}
#endif
if (mApzcTreeManager) {
mApzcTreeManager->UpdateFocusState(mRootLayerTreeID, aId,
aFocusTarget);
if (mApzSampler) {
mApzSampler->UpdateFocusState(mRootLayerTreeID, aId, aFocusTarget);
if (aHitTestUpdate) {
mApzcTreeManager->UpdateHitTestingTree(mRootLayerTreeID,
mApzSampler->UpdateHitTestingTree(mRootLayerTreeID,
mLayerManager->GetRoot(), aIsFirstPaint, aId, aPaintSequenceNumber);
}
}
@ -1123,13 +1126,15 @@ CompositorBridgeParent::AllocPAPZCTreeManagerParent(const uint64_t& aLayersId)
// This message doubles as initialization
MOZ_ASSERT(!mApzcTreeManager);
mApzcTreeManager = new APZCTreeManager(mRootLayerTreeID);
mApzSampler = new APZSampler(mApzcTreeManager);
MonitorAutoLock lock(*sIndirectLayerTreesLock);
CompositorBridgeParent::LayerTreeState& state = sIndirectLayerTrees[mRootLayerTreeID];
MOZ_ASSERT(state.mParent);
MOZ_ASSERT(state.mParent.get() == this);
MOZ_ASSERT(!state.mApzcTreeManagerParent);
state.mApzcTreeManagerParent = new APZCTreeManagerParent(mRootLayerTreeID, state.mParent->GetAPZCTreeManager());
state.mApzcTreeManagerParent = new APZCTreeManagerParent(mRootLayerTreeID, mApzcTreeManager);
return state.mApzcTreeManagerParent;
}
@ -1175,6 +1180,12 @@ CompositorBridgeParent::GetAPZCTreeManager()
return mApzcTreeManager;
}
RefPtr<APZSampler>
CompositorBridgeParent::GetAPZSampler()
{
return mApzSampler;
}
CompositorBridgeParent*
CompositorBridgeParent::GetCompositorBridgeParentFromLayersId(const uint64_t& aLayersId)
{
@ -1233,15 +1244,15 @@ CompositorBridgeParent::ShadowLayersUpdated(LayerTransactionParent* aLayerTree,
Layer* root = aLayerTree->GetRoot();
mLayerManager->SetRoot(root);
if (mApzcTreeManager && !aInfo.isRepeatTransaction()) {
mApzcTreeManager->UpdateFocusState(mRootLayerTreeID,
if (mApzSampler && !aInfo.isRepeatTransaction()) {
mApzSampler->UpdateFocusState(mRootLayerTreeID,
mRootLayerTreeID,
aInfo.focusTarget());
if (aHitTestUpdate) {
AutoResolveRefLayers resolve(mCompositionManager);
mApzcTreeManager->UpdateHitTestingTree(
mApzSampler->UpdateHitTestingTree(
mRootLayerTreeID, root, aInfo.isFirstPaint(),
mRootLayerTreeID, aInfo.paintSequenceNumber());
}
@ -1376,9 +1387,10 @@ void
CompositorBridgeParent::GetAPZTestData(const uint64_t& aLayersId,
APZTestData* aOutData)
{
MOZ_ASSERT(aLayersId == 0 || aLayersId == mRootLayerTreeID);
MonitorAutoLock lock(*sIndirectLayerTreesLock);
*aOutData = sIndirectLayerTrees[mRootLayerTreeID].mApzTestData;
uint64_t layersId = (aLayersId == 0 ? mRootLayerTreeID : aLayersId);
if (mApzSampler) {
mApzSampler->GetAPZTestData(layersId, aOutData);
}
}
void
@ -1660,12 +1672,14 @@ CompositorBridgeParent::RecvMapAndNotifyChildCreated(const uint64_t& aChild,
mozilla::ipc::IPCResult
CompositorBridgeParent::RecvAdoptChild(const uint64_t& child)
{
RefPtr<APZSampler> oldApzSampler;
APZCTreeManagerParent* parent;
{
MonitorAutoLock lock(*sIndirectLayerTreesLock);
// We currently don't support adopting children from one compositor to
// another if the two compositors don't have the same options.
MOZ_ASSERT(sIndirectLayerTrees[child].mParent->mOptions == mOptions);
oldApzSampler = sIndirectLayerTrees[child].mParent->mApzSampler;
NotifyChildCreated(child);
if (sIndirectLayerTrees[child].mLayerTree) {
sIndirectLayerTrees[child].mLayerTree->SetLayerManager(mLayerManager, GetAnimationStorage());
@ -1690,9 +1704,17 @@ CompositorBridgeParent::RecvAdoptChild(const uint64_t& child)
parent = sIndirectLayerTrees[child].mApzcTreeManagerParent;
}
if (mApzcTreeManager && parent) {
// We don't support moving a child from a APZ-enabled compositor to a
// APZ-disabled compostior. The mOptions assertion above should already
// ensure this, since APZ-ness is one of the things in mOptions.
MOZ_ASSERT((oldApzSampler != nullptr) == (mApzSampler != nullptr));
if (mApzSampler) {
if (parent) {
MOZ_ASSERT(mApzcTreeManager);
parent->ChildAdopted(mApzcTreeManager);
}
mApzSampler->NotifyLayerTreeAdopted(child, oldApzSampler);
}
return IPC_OK();
}
@ -1784,6 +1806,9 @@ EraseLayerState(uint64_t aId)
CompositorBridgeParent* parent = iter->second.mParent;
if (parent) {
parent->ClearApproximatelyVisibleRegions(aId, Nothing());
if (RefPtr<APZSampler> apz = parent->GetAPZSampler()) {
apz->NotifyLayerTreeRemoved(aId);
}
}
sIndirectLayerTrees.erase(iter);
@ -1845,7 +1870,7 @@ CompositorBridgeParent::SetControllerForLayerTree(uint64_t aLayersId,
aController));
}
/*static*/ already_AddRefed<APZCTreeManager>
/*static*/ already_AddRefed<IAPZCTreeManager>
CompositorBridgeParent::GetAPZCTreeManager(uint64_t aLayersId)
{
EnsureLayerTreeMapReady();
@ -1856,7 +1881,7 @@ CompositorBridgeParent::GetAPZCTreeManager(uint64_t aLayersId)
}
LayerTreeState* lts = &cit->second;
RefPtr<APZCTreeManager> apzctm = lts->mParent
RefPtr<IAPZCTreeManager> apzctm = lts->mParent
? lts->mParent->mApzcTreeManager.get()
: nullptr;
return apzctm.forget();
@ -2083,9 +2108,8 @@ UpdateIndirectTree(uint64_t aId, Layer* aRoot, const TargetConfig& aTargetConfig
/* static */ CompositorBridgeParent::LayerTreeState*
CompositorBridgeParent::GetIndirectShadowTree(uint64_t aId)
{
// Only the compositor thread should use this method variant, however it is
// safe to be called on the main thread during APZ gtests.
APZThreadUtils::AssertOnCompositorThread();
// Only the compositor thread should use this method variant
MOZ_ASSERT(CompositorThreadHolder::IsInCompositorThread());
MonitorAutoLock lock(*sIndirectLayerTreesLock);
LayerTreeMap::iterator cit = sIndirectLayerTrees.find(aId);

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

@ -64,6 +64,7 @@ namespace layers {
class APZCTreeManager;
class APZCTreeManagerParent;
class APZSampler;
class AsyncCompositionManager;
class AsyncImagePipelineManager;
class Compositor;
@ -72,6 +73,7 @@ class CompositorBridgeParent;
class CompositorManagerParent;
class CompositorVsyncScheduler;
class HostLayerManager;
class IAPZCTreeManager;
class LayerTransactionParent;
class PAPZParent;
class CrossProcessCompositorBridgeParent;
@ -360,7 +362,6 @@ public:
// the PCompositorBridgeChild
CrossProcessCompositorBridgeParent* mCrossProcessParent;
TargetConfig mTargetConfig;
APZTestData mApzTestData;
LayerTransactionParent* mLayerTree;
nsTArray<PluginWindowData> mPluginData;
bool mUpdatedPluginDataAvailable;
@ -446,6 +447,7 @@ public:
bool DeallocPAPZParent(PAPZParent* aActor) override;
RefPtr<APZCTreeManager> GetAPZCTreeManager();
RefPtr<APZSampler> GetAPZSampler();
CompositorOptions GetOptions() const {
return mOptions;
@ -486,10 +488,11 @@ private:
void StopAndClearResources();
/**
* This returns a reference to the APZCTreeManager to which
* pan/zoom-related events can be sent.
* This returns a reference to the IAPZCTreeManager "controller subinterface"
* to which pan/zoom-related events can be sent. The controller subinterface
* doesn't expose any sampler-thread APZCTreeManager methods.
*/
static already_AddRefed<APZCTreeManager> GetAPZCTreeManager(uint64_t aLayersId);
static already_AddRefed<IAPZCTreeManager> GetAPZCTreeManager(uint64_t aLayersId);
/**
* Release compositor-thread resources referred to by |aID|.
@ -610,6 +613,7 @@ protected:
RefPtr<CancelableRunnable> mForceCompositionTask;
RefPtr<APZCTreeManager> mApzcTreeManager;
RefPtr<APZSampler> mApzSampler;
RefPtr<CompositorVsyncScheduler> mCompositorScheduler;
// This makes sure the compositorParent is not destroyed before receiving

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

@ -7,6 +7,7 @@
#include "MainThreadUtils.h"
#include "nsThreadUtils.h"
#include "CompositorBridgeParent.h"
#include "mozilla/layers/CompositorManagerParent.h"
#include "mozilla/layers/ImageBridgeParent.h"
#include "mozilla/media/MediaSystemResourceService.h"

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

@ -486,8 +486,13 @@ CrossProcessCompositorBridgeParent::GetAPZTestData(
APZTestData* aOutData)
{
MOZ_ASSERT(aLayersId != 0);
MonitorAutoLock lock(*sIndirectLayerTreesLock);
*aOutData = sIndirectLayerTrees[aLayersId].mApzTestData;
const CompositorBridgeParent::LayerTreeState* state =
CompositorBridgeParent::GetIndirectShadowTree(aLayersId);
if (!state || !state->mParent) {
return;
}
state->mParent->GetAPZTestData(aLayersId, aOutData);
}
void

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

@ -92,6 +92,7 @@ EXPORTS.mozilla.dom += [
EXPORTS.mozilla.layers += [
'AnimationHelper.h',
'AnimationInfo.h',
'apz/public/APZSampler.h',
'apz/public/CompositorController.h',
'apz/public/GeckoContentController.h',
'apz/public/IAPZCTreeManager.h',
@ -297,6 +298,7 @@ UNIFIED_SOURCES += [
'AnimationInfo.cpp',
'apz/public/IAPZCTreeManager.cpp',
'apz/src/APZCTreeManager.cpp',
'apz/src/APZSampler.cpp',
'apz/src/AsyncPanZoomController.cpp',
'apz/src/AutoscrollAnimation.cpp',
'apz/src/Axis.cpp',

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

@ -8,7 +8,6 @@ license = "MIT/Apache-2.0"
[features]
simd-accel = ["encoding_rs/simd-accel"]
no-static-ideograph-encoder-tables = ["encoding_rs/no-static-ideograph-encoder-tables"]
parallel-utf8 = ["encoding_rs/parallel-utf8"]
[dependencies]
encoding_rs = "0.7.0"

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

@ -16,10 +16,12 @@
#include "mozilla/RefPtr.h"
#include "mozilla/SystemGroup.h"
#include "private/prpriv.h" // For PR_GetThreadID
#include "WinUtils.h"
#include <winternl.h> // For NTSTATUS and NTAPI
namespace {
typedef NTSTATUS (NTAPI* NtTestAlertPtr)(VOID);
/**
* SyncRunnable implements different code paths depending on whether or not
* we are running on a multiprocessor system. In the multiprocessor case, we
@ -33,15 +35,29 @@ public:
explicit SyncRunnable(already_AddRefed<nsIRunnable> aRunnable)
: mozilla::Runnable("MainThreadInvoker")
, mRunnable(aRunnable)
{}
{
static const bool gotStatics = InitStatics();
MOZ_ASSERT(gotStatics);
}
~SyncRunnable() = default;
NS_IMETHOD Run() override
{
if (mHasRun) {
// The APC already ran, so we have nothing to do.
return NS_OK;
}
// Run the pending APC in the queue.
MOZ_ASSERT(sNtTestAlert);
sNtTestAlert();
return NS_OK;
}
// This is called by MainThreadInvoker::MainThreadAPC.
void APCRun()
{
mHasRun = true;
TimeStamp runStart(TimeStamp::Now());
@ -51,7 +67,6 @@ public:
mDuration = runEnd - runStart;
mEvent.Signal();
return NS_OK;
}
bool WaitUntilComplete()
@ -69,8 +84,21 @@ private:
nsCOMPtr<nsIRunnable> mRunnable;
mozilla::mscom::SpinEvent mEvent;
mozilla::TimeDuration mDuration;
static NtTestAlertPtr sNtTestAlert;
static bool InitStatics()
{
sNtTestAlert = reinterpret_cast<NtTestAlertPtr>(
::GetProcAddress(::GetModuleHandleW(L"ntdll.dll"), "NtTestAlert"));
MOZ_ASSERT(sNtTestAlert);
return sNtTestAlert;
}
};
NtTestAlertPtr SyncRunnable::sNtTestAlert = nullptr;
} // anonymous namespace
namespace mozilla {
@ -120,11 +148,15 @@ MainThreadInvoker::Invoke(already_AddRefed<nsIRunnable>&& aRunnable)
RefPtr<SyncRunnable> syncRunnable = new SyncRunnable(runnable.forget());
if (NS_FAILED(SystemGroup::Dispatch(
TaskCategory::Other, do_AddRef(syncRunnable)))) {
return false;
}
// The main thread could be either blocked on a condition variable waiting
// for a Gecko event, or it could be blocked waiting on a Windows HANDLE in
// IPC code (doing a sync message send). In the former case, we wake it by
// posting a Gecko runnable to the main thread. In the latter case, we wake
// it using an APC. However, the latter case doesn't happen very often now
// and APCs aren't otherwise run by the main thread. To ensure the
// SyncRunnable is cleaned up, we need both to run consistently.
// To do this, we:
// 1. Queue an APC which does the actual work.
// This ref gets released in MainThreadAPC when it runs.
SyncRunnable* syncRunnableRef = syncRunnable.get();
NS_ADDREF(syncRunnableRef);
@ -133,6 +165,13 @@ MainThreadInvoker::Invoke(already_AddRefed<nsIRunnable>&& aRunnable)
return false;
}
// 2. Post a Gecko runnable (which always runs). If the APC hasn't run, the
// Gecko runnable runs it. Otherwise, it does nothing.
if (NS_FAILED(SystemGroup::Dispatch(
TaskCategory::Other, do_AddRef(syncRunnable)))) {
return false;
}
bool result = syncRunnable->WaitUntilComplete();
mDuration = syncRunnable->GetDuration();
return result;
@ -145,7 +184,7 @@ MainThreadInvoker::MainThreadAPC(ULONG_PTR aParam)
mozilla::HangMonitor::NotifyActivity(mozilla::HangMonitor::kGeneralActivity);
MOZ_ASSERT(NS_IsMainThread());
auto runnable = reinterpret_cast<SyncRunnable*>(aParam);
runnable->Run();
runnable->APCRun();
NS_RELEASE(runnable);
}

367
js/rust/Cargo.lock сгенерированный
Просмотреть файл

@ -1,367 +0,0 @@
[[package]]
name = "aho-corasick"
version = "0.6.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"memchr 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "ansi_term"
version = "0.10.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "atty"
version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "bindgen"
version = "0.32.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"cexpr 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"cfg-if 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"clang-sys 0.21.1 (registry+https://github.com/rust-lang/crates.io-index)",
"clap 2.29.0 (registry+https://github.com/rust-lang/crates.io-index)",
"env_logger 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
"peeking_take_while 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)",
"regex 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"which 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "bitflags"
version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "cexpr"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"nom 1.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "cfg-if"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "clang-sys"
version = "0.21.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
"libloading 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "clap"
version = "2.29.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"ansi_term 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)",
"atty 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"strsim 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
"textwrap 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
"unicode-width 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
"vec_map 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "cmake"
version = "0.1.24"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"gcc 0.3.54 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "env_logger"
version = "0.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
"regex 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "gcc"
version = "0.3.54"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "glob"
version = "0.2.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "js"
version = "0.1.4"
dependencies = [
"bindgen 0.32.2 (registry+https://github.com/rust-lang/crates.io-index)",
"cmake 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)",
"env_logger 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
"glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
"mozjs_sys 0.0.0",
"num-traits 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "kernel32-sys"
version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "lazy_static"
version = "0.2.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "lazy_static"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "libc"
version = "0.2.33"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "libloading"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "libz-sys"
version = "1.0.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"gcc 0.3.54 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
"pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
"vcpkg 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "log"
version = "0.3.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "memchr"
version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "mozjs_sys"
version = "0.0.0"
dependencies = [
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
"libz-sys 1.0.16 (registry+https://github.com/rust-lang/crates.io-index)",
"num_cpus 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "nom"
version = "1.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "num-traits"
version = "0.1.41"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "num_cpus"
version = "1.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "peeking_take_while"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "pkg-config"
version = "0.3.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "quote"
version = "0.3.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "regex"
version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"aho-corasick 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)",
"memchr 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
"regex-syntax 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"thread_local 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
"utf8-ranges 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "regex-syntax"
version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "strsim"
version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "textwrap"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"unicode-width 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "thread-id"
version = "3.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "thread_local"
version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"thread-id 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"unreachable 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "unicode-width"
version = "0.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "unreachable"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "utf8-ranges"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "vcpkg"
version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "vec_map"
version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "void"
version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "which"
version = "1.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "winapi"
version = "0.2.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "winapi-build"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
[metadata]
"checksum aho-corasick 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "500909c4f87a9e52355b26626d890833e9e1d53ac566db76c36faa984b889699"
"checksum ansi_term 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6b3568b48b7cefa6b8ce125f9bb4989e52fbcc29ebea88df04cc7c5f12f70455"
"checksum atty 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d912da0db7fa85514874458ca3651fe2cddace8d0b0505571dbdcd41ab490159"
"checksum bindgen 0.32.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6ed9557522980fcdb4986097c2ea9d2504eafa7e5818f393110205b5325a52ce"
"checksum bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b3c30d3802dfb7281680d6285f2ccdaa8c2d8fee41f93805dba5c4cf50dc23cf"
"checksum cexpr 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "393a5f0088efbe41f9d1fcd062f24e83c278608420e62109feb2c8abee07de7d"
"checksum cfg-if 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d0c47d456a36ebf0536a6705c83c1cbbcb9255fbc1d905a6ded104f479268a29"
"checksum clang-sys 0.21.1 (registry+https://github.com/rust-lang/crates.io-index)" = "00048189ee171715296dfe3b2fcfd439563c7bfec0d98d3976ce3402d62c8f07"
"checksum clap 2.29.0 (registry+https://github.com/rust-lang/crates.io-index)" = "110d43e343eb29f4f51c1db31beb879d546db27998577e5715270a54bcf41d3f"
"checksum cmake 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)" = "b8ebbb35d3dc9cd09497168f33de1acb79b265d350ab0ac34133b98f8509af1f"
"checksum env_logger 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3ddf21e73e016298f5cb37d6ef8e8da8e39f91f9ec8b0df44b7deb16a9f8cd5b"
"checksum gcc 0.3.54 (registry+https://github.com/rust-lang/crates.io-index)" = "5e33ec290da0d127825013597dbdfc28bee4964690c7ce1166cbc2a7bd08b1bb"
"checksum glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "8be18de09a56b60ed0edf84bc9df007e30040691af7acd1c41874faac5895bfb"
"checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d"
"checksum lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "76f033c7ad61445c5b347c7382dd1237847eb1bce590fe50365dcb33d546be73"
"checksum lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c8f31047daa365f19be14b47c29df4f7c3b581832407daabe6ae77397619237d"
"checksum libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)" = "5ba3df4dcb460b9dfbd070d41c94c19209620c191b0340b929ce748a2bcd42d2"
"checksum libloading 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "be99f814beb3e9503a786a592c909692bb6d4fc5a695f6ed7987223acfbd5194"
"checksum libz-sys 1.0.16 (registry+https://github.com/rust-lang/crates.io-index)" = "3fdd64ef8ee652185674455c1d450b83cbc8ad895625d543b5324d923f82e4d8"
"checksum log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "880f77541efa6e5cc74e76910c9884d9859683118839d6a1dc3b11e63512565b"
"checksum memchr 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "148fab2e51b4f1cfc66da2a7c32981d1d3c083a803978268bb11fe4b86925e7a"
"checksum nom 1.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "a5b8c256fd9471521bcb84c3cdba98921497f1a331cbc15b8030fc63b82050ce"
"checksum num-traits 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)" = "cacfcab5eb48250ee7d0c7896b51a2c5eec99c1feea5f32025635f5ae4b00070"
"checksum num_cpus 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "514f0d73e64be53ff320680ca671b64fe3fb91da01e1ae2ddc99eb51d453b20d"
"checksum peeking_take_while 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099"
"checksum pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "3a8b4c6b8165cd1a1cd4b9b120978131389f64bdaf456435caa41e630edba903"
"checksum quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6e920b65c65f10b2ae65c831a81a073a89edd28c7cce89475bff467ab4167a"
"checksum regex 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1731164734096285ec2a5ec7fea5248ae2f5485b3feeb0115af4fda2183b2d1b"
"checksum regex-syntax 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ad890a5eef7953f55427c50575c680c42841653abd2b028b68cd223d157f62db"
"checksum strsim 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b4d15c810519a91cf877e7e36e63fe068815c678181439f2f29e2562147c3694"
"checksum textwrap 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c0b59b6b4b44d867f1370ef1bd91bfb262bf07bf0ae65c202ea2fbc16153b693"
"checksum thread-id 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8df7875b676fddfadffd96deea3b1124e5ede707d4884248931077518cf1f773"
"checksum thread_local 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c85048c6260d17cf486ceae3282d9fb6b90be220bf5b28c400f5485ffc29f0c7"
"checksum unicode-width 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "bf3a113775714a22dcb774d8ea3655c53a32debae63a063acc00a91cc586245f"
"checksum unreachable 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1f2ae5ddb18e1c92664717616dd9549dde73f539f01bd7b77c2edb2446bdff91"
"checksum utf8-ranges 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "662fab6525a98beff2921d7f61a39e7d59e0b425ebc7d0d9e66d316e55124122"
"checksum vcpkg 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9e0a7d8bed3178a8fb112199d466eeca9ed09a14ba8ad67718179b4fd5487d0b"
"checksum vec_map 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "887b5b631c2ad01628bbbaa7dd4c869f80d3186688f8d0b6f58774fbe324988c"
"checksum void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d"
"checksum which 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "4be6cfa54dab45266e98b5d7be2f8ce959ddd49abd141a05d52dce4b07f803bb"
"checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a"
"checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc"

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

@ -8,7 +8,7 @@ license = "MPL-2.0"
[build-dependencies]
env_logger = "0.4"
log = "0.3"
bindgen = "0.32.2"
bindgen = "0.33.1"
cmake = "0.1"
glob = "0.2.11"

55
js/src/Cargo.lock сгенерированный
Просмотреть файл

@ -1,55 +0,0 @@
[[package]]
name = "gcc"
version = "0.3.54"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "libc"
version = "0.2.33"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "libz-sys"
version = "1.0.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"gcc 0.3.54 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
"pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
"vcpkg 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "mozjs_sys"
version = "0.0.0"
dependencies = [
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
"libz-sys 1.0.16 (registry+https://github.com/rust-lang/crates.io-index)",
"num_cpus 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "num_cpus"
version = "1.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "pkg-config"
version = "0.3.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "vcpkg"
version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
[metadata]
"checksum gcc 0.3.54 (registry+https://github.com/rust-lang/crates.io-index)" = "5e33ec290da0d127825013597dbdfc28bee4964690c7ce1166cbc2a7bd08b1bb"
"checksum libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)" = "5ba3df4dcb460b9dfbd070d41c94c19209620c191b0340b929ce748a2bcd42d2"
"checksum libz-sys 1.0.16 (registry+https://github.com/rust-lang/crates.io-index)" = "3fdd64ef8ee652185674455c1d450b83cbc8ad895625d543b5324d923f82e4d8"
"checksum num_cpus 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "514f0d73e64be53ff320680ca671b64fe3fb91da01e1ae2ddc99eb51d453b20d"
"checksum pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "3a8b4c6b8165cd1a1cd4b9b120978131389f64bdaf456435caa41e630edba903"
"checksum vcpkg 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9e0a7d8bed3178a8fb112199d466eeca9ed09a14ba8ad67718179b4fd5487d0b"

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

@ -677,10 +677,16 @@ AreNonLocalConnectionsDisabled()
inline bool
IsInAutomation()
{
const char* prefName =
"security.turn_off_all_security_so_that_viruses_can_take_over_this_computer";
return mozilla::Preferences::GetBool(prefName) &&
AreNonLocalConnectionsDisabled();
static bool sAutomationPrefIsSet;
static bool sPrefCacheAdded = false;
if (!sPrefCacheAdded) {
mozilla::Preferences::AddBoolVarCache(
&sAutomationPrefIsSet,
"security.turn_off_all_security_so_that_viruses_can_take_over_this_computer",
false);
sPrefCacheAdded = true;
}
return sAutomationPrefIsSet && AreNonLocalConnectionsDisabled();
}
void

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

@ -42,6 +42,7 @@ static const char* acLogTag ="WebrtcAudioSessionConduit";
// 32 bytes is what WebRTC CodecInst expects
const unsigned int WebrtcAudioConduit::CODEC_PLNAME_SIZE = 32;
using LocalDirection = MediaSessionConduitLocalDirection;
/**
* Factory Method for AudioConduit
*/
@ -612,49 +613,56 @@ WebrtcAudioConduit::ConfigureRecvMediaCodecs(
}
MediaConduitErrorCode
WebrtcAudioConduit::EnableAudioLevelExtension(bool aEnabled,
uint8_t aId,
bool aDirectionIsSend,
bool aLevelIsSsrc)
WebrtcAudioConduit::SetLocalRTPExtensions(LocalDirection aDirection,
const RtpExtList& extensions)
{
CSFLogDebug(LOGTAG, "%s %d %d %d", __FUNCTION__, aEnabled, aId,
aDirectionIsSend);
bool ret;
if (aDirectionIsSend) {
if (!aLevelIsSsrc) {
CSFLogError(LOGTAG,
"%s SetSendAudioLevelIndicationStatus Failed"
CSFLogDebug(LOGTAG, "%s direction: %s", __FUNCTION__,
MediaSessionConduit::LocalDirectionToString(aDirection).c_str());
bool isSend = aDirection == LocalDirection::kSend;
constexpr bool kEnableExt = true;
constexpr bool kSsrcLevel = true;
constexpr bool kCsrcLevel = false;
for(const auto& extension : extensions) {
int ret = 0;
// ssrc-audio-level RTP header extension
if (extension.uri == webrtc::RtpExtension::kAudioLevelUri) {
if (isSend) {
ret = mPtrVoERTP_RTCP->SetSendAudioLevelIndicationStatus(mChannel,
kEnableExt,
extension.id);
} else {
ret = mPtrRTP->SetReceiveAudioLevelIndicationStatus(mChannel,
kEnableExt,
extension.id,
kSsrcLevel);
}
}
// csrc-audio-level RTP header extension
if (extension.uri == webrtc::RtpExtension::kCsrcAudioLevelUri) {
if (isSend) {
CSFLogError(LOGTAG, "%s SetSendAudioLevelIndicationStatus Failed"
" can not send CSRC audio levels.", __FUNCTION__);
return kMediaConduitMalformedArgument;
}
ret = mPtrVoERTP_RTCP->SetSendAudioLevelIndicationStatus(mChannel,
aEnabled,
aId) == -1;
} else {
ret = mPtrRTP->SetReceiveAudioLevelIndicationStatus(mChannel,
aEnabled,
aId,
aLevelIsSsrc) == -1;
kEnableExt,
extension.id,
kCsrcLevel);
}
if (ret) {
CSFLogError(LOGTAG, "%s SetSendAudioLevelIndicationStatus Failed", __FUNCTION__);
// MID RTP header extension
if (aDirection == LocalDirection::kSend &&
extension.uri == webrtc::RtpExtension::kMIdUri) {
ret = mPtrVoERTP_RTCP->SetSendMIDStatus(mChannel, kEnableExt,
extension.id);
}
// Handle errors
if (ret == -1) {
CSFLogError(LOGTAG, "Failed %s setting extension %s with id %d",
__FUNCTION__, extension.uri.c_str(),
static_cast<int>(extension.id));
return kMediaConduitUnknownError;
}
return kMediaConduitNoError;
}
MediaConduitErrorCode
WebrtcAudioConduit::EnableMIDExtension(bool enabled, uint8_t id)
{
CSFLogDebug(LOGTAG, "%s %d %d ", __FUNCTION__, enabled, id);
if (mPtrVoERTP_RTCP->SetSendMIDStatus(mChannel, enabled, id) == -1)
{
CSFLogError(LOGTAG, "%s SetSendMIDStatus Failed", __FUNCTION__);
return kMediaConduitUnknownError;
}
return kMediaConduitNoError;
}

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

@ -97,12 +97,8 @@ public:
const std::vector<AudioCodecConfig* >& codecConfigList) override;
MediaConduitErrorCode
EnableAudioLevelExtension(bool aEnabled,
uint8_t aId,
bool aDirectionIsSend,
bool aLevelIsSsrc = true) override;
virtual MediaConduitErrorCode EnableMIDExtension(bool enabled, uint8_t id) override;
SetLocalRTPExtensions(MediaSessionConduitLocalDirection aDirection,
const RtpExtList& extensions) override;
/**
* Register External Transport to this Conduit. RTP and RTCP frames from the VoiceEngine

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

@ -34,6 +34,11 @@ class VideoFrame;
namespace mozilla {
enum class MediaSessionConduitLocalDirection : int {
kSend,
kRecv
};
using RtpExtList = std::vector<webrtc::RtpExtension>;
// Wrap the webrtc.org Call class adding mozilla add/ref support.
@ -182,6 +187,12 @@ protected:
public:
enum Type { AUDIO, VIDEO } ;
static std::string
LocalDirectionToString(const MediaSessionConduitLocalDirection aDirection) {
return aDirection == MediaSessionConduitLocalDirection::kSend ?
"send" : "receive";
}
virtual Type type() const = 0;
/**
@ -241,15 +252,17 @@ public:
virtual std::vector<unsigned int> GetLocalSSRCs() const = 0;
/**
* Adds negotiated RTP extensions
* XXX Move to MediaSessionConduit
* Adds negotiated RTP header extensions to the the conduit. Unknown extensions
* are ignored.
* @param aDirection the local direction to set the RTP header extensions for
* @param aExtensions the RTP header extensions to set
* @return if all extensions were set it returns a success code,
* if an extension fails to set it may immediately return an error code
* TODO webrtc.org 64 update: make return type void again
*/
virtual void
SetLocalRTPExtensions(bool aIsSend, const RtpExtList& extensions) = 0;
/**
* Returns the negotiated RTP extensions
*/
virtual RtpExtList GetLocalRTPExtensions(bool aIsSend) const = 0;
virtual MediaConduitErrorCode
SetLocalRTPExtensions(MediaSessionConduitLocalDirection aDirection,
const RtpExtList& aExtensions) = 0;
virtual bool GetRemoteSSRC(unsigned int* ssrc) = 0;
virtual bool SetRemoteSSRC(unsigned int ssrc) = 0;
@ -357,12 +370,9 @@ public:
Type type() const override { return VIDEO; }
void
SetLocalRTPExtensions(bool aIsSend,
MediaConduitErrorCode
SetLocalRTPExtensions(MediaSessionConduitLocalDirection aDirection,
const RtpExtList& extensions) override = 0;
RtpExtList GetLocalRTPExtensions(bool aIsSend) const override = 0;
/**
* Function to attach Renderer end-point of the Media-Video conduit.
* @param aRenderer : Reference to the concrete Video renderer implementation
@ -461,12 +471,9 @@ public:
Type type() const override { return AUDIO; }
void
SetLocalRTPExtensions(bool aIsSend,
const RtpExtList& extensions) override {};
RtpExtList
GetLocalRTPExtensions(bool aIsSend) const override {return RtpExtList();}
MediaConduitErrorCode
SetLocalRTPExtensions(MediaSessionConduitLocalDirection aDirection,
const RtpExtList& extensions) override = 0;
/**
* Function to deliver externally captured audio sample for encoding and transport
* @param audioData [in]: Pointer to array containing a frame of audio
@ -531,21 +538,6 @@ public:
*/
virtual MediaConduitErrorCode ConfigureRecvMediaCodecs(
const std::vector<AudioCodecConfig* >& recvCodecConfigList) = 0;
/**
* Function to enable the audio level extension
* @param aEnabled: enable extension
* @param aId: the RTP extension header ID to use
* @param aDirectionIsSend: indicates whether to set the extension on the
* sender or the receiver side
* returns an error if the extension could not be set
*/
virtual MediaConduitErrorCode
EnableAudioLevelExtension(bool aEnabled,
uint8_t aId,
bool aDirectionIsSend,
bool aLevelIsSsrc = true) = 0;
virtual MediaConduitErrorCode
EnableMIDExtension(bool enabled, uint8_t id) = 0;
virtual bool SetDtmfPayloadType(unsigned char type, int freq) = 0;

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

@ -76,6 +76,8 @@ static const char* vcLogTag = "WebrtcVideoSessionConduit";
#endif
#define LOGTAG vcLogTag
using LocalDirection = MediaSessionConduitLocalDirection;
static const int kNullPayloadType = -1;
static const char* kUlpFecPayloadName = "ulpfec";
static const char* kRedPayloadName = "red";
@ -320,20 +322,15 @@ WebrtcVideoConduit::~WebrtcVideoConduit()
Destroy();
}
void
WebrtcVideoConduit::SetLocalRTPExtensions(bool aIsSend,
const RtpExtList & aExtensions)
MediaConduitErrorCode
WebrtcVideoConduit::SetLocalRTPExtensions(LocalDirection aDirection,
const RtpExtList& aExtensions)
{
auto& extList = aIsSend ? mSendStreamConfig.rtp.extensions :
auto& extList = aDirection == LocalDirection::kSend ?
mSendStreamConfig.rtp.extensions :
mRecvStreamConfig.rtp.extensions;
extList = aExtensions;
}
RtpExtList
WebrtcVideoConduit::GetLocalRTPExtensions(bool aIsSend) const
{
return aIsSend ? mSendStreamConfig.rtp.extensions :
mRecvStreamConfig.rtp.extensions;
return kMediaConduitNoError;
}
bool WebrtcVideoConduit::SetLocalSSRCs(const std::vector<unsigned int> & aSSRCs)

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

@ -78,13 +78,9 @@ public:
//VoiceEngine defined constant for Payload Name Size.
static const unsigned int CODEC_PLNAME_SIZE;
/**
* Add rtp extensions to the the VideoSendStream
*/
void
SetLocalRTPExtensions(bool aIsSend, const RtpExtList& extensions) override;
RtpExtList GetLocalRTPExtensions(bool aIsSend) const override;
MediaConduitErrorCode
SetLocalRTPExtensions(MediaSessionConduitLocalDirection aDirection,
const RtpExtList& aExtensions) override;
/**
* Set up A/V sync between this (incoming) VideoConduit and an audio conduit.

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

@ -32,6 +32,8 @@ namespace mozilla {
MOZ_MTLOG_MODULE("transceiverimpl")
using LocalDirection = MediaSessionConduitLocalDirection;
TransceiverImpl::TransceiverImpl(
const std::string& aPCHandle,
JsepTransceiver* aJsepTransceiver,
@ -727,36 +729,7 @@ TransceiverImpl::UpdateAudioConduit()
" ConfigureRecvMediaCodecs failed: " << error);
return NS_ERROR_FAILURE;
}
const SdpExtmapAttributeList::Extmap* audioLevelExt =
details.GetExt(webrtc::RtpExtension::kAudioLevelUri);
if (audioLevelExt) {
MOZ_MTLOG(ML_DEBUG, "Calling EnableAudioLevelExtension");
error = conduit->EnableAudioLevelExtension(true,
audioLevelExt->entry,
false);
if (error) {
MOZ_MTLOG(ML_ERROR, mPCHandle << "[" << mMid << "]: " << __FUNCTION__ <<
" EnableAudioLevelExtension failed: " << error);
return NS_ERROR_FAILURE;
}
}
const SdpExtmapAttributeList::Extmap* csrcAudioLevelExt =
details.GetExt(webrtc::RtpExtension::kCsrcAudioLevelUri);
if (csrcAudioLevelExt) {
MOZ_MTLOG(ML_DEBUG, "Calling EnableAudioLevelExtension for CSRCs");
error = conduit->EnableAudioLevelExtension(true,
csrcAudioLevelExt->entry,
false,
false);
if (error) {
MOZ_MTLOG(ML_ERROR, mPCHandle << "[" << mMid << "]: " << __FUNCTION__ <<
" EnableAudioLevelExtension for CSRCs failed: " << error);
return NS_ERROR_FAILURE;
}
}
UpdateConduitRtpExtmap(details, LocalDirection::kRecv);
}
if (mJsepTransceiver->mSendTrack.GetNegotiatedDetails() &&
@ -787,36 +760,7 @@ TransceiverImpl::UpdateAudioConduit()
" ConfigureSendMediaCodec failed: " << error);
return NS_ERROR_FAILURE;
}
// Should these be genericized like they are in the video conduit case?
const SdpExtmapAttributeList::Extmap* audioLevelExt =
details.GetExt(webrtc::RtpExtension::kAudioLevelUri);
if (audioLevelExt) {
MOZ_MTLOG(ML_DEBUG, "Calling EnableAudioLevelExtension");
error = conduit->EnableAudioLevelExtension(true,
audioLevelExt->entry,
true);
if (error) {
MOZ_MTLOG(ML_ERROR, mPCHandle << "[" << mMid << "]: " << __FUNCTION__ <<
" EnableAudioLevelExtension failed: " << error);
return NS_ERROR_FAILURE;
}
}
const SdpExtmapAttributeList::Extmap* midExt =
details.GetExt(webrtc::RtpExtension::kMIdUri);
if (midExt) {
MOZ_MTLOG(ML_DEBUG, "Calling EnableMIDExtension");
error = conduit->EnableMIDExtension(true, midExt->entry);
if (error) {
MOZ_MTLOG(ML_ERROR, "EnableMIDExtension failed: " << error);
return NS_ERROR_FAILURE;
}
}
UpdateConduitRtpExtmap(details, LocalDirection::kSend);
}
return NS_OK;
@ -923,7 +867,7 @@ TransceiverImpl::UpdateVideoConduit()
mJsepTransceiver->mRecvTrack.GetActive()) {
const auto& details(*mJsepTransceiver->mRecvTrack.GetNegotiatedDetails());
UpdateVideoExtmap(details, false);
UpdateConduitRtpExtmap(details, LocalDirection::kRecv);
PtrVector<VideoCodecConfig> configs;
nsresult rv = NegotiatedDetailsToVideoCodecConfigs(details, &configs);
@ -952,7 +896,7 @@ TransceiverImpl::UpdateVideoConduit()
mSendTrack) {
const auto& details(*mJsepTransceiver->mSendTrack.GetNegotiatedDetails());
UpdateVideoExtmap(details, true);
UpdateConduitRtpExtmap(details, LocalDirection::kSend);
nsresult rv = ConfigureVideoCodecMode(*conduit);
if (NS_FAILED(rv)) {
@ -1020,8 +964,8 @@ TransceiverImpl::ConfigureVideoCodecMode(VideoSessionConduit& aConduit)
}
void
TransceiverImpl::UpdateVideoExtmap(const JsepTrackNegotiatedDetails& aDetails,
bool aSending)
TransceiverImpl::UpdateConduitRtpExtmap(const JsepTrackNegotiatedDetails& aDetails,
const LocalDirection aDirection)
{
std::vector<webrtc::RtpExtension> extmaps;
// @@NG read extmap from track
@ -1035,7 +979,7 @@ TransceiverImpl::UpdateVideoExtmap(const JsepTrackNegotiatedDetails& aDetails,
mConduit.get());
if (!extmaps.empty()) {
conduit->SetLocalRTPExtensions(aSending, extmaps);
conduit->SetLocalRTPExtensions(aDirection, extmaps);
}
}

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

@ -21,8 +21,10 @@ namespace mozilla {
class PeerIdentity;
class PeerConnectionMedia;
class JsepTransceiver;
enum class MediaSessionConduitLocalDirection : int;
class MediaSessionConduit;
class VideoSessionConduit;
class AudioSessionConduit;
class MediaPipelineReceive;
class MediaPipelineTransmit;
class MediaPipeline;
@ -132,9 +134,8 @@ private:
nsresult UpdateAudioConduit();
nsresult UpdateVideoConduit();
nsresult ConfigureVideoCodecMode(VideoSessionConduit& aConduit);
// This will eventually update audio extmap too
void UpdateVideoExtmap(const JsepTrackNegotiatedDetails& aDetails,
bool aSending);
void UpdateConduitRtpExtmap(const JsepTrackNegotiatedDetails& aDetails,
const MediaSessionConduitLocalDirection aDir);
void Stop();
const std::string mPCHandle;

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

@ -16,6 +16,9 @@ with Files('LEGAL'):
with Files('aclocal.m4'):
BUG_COMPONENT = ('Core', 'Build Config')
with Files('Cargo.*'):
BUG_COMPONENT = ('Core', 'Build Config')
with Files('client.*'):
BUG_COMPONENT = ('Core', 'Build Config')

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

@ -531,52 +531,6 @@ class TreeMetadataEmitter(LoggingMixin):
'crate-type %s is not permitted for %s' % (crate_type, libname),
context)
# Check that the [profile.{dev,release}.panic] field is "abort"
profile_section = config.get('profile', None)
if not profile_section:
raise SandboxValidationError(
'Cargo.toml for %s has no [profile] section' % libname,
context)
for profile_name in ['dev', 'release']:
profile = profile_section.get(profile_name, None)
if not profile:
raise SandboxValidationError(
'Cargo.toml for %s has no [profile.%s] section' % (libname, profile_name),
context)
panic = profile.get('panic', None)
if panic != 'abort':
raise SandboxValidationError(
('Cargo.toml for %s does not specify `panic = "abort"`'
' in [profile.%s] section') % (libname, profile_name),
context)
# gkrust and gkrust-gtest must have the exact same profile settings
# for our almost-workspaces configuration to work properly.
if libname in ('gkrust', 'gkrust-gtest'):
if profile_name == 'dev':
expected_profile = {
'opt-level': 1,
'rpath': False,
'lto': False,
'debug-assertions': True,
'panic': 'abort',
}
else:
expected_profile = {
'opt-level': 2,
'rpath': False,
'debug-assertions': False,
'panic': 'abort',
'codegen-units': 1,
}
if profile != expected_profile:
raise SandboxValidationError(
'Cargo profile.%s for %s is incorrect' % (profile_name, libname),
context)
cargo_target_dir = context.get('RUST_LIBRARY_TARGET_DIR', '.')
dependencies = set(config.get('dependencies', {}).iterkeys())

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

@ -1,12 +0,0 @@
[package]
name = "random-crate"
version = "0.1.0"
authors = [
"Nobody <nobody@mozilla.org>",
]
[lib]
crate-type = ["staticlib"]
[profile.release]
panic = "abort"

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

@ -1,18 +0,0 @@
# Any copyright is dedicated to the Public Domain.
# http://creativecommons.org/publicdomain/zero/1.0/
@template
def Library(name):
'''Template for libraries.'''
LIBRARY_NAME = name
@template
def RustLibrary(name):
'''Template for Rust libraries.'''
Library(name)
IS_RUST_LIBRARY = True
RustLibrary('random-crate')

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

@ -1,14 +0,0 @@
[package]
name = "random-crate"
version = "0.1.0"
authors = [
"Nobody <nobody@mozilla.org>",
]
[lib]
crate-type = ["staticlib"]
[profile.dev]
panic = "unwind"
[profile.release]

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

@ -1,18 +0,0 @@
# Any copyright is dedicated to the Public Domain.
# http://creativecommons.org/publicdomain/zero/1.0/
@template
def Library(name):
'''Template for libraries.'''
LIBRARY_NAME = name
@template
def RustLibrary(name):
'''Template for Rust libraries.'''
Library(name)
IS_RUST_LIBRARY = True
RustLibrary('random-crate')

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

@ -1415,13 +1415,6 @@ class TestEmitterBasic(unittest.TestCase):
'Cargo.toml for.* has no \\[lib\\] section'):
self.read_topsrcdir(reader)
def test_rust_library_no_profile_section(self):
'''Test that a RustLibrary Cargo.toml with no [profile] section fails.'''
reader = self.reader('rust-library-no-profile-section')
with self.assertRaisesRegexp(SandboxValidationError,
'Cargo.toml for.* has no \\[profile\\.dev\\] section'):
self.read_topsrcdir(reader)
def test_rust_library_invalid_crate_type(self):
'''Test that a RustLibrary Cargo.toml has a permitted crate-type.'''
reader = self.reader('rust-library-invalid-crate-type')
@ -1429,13 +1422,6 @@ class TestEmitterBasic(unittest.TestCase):
'crate-type.* is not permitted'):
self.read_topsrcdir(reader)
def test_rust_library_non_abort_panic(self):
'''Test that a RustLibrary Cargo.toml has `panic = "abort" set'''
reader = self.reader('rust-library-non-abort-panic')
with self.assertRaisesRegexp(SandboxValidationError,
'does not specify `panic = "abort"`'):
self.read_topsrcdir(reader)
def test_rust_library_dash_folding(self):
'''Test that on-disk names of RustLibrary objects convert dashes to underscores.'''
reader = self.reader('rust-library-dash-folding',

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

@ -266,24 +266,12 @@ license file's hash.
mozfile.remove(vendor_dir)
# Once we require a new enough cargo to switch to workspaces, we can
# just do this once on the workspace root crate.
crates_and_roots = (
('gkrust', 'toolkit/library/rust'),
('gkrust-gtest', 'toolkit/library/gtest/rust'),
('js', 'js/rust'),
('mozjs_sys', 'js/src'),
('geckodriver', 'testing/geckodriver'),
)
lockfiles = []
for (lib, crate_root) in crates_and_roots:
path = mozpath.join(self.topsrcdir, crate_root)
# We use check_call instead of mozprocess to ensure errors are displayed.
# We do an |update -p| here to regenerate the Cargo.lock file with minimal changes. See bug 1324462
subprocess.check_call([cargo, 'update', '--manifest-path', mozpath.join(path, 'Cargo.toml'), '-p', lib], cwd=self.topsrcdir)
lockfiles.append('--sync')
lockfiles.append(mozpath.join(path, 'Cargo.lock'))
subprocess.check_call([cargo, 'update', '-p', 'gkrust'], cwd=self.topsrcdir)
subprocess.check_call([cargo, 'vendor', '--quiet', '--no-delete'] + lockfiles + [vendor_dir], cwd=self.topsrcdir)
subprocess.check_call([cargo, 'vendor', '--quiet', '--no-delete', '--sync', 'Cargo.lock'] + [vendor_dir], cwd=self.topsrcdir)
if not self._check_licenses(vendor_dir):
self.log(logging.ERROR, 'license_check_failed', {},

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

@ -1008,6 +1008,7 @@ static const TransportSecurityPreload kPublicKeyPinningPreloadList[] = {
{ "goto.google.com", true, false, false, -1, &kPinset_google_root_pems },
{ "gr.search.yahoo.com", false, true, false, -1, &kPinset_yahoo },
{ "groups.google.com", true, false, false, -1, &kPinset_google_root_pems },
{ "gstatic.cn", true, false, false, -1, &kPinset_google_root_pems },
{ "gstatic.com", true, false, false, -1, &kPinset_google_root_pems },
{ "gvt1.com", true, false, false, -1, &kPinset_google_root_pems },
{ "gvt2.com", true, false, false, -1, &kPinset_google_root_pems },
@ -1158,8 +1159,8 @@ static const TransportSecurityPreload kPublicKeyPinningPreloadList[] = {
{ "zh.search.yahoo.com", false, true, false, -1, &kPinset_yahoo },
};
// Pinning Preload List Length = 484;
// Pinning Preload List Length = 485;
static const int32_t kUnknownId = -1;
static const PRTime kPreloadPKPinsExpirationTime = INT64_C(1528401564528000);
static const PRTime kPreloadPKPinsExpirationTime = INT64_C(1528491279168000);

Разница между файлами не показана из-за своего большого размера Загрузить разницу

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

@ -8,7 +8,7 @@
/*****************************************************************************/
#include <stdint.h>
const PRTime gPreloadListExpirationTime = INT64_C(1530820751850000);
const PRTime gPreloadListExpirationTime = INT64_C(1530910464714000);
%%
0-1.party, 1
0.me.uk, 1
@ -490,7 +490,6 @@ const PRTime gPreloadListExpirationTime = INT64_C(1530820751850000);
555xl.com, 1
558da.com, 1
55scc.com, 1
57aromas.com, 1
57he.com, 1
598598598.net, 1
5apps.com, 1
@ -1553,7 +1552,6 @@ allesisonline.nl, 1
alleskomtgoed.org, 1
allesrocknroll.de, 1
allforyou.at, 1
allfreelancers.su, 1
allgrass.net, 1
allgreenturf.com.au, 1
alliances-faq.de, 1
@ -2037,6 +2035,7 @@ annuaire-photographe.fr, 0
anohana.org, 1
anojan.com, 1
anon-next.de, 1
anonboards.com, 1
anoncom.net, 1
anoneko.com, 1
anongoth.pl, 1
@ -2187,12 +2186,12 @@ apisyouwonthate.com, 1
apk.li, 1
apk4fun.com, 1
apkoyunlar.club, 1
apkriver.com, 1
apl2bits.net, 1
aplikaceproandroid.cz, 1
aplis-online.de, 0
aplpackaging.co.uk, 1
aplu.fr, 1
apm.com.tw, 1
apmpproject.org, 1
apn-dz.org, 1
apn-einstellungen.de, 1
@ -2908,6 +2907,7 @@ avid.blue, 1
avietech.com, 1
aviv.nyc, 1
avmemo.com, 1
avmo.pw, 1
avmoo.com, 1
avnet.ws, 1
avocode.com, 1
@ -2915,6 +2915,7 @@ avonlearningcampus.com, 1
avotoma.com, 1
avova.de, 1
avpres.net, 1
avso.pw, 1
avsox.com, 1
avspot.net, 1
avticket.ru, 0
@ -2922,6 +2923,7 @@ avtoforex.ru, 1
avtogara-isperih.com, 1
avtovokzaly.ru, 1
avvcorda.com, 1
avxo.pw, 1
awan.tech, 1
awaremi-tai.com, 1
awaro.net, 1
@ -3036,7 +3038,6 @@ b8591.com, 1
b8591.net, 1
b8979.com, 1
b8979.net, 1
b8a.me, 1
b9018.com, 1
b9018.net, 1
b9108.com, 1
@ -4403,6 +4404,7 @@ blogreen.org, 1
blogtroterzy.pl, 1
bloodsports.org, 1
bloodyexcellent.com, 1
bloom-avenue.com, 1
bltc.co.uk, 1
bltc.com, 1
bltc.net, 1
@ -4943,7 +4945,6 @@ brentacampbell.com, 1
brentnewbury.com, 1
bressier.fr, 1
bretcarmichael.com, 1
brettabel.com, 1
brettcornwall.com, 1
brettelliff.com, 1
bretz-hufer.de, 1
@ -5095,6 +5096,7 @@ btcontract.com, 1
btcp.space, 1
btcpop.co, 1
btcycle.org, 1
btio.pw, 1
btku.org, 1
btmstore.com.br, 1
btnissanparts.com, 1
@ -5232,7 +5234,6 @@ bushcraftfriends.com, 1
busindre.com, 1
business-garden.com, 1
business.facebook.com, 0
businessadviceperth.com.au, 1
businessamongus.com, 1
businesscentermarin.ch, 1
businessesdirectory.eu, 1
@ -5774,7 +5775,6 @@ catalyst-ecommerce.com, 0
catbold.space, 1
catbull.com, 1
catburton.co.uk, 1
catchers.cc, 1
catchersgear.com, 1
catchfotografie.nl, 1
catchief.com, 1
@ -6484,7 +6484,7 @@ cirugiasplasticas.com.mx, 1
cirujanooral.com, 1
cirurgicagervasio.com.br, 1
cirurgicalucena.com.br, 1
ciscodude.net, 1
ciscodude.net, 0
cisoaid.com, 1
ciss.ltd, 1
cisy.me, 1
@ -7365,7 +7365,6 @@ coupe-bordure.com, 1
couponcodesme.com, 1
cour4g3.me, 1
couragefound.org, 1
courageousparentsnetwork.org, 1
course.pp.ua, 1
coursera.org, 1
courses.nl, 1
@ -7469,6 +7468,7 @@ creative-wave.fr, 1
creativebites.de, 1
creativecaptiv.es, 1
creativecommons.cl, 1
creativecommons.gr, 1
creativecommons.org, 1
creativecommonscatpictures.com, 1
creativeconceptsvernon.com, 1
@ -7777,7 +7777,6 @@ customshort.link, 1
customwritings.com, 1
customwritingservice.com, 1
customwritten.com, 1
cutelariafiveladeouro.com.br, 1
cutephil.com, 1
cutimbo.ovh, 1
cutner.co, 1
@ -8280,7 +8279,6 @@ dc562.org, 1
dc585.info, 1
dcards.in.th, 1
dcautomacao.com.br, 1
dcbouncycastles.co.uk, 1
dcc.cat, 1
dcc.moe, 1
dcepler.net, 1
@ -8290,6 +8288,7 @@ dckd.nl, 1
dcl.re, 1
dclaisse.fr, 1
dcmt.co, 1
dcpower.eu, 1
dcrdev.com, 1
dd.art.pl, 1
ddel.de, 1
@ -9662,7 +9661,6 @@ dustygroove.com, 1
dustyspokesbnb.ca, 1
dutch.desi, 1
dutch1.nl, 1
dutchessuganda.com, 1
dutchrank.nl, 1
dutchwanderers.nl, 1
dutchweballiance.nl, 1
@ -10003,6 +10001,7 @@ edzilla.info, 1
ee-terminals.com, 1
eeb98.com, 1
eeetrust.org, 1
eellak.gr, 1
eelsden.net, 1
eelzak.nl, 1
eeqj.com, 1
@ -10105,7 +10104,6 @@ ejdv-anmeldung.de, 1
ejeff.org, 1
ejgconsultancy.co.uk, 1
ejuicelab.co.uk, 1
ejusu.com, 1
ek-networks.de, 1
ek.network, 1
ekaigotenshoku.com, 1
@ -12393,7 +12391,6 @@ freemanning.de, 1
freemans.com, 1
freemedforms.com, 1
freemyipod.org, 1
freend.me, 0
freenetproject.org, 1
freeonplate.com, 1
freepnglogos.com, 1
@ -13848,7 +13845,6 @@ gst.priv.at, 1
gt-mp.net, 1
gt-network.de, 1
gta-arabs.com, 1
gta5voice.net, 1
gtaforum.nl, 1
gtalife.net, 1
gtchipsi.org, 1
@ -14865,6 +14861,7 @@ holzschutz-holzbearbeitung.de, 1
holzspielzeug-shop.ch, 1
holzundgarten.de, 1
holzvergaser-forum.de, 1
homa.website, 0
homatism.com, 1
home-cloud.online, 1
home-v.ind.in, 1
@ -17095,6 +17092,7 @@ jonathancarter.org, 1
jonathandowning.uk, 1
jonathandupree.com, 1
jonathanha.as, 1
jonathanj.nl, 1
jonathanmassacand.ch, 1
jonathansanchez.pro, 1
jonathanschle.de, 1
@ -17638,6 +17636,7 @@ kazu.click, 1
kazuhirohigashi.com, 1
kazumi.ro, 1
kazy111.info, 1
kb3.net, 1
kba-online.de, 1
kbb-ev.de, 1
kbbouncycastlehire.co.uk, 1
@ -17763,7 +17762,6 @@ kettner.com, 1
ketty-voyance.com, 1
kevinapease.com, 1
kevinbowers.me, 1
kevinbusse.de, 1
kevincox.ca, 0
kevindekoninck.com, 0
kevinfoley.cc, 1
@ -18608,7 +18606,6 @@ lamakat.de, 1
lamapoll.de, 1
lambauer.com, 1
lamboo.be, 1
lamereabizix.com, 1
lamiaposta.email, 0
laminine.info, 1
lampegiganten.dk, 1
@ -20223,6 +20220,7 @@ mammaw.com, 1
mammeitalianeavienna.com, 1
mammooc.org, 1
mamochka.org.ua, 1
mamospienas.lt, 1
mamot.fr, 0
mamout.xyz, 1
mamuko.nl, 1
@ -20829,7 +20827,6 @@ medicinia.com.br, 1
medicinskavranje.edu.rs, 1
medicocompetente.it, 1
medicoresponde.com.br, 1
medifab.online, 1
medifi.com, 1
medinside.ch, 1
medinside.li, 1
@ -21810,7 +21807,6 @@ moshwire.com, 1
mosin.org, 1
moskeedieren.nl, 1
moskva.guide, 1
moso.io, 1
mosos.de, 1
mosscade.com, 1
mosstier.com, 1
@ -21835,6 +21831,7 @@ motoroilinfo.com, 1
motorpointarenacardiff.co.uk, 1
motorring.ru, 1
motorsplus.com, 0
motorsportdiesel.com, 1
motoryachtclub-radolfzell.de, 1
motosikletevi.com, 1
motostorie.blog, 0
@ -21937,7 +21934,6 @@ mrliu.me, 1
mrmoregame.de, 1
mrnh.de, 1
mrnh.tk, 1
mrparker.pw, 1
mrpropop.com, 1
mrs-labo.jp, 1
mrserge.lv, 1
@ -22233,6 +22229,7 @@ mydna.bio, 1
mydocserve.com, 1
mydreamlifelab.com, 1
myeberspaecher.com, 1
myeffect.today, 1
myepass.bg, 1
myepass.de, 1
myessaygeek.com, 1
@ -22332,14 +22329,13 @@ myprintcard.de, 1
myproblog.com, 1
myptsite.com, 1
mypup.nl, 1
myqdu.cn, 1
myrandomtips.com, 1
myranicol.com, 1
myrealestatemate.com.au, 1
myref.net, 1
myrekber.co.id, 1
myrent.quebec, 1
myrepublic.co.id, 0
myrepublic.co.id, 1
myresearchapp.com, 1
myrewardspoints.com, 1
myriadof.com, 1
@ -22504,7 +22500,6 @@ nanarose.ch, 1
nanch.com, 1
nanderson.me, 1
nanfangstone.com, 1
nani.io, 1
nankiseamansclub.com, 1
nanogi.ga, 1
nanotechnologist.com, 1
@ -23301,7 +23296,6 @@ noordsee.de, 1
noorsolidarity.com, 1
nootropic.com, 1
noovell.com, 1
nopaste.xyz, 1
nopaynocure.com, 1
norad.sytes.net, 1
nord-sud.be, 1
@ -23837,7 +23831,6 @@ omranic.com, 1
omronwellness.com, 1
omsdieppe.fr, 1
on-tech.co.uk, 1
ona.io, 1
onaboat.se, 1
onahonavi.com, 1
onarto.com, 1
@ -23964,7 +23957,6 @@ op11.co.uk, 0
opalesurfcasting.net, 1
oparl.org, 1
opatut.de, 1
opcaobolsas.com.br, 1
opcenter.de, 1
ope.ee, 1
open-bs.com, 1
@ -23976,6 +23968,7 @@ open-infrastructure.net, 1
open-letters.de, 1
open-mesh.org, 1
open-sauce-recipes.co.uk, 1
open-source.gr, 1
open.gl, 1
openacademies.com, 1
openacte.ch, 1
@ -24023,12 +24016,12 @@ opentuition.com, 1
openverse.com, 1
openvz.org, 1
openwaveguide.de, 1
openwifi.gr, 1
openwireless.org, 1
operad.fr, 1
operationforever.com, 1
opfin.com, 1
opiates.ca, 1
opiates.net, 1
opic.gov, 1
opin.me, 1
opinion8td.com, 1
@ -24630,7 +24623,6 @@ patriaco.net, 1
patric-lenhart.de, 1
patrick-othmer.de, 1
patrick-robrecht.de, 1
patrick.dark.name, 1
patrickaudley.ca, 1
patrickaudley.com, 1
patrickbrosi.de, 1
@ -24938,7 +24930,6 @@ peterhuetz.at, 1
peterhuetz.com, 1
peterjohnson.io, 1
peterlew.is, 1
peternagy.ie, 1
petersontoscano.com, 1
pethelpers.org, 1
petit-archer.com, 1
@ -25477,7 +25468,6 @@ pn.id.lv, 1
pneu01.fr, 1
pneu74.fr, 1
pneuhaus-lemp.ch, 1
pneusgppremium.com.br, 1
pnimmobilier.ch, 1
pnmhomecheckup.com, 1
pnona.cz, 1
@ -25877,7 +25867,6 @@ primorus.lt, 1
primotilesandbathrooms.co.uk, 1
princeagency.com, 1
princeofwhales.com, 1
princesparktouch.com, 1
princessbackpack.de, 1
princessmargaretlotto.com, 1
principalstest.com, 1
@ -26364,7 +26353,6 @@ qifu.me, 1
qifu.org.cn, 1
qikan.net, 1
qiliang.wang, 1
qimiao.io, 1
qingpat.com, 1
qingpei.me, 1
qionouu.cn, 1
@ -27034,6 +27022,7 @@ rene-schwarz.com, 1
rene-stolp.de, 1
renearends.nl, 1
reneleu.ch, 1
renem.net, 0
renemayrhofer.com, 1
renerehelse.no, 0
reneschmidt.de, 1
@ -27052,6 +27041,7 @@ rentasweb.gob.ar, 1
rentbrowser.com, 1
rentinsingapore.com.sg, 1
rentourhomeinprovence.com, 1
renuo.ch, 1
reorz.com, 1
reox.at, 0
repaik.com, 1
@ -27075,6 +27065,7 @@ reprogrammingpredators.com, 1
reprozip.org, 1
repsomelt.com, 1
reptrax.com, 1
republic.gr, 1
republique.org, 1
repugnant-conclusion.com, 1
repugnantconclusion.com, 1
@ -27174,7 +27165,6 @@ reviewninja.net, 1
reviews.anime.my, 0
revision.co.zw, 1
revisionnotes.xyz, 1
revistapequenosolhares.com.br, 1
revivalinhisword.com, 1
revivingtheredeemed.org, 1
revlect.com, 1
@ -27463,6 +27453,7 @@ roelsworld.eu, 1
roemhild.de, 1
roerstaafjes.nl, 1
roessner-network-solutions.com, 0
roffe.nu, 1
rofl.com.ua, 1
roflcopter.fr, 1
rofrank.space, 1
@ -27742,7 +27733,6 @@ rullzer.com, 1
rulu.co, 1
rulu.tv, 1
rulutv.com, 1
rumlager.de, 1
rummel-platz.de, 1
rumplesinflatables.co.uk, 1
rumtaste.com, 1
@ -28417,6 +28407,7 @@ script.google.com, 1
scriptgates.ru, 1
scripthost.org, 1
scriptjunkie.us, 1
scriptum.gr, 1
scrisulfacebine.ro, 1
scruffymen.com, 0
scrumbleship.com, 1
@ -28591,6 +28582,7 @@ securityinet.com, 0
securitykey.co, 1
securitymap.wiki, 1
securitypluspro.com, 1
securityprimes.in, 1
securitysnobs.com, 0
securitysoapbox.com, 1
securitystrata.com, 1
@ -29713,7 +29705,6 @@ smit.com.ua, 1
smith.is, 1
smithandcanova.co.uk, 0
sml.lc, 1
smm.im, 1
smoo.st, 1
smoothgesturesplus.com, 1
smoothics.at, 1
@ -29824,7 +29815,6 @@ social-events.net, 0
social-media-strategies.it, 1
socialdevelop.biz, 0
socialdj.de, 1
socialhams.net, 1
socialmedia.ro, 1
socialnitro.com, 1
socialnous.co, 1
@ -30224,6 +30214,7 @@ spotlightsrule.com, 1
spotrebitelskecentrum.sk, 1
spottedpenguin.co.uk, 1
spotupload.com, 1
spr.id.au, 1
sprachfreudehoch3.de, 1
spreadsheets.google.com, 1
spreadthenews.eu, 1
@ -30891,6 +30882,7 @@ sundayfundayjapan.com, 1
suneilpatel.com, 1
sunfeathers.net, 1
sunfireshop.com.br, 1
sunflyer.cn, 0
sunfox.cz, 1
sunfulong.blog, 1
sunfulong.me, 1
@ -31053,6 +31045,7 @@ sweetair.com, 1
sweetgood.de, 1
sweetlegs.jp, 1
sweetll.me, 0
sweets-mimatsu.com, 1
sweetvanilla.jp, 1
swehack.org, 1
sweharris.org, 1
@ -31374,7 +31367,6 @@ tavolaquadrada.com.br, 1
tavsys.net, 1
taxaroo.com, 1
taxaudit.com, 1
taxi-24std.de, 1
taxi-chamonix.fr, 1
taxi-collectif.ch, 1
taxicollectif.ch, 1
@ -32202,6 +32194,7 @@ thw-bernburg.de, 1
thxandbye.de, 1
thyngster.com, 1
thynx.io, 1
thzone.net, 1
ti-js.com, 1
ti-pla.net, 1
ti-planet.org, 1
@ -32469,6 +32462,7 @@ todocracy.com, 1
todoescine.com, 1
todoist.com, 1
todon.fr, 1
todoscomciro.com, 1
todosrv.com, 1
toeglhofer.at, 1
toeightycountries.com, 1
@ -32902,7 +32896,6 @@ trauertexte.info, 1
traut.cloud, 1
travador.com, 1
travaux-toiture-idf.fr, 1
travel-dealz.de, 1
travel-to-nature.ch, 1
travel1x1.com, 1
travel365.it, 1
@ -33948,7 +33941,6 @@ vekenz.com, 1
velasense.com, 1
velen.io, 1
velonustraduction.com, 1
velotyretz.fr, 1
venalytics.com, 1
venclave.com, 1
vendigital.com, 1
@ -34622,7 +34614,6 @@ watertrails.io, 1
waterworkscondos.com, 1
watoo.tech, 1
watsonwork.me, 1
wattechweb.com, 1
wave-ola.es, 1
wave.is, 1
wavesboardshop.com, 1
@ -35204,7 +35195,6 @@ wills.co.tt, 1
willstamper.name, 1
willywangstory.com, 1
willywangstory.com.tw, 1
willywangstory.org, 1
wiloca.it, 1
wilseyrealty.com, 1
wilsonovi.com, 1
@ -35919,7 +35909,6 @@ xn--sz8h.ml, 1
xn--t-oha.lv, 1
xn--t8j2a3042d.xyz, 1
xn--t8j4aa4nkg1h9bwcvud.com, 1
xn--t8j4aa4nyhxa7duezbl49aqg5546e264d.net, 1
xn--t8j4aa4nzg3a5euoxcwee.xyz, 1
xn--tda.ml, 1
xn--thorme-6uaf.ca, 1
@ -36278,7 +36267,6 @@ youtous.me, 1
youtsuu-raku.com, 1
youtube.com, 1
youtubedownloader.com, 1
youtubeviews.ml, 1
youwatchporn.com, 1
yoxall.me.uk, 1
yoyoost.duckdns.org, 1
@ -36687,7 +36675,6 @@ zorium.org, 1
zorki.nl, 1
zorntt.fr, 1
zorz.info, 1
zotero.org, 1
zouk.info, 1
zouyaoji.top, 1
zravypapir.cz, 1
@ -36762,7 +36749,6 @@ zyrillezuno.com, 1
zyul.ddns.net, 1
zyx.im, 0
zyzardx.com, 1
zzpd.nl, 1
zzsec.org, 1
zzw.ca, 1
%%

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

@ -135,4 +135,4 @@ pref("security.cert_pinning.max_max_age_seconds", 5184000);
// 0: No distrust policies enforced
// 1: Symantec root distrust policy enforced
// See https://wiki.mozilla.org/CA/Upcoming_Distrust_Actions for more details.
pref("security.pki.distrust_ca_policy", 0);
pref("security.pki.distrust_ca_policy", 1);

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

@ -738,6 +738,22 @@ BufferedBookmarksEngine.prototype = {
},
async _createRecord(id) {
let record = await this._doCreateRecord(id);
if (!record.deleted) {
// Set hasDupe on all (non-deleted) records since we don't use it (e.g.
// the buffered engine doesn't), and we want to minimize the risk of older
// clients corrupting records. Note that the SyncedBookmarksMirror sets it
// for all records that it created, but we would like to ensure that
// weakly uploaded records are marked as hasDupe as well.
record.hasDupe = true;
}
return record;
},
async _doCreateRecord(id) {
if (this._needWeakUpload.has(id)) {
return this._store.createRecord(id, this.name);
}
let change = this._modified.changes[id];
if (!change) {
this._log.error("Creating record for item ${id} not in strong " +

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

@ -186,9 +186,15 @@ EngineSynchronizer.prototype = {
// If there were no sync engine failures
if (this.service.status.service != SYNC_FAILED_PARTIAL) {
Svc.Prefs.set("lastSync", new Date().toString());
this.service.status.sync = SYNC_SUCCEEDED;
}
// Even if there were engine failures, bump lastSync even on partial since
// it's reflected in the UI (bug 1439777).
if (this.service.status.service == SYNC_FAILED_PARTIAL ||
this.service.status.service == STATUS_OK) {
Svc.Prefs.set("lastSync", new Date().toString());
}
} finally {
Svc.Prefs.reset("firstSync");

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

@ -8,6 +8,8 @@ var Cm = Components.manager;
ChromeUtils.import("resource://gre/modules/Log.jsm");
ChromeUtils.import("resource://services-common/utils.js");
ChromeUtils.import("resource://testing-common/TestUtils.jsm");
ChromeUtils.import("resource://testing-common/services/sync/utils.js");
const SYNC_HTTP_LOGGER = "Sync.Test.Server";
// While the sync code itself uses 1.5, the tests hard-code 1.1,
@ -145,7 +147,27 @@ ServerWBO.prototype = {
response.setStatusLine(request.httpVersion, statusCode, status);
response.bodyOutputStream.write(body, body.length);
};
}
},
/**
* Get the cleartext data stored in the payload.
*
* This isn't `get cleartext`, because `x.cleartext.blah = 3;` wouldn't work,
* which seems like a footgun.
*/
getCleartext() {
return JSON.parse(JSON.parse(this.payload).ciphertext);
},
/**
* Setter for getCleartext(), but lets you adjust the modified timestamp too.
* Returns this ServerWBO object.
*/
setCleartext(cleartext, modifiedTimestamp = this.modified) {
this.payload = JSON.stringify(encryptPayload(cleartext));
this.modified = modifiedTimestamp;
return this;
},
};
@ -234,9 +256,7 @@ ServerCollection.prototype = {
* @return an array of the payloads of each stored WBO.
*/
payloads() {
return this.wbos().map(function(wbo) {
return JSON.parse(JSON.parse(wbo.payload).ciphertext);
});
return this.wbos().map(wbo => wbo.getCleartext());
},
// Just for syntactic elegance.
@ -248,6 +268,10 @@ ServerCollection.prototype = {
return this.wbo(id).payload;
},
cleartext(id) {
return this.wbo(id).getCleartext();
},
/**
* Insert the provided WBO under its ID.
*
@ -258,6 +282,40 @@ ServerCollection.prototype = {
return this._wbos[wbo.id] = wbo;
},
/**
* Update an existing WBO's cleartext using a callback function that modifies
* the record in place, or returns a new record.
*/
updateRecord(id, updateCallback, optTimestamp) {
let wbo = this.wbo(id);
if (!wbo) {
throw new Error("No record with provided ID");
}
let curCleartext = wbo.getCleartext();
// Allow update callback to either return a new cleartext, or modify in place.
let newCleartext = updateCallback(curCleartext) || curCleartext;
wbo.setCleartext(newCleartext, optTimestamp);
// It is already inserted, but we might need to update our timestamp based
// on it's `modified` value, if `optTimestamp` was provided.
return this.insertWBO(wbo);
},
/**
* Insert a record, which may either an object with a cleartext property, or
* the cleartext property itself.
*/
insertRecord(record, timestamp = Date.now() / 1000) {
if (typeof timestamp != "number") {
throw new TypeError("insertRecord: Timestamp is not a number.");
}
if (!record.id) {
throw new Error("Attempt to insert record with no id");
}
// Allow providing either the cleartext directly, or the CryptoWrapper-like.
let cleartext = record.cleartext || record;
return this.insert(record.id, encryptPayload(cleartext), timestamp);
},
/**
* Insert the provided payload as part of a new ServerWBO with the provided
* ID.

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

@ -66,9 +66,7 @@ async function createBookmark(parentId, url, title, index = bms.DEFAULT_INDEX) {
}
function getServerRecord(collection, id) {
let wbo = collection.get({ full: true, ids: [id] });
// Whew - lots of json strings inside strings.
return JSON.parse(JSON.parse(JSON.parse(JSON.parse(wbo)[0]).payload).ciphertext);
return collection.cleartext(id);
}
async function promiseNoLocalItem(guid) {
@ -166,13 +164,13 @@ add_task(async function test_dupe_bookmark() {
// We should have logically deleted the dupe record.
equal(collection.count(), 7);
ok(getServerRecord(collection, bmk1_guid).deleted);
ok(collection.cleartext(bmk1_guid).deleted);
// and physically removed from the local store.
await promiseNoLocalItem(bmk1_guid);
// Parent should still only have 1 item.
equal((await getFolderChildrenIDs(folder1_id)).length, 1);
// The parent record on the server should now reference the new GUID and not the old.
let serverRecord = getServerRecord(collection, folder1_guid);
let serverRecord = collection.cleartext(folder1_guid);
ok(!serverRecord.children.includes(bmk1_guid));
ok(serverRecord.children.includes(newGUID));
@ -227,7 +225,7 @@ add_task(async function test_dupe_reparented_bookmark() {
// We should have logically deleted the dupe record.
equal(collection.count(), 8);
ok(getServerRecord(collection, bmk1_guid).deleted);
ok(collection.cleartext(bmk1_guid).deleted);
// and physically removed from the local store.
await promiseNoLocalItem(bmk1_guid);
// The original folder no longer has the item
@ -236,12 +234,12 @@ add_task(async function test_dupe_reparented_bookmark() {
equal((await getFolderChildrenIDs(folder2_id)).length, 1);
// The record for folder1 on the server should reference neither old or new GUIDs.
let serverRecord1 = getServerRecord(collection, folder1_guid);
let serverRecord1 = collection.cleartext(folder1_guid);
ok(!serverRecord1.children.includes(bmk1_guid));
ok(!serverRecord1.children.includes(newGUID));
// The record for folder2 on the server should only reference the new new GUID.
let serverRecord2 = getServerRecord(collection, folder2_guid);
let serverRecord2 = collection.cleartext(folder2_guid);
ok(!serverRecord2.children.includes(bmk1_guid));
ok(serverRecord2.children.includes(newGUID));
@ -308,7 +306,7 @@ add_task(async function test_dupe_reparented_locally_changed_bookmark() {
// We should have logically deleted the dupe record.
equal(collection.count(), 8);
ok(getServerRecord(collection, bmk1_guid).deleted);
ok(collection.cleartext(bmk1_guid).deleted);
// and physically removed from the local store.
await promiseNoLocalItem(bmk1_guid);
// The original folder still has the item
@ -317,12 +315,12 @@ add_task(async function test_dupe_reparented_locally_changed_bookmark() {
equal((await getFolderChildrenIDs(folder2_id)).length, 0);
// The record for folder1 on the server should reference only the GUID.
let serverRecord1 = getServerRecord(collection, folder1_guid);
let serverRecord1 = collection.cleartext(folder1_guid);
ok(!serverRecord1.children.includes(bmk1_guid));
ok(serverRecord1.children.includes(newGUID));
// The record for folder2 on the server should reference nothing.
let serverRecord2 = getServerRecord(collection, folder2_guid);
let serverRecord2 = collection.cleartext(folder2_guid);
ok(!serverRecord2.children.includes(bmk1_guid));
ok(!serverRecord2.children.includes(newGUID));
@ -531,14 +529,14 @@ add_task(async function test_dupe_reparented_to_future_arriving_parent_bookmark(
// We should have logically deleted the dupe record.
equal(collection.count(), 8);
ok(getServerRecord(collection, bmk1_guid).deleted);
ok(collection.cleartext(bmk1_guid).deleted);
// and physically removed from the local store.
await promiseNoLocalItem(bmk1_guid);
// The intended parent doesn't exist, so it remains in the original folder
equal((await getFolderChildrenIDs(folder1_id)).length, 1);
// The record for folder1 on the server should reference the new GUID.
let serverRecord1 = getServerRecord(collection, folder1_guid);
let serverRecord1 = collection.cleartext(folder1_guid);
ok(!serverRecord1.children.includes(bmk1_guid));
ok(serverRecord1.children.includes(newGUID));
@ -649,7 +647,7 @@ add_task(async function test_dupe_empty_folder() {
// Collection now has one additional record - the logically deleted dupe.
equal(collection.count(), 6);
// original folder should be logically deleted.
ok(getServerRecord(collection, folder1_guid).deleted);
ok(collection.cleartext(folder1_guid).deleted);
await promiseNoLocalItem(folder1_guid);
} finally {
await cleanup(engine, server);

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

@ -797,7 +797,7 @@ add_bookmark_test(async function test_sync_dateAdded(engine) {
let newRecord2 = await store.createRecord(item2GUID);
equal(newRecord2.dateAdded, item2.dateAdded, "dateAdded update should work for earlier date");
let bzWBO = JSON.parse(JSON.parse(collection._wbos[bz.guid].payload).ciphertext);
let bzWBO = collection.cleartext(bz.guid);
ok(bzWBO.dateAdded, "Locally added dateAdded lost");
let localRecord = await store.createRecord(bz.guid);
@ -820,6 +820,59 @@ add_bookmark_test(async function test_sync_dateAdded(engine) {
}
});
add_task(async function test_buffer_hasDupe() {
await Service.recordManager.clearCache();
await PlacesSyncUtils.bookmarks.reset();
let engine = new BufferedBookmarksEngine(Service);
await engine.initialize();
let server = await serverForFoo(engine);
await SyncTestingInfrastructure(server);
let collection = server.user("foo").collection("bookmarks");
engine._tracker.start(); // We skip usual startup...
try {
let guid1 = Utils.makeGUID();
let guid2 = Utils.makeGUID();
await PlacesUtils.bookmarks.insert({
guid: guid1,
parentGuid: PlacesUtils.bookmarks.toolbarGuid,
url: "https://www.example.com",
title: "example.com",
});
await PlacesUtils.bookmarks.insert({
guid: guid2,
parentGuid: PlacesUtils.bookmarks.toolbarGuid,
url: "https://www.example.com",
title: "example.com",
});
await sync_engine_and_validate_telem(engine, false);
// Make sure we set hasDupe on outgoing records
Assert.ok(collection.payloads().every(payload => payload.hasDupe));
await PlacesUtils.bookmarks.remove(guid1);
// Make sure it works for weakly uploaded records
engine.addForWeakUpload(guid2);
await sync_engine_and_validate_telem(engine, false);
let tombstone = JSON.parse(JSON.parse(collection.payload(guid1)).ciphertext);
// We shouldn't set hasDupe on tombstones.
Assert.ok(tombstone.deleted);
Assert.ok(!tombstone.hasDupe);
let record = JSON.parse(JSON.parse(collection.payload(guid2)).ciphertext);
// We should set hasDupe on weakly uploaded records.
Assert.ok(!record.deleted);
Assert.ok(record.hasDupe,
"Buffered bookmark engine should set hasDupe for weakly uploaded records.");
await sync_engine_and_validate_telem(engine, false);
} finally {
await cleanup(engine, server);
}
});
// Bug 890217.
add_task(async function test_sync_imap_URLs() {
await Service.recordManager.clearCache();
@ -867,8 +920,7 @@ add_task(async function test_sync_imap_URLs() {
"invalidazPrahy.jpg",
"Remote bookmark A with IMAP URL should exist locally");
let bPayload = JSON.parse(JSON.parse(
collection.payload("bookmarkBBBB")).ciphertext);
let bPayload = collection.cleartext("bookmarkBBBB");
equal(bPayload.bmkUri, "imap://eleven.vs.solnicky.cz:993/" +
"fetch%3EUID%3E/CURRENT%3E2433?part=1.2&type=text/html&filename=" +
"TomEdwards.html",

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

@ -107,7 +107,7 @@ add_task(async function test_annotation_uploaded() {
Assert.equal(serverGUID, guid);
let serverWBO = collection.wbo(serverGUID);
Assert.ok(!!serverWBO);
let body = JSON.parse(JSON.parse(serverWBO.payload).ciphertext);
let body = serverWBO.getCleartext();
Assert.equal(body.queryId, "MostVisited");
_("We still have the right count.");

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

@ -18,7 +18,7 @@ let engine;
* we should be putting into records.
*/
async function check_record_version(user, id) {
let payload = JSON.parse(user.collection("clients").wbo(id).payload);
let payload = user.collection("clients").wbo(id).data;
let rec = new CryptoWrapper();
rec.id = id;
@ -224,24 +224,24 @@ add_task(async function test_full_sync() {
await generateNewKeys(Service.collectionKeys);
let activeID = Utils.makeGUID();
server.insertWBO("foo", "clients", new ServerWBO(activeID, encryptPayload({
user.collection("clients").insertRecord({
id: activeID,
name: "Active client",
type: "desktop",
commands: [],
version: "48",
protocols: ["1.5"],
}), now - 10));
}, now - 10);
let deletedID = Utils.makeGUID();
server.insertWBO("foo", "clients", new ServerWBO(deletedID, encryptPayload({
user.collection("clients").insertRecord({
id: deletedID,
name: "Client to delete",
type: "desktop",
commands: [],
version: "48",
protocols: ["1.5"],
}), now - 10));
}, now - 10);
try {
let store = engine._store;
@ -373,14 +373,14 @@ add_task(async function test_last_modified() {
await generateNewKeys(Service.collectionKeys);
let activeID = Utils.makeGUID();
server.insertWBO("foo", "clients", new ServerWBO(activeID, encryptPayload({
user.collection("clients").insertRecord({
id: activeID,
name: "Active client",
type: "desktop",
commands: [],
version: "48",
protocols: ["1.5"],
}), now - 10));
}, now - 10);
try {
let collection = user.collection("clients");
@ -403,7 +403,7 @@ add_task(async function test_last_modified() {
ok(engine._store._remoteClients[activeID].serverLastModified >= now);
_("Record on the server should have new name but not serverLastModified");
let payload = JSON.parse(JSON.parse(collection.payload(activeID)).ciphertext);
let payload = collection.cleartext(activeID);
equal(payload.name, "New name");
equal(payload.serverLastModified, undefined);
@ -609,36 +609,36 @@ add_task(async function test_filter_duplicate_names() {
// Synced recently.
let recentID = Utils.makeGUID();
server.insertWBO("foo", "clients", new ServerWBO(recentID, encryptPayload({
user.collection("clients").insertRecord({
id: recentID,
name: "My Phone",
type: "mobile",
commands: [],
version: "48",
protocols: ["1.5"],
}), now - 10));
}, now - 10);
// Dupe of our client, synced more than 1 week ago.
let dupeID = Utils.makeGUID();
server.insertWBO("foo", "clients", new ServerWBO(dupeID, encryptPayload({
user.collection("clients").insertRecord({
id: dupeID,
name: engine.localName,
type: "desktop",
commands: [],
version: "48",
protocols: ["1.5"],
}), now - 604810));
}, now - 604820);
// Synced more than 1 week ago, but not a dupe.
let oldID = Utils.makeGUID();
server.insertWBO("foo", "clients", new ServerWBO(oldID, encryptPayload({
user.collection("clients").insertRecord({
id: oldID,
name: "My old desktop",
type: "desktop",
commands: [],
version: "48",
protocols: ["1.5"],
}), now - 604820));
}, now - 604820);
try {
let store = engine._store;
@ -692,27 +692,27 @@ add_task(async function test_filter_duplicate_names() {
await syncClientsEngine(server);
let collection = server.getCollection("foo", "clients");
let recentPayload = JSON.parse(JSON.parse(collection.payload(recentID)).ciphertext);
let recentPayload = collection.cleartext(recentID);
compareCommands(recentPayload.commands, [{ command: "logout", args: [] }],
"Should send commands to the recent client");
let oldPayload = JSON.parse(JSON.parse(collection.payload(oldID)).ciphertext);
let oldPayload = collection.cleartext(oldID);
compareCommands(oldPayload.commands, [{ command: "logout", args: [] }],
"Should send commands to the week-old client");
let dupePayload = JSON.parse(JSON.parse(collection.payload(dupeID)).ciphertext);
let dupePayload = collection.cleartext(dupeID);
deepEqual(dupePayload.commands, [],
"Should not send commands to the dupe client");
_("Update the dupe client's modified time");
server.insertWBO("foo", "clients", new ServerWBO(dupeID, encryptPayload({
collection.insertRecord({
id: dupeID,
name: engine.localName,
type: "desktop",
commands: [],
version: "48",
protocols: ["1.5"],
}), now - 10));
}, now - 10);
_("Second sync.");
await syncClientsEngine(server);
@ -765,14 +765,14 @@ add_task(async function test_command_sync() {
}
_("Create remote client record");
server.insertWBO("foo", "clients", new ServerWBO(remoteId, encryptPayload({
user.collection("clients").insertRecord({
id: remoteId,
name: "Remote client",
type: "desktop",
commands: [],
version: "48",
protocols: ["1.5"],
}), Date.now() / 1000));
});
try {
_("Syncing.");
@ -830,9 +830,10 @@ add_task(async function test_clients_not_in_fxa_list() {
let remoteId = Utils.makeGUID();
let remoteId2 = Utils.makeGUID();
let collection = server.getCollection("foo", "clients");
_("Create remote client records");
server.insertWBO("foo", "clients", new ServerWBO(remoteId, encryptPayload({
collection.insertRecord({
id: remoteId,
name: "Remote client",
type: "desktop",
@ -840,8 +841,9 @@ add_task(async function test_clients_not_in_fxa_list() {
version: "48",
fxaDeviceId: remoteId,
protocols: ["1.5"],
}), Date.now() / 1000));
server.insertWBO("foo", "clients", new ServerWBO(remoteId2, encryptPayload({
});
collection.insertRecord({
id: remoteId2,
name: "Remote client 2",
type: "desktop",
@ -849,7 +851,7 @@ add_task(async function test_clients_not_in_fxa_list() {
version: "48",
fxaDeviceId: remoteId2,
protocols: ["1.5"],
}), Date.now() / 1000));
});
let fxAccounts = engine.fxAccounts;
engine.fxAccounts = {
@ -870,7 +872,6 @@ add_task(async function test_clients_not_in_fxa_list() {
await cleanup();
try {
let collection = server.getCollection("foo", "clients");
collection.remove(remoteId);
} finally {
await promiseStopServer(server);
@ -892,8 +893,10 @@ add_task(async function test_dupe_device_ids() {
let remoteId2 = Utils.makeGUID();
let remoteDeviceId = Utils.makeGUID();
let collection = server.getCollection("foo", "clients");
_("Create remote client records");
server.insertWBO("foo", "clients", new ServerWBO(remoteId, encryptPayload({
collection.insertRecord({
id: remoteId,
name: "Remote client",
type: "desktop",
@ -901,8 +904,8 @@ add_task(async function test_dupe_device_ids() {
version: "48",
fxaDeviceId: remoteDeviceId,
protocols: ["1.5"],
}), Date.now() / 1000 - 30000));
server.insertWBO("foo", "clients", new ServerWBO(remoteId2, encryptPayload({
}, Date.now() / 1000 - 30000);
collection.insertRecord({
id: remoteId2,
name: "Remote client",
type: "desktop",
@ -910,7 +913,7 @@ add_task(async function test_dupe_device_ids() {
version: "48",
fxaDeviceId: remoteDeviceId,
protocols: ["1.5"],
}), Date.now() / 1000));
});
let fxAccounts = engine.fxAccounts;
engine.fxAccounts = {
@ -931,7 +934,6 @@ add_task(async function test_dupe_device_ids() {
await cleanup();
try {
let collection = server.getCollection("foo", "clients");
collection.remove(remoteId);
} finally {
await promiseStopServer(server);
@ -1064,12 +1066,13 @@ add_task(async function test_merge_commands() {
let now = Date.now() / 1000;
let server = await serverForFoo(engine);
await SyncTestingInfrastructure(server);
await generateNewKeys(Service.collectionKeys);
let collection = server.getCollection("foo", "clients");
let desktopID = Utils.makeGUID();
server.insertWBO("foo", "clients", new ServerWBO(desktopID, encryptPayload({
collection.insertRecord({
id: desktopID,
name: "Desktop client",
type: "desktop",
@ -1080,10 +1083,10 @@ add_task(async function test_merge_commands() {
}],
version: "48",
protocols: ["1.5"],
}), now - 10));
}, now - 10);
let mobileID = Utils.makeGUID();
server.insertWBO("foo", "clients", new ServerWBO(mobileID, encryptPayload({
collection.insertRecord({
id: mobileID,
name: "Mobile client",
type: "mobile",
@ -1094,7 +1097,7 @@ add_task(async function test_merge_commands() {
}],
version: "48",
protocols: ["1.5"],
}), now - 10));
}, now - 10);
try {
_("First sync. 2 records downloaded.");
@ -1105,8 +1108,7 @@ add_task(async function test_merge_commands() {
await engine.sendCommand("logout", []);
await syncClientsEngine(server);
let collection = server.getCollection("foo", "clients");
let desktopPayload = JSON.parse(JSON.parse(collection.payload(desktopID)).ciphertext);
let desktopPayload = collection.cleartext(desktopID);
compareCommands(desktopPayload.commands, [{
command: "displayURI",
args: ["https://example.com", engine.localID, "Yak Herders Anonymous"],
@ -1115,7 +1117,7 @@ add_task(async function test_merge_commands() {
args: [],
}], "Should send the logout command to the desktop client");
let mobilePayload = JSON.parse(JSON.parse(collection.payload(mobileID)).ciphertext);
let mobilePayload = collection.cleartext(mobileID);
compareCommands(mobilePayload.commands, [{ command: "logout", args: [] }],
"Should not send a duplicate logout to the mobile client");
} finally {
@ -1138,15 +1140,17 @@ add_task(async function test_duplicate_remote_commands() {
await SyncTestingInfrastructure(server);
await generateNewKeys(Service.collectionKeys);
let collection = server.getCollection("foo", "clients");
let desktopID = Utils.makeGUID();
server.insertWBO("foo", "clients", new ServerWBO(desktopID, encryptPayload({
collection.insertRecord({
id: desktopID,
name: "Desktop client",
type: "desktop",
commands: [],
version: "48",
protocols: ["1.5"],
}), now - 10));
}, now - 10);
try {
_("First sync. 1 record downloaded.");
@ -1158,21 +1162,20 @@ add_task(async function test_duplicate_remote_commands() {
await syncClientsEngine(server);
_("Simulate the desktop client consuming the command and syncing to the server");
server.insertWBO("foo", "clients", new ServerWBO(desktopID, encryptPayload({
collection.insertRecord({
id: desktopID,
name: "Desktop client",
type: "desktop",
commands: [],
version: "48",
protocols: ["1.5"],
}), now - 10));
}, now - 10);
_("Send another tab to the desktop client");
await engine.sendCommand("displayURI", ["https://foobar.com", engine.localID, "Foo bar!"], desktopID);
await syncClientsEngine(server);
let collection = server.getCollection("foo", "clients");
let desktopPayload = JSON.parse(JSON.parse(collection.payload(desktopID)).ciphertext);
let desktopPayload = collection.cleartext(desktopID);
compareCommands(desktopPayload.commands, [{
command: "displayURI",
args: ["https://foobar.com", engine.localID, "Foo bar!"],
@ -1197,9 +1200,11 @@ add_task(async function test_upload_after_reboot() {
await SyncTestingInfrastructure(server);
await generateNewKeys(Service.collectionKeys);
let collection = server.getCollection("foo", "clients");
let deviceBID = Utils.makeGUID();
let deviceCID = Utils.makeGUID();
server.insertWBO("foo", "clients", new ServerWBO(deviceBID, encryptPayload({
collection.insertRecord({
id: deviceBID,
name: "Device B",
type: "desktop",
@ -1210,15 +1215,15 @@ add_task(async function test_upload_after_reboot() {
}],
version: "48",
protocols: ["1.5"],
}), now - 10));
server.insertWBO("foo", "clients", new ServerWBO(deviceCID, encryptPayload({
}, now - 10);
collection.insertRecord({
id: deviceCID,
name: "Device C",
type: "desktop",
commands: [],
version: "48",
protocols: ["1.5"],
}), now - 10));
}, now - 10);
try {
_("First sync. 2 records downloaded.");
@ -1232,21 +1237,20 @@ add_task(async function test_upload_after_reboot() {
SyncEngine.prototype._uploadOutgoing = async () => engine._onRecordsWritten([], [deviceBID]);
await syncClientsEngine(server);
let collection = server.getCollection("foo", "clients");
let deviceBPayload = JSON.parse(JSON.parse(collection.payload(deviceBID)).ciphertext);
let deviceBPayload = collection.cleartext(deviceBID);
compareCommands(deviceBPayload.commands, [{
command: "displayURI", args: ["https://deviceclink.com", deviceCID, "Device C link"]
}], "Should be the same because the upload failed");
_("Simulate the client B consuming the command and syncing to the server");
server.insertWBO("foo", "clients", new ServerWBO(deviceBID, encryptPayload({
collection.insertRecord({
id: deviceBID,
name: "Device B",
type: "desktop",
commands: [],
version: "48",
protocols: ["1.5"],
}), now - 10));
}, now - 10);
// Simulate reboot
SyncEngine.prototype._uploadOutgoing = oldUploadOutgoing;
@ -1255,7 +1259,7 @@ add_task(async function test_upload_after_reboot() {
await syncClientsEngine(server);
deviceBPayload = JSON.parse(JSON.parse(collection.payload(deviceBID)).ciphertext);
deviceBPayload = collection.cleartext(deviceBID);
compareCommands(deviceBPayload.commands, [{
command: "displayURI",
args: ["https://example.com", engine.localID, "Yak Herders Anonymous"],
@ -1280,9 +1284,11 @@ add_task(async function test_keep_cleared_commands_after_reboot() {
await SyncTestingInfrastructure(server);
await generateNewKeys(Service.collectionKeys);
let collection = server.getCollection("foo", "clients");
let deviceBID = Utils.makeGUID();
let deviceCID = Utils.makeGUID();
server.insertWBO("foo", "clients", new ServerWBO(engine.localID, encryptPayload({
collection.insertRecord({
id: engine.localID,
name: "Device A",
type: "desktop",
@ -1298,29 +1304,28 @@ add_task(async function test_keep_cleared_commands_after_reboot() {
}],
version: "48",
protocols: ["1.5"],
}), now - 10));
server.insertWBO("foo", "clients", new ServerWBO(deviceBID, encryptPayload({
}, now - 10);
collection.insertRecord({
id: deviceBID,
name: "Device B",
type: "desktop",
commands: [],
version: "48",
protocols: ["1.5"],
}), now - 10));
server.insertWBO("foo", "clients", new ServerWBO(deviceCID, encryptPayload({
}, now - 10);
collection.insertRecord({
id: deviceCID,
name: "Device C",
type: "desktop",
commands: [],
version: "48",
protocols: ["1.5"],
}), now - 10));
}, now - 10);
try {
_("First sync. Download remote and our record.");
strictEqual(engine.lastRecordUpload, 0);
let collection = server.getCollection("foo", "clients");
const oldUploadOutgoing = SyncEngine.prototype._uploadOutgoing;
SyncEngine.prototype._uploadOutgoing = async () => engine._onRecordsWritten([], [deviceBID]);
let commandsProcessed = 0;
@ -1330,7 +1335,7 @@ add_task(async function test_keep_cleared_commands_after_reboot() {
await engine.processIncomingCommands(); // Not called by the engine.sync(), gotta call it ourselves
equal(commandsProcessed, 2, "We processed 2 commands");
let localRemoteRecord = JSON.parse(JSON.parse(collection.payload(engine.localID)).ciphertext);
let localRemoteRecord = collection.cleartext(engine.localID);
compareCommands(localRemoteRecord.commands, [{
command: "displayURI", args: ["https://deviceblink.com", deviceBID, "Device B link"]
},
@ -1339,7 +1344,7 @@ add_task(async function test_keep_cleared_commands_after_reboot() {
}], "Should be the same because the upload failed");
// Another client sends another link
server.insertWBO("foo", "clients", new ServerWBO(engine.localID, encryptPayload({
collection.insertRecord({
id: engine.localID,
name: "Device A",
type: "desktop",
@ -1360,7 +1365,7 @@ add_task(async function test_keep_cleared_commands_after_reboot() {
}],
version: "48",
protocols: ["1.5"],
}), now - 5));
}, now - 5);
// Simulate reboot
SyncEngine.prototype._uploadOutgoing = oldUploadOutgoing;
@ -1373,7 +1378,7 @@ add_task(async function test_keep_cleared_commands_after_reboot() {
await engine.processIncomingCommands();
equal(commandsProcessed, 1, "We processed one command (the other were cleared)");
localRemoteRecord = JSON.parse(JSON.parse(collection.payload(deviceBID)).ciphertext);
localRemoteRecord = collection.cleartext(deviceBID);
deepEqual(localRemoteRecord.commands, [], "Should be empty");
} finally {
await cleanup();
@ -1400,32 +1405,33 @@ add_task(async function test_deleted_commands() {
await SyncTestingInfrastructure(server);
await generateNewKeys(Service.collectionKeys);
let collection = server.getCollection("foo", "clients");
let activeID = Utils.makeGUID();
server.insertWBO("foo", "clients", new ServerWBO(activeID, encryptPayload({
collection.insertRecord({
id: activeID,
name: "Active client",
type: "desktop",
commands: [],
version: "48",
protocols: ["1.5"],
}), now - 10));
}, now - 10);
let deletedID = Utils.makeGUID();
server.insertWBO("foo", "clients", new ServerWBO(deletedID, encryptPayload({
collection.insertRecord({
id: deletedID,
name: "Client to delete",
type: "desktop",
commands: [],
version: "48",
protocols: ["1.5"],
}), now - 10));
}, now - 10);
try {
_("First sync. 2 records downloaded.");
await syncClientsEngine(server);
_("Delete a record on the server.");
let collection = server.getCollection("foo", "clients");
collection.remove(deletedID);
_("Broadcast a command to all clients");
@ -1435,7 +1441,7 @@ add_task(async function test_deleted_commands() {
deepEqual(collection.keys().sort(), [activeID, engine.localID].sort(),
"Should not reupload deleted clients");
let activePayload = JSON.parse(JSON.parse(collection.payload(activeID)).ciphertext);
let activePayload = collection.cleartext(activeID);
compareCommands(activePayload.commands, [{ command: "logout", args: [] }],
"Should send the command to the active client");
} finally {
@ -1464,19 +1470,19 @@ add_task(async function test_send_uri_ack() {
_("Initial sync for empty clients collection");
await syncClientsEngine(server);
let collection = server.getCollection("foo", "clients");
let ourPayload = JSON.parse(JSON.parse(collection.payload(engine.localID)).ciphertext);
ok(ourPayload, "Should upload our client record");
collection.updateRecord(engine.localID, payload => {
_("Send a URL to the device on the server");
ourPayload.commands = [{
payload.commands = [{
command: "displayURI",
args: ["https://example.com", fakeSenderID, "Yak Herders Anonymous"],
flowID: Utils.makeGUID(),
}];
server.insertWBO("foo", "clients", new ServerWBO(engine.localID, encryptPayload(ourPayload), now));
}, now - 10);
_("Sync again");
await syncClientsEngine(server);
compareCommands(engine.localCommands, [{
command: "displayURI",
args: ["https://example.com", fakeSenderID, "Yak Herders Anonymous"],
@ -1490,7 +1496,7 @@ add_task(async function test_send_uri_ack() {
_("Check that the command was removed on the server");
await syncClientsEngine(server);
ourPayload = JSON.parse(JSON.parse(collection.payload(engine.localID)).ciphertext);
let ourPayload = collection.cleartext(engine.localID);
ok(ourPayload, "Should upload the synced client record");
deepEqual(ourPayload.commands, [], "Should not reupload cleared commands");
} finally {
@ -1518,24 +1524,24 @@ add_task(async function test_command_sync() {
let remoteId2 = Utils.makeGUID();
_("Create remote client record 1");
server.insertWBO("foo", "clients", new ServerWBO(remoteId, encryptPayload({
collection.insertRecord({
id: remoteId,
name: "Remote client",
type: "desktop",
commands: [],
version: "48",
protocols: ["1.5"]
}), Date.now() / 1000));
});
_("Create remote client record 2");
server.insertWBO("foo", "clients", new ServerWBO(remoteId2, encryptPayload({
collection.insertRecord({
id: remoteId2,
name: "Remote client 2",
type: "mobile",
commands: [],
version: "48",
protocols: ["1.5"]
}), Date.now() / 1000));
});
try {
equal(collection.count(), 2, "2 remote records written");
@ -1578,29 +1584,30 @@ add_task(async function ensureSameFlowIDs() {
// Setup 2 clients, send them a command, and ensure we get to events
// written, both with the same flowID.
await SyncTestingInfrastructure(server);
let collection = server.getCollection("foo", "clients");
let remoteId = Utils.makeGUID();
let remoteId2 = Utils.makeGUID();
_("Create remote client record 1");
server.insertWBO("foo", "clients", new ServerWBO(remoteId, encryptPayload({
collection.insertRecord({
id: remoteId,
name: "Remote client",
type: "desktop",
commands: [],
version: "48",
protocols: ["1.5"]
}), Date.now() / 1000));
});
_("Create remote client record 2");
server.insertWBO("foo", "clients", new ServerWBO(remoteId2, encryptPayload({
collection.insertRecord({
id: remoteId2,
name: "Remote client 2",
type: "mobile",
commands: [],
version: "48",
protocols: ["1.5"]
}), Date.now() / 1000));
});
await syncClientsEngine(server);
await engine.sendCommand("wipeAll", []);
@ -1670,29 +1677,30 @@ add_task(async function test_duplicate_commands_telemetry() {
let server = await serverForFoo(engine);
try {
await SyncTestingInfrastructure(server);
let collection = server.getCollection("foo", "clients");
let remoteId = Utils.makeGUID();
let remoteId2 = Utils.makeGUID();
_("Create remote client record 1");
server.insertWBO("foo", "clients", new ServerWBO(remoteId, encryptPayload({
collection.insertRecord({
id: remoteId,
name: "Remote client",
type: "desktop",
commands: [],
version: "48",
protocols: ["1.5"]
}), Date.now() / 1000));
});
_("Create remote client record 2");
server.insertWBO("foo", "clients", new ServerWBO(remoteId2, encryptPayload({
collection.insertRecord({
id: remoteId2,
name: "Remote client 2",
type: "mobile",
commands: [],
version: "48",
protocols: ["1.5"]
}), Date.now() / 1000));
});
await syncClientsEngine(server);
// Make sure deduping works before syncing
@ -1836,14 +1844,14 @@ add_task(async function test_create_record_command_limit() {
let remoteId = Utils.makeGUID();
_("Create remote client record");
server.insertWBO("foo", "clients", new ServerWBO(remoteId, encryptPayload({
user.collection("clients").insertRecord({
id: remoteId,
name: "Remote client",
type: "desktop",
commands: [],
version: "57",
protocols: ["1.5"],
}), Date.now() / 1000));
});
try {
_("Initial sync.");
@ -1859,8 +1867,7 @@ add_task(async function test_create_record_command_limit() {
await syncClientsEngine(server);
_("Make sure they all fit and weren't dropped.");
let parsedServerRecord = JSON.parse(JSON.parse(
user.collection("clients").payload(remoteId)).ciphertext);
let parsedServerRecord = user.collection("clients").cleartext(remoteId);
equal(parsedServerRecord.commands.length, 5);
@ -1876,11 +1883,11 @@ add_task(async function test_create_record_command_limit() {
await syncClientsEngine(server);
_("Ensure we didn't overflow the server limit.");
let payload = user.collection("clients").payload(remoteId);
less(payload.length, fakeLimit);
let wbo = user.collection("clients").wbo(remoteId);
less(wbo.payload.length, fakeLimit);
_("And that the data we uploaded is both sane json and containing some commands.");
let remoteCommands = JSON.parse(JSON.parse(payload).ciphertext).commands;
let remoteCommands = wbo.getCleartext().commands;
greater(remoteCommands.length, 2);
let firstCommand = remoteCommands[0];
_("The first command should still be present, since it had a high priority");

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

@ -131,35 +131,39 @@ add_task(async function test_crypto_keys_login_server_maintenance_error() {
await promiseStopServer(server);
});
add_task(async function test_sync_prolonged_server_maintenance_error() {
add_task(async function test_lastSync_not_updated_on_complete_failure() {
enableValidationPrefs();
// Test prolonged server maintenance errors are reported.
// Test info/collections prolonged server maintenance errors are reported.
let server = await EHTestsCommon.sync_httpd_setup();
await EHTestsCommon.setUp(server);
const BACKOFF = 42;
engine.enabled = true;
engine.exception = {status: 503,
headers: {"retry-after": BACKOFF}};
await configureIdentity({username: "johndoe"}, server);
let promiseObserved = promiseOneObserver("weave:ui:sync:error");
// Do an initial sync that we expect to be successful.
await sync_and_validate_telem(false);
Assert.equal(Status.service, STATUS_OK);
Assert.equal(Status.sync, SYNC_SUCCEEDED);
setLastSync(PROLONGED_ERROR_DURATION);
let ping = await sync_and_validate_telem(true);
deepEqual(ping.status.sync, PROLONGED_SYNC_FAILURE);
deepEqual(ping.engines.find(e => e.failureReason).failureReason,
{ name: "httperror", code: 503 });
await promiseObserved;
let lastSync = Svc.Prefs.get("lastSync");
Assert.ok(lastSync);
// Report server maintenance on info/collections requests
server.registerPathHandler("/1.1/johndoe/info/collections",
EHTestsCommon.service_unavailable);
await sync_and_validate_telem(true);
Assert.equal(Status.sync, SERVER_MAINTENANCE);
Assert.equal(Status.service, SYNC_FAILED);
Assert.equal(Status.sync, PROLONGED_SYNC_FAILURE);
Assert.ok(errorHandler.didReportProlongedError);
await promiseStopServer(server);
// We shouldn't update lastSync on complete failure.
Assert.equal(lastSync, Svc.Prefs.get("lastSync"));
await clean();
await promiseStopServer(server);
});
add_task(async function test_info_collections_login_prolonged_server_maintenance_error() {
@ -795,7 +799,7 @@ add_task(async function test_sync_engine_generic_fail() {
engine.sync = async function sync() {
Svc.Obs.notify("weave:engine:sync:error", ENGINE_UNKNOWN_FAIL, "catapult");
};
let lastSync = Svc.Prefs.get("lastSync");
let log = Log.repository.getLogger("Sync.ErrorHandler");
Svc.Prefs.set("log.appender.file.logOnError", true);
@ -824,6 +828,9 @@ add_task(async function test_sync_engine_generic_fail() {
Assert.equal(Status.engines.catapult, ENGINE_UNKNOWN_FAIL);
Assert.equal(Status.service, SYNC_FAILED_PARTIAL);
// lastSync should update on partial failure.
Assert.notEqual(lastSync, Svc.Prefs.get("lastSync"));
// Test Error log was written on SYNC_FAILED_PARTIAL.
let logFiles = getLogFiles();
equal(logFiles.length, 1);

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше