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

This commit is contained in:
Noemi Erli 2018-04-07 01:03:50 +03:00
Родитель 0a7ab378d1 eb61878455
Коммит 3c6217a11e
1350 изменённых файлов: 275608 добавлений и 4834 удалений

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

@ -1,3 +1,12 @@
[[package]]
name = "Inflector"
version = "0.11.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"regex 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "adler32"
version = "1.0.2"
@ -33,11 +42,29 @@ dependencies = [
"nodrop 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "ascii-canvas"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"term 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "atomic_refcell"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "atty"
version = "0.1.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.39 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "atty"
version = "0.2.2"
@ -140,6 +167,43 @@ dependencies = [
"which 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "binjs_meta"
version = "0.3.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"Inflector 0.11.2 (registry+https://github.com/rust-lang/crates.io-index)",
"itertools 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"webidl 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "binsource"
version = "0.1.0"
dependencies = [
"binjs_meta 0.3.6 (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.5.6 (registry+https://github.com/rust-lang/crates.io-index)",
"itertools 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"webidl 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
"yaml-rust 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "bit-set"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"bit-vec 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "bit-vec"
version = "0.4.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "bitflags"
version = "0.7.0"
@ -364,7 +428,7 @@ name = "cssparser"
version = "0.23.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"cssparser-macros 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"cssparser-macros 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
"dtoa-short 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
"itoa 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"matches 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
@ -378,13 +442,14 @@ dependencies = [
[[package]]
name = "cssparser-macros"
version = "0.3.0"
version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"phf_codegen 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)",
"proc-macro2 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"procedural-masquerade 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)",
"syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)",
"quote 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
"syn 0.12.12 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@ -487,6 +552,23 @@ dependencies = [
"unreachable 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "diff"
version = "0.1.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "docopt"
version = "0.8.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"regex 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.35 (git+https://github.com/servo/serde?branch=deserialize_from_enums5)",
"strsim 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "dtoa"
version = "0.4.2"
@ -519,6 +601,11 @@ name = "either"
version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "ena"
version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "encoding_c"
version = "0.8.0"
@ -553,6 +640,7 @@ 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.6 (registry+https://github.com/rust-lang/crates.io-index)",
]
@ -578,6 +666,11 @@ dependencies = [
"smallvec 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "fixedbitset"
version = "0.1.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "flate2"
version = "1.0.1"
@ -669,7 +762,7 @@ dependencies = [
[[package]]
name = "geckodriver"
version = "0.20.0"
version = "0.20.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)",
@ -744,7 +837,6 @@ dependencies = [
"prefs_parser 0.0.1",
"rsdparsa_capi 0.1.0",
"rust_url_capi 0.0.1",
"syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)",
"u2fhid 0.1.0",
"webrender_bindings 0.1.0",
"xpcom 0.1.0",
@ -836,6 +928,14 @@ dependencies = [
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "itertools"
version = "0.6.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"either 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "itertools"
version = "0.7.6"
@ -883,6 +983,61 @@ name = "khronos_api"
version = "2.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "lalrpop"
version = "0.15.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"ascii-canvas 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"atty 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"bit-set 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"diff 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)",
"docopt 0.8.3 (registry+https://github.com/rust-lang/crates.io-index)",
"ena 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
"itertools 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)",
"lalrpop-snap 0.15.1 (registry+https://github.com/rust-lang/crates.io-index)",
"lalrpop-util 0.15.1 (registry+https://github.com/rust-lang/crates.io-index)",
"petgraph 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)",
"regex 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"regex-syntax 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.35 (git+https://github.com/servo/serde?branch=deserialize_from_enums5)",
"string_cache 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"term 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
"unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "lalrpop-intern"
version = "0.15.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "lalrpop-snap"
version = "0.15.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"ascii-canvas 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"atty 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"bit-set 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"diff 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)",
"ena 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
"itertools 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)",
"lalrpop-intern 0.15.1 (registry+https://github.com/rust-lang/crates.io-index)",
"lalrpop-util 0.15.1 (registry+https://github.com/rust-lang/crates.io-index)",
"petgraph 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)",
"regex 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"regex-syntax 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"string_cache 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"term 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
"unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "lalrpop-util"
version = "0.15.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "language-tags"
version = "0.2.2"
@ -940,6 +1095,11 @@ dependencies = [
"vcpkg 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "linked-hash-map"
version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "log"
version = "0.3.9"
@ -1260,6 +1420,11 @@ dependencies = [
"unreachable 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "ordermap"
version = "0.3.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "owning_ref"
version = "0.3.3"
@ -1299,6 +1464,15 @@ name = "percent-encoding"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "petgraph"
version = "0.4.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"fixedbitset 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
"ordermap 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "phf"
version = "0.7.21"
@ -1518,11 +1692,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "same-file"
version = "0.1.3"
version = "1.0.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)",
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@ -1642,6 +1815,36 @@ name = "stable_deref_trait"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "string_cache"
version = "0.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"debug_unreachable 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"phf_shared 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)",
"precomputed-hash 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)",
"string_cache_codegen 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"string_cache_shared 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "string_cache_codegen"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"phf_generator 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)",
"phf_shared 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)",
"quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)",
"string_cache_shared 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "string_cache_shared"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "strsim"
version = "0.6.0"
@ -1694,7 +1897,7 @@ dependencies = [
"unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
"unicode-segmentation 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
"walkdir 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)",
"walkdir 2.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@ -1789,6 +1992,15 @@ dependencies = [
"rand 0.3.18 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "term"
version = "0.4.6"
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)",
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "term_size"
version = "0.3.0"
@ -2026,12 +2238,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "walkdir"
version = "1.0.7"
version = "2.1.4"
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)",
"same-file 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
"same-file 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@ -2048,6 +2259,15 @@ dependencies = [
"url 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "webidl"
version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"lalrpop 0.15.1 (registry+https://github.com/rust-lang/crates.io-index)",
"lalrpop-util 0.15.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "webrender"
version = "0.57.2"
@ -2211,6 +2431,14 @@ dependencies = [
"syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "yaml-rust"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"linked-hash-map 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "zip"
version = "0.3.1"
@ -2224,17 +2452,23 @@ dependencies = [
]
[metadata]
"checksum Inflector 0.11.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1b33cd9b653730fc539c53c7b3c672d2f47108fa20c6df571fa5817178f5a14c"
"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 ascii-canvas 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b385d69402821a1c254533a011a312531cbcc0e3e24f19bbb4747a5a2daf37e2"
"checksum atomic_refcell 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fb2dcb6e6d35f20276943cc04bb98e538b348d525a04ac79c10021561d202f21"
"checksum atty 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d0fd4c0631f06448cc45a6bbb3b710ebb7ff8ccb96a0800c994afe23a70d5df2"
"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 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bda13183df33055cbb84b847becce220d392df502ebe7a4a78d7021771ed94d0"
"checksum bindgen 0.33.2 (registry+https://github.com/rust-lang/crates.io-index)" = "603ed8d8392ace9581e834e26bd09799bf1e989a79bd1aedbb893e72962bdc6e"
"checksum binjs_meta 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "9fcfc86eecb125147e907529a5f1ac7978f6f26d20a52b82a7e053da5faefbc3"
"checksum bit-set 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d9bf6104718e80d7b26a68fdbacff3481cfc05df670821affc7e9cbc1884400c"
"checksum bit-vec 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "02b4ff8b16e6076c3e14220b39fbc1fabb6737522281a388998046859400895f"
"checksum bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "aad18937a628ec6abcd26d1489012cc0e18c21798210f491af69ded9b881106d"
"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"
@ -2263,7 +2497,7 @@ dependencies = [
"checksum crossbeam-epoch 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "927121f5407de9956180ff5e936fe3cf4324279280001cd56b669d28ee7e9150"
"checksum crossbeam-utils 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2760899e32a1d58d5abb31129f8fae5de75220bc2176e77ff7c627ae45c918d9"
"checksum cssparser 0.23.4 (registry+https://github.com/rust-lang/crates.io-index)" = "b906ac3f6108d8d0bfd4158469abe5909df1497116c8400346b5e08944579edd"
"checksum cssparser-macros 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "079adec4af52bb5275eadd004292028c79eb3c5f5b4ee8086a36d4197032f6df"
"checksum cssparser-macros 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9ce714f82ed2ca0e026ee351b7f25b2d70f81cf6f0f3214537a2edb67cd4d4d0"
"checksum cstr 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "b6557bdb1dc9647eae1cf7f5601b14cd45fc3c7ccf2df618387416fe542da6ea"
"checksum cstr-macros 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f9f316203d1ea36f4f18316822806f6999aa3dc5ed1adf51e35b77e3b3933d78"
"checksum cubeb 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "8a3502aafa1bf95c524f65d2ba46d8741700c6a8a9543ea52c6da3d8b69a2896"
@ -2274,15 +2508,19 @@ dependencies = [
"checksum darling_core 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "167dd3e235c2f1da16a635c282630452cdf49191eb05711de1bcd1d3d5068c00"
"checksum darling_macro 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c53edaba455f6073a10c27c72440860eb3f60444f8c8660a391032eeae744d82"
"checksum debug_unreachable 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9a032eac705ca39214d169f83e3d3da290af06d8d1d344d1baad2fd002dca4b3"
"checksum diff 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "3c2b69f912779fbb121ceb775d74d51e915af17aaebc38d28a592843a2dd0a3a"
"checksum docopt 0.8.3 (registry+https://github.com/rust-lang/crates.io-index)" = "d8acd393692c503b168471874953a2531df0e9ab77d0b6bbc582395743300a4a"
"checksum dtoa 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "09c3753c3db574d215cba4ea76018483895d7bff25a31b49ba45db21c48e50ab"
"checksum dtoa-short 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "068d4026697c1a18f0b0bb8cfcad1b0c151b90d8edb9bf4c235ad68128920d1d"
"checksum dwrote 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b26e30aaa6bf31ec830db15fec14ed04f0f2ecfcc486ecfce88c55d3389b237f"
"checksum either 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "18785c1ba806c258137c937e44ada9ee7e69a37e3c72077542cd2f069d78562a"
"checksum ena 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "cabe5a5078ac8c506d3e4430763b1ba9b609b1286913e7d08e581d1c2de9b7e5"
"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.5.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0561146661ae44c579e993456bc76d11ce1e0c7d745e57b2fa7146b6e49fa2ad"
"checksum error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ff511d5dc435d703f4971bc399647c9bc38e20cb41452e3b9feb4765419ed3f3"
"checksum euclid 0.17.2 (registry+https://github.com/rust-lang/crates.io-index)" = "adfe67a9343519c1449d208da5998c6de582de698f7a39c4ac82ffba23d131a5"
"checksum fixedbitset 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "85cb8fec437468d86dc7c83ca7cfc933341d561873275f22dd5eedefa63a6478"
"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"
@ -2304,11 +2542,16 @@ dependencies = [
"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"
"checksum itertools 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "d3f2be4da1690a039e9ae5fd575f706a63ad5a2120f161b1d653c9da3930dd21"
"checksum itertools 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)" = "b07332223953b5051bceb67e8c4700aa65291535568e1f12408c43c4a42c0394"
"checksum itoa 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "eb2f404fbc66fd9aac13e998248505e7ecb2ad8e44ab6388684c5fb11c6c251c"
"checksum itoa 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c069bbec61e1ca5a596166e55dfe4773ff745c3d16b700013bcaff9a6df2c682"
"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 lalrpop 0.15.1 (registry+https://github.com/rust-lang/crates.io-index)" = "88035943c3cfbb897a499a556212b2b053574f32b4238b71b61625bc470f80aa"
"checksum lalrpop-intern 0.15.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cc4fd87be4a815fd373e02773983940f0d75fb26fde8c098e9e45f7af03154c0"
"checksum lalrpop-snap 0.15.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5f244285324e4e33d486910b66fd3b7cb37e2072c5bf63319f506fe99ed72650"
"checksum lalrpop-util 0.15.1 (registry+https://github.com/rust-lang/crates.io-index)" = "de408fd50dea8ad7a77107144983a25c7fdabf5f8faf707a6e020d68874ed06c"
"checksum language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a91d884b6667cd606bb5a69aa0c99ba811a115fc68915e7056ec08a46e93199a"
"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"
@ -2316,6 +2559,7 @@ dependencies = [
"checksum libloading 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9c3ad660d7cb8c5822cd83d10897b0f1f1526792737a179e73896152f85b88c2"
"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 linked-hash-map 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "70fb39025bc7cdd76305867c4eccf2f2dcf6e9a57f5b21a93e1c2d86cd03ec9e"
"checksum log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "e19e8d5c34a3e0e2223db8e060f9e8264aeeb5c5fc64a4ee9965c062211c024b"
"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"
@ -2341,11 +2585,13 @@ dependencies = [
"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"
"checksum ordered-float 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "da12c96037889ae0be29dd2bdd260e5a62a7df24e6466d5a15bb8131c1c200a8"
"checksum ordermap 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "a86ed3f5f244b372d6b1a00b72ef7f8876d0bc6a78a4c9985c53614041512063"
"checksum owning_ref 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "cdf84f41639e037b484f93433aa3897863b561ed65c6e59c7073d7c561710f37"
"checksum parking_lot 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)" = "9fd9d732f2de194336fb02fe11f9eed13d9e76f13f4315b4d88a14ca411750cd"
"checksum parking_lot_core 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "6c677d78851950b3aec390e681a411f78cc250cba277d4f578758a377f727970"
"checksum peeking_take_while 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099"
"checksum percent-encoding 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "de154f638187706bde41d9b4738748933d64e6b37bdbffc0b47a97d16a6ae356"
"checksum petgraph 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)" = "7a7e5234c228fbfa874c86a77f685886127f82e0aef602ad1d48333fcac6ad61"
"checksum phf 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)" = "cb325642290f28ee14d8c6201159949a872f220c62af6e110a56ea914fbe42fc"
"checksum phf_codegen 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)" = "d62594c0bb54c464f633175d502038177e90309daf2e0158be42ed5f023ce88f"
"checksum phf_generator 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)" = "6b07ffcc532ccc85e3afc45865469bf5d9e4ef5bfcf9622e3cfe80c2d275ec03"
@ -2370,7 +2616,7 @@ dependencies = [
"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 same-file 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "cfb6eded0b06a0b512c8ddbcf04089138c9b4362c2f696f3c3d76039d68f3637"
"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"
"checksum semver 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7a3186ec9e65071a2095434b1f5bb24838d4e8e130f584c790f6033c79943537"
@ -2385,12 +2631,16 @@ dependencies = [
"checksum smallbitvec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "79b776f00dfe01df905fa3b2eaa1659522e99e3fc4a7b1334171622205c4bdcf"
"checksum smallvec 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "44db0ecb22921ef790d17ae13a3f6d15784183ff5f2a01aa32098c7498d2b4b9"
"checksum stable_deref_trait 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "15132e0e364248108c5e2c02e3ab539be8d6f5d52a01ca9bbf27ed657316f02b"
"checksum string_cache 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "39cb4173bcbd1319da31faa5468a7e3870683d7a237150b0b0aaafd546f6ad12"
"checksum string_cache_codegen 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "479cde50c3539481f33906a387f2bd17c8e87cb848c35b6021d41fb81ff9b4d7"
"checksum string_cache_shared 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b1884d1bc09741d466d9b14e6d37ac89d6909cbcac41dd9ae982d4d063bbedfc"
"checksum strsim 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b4d15c810519a91cf877e7e36e63fe068815c678181439f2f29e2562147c3694"
"checksum syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)" = "d3b891b9015c88c576343b9b3e41c2c11a51c219ef067b264bd9c8aa9b441dad"
"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 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "fa63644f74ce96fbeb9b794f66aff2a52d601cbd5e80f4b97123e3899f4570f1"
"checksum term_size 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e2b6b55df3198cc93372e85dd2ed817f0e38ce8cc0f22eb32391bfad9c4bf209"
"checksum termcolor 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "adc4587ead41bf016f11af03e55a624c06568b5a19db4e90fde573d805074f83"
"checksum textwrap 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c0b59b6b4b44d867f1370ef1bd91bfb262bf07bf0ae65c202ea2fbc16153b693"
@ -2420,7 +2670,8 @@ dependencies = [
"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 walkdir 2.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "63636bd0eb3d00ccb8b9036381b526efac53caf112b7783b730ab3f8e44da369"
"checksum webidl 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "dc14e4b71f94b5bb4c6d696e3b3be4d2e9ee6750a60870ecae09ff7138a131a7"
"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"
@ -2431,4 +2682,5 @@ dependencies = [
"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 yaml-rust 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "57ab38ee1a4a266ed033496cf9af1828d8d6e6c1cfa5f643a2809effcae4d628"
"checksum zip 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "10931e278527cea65682696481e6d840371d581079df529ebfee186e0eaad719"

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

@ -7,6 +7,7 @@
members = [
"js/src",
"js/rust",
"js/src/frontend/binsource", # Code generator.
"testing/geckodriver",
"toolkit/library/gtest/rust",
"toolkit/library/rust/",

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

@ -490,13 +490,6 @@ pref("browser.tabs.drawInTitlebar", true);
// will only be shown if browser.tabs.drawInTitlebar is true.
pref("browser.tabs.extraDragSpace", false);
// 0 - Disable the tabbar session restore button.
// 1 - Enable the tabbar session restore button.
// 2 - Control group. The tabbar session restore button is disabled,
// but we will record data on other session restore usage.
// To be enabled with shield.
pref("browser.tabs.restorebutton", 0);
// When tabs opened by links in other tabs via a combination of
// browser.link.open_newwindow being set to 3 and target="_blank" etc are
// closed:

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

@ -8712,23 +8712,8 @@ function switchToTabHavingURI(aURI, aOpenNew, aOpenParams = {}) {
var RestoreLastSessionObserver = {
init() {
let browser_tabs_restorebutton_pref = Services.prefs.getIntPref("browser.tabs.restorebutton");
Services.telemetry.scalarSet("browser.session.restore.browser_tabs_restorebutton", browser_tabs_restorebutton_pref);
Services.telemetry.scalarSet("browser.session.restore.browser_startup_page", Services.prefs.getIntPref("browser.startup.page"));
if (SessionStore.canRestoreLastSession &&
!PrivateBrowsingUtils.isWindowPrivate(window)) {
if (browser_tabs_restorebutton_pref == 1) {
let {restoreTabsButton, restoreTabsButtonWrapperWidth} = gBrowser.tabContainer;
let restoreTabsButtonWrapper = restoreTabsButton.parentNode;
restoreTabsButtonWrapper.setAttribute("session-exists", "true");
gBrowser.tabContainer.updateSessionRestoreVisibility();
restoreTabsButton.style.maxWidth = `${restoreTabsButtonWrapperWidth}px`;
gBrowser.tabContainer.addEventListener("TabOpen", this);
Services.telemetry.scalarSet("browser.session.restore.tabbar_restore_available", true);
restoreTabsButton.addEventListener("click", () => {
Services.telemetry.scalarSet("browser.session.restore.tabbar_restore_clicked", true);
});
}
Services.obs.addObserver(this, "sessionstore-last-session-cleared", true);
goSetCommandEnabled("Browser:RestoreLastSession", true);
} else if (SessionStartup.isAutomaticRestoreEnabled()) {
@ -8736,34 +8721,11 @@ var RestoreLastSessionObserver = {
}
},
handleEvent(event) {
switch (event.type) {
case "TabOpen":
this.removeRestoreButton();
break;
}
},
removeRestoreButton() {
let {restoreTabsButton} = gBrowser.tabContainer;
let restoreTabsButtonWrapper = restoreTabsButton.parentNode;
gBrowser.tabContainer.addEventListener("transitionend", function maxWidthTransitionHandler(e) {
if (e.target == gBrowser.tabContainer && e.propertyName == "max-width") {
gBrowser.tabContainer.updateSessionRestoreVisibility();
gBrowser.tabContainer.removeEventListener("transitionend", maxWidthTransitionHandler);
}
});
restoreTabsButtonWrapper.removeAttribute("session-exists");
restoreTabsButton.style.maxWidth = 0;
gBrowser.tabContainer.removeEventListener("TabOpen", this);
},
observe() {
// The last session can only be restored once so there's
// no way we need to re-enable our menu item.
Services.obs.removeObserver(this, "sessionstore-last-session-cleared");
goSetCommandEnabled("Browser:RestoreLastSession", false);
this.removeRestoreButton();
},
QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver,

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

@ -54,9 +54,8 @@ window._gBrowser = {
// To correctly handle keypresses for potential FindAsYouType, while
// the tab's find bar is not yet initialized.
this._findAsYouType = Services.prefs.getBoolPref("accessibility.typeaheadfind");
Services.prefs.addObserver("accessibility.typeaheadfind", this);
messageManager.addMessageListener("Findbar:Keypress", this);
this._setFindbarData();
XPCOMUtils.defineLazyPreferenceGetter(this, "animationsEnabled",
"toolkit.cosmeticAnimations.enabled");
@ -438,6 +437,27 @@ window._gBrowser = {
return this.selectedBrowser.userTypedValue;
},
_setFindbarData() {
// Ensure we know what the find bar key is in the content process:
let initialProcessData = Services.ppmm.initialProcessData;
if (!initialProcessData.findBarShortcutData) {
let keyEl = document.getElementById("key_find");
let mods = keyEl.getAttribute("modifiers")
.replace(/accel/i, AppConstants.platform == "macosx" ? "meta" : "control");
initialProcessData.findBarShortcutData = {
key: keyEl.getAttribute("key"),
modifiers: {
shiftKey: mods.includes("shift"),
ctrlKey: mods.includes("control"),
altKey: mods.includes("alt"),
metaKey: mods.includes("meta"),
},
};
Services.ppmm.broadcastAsyncMessage("Findbar:ShortcutData",
initialProcessData.findBarShortcutData);
}
},
isFindBarInitialized(aTab) {
return (aTab || this.selectedTab)._findBar != undefined;
},
@ -469,27 +489,19 @@ window._gBrowser = {
/**
* Create a findbar instance.
* @param aTab the tab to create the find bar for.
* @param aForce Whether to force a sync flush to trigger XBL construction immediately.
* @return the created findbar, or null if the window or tab is closed/closing.
*/
async _createFindBar(aTab, aForce = false) {
async _createFindBar(aTab) {
let findBar = document.createElementNS(this._XUL_NS, "findbar");
let browser = this.getBrowserForTab(aTab);
let browserContainer = this.getBrowserContainer(browser);
browserContainer.appendChild(findBar);
if (aForce) {
// Force a style flush to ensure that our binding is attached.
// Remove after bug 1371523 makes more of this async.
findBar.clientTop;
} else {
await new Promise(r => requestAnimationFrame(r));
if (window.closed || aTab.closing) {
delete aTab._pendingFindBar;
return null;
}
}
await new Promise(r => requestAnimationFrame(r));
delete aTab._pendingFindBar;
if (window.closed || aTab.closing) {
return null;
}
findBar.browser = browser;
findBar._findField.value = this._lastFindValue;
@ -3787,30 +3799,11 @@ window._gBrowser = {
case "Findbar:Keypress":
{
let tab = this.getTabForBrowser(browser);
// If the find bar for this tab is not yet alive, only initialize
// it if there's a possibility FindAsYouType will be used.
// There's no point in doing it for most random keypresses.
if (!this.isFindBarInitialized(tab) &&
data.shouldFastFind) {
let shouldFastFind = this._findAsYouType;
if (!shouldFastFind) {
// Please keep in sync with toolkit/content/widgets/findbar.xml
const FAYT_LINKS_KEY = "'";
const FAYT_TEXT_KEY = "/";
let charCode = data.fakeEvent.charCode;
let key = charCode ? String.fromCharCode(charCode) : null;
shouldFastFind = key == FAYT_LINKS_KEY || key == FAYT_TEXT_KEY;
}
if (shouldFastFind) {
// Make sure we return the result.
// This needs sync initialization of the find bar, unfortunately.
// bug 1371523 tracks removing all of this.
// This returns a promise, so don't use the result...
this._createFindBar(tab, true);
// ... just grab the 'cached' version now we know it exists.
this.getCachedFindBar().receiveMessage(aMessage);
}
if (!this.isFindBarInitialized(tab)) {
let fakeEvent = data;
this.getFindBar(tab).then(findbar => {
findbar._onBrowserKeypress(fakeEvent);
});
}
break;
}
@ -3879,12 +3872,6 @@ window._gBrowser = {
}
break;
}
case "nsPref:changed":
{
// This is the only pref observed.
this._findAsYouType = Services.prefs.getBoolPref("accessibility.typeaheadfind");
break;
}
}
},
@ -3945,8 +3932,6 @@ window._gBrowser = {
this._switcher.destroy();
}
}
Services.prefs.removeObserver("accessibility.typeaheadfind", this);
},
_setupEventListeners() {

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

@ -95,13 +95,6 @@
command="cmd_newNavigatorTab"
onclick="checkForMiddleClick(this, event);"
tooltip="dynamic-shortcut-tooltip"/>
<xul:hbox class="restore-tabs-button-wrapper"
anonid="restore-tabs-button-wrapper">
<xul:toolbarbutton anonid="restore-tabs-button"
class="restore-tabs-button"
onclick="SessionStore.restoreLastSession();"/>
</xul:hbox>
<xul:spacer class="closing-tabs-spacer" anonid="closing-tabs-spacer"
style="width: 0;"/>
</xul:arrowscrollbox>
@ -112,9 +105,6 @@
<![CDATA[
this._tabClipWidth = Services.prefs.getIntPref("browser.tabs.tabClipWidth");
let { restoreTabsButton } = this;
restoreTabsButton.setAttribute("label", gTabBrowserBundle.GetStringFromName("tabs.restoreLastTabs"));
let strId = PrivateBrowsingUtils.isWindowPrivate(window) ?
"emptyPrivateTabTitle" : "emptyTabTitle";
this.emptyTabTitle = gTabBrowserBundle.GetStringFromName("tabs." + strId);
@ -175,13 +165,6 @@
<field name="_beforeHoveredTab">null</field>
<field name="_afterHoveredTab">null</field>
<field name="_hoveredTab">null</field>
<field name="restoreTabsButton">
document.getAnonymousElementByAttribute(this, "anonid", "restore-tabs-button");
</field>
<field name="_restoreTabsButtonWrapperWidth">0</field>
<field name="windowUtils">
window.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIDOMWindowUtils);
</field>
<property name="_tabMinWidth">
<setter>
@ -190,51 +173,6 @@
</setter>
</property>
<property name="restoreTabsButtonWrapperWidth" readonly="true">
<getter>
if (!this._restoreTabsButtonWrapperWidth) {
this._restoreTabsButtonWrapperWidth = this.windowUtils
.getBoundsWithoutFlushing(this.restoreTabsButton.parentNode)
.width;
}
return this._restoreTabsButtonWrapperWidth;
</getter>
</property>
<method name="updateSessionRestoreVisibility">
<body><![CDATA[
let {restoreTabsButton, restoreTabsButtonWrapperWidth, windowUtils} = this;
let restoreTabsButtonWrapper = restoreTabsButton.parentNode;
if (!restoreTabsButtonWrapper.getAttribute("session-exists")) {
restoreTabsButtonWrapper.removeAttribute("shown");
return;
}
let arrowScrollboxWidth = this.arrowScrollbox.clientWidth;
let newTabButton = document.getAnonymousElementByAttribute(
this, "anonid", "tabs-newtab-button");
// If there are no pinned tabs it will multiply by 0 and result in 0
let pinnedTabsWidth = windowUtils.getBoundsWithoutFlushing(this.firstChild).width * this._lastNumPinned;
let numUnpinnedTabs = this.childNodes.length - this._lastNumPinned;
let unpinnedTabsWidth = windowUtils.getBoundsWithoutFlushing(this.lastChild).width * numUnpinnedTabs;
let tabbarUsedSpace = pinnedTabsWidth + unpinnedTabsWidth
+ windowUtils.getBoundsWithoutFlushing(newTabButton).width;
// Subtract the elements' widths from the available space to ensure
// that showing the restoreTabsButton won't cause any overflow.
if (arrowScrollboxWidth - tabbarUsedSpace > restoreTabsButtonWrapperWidth) {
restoreTabsButtonWrapper.setAttribute("shown", "true");
} else {
restoreTabsButtonWrapper.removeAttribute("shown");
}
]]></body>
</method>
<method name="observe">
<parameter name="aSubject"/>
<parameter name="aTopic"/>
@ -728,7 +666,6 @@
this._updateCloseButtons();
this._handleTabSelect(true);
this.updateSessionRestoreVisibility();
break;
case "mouseout":
// If the "related target" (the node to which the pointer went) is not

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

@ -83,6 +83,37 @@ const EXPECTED_REFLOWS_FIRST_OPEN = [
},
];
// These extra reflows happen on beta/release as one of the default bookmarks in
// bookmarks.html.in has a long URL.
if (AppConstants.RELEASE_OR_BETA) {
EXPECTED_REFLOWS_FIRST_OPEN.push({
stack: [
"_handleOverflow@chrome://global/content/bindings/autocomplete.xml",
"_onUnderflow@chrome://global/content/bindings/autocomplete.xml",
"onunderflow@chrome://browser/content/browser.xul",
],
maxCount: 6,
});
EXPECTED_REFLOWS_FIRST_OPEN.push({
stack: [
"_handleOverflow@chrome://global/content/bindings/autocomplete.xml",
"_onOverflow@chrome://global/content/bindings/autocomplete.xml",
"onoverflow@chrome://browser/content/browser.xul",
],
maxCount: 6,
});
EXPECTED_REFLOWS_FIRST_OPEN.push({
stack: [
"_handleOverflow@chrome://global/content/bindings/autocomplete.xml",
"_adjustAcItem@chrome://global/content/bindings/autocomplete.xml",
"_appendCurrentResult@chrome://global/content/bindings/autocomplete.xml",
"_invalidate@chrome://global/content/bindings/autocomplete.xml",
"invalidate@chrome://global/content/bindings/autocomplete.xml",
],
maxCount: 12,
});
}
/**
* Returns a Promise that resolves once the AwesomeBar popup for a particular
* window has appeared after having done a search for its input text.

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

@ -2396,7 +2396,7 @@ BrowserGlue.prototype = {
},
RecentTags: {
title: bundle.GetStringFromName("recentTagsTitle"),
url: "place:type=" + queryOptions.RESULTS_AS_TAG_QUERY +
url: "place:type=" + queryOptions.RESULTS_AS_TAGS_ROOT +
"&sort=" + queryOptions.SORT_BY_LASTMODIFIED_DESCENDING +
"&maxResults=" + MAX_RESULTS,
parentGuid: PlacesUtils.bookmarks.menuGuid,

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

@ -798,24 +798,14 @@ PlacesController.prototype = {
let tag = node.parent.title || "";
if (!tag) {
// The parent may be the root node, that doesn't have a title.
// Until we fix bug 1293445, we have two ways to get tags:
if (node.parent.queryOptions.resultType ==
Ci.nsINavHistoryQueryOptions.RESULTS_AS_TAG_CONTENTS) {
// Get the tag using the bookmarks API.
let tagItemId = PlacesUtils.getConcreteItemId(node.parent);
let tagGuid = await PlacesUtils.promiseItemGuid(tagItemId);
tag = (await PlacesUtils.bookmarks.fetch(tagGuid)).title;
} else {
// Extract the tag from the query itself.
tag = node.parent.query.tags[0];
}
tag = node.parent.query.tags[0];
}
transactions.push(PlacesTransactions.Untag({ urls: [node.uri], tag }));
} else if (PlacesUtils.nodeIsTagQuery(node) &&
node.parent &&
PlacesUtils.nodeIsQuery(node.parent) &&
PlacesUtils.asQuery(node.parent).queryOptions.resultType ==
Ci.nsINavHistoryQueryOptions.RESULTS_AS_TAG_QUERY) {
Ci.nsINavHistoryQueryOptions.RESULTS_AS_TAGS_ROOT) {
// This is a tag container.
// Untag all URIs tagged with this tag only if the tag container is
// child of the "Tags" query in the library, in all other places we

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

@ -84,7 +84,7 @@
// tag containers, so we must fall to the default case.
if (PlacesUtils.nodeIsHistoryContainer(queryNode) ||
PlacesUtils.nodeIsTagQuery(queryNode) ||
options.resultType == options.RESULTS_AS_TAG_QUERY ||
options.resultType == options.RESULTS_AS_TAGS_ROOT ||
options.resultType == options.RESULTS_AS_ROOTS_QUERY)
options.resultType = options.RESULTS_AS_URI;

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

@ -138,7 +138,7 @@ PlacesTreeView.prototype = {
case Ci.nsINavHistoryQueryOptions.RESULTS_AS_DATE_QUERY:
case Ci.nsINavHistoryQueryOptions.RESULTS_AS_SITE_QUERY:
case Ci.nsINavHistoryQueryOptions.RESULTS_AS_DATE_SITE_QUERY:
case Ci.nsINavHistoryQueryOptions.RESULTS_AS_TAG_QUERY:
case Ci.nsINavHistoryQueryOptions.RESULTS_AS_TAGS_ROOT:
case Ci.nsINavHistoryQueryOptions.RESULTS_AS_ROOTS_QUERY:
case Ci.nsINavHistoryQueryOptions.RESULTS_AS_LEFT_PANE_QUERY:
return false;

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

@ -73,7 +73,7 @@ add_task(async function() {
let tagsQuery = await PlacesUtils.bookmarks.insert({
parentGuid: root.guid,
title: "",
url: "place:type=" + Ci.nsINavHistoryQueryOptions.RESULTS_AS_TAG_QUERY,
url: "place:type=" + Ci.nsINavHistoryQueryOptions.RESULTS_AS_TAGS_ROOT,
});
tree.selectItems([tagsQuery.guid]);
PlacesUtils.asQuery(tree.selectedNode).containerOpen = true;

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

@ -3514,10 +3514,6 @@ var SessionStoreInternal = {
arrowScrollbox.smoothScroll = smoothScroll;
TelemetryStopwatch.finish("FX_SESSION_RESTORE_RESTORE_WINDOW_MS");
if (Services.prefs.getIntPref("browser.tabs.restorebutton") != 0 ) {
Services.telemetry.scalarAdd("browser.session.restore.number_of_tabs", winData.tabs.length);
Services.telemetry.scalarAdd("browser.session.restore.number_of_win", 1);
}
this._setWindowStateReady(aWindow);

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

@ -2,7 +2,6 @@
# 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/.
tabs.restoreLastTabs=Restore Tabs From Last Time
tabs.emptyTabTitle=New Tab
tabs.emptyPrivateTabTitle=Private Browsing
tabs.closeTab=Close Tab

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

@ -128,7 +128,6 @@ XPCOMUtils.defineLazyGetter(this, "ALL_BUILTIN_ITEMS", function() {
"BMB_bookmarksToolbarPopup",
"search-go-button",
"soundplaying-icon",
"restore-tabs-button",
];
return DEFAULT_ITEMS.concat(PALETTE_ITEMS)
.concat(SPECIAL_CASES);

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

@ -628,11 +628,6 @@ notification[value="translation"] menulist > .menulist-dropmarker {
border-radius: inherit;
}
/* Prevent movement in the restore-tabs-button when it's clicked. */
.restore-tabs-button:hover:active:not([disabled="true"]) {
padding: 3px;
}
/* Hide the titlebar explicitly on versions of GTK+ where
* it's rendered by window manager. */
@media (-moz-gtk-csd-available: 0) {

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

@ -748,55 +748,3 @@
list-style-image: url(chrome://browser/skin/tabbrowser/tab-audio-blocked.svg);
}
.restore-tabs-button-wrapper {
visibility: hidden;
position: fixed; /* so the button does not take up actual space and cause overflow buttons in the tabbar when hidden */
}
.restore-tabs-button-wrapper[shown] {
visibility: visible;
position: initial;
}
.restore-tabs-button {
box-sizing: border-box;
-moz-appearance: none;
background-color: hsl(0,0%,0%,.04);
border: 1px solid hsla(0,0%,16%,.2);
border-radius: 3px;
margin: 3px;
margin-inline-start: 9px;
transition: max-width 100ms;
padding: 0 5px;
}
.restore-tabs-button:hover {
background-color: hsl(0,0%,0%,.08);
}
.restore-tabs-button:active {
background-color: hsl(0,0%,0%,.11);
}
#TabsToolbar[brighttext] .restore-tabs-button {
background-color: hsl(0,0%,100%,.07);
border-color:currentColor;
color: currentColor;
opacity: .7;
}
#TabsToolbar[brighttext] .restore-tabs-button:hover {
background-color: hsl(0,0%,100%,.17);
}
#TabsToolbar[brighttext] .restore-tabs-button:active {
background-color: hsl(0,0%,100%,.27);
}
.restore-tabs-button > .toolbarbutton-icon {
display: none;
}
.restore-tabs-button > .toolbarbutton-text {
display: -moz-box;
}

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

@ -1115,7 +1115,3 @@ panel[touchmode] .PanelUI-subView #appMenu-zoom-controls > .subviewbutton-iconic
padding-bottom: .9167em;
}
/* Prevent movement in the restore-tabs-button when it's clicked. */
.restore-tabs-button:hover:active:not([disabled="true"]) {
padding: 3px;
}

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

@ -113,6 +113,7 @@ included_inclnames_to_ignore = set([
# ignore #includes of them when checking #include ordering.
oddly_ordered_inclnames = set([
'ctypes/typedefs.h', # Included multiple times in the body of ctypes/CTypes.h
'frontend/BinSource-auto.h', # Included in the body of frontend/BinSource.h
'frontend/ReservedWordsGenerated.h', # Included in the body of frontend/TokenStream.h
'gc/StatsPhasesGenerated.h', # Included in the body of gc/Statistics.h
'gc/StatsPhasesGenerated.cpp', # Included in the body of gc/Statistics.cpp

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

@ -66,9 +66,10 @@ function testEventListeners(aThreadClient) {
return;
}
// There are 3 event listeners in the page: button.onclick, window.onload
// and one more from the video element controls.
is(aPacket.listeners.length, 3, "Found all event listeners.");
// There are 2 event listeners in the page: button.onclick, window.onload.
// The video element controls listeners are skipped — they cannot be
// unwrapped but they shouldn't cause us to throw either.
is(aPacket.listeners.length, 2, "Found all event listeners.");
aThreadClient.resume(deferred.resolve);
});

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

@ -107,21 +107,14 @@ async function testSelectTool() {
async function testOptionsShortcut() {
info("Selecting another tool, then reselecting options panel with keyboard.");
await toolbox.selectTool("webconsole");
is(toolbox.currentToolId, "webconsole", "webconsole is selected");
synthesizeKeyShortcut(L10N.getStr("toolbox.options.key"));
is(toolbox.currentToolId, "options", "Toolbox selected via shortcut key (1)");
synthesizeKeyShortcut(L10N.getStr("toolbox.options.key"));
is(toolbox.currentToolId, "webconsole", "webconsole is selected (1)");
await toolbox.selectTool("webconsole");
is(toolbox.currentToolId, "webconsole", "webconsole is selected");
synthesizeKeyShortcut(L10N.getStr("toolbox.help.key"));
is(toolbox.currentToolId, "options", "Toolbox selected via shortcut key (2)");
synthesizeKeyShortcut(L10N.getStr("toolbox.options.key"));
is(toolbox.currentToolId, "webconsole", "webconsole is reselected (2)");
is(toolbox.currentToolId, "options", "Toolbox selected via shortcut key");
synthesizeKeyShortcut(L10N.getStr("toolbox.help.key"));
is(toolbox.currentToolId, "options", "Toolbox selected via shortcut key (2)");
is(toolbox.currentToolId, "webconsole", "webconsole is reselected");
synthesizeKeyShortcut(L10N.getStr("toolbox.help.key"));
is(toolbox.currentToolId, "options", "Toolbox selected via shortcut key");
}
async function testOptions() {

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

@ -823,10 +823,7 @@ Toolbox.prototype = {
} else {
this.selectTool("options");
}
// Prevent the opening of bookmarks window on toolbox.options.key
event.preventDefault();
};
this.shortcuts.on(L10N.getStr("toolbox.options.key"), selectOptions);
this.shortcuts.on(L10N.getStr("toolbox.help.key"), selectOptions);
},

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

@ -98,10 +98,6 @@ toolbox.viewJsSourceInDebugger.label=Open File in Debugger
toolbox.resumeOrderWarning=Page did not resume after the debugger was attached. To fix this, please close and re-open the toolbox.
# LOCALIZATION NOTE (toolbox.options.key)
# Key shortcut used to open the options panel
toolbox.options.key=CmdOrCtrl+Shift+O
# LOCALIZATION NOTE (toolbox.help.key)
# Key shortcut used to open the options panel
toolbox.help.key=F1

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

@ -696,16 +696,23 @@ checkbox:-moz-focusring {
width: 100%;
height: 2px;
background: transparent;
transition: transform 250ms var(--animation-easing-function), opacity 250ms var(--animation-easing-function);
opacity: 0;
transform: scaleX(0);
}
.devtools-tab:hover .devtools-tab-line,
.tabs-menu-item:hover .devtools-tab-line {
background: var(--tab-line-hover-color);
opacity: 1;
transform: scaleX(1);
}
.devtools-tab.selected .devtools-tab-line,
.tabs-menu-item.is-active .devtools-tab-line {
background: var(--tab-line-selected-color);
opacity: 1;
transform: scaleX(1);
}
/* No result message styles */

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

@ -1197,12 +1197,10 @@ KeyframeEffectReadOnly::CanThrottle() const
mTarget->mPseudoType);
MOZ_ASSERT(effectSet, "CanThrottle should be called on an effect "
"associated with a target element");
layers::Layer* layer =
FrameLayerBuilder::GetDedicatedLayer(frame, record.mLayerType);
// Unthrottle if the layer needs to be brought up to date
if (!layer ||
effectSet->GetAnimationGeneration() !=
layer->GetAnimationGeneration()) {
Maybe<uint64_t> generation = layers::AnimationInfo::GetGenerationFromFrame(
frame, record.mLayerType);
// Unthrottle if the animation needs to be brought up to date
if (!generation || effectSet->GetAnimationGeneration() != *generation) {
return false;
}

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

@ -3677,6 +3677,7 @@ nsIDocument::SetDocumentCharacterSet(NotNull<const Encoding*> aEncoding)
{
if (mCharacterSet != aEncoding) {
mCharacterSet = aEncoding;
mEncodingMenuDisabled = aEncoding == UTF_8_ENCODING;
if (nsPresContext* context = GetPresContext()) {
context->DispatchCharSetChange(aEncoding);

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

@ -4159,6 +4159,7 @@ FullscreenTransitionTask::Run()
this);
} else if (stage == eEnd) {
PROFILER_ADD_MARKER("Fullscreen transition end");
mWidget->CleanupFullscreenTransition();
}
return NS_OK;
}

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

@ -1113,9 +1113,9 @@ public:
* Called when the document was decoded as UTF-8 and decoder encountered no
* errors.
*/
void DisableEncodingMenu()
void EnableEncodingMenu()
{
mEncodingMenuDisabled = true;
mEncodingMenuDisabled = false;
}
/**

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

@ -722,7 +722,9 @@ EventStateManager::PreHandleEvent(nsPresContext* aPresContext,
// that ClearFrameRefs() has been called and it cleared out
// |mCurrentTarget|. As a result, we should pass |mCurrentTarget|
// into UpdateCursor().
GenerateDragGesture(aPresContext, mouseEvent);
if (!mInTouchDrag) {
GenerateDragGesture(aPresContext, mouseEvent);
}
UpdateCursor(aPresContext, aEvent, mCurrentTarget, aStatus);
UpdateLastRefPointOfMouseEvent(mouseEvent);

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

@ -172,8 +172,11 @@ var testData = [
},
];
function sendKeys(aKeys) {
function sendKeys(aKeys, aElem) {
for (let i = 0; i < aKeys.length; i++) {
// Force layout flush between keys to ensure focus is correct.
// This shouldn't be necessary; bug 1450219 tracks this.
aElem.clientTop;
let key = aKeys[i];
if (key.startsWith("KEY_")) {
synthesizeKey(key);
@ -189,7 +192,7 @@ function test() {
for (let { keys, initialVal, expectedVal } of testData) {
elem.focus();
elem.value = initialVal;
sendKeys(keys);
sendKeys(keys, elem);
is(elem.value, expectedVal,
"Test with " + keys + ", result should be " + expectedVal);
elem.value = "";

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

@ -134,6 +134,9 @@ private:
#ifdef MOZ_FFVPX
DECL_MEDIA_PREF("media.ffvpx.enabled", PDMFFVPXEnabled, bool, true);
#endif
#ifdef MOZ_AV1
DECL_MEDIA_PREF("media.av1.enabled", AV1Enabled, bool, false);
#endif
#ifdef XP_WIN
DECL_MEDIA_PREF("media.wmf.enabled", PDMWMFEnabled, bool, true);
DECL_MEDIA_PREF("media.wmf.skip-blacklist", PDMWMFSkipBlacklist, bool, false);

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

@ -5,6 +5,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "AgnosticDecoderModule.h"
#include "MediaPrefs.h"
#include "OpusDecoder.h"
#include "TheoraDecoder.h"
#include "VPXDecoder.h"
@ -25,13 +26,15 @@ AgnosticDecoderModule::SupportsMimeType(
{
bool supports =
VPXDecoder::IsVPX(aMimeType) ||
#ifdef MOZ_AV1
AOMDecoder::IsAV1(aMimeType) ||
#endif
OpusDataDecoder::IsOpus(aMimeType) ||
VorbisDataDecoder::IsVorbis(aMimeType) ||
WaveDataDecoder::IsWave(aMimeType) ||
TheoraDecoder::IsTheora(aMimeType);
#ifdef MOZ_AV1
if (MediaPrefs::AV1Enabled()) {
supports |= AOMDecoder::IsAV1(aMimeType);
}
#endif
MOZ_LOG(sPDMLog, LogLevel::Debug, ("Agnostic decoder %s requested type",
supports ? "supports" : "rejects"));
return supports;
@ -46,7 +49,8 @@ AgnosticDecoderModule::CreateVideoDecoder(const CreateDecoderParams& aParams)
m = new VPXDecoder(aParams);
}
#ifdef MOZ_AV1
else if (AOMDecoder::IsAV1(aParams.mConfig.mMimeType)) {
else if (AOMDecoder::IsAV1(aParams.mConfig.mMimeType) &&
MediaPrefs::AV1Enabled()) {
m = new AOMDecoder(aParams);
}
#endif

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

@ -10,6 +10,7 @@
#include "AOMDecoder.h"
#endif
#include "MediaContainerType.h"
#include "MediaPrefs.h"
#include "PDMFactory.h"
#include "VideoUtils.h"
@ -69,7 +70,8 @@ WebMDecoder::IsSupportedType(const MediaContainerType& aContainerType)
}
}
#ifdef MOZ_AV1
if (isVideo && AOMDecoder::IsSupportedCodec(codec)) {
if (isVideo && MediaPrefs::AV1Enabled() &&
AOMDecoder::IsSupportedCodec(codec)) {
continue;
}
#endif

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

@ -174,5 +174,24 @@ AnimationInfo::HasTransformAnimation() const
return false;
}
/* static */ Maybe<uint64_t>
AnimationInfo::GetGenerationFromFrame(nsIFrame* aFrame,
DisplayItemType aDisplayItemKey)
{
layers::Layer* layer =
FrameLayerBuilder::GetDedicatedLayer(aFrame, aDisplayItemKey);
if (layer) {
return Some(layer->GetAnimationInfo().GetAnimationGeneration());
}
RefPtr<WebRenderAnimationData> animationData =
GetWebRenderUserData<WebRenderAnimationData>(aFrame, (uint32_t)aDisplayItemKey);
if (animationData) {
return Some(animationData->GetAnimationInfo().GetAnimationGeneration());
}
return Nothing();
}
} // namespace layers
} // namespace mozilla

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

@ -8,6 +8,7 @@
#define GFX_ANIMATIONINFO_H
#include "mozilla/StyleAnimationValue.h"
#include "nsDisplayItemTypes.h"
namespace mozilla {
namespace layers {
@ -58,6 +59,9 @@ public:
bool HasOpacityAnimation() const;
bool HasTransformAnimation() const;
static Maybe<uint64_t> GetGenerationFromFrame(nsIFrame* aFrame,
DisplayItemType aDisplayItemKey);
protected:
LayerManager* mManager;
AnimationArray mAnimations;

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

@ -1,166 +0,0 @@
/* -*- 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/AnimationMetricsTracker.h"
#include <algorithm>
#include <cmath>
#include <inttypes.h>
#define AMT_LOG(...)
// #define AMT_LOG(...) printf_stderr("AMT: " __VA_ARGS__)
namespace mozilla {
namespace layers {
AnimationMetricsTracker::AnimationMetricsTracker()
: mMaxLayerAreaAnimated(0)
{
}
AnimationMetricsTracker::~AnimationMetricsTracker()
{
}
void
AnimationMetricsTracker::UpdateAnimationInProgress(AnimationProcessTypes aActive,
uint64_t aLayerArea,
TimeDuration aVsyncInterval)
{
bool inProgress = (aActive != AnimationProcessTypes::eNone);
MOZ_ASSERT(inProgress || aLayerArea == 0);
if (mCurrentAnimationStart && !inProgress) {
AnimationEnded();
mCurrentAnimationStart = TimeStamp();
mMaxLayerAreaAnimated = 0;
} else if (inProgress) {
if (!mCurrentAnimationStart) {
mCurrentAnimationStart = TimeStamp::Now();
mMaxLayerAreaAnimated = aLayerArea;
AnimationStarted();
} else {
mMaxLayerAreaAnimated = std::max(mMaxLayerAreaAnimated, aLayerArea);
}
}
UpdateAnimationThroughput("chrome",
(aActive & AnimationProcessTypes::eChrome) != AnimationProcessTypes::eNone,
mChromeAnimation,
aVsyncInterval,
Telemetry::COMPOSITOR_ANIMATION_THROUGHPUT_CHROME,
Telemetry::COMPOSITOR_ANIMATION_MAX_CONTIGUOUS_DROPS_CHROME);
UpdateAnimationThroughput("content",
(aActive & AnimationProcessTypes::eContent) != AnimationProcessTypes::eNone,
mContentAnimation,
aVsyncInterval,
Telemetry::COMPOSITOR_ANIMATION_THROUGHPUT_CONTENT,
Telemetry::COMPOSITOR_ANIMATION_MAX_CONTIGUOUS_DROPS_CONTENT);
}
void
AnimationMetricsTracker::UpdateApzAnimationInProgress(bool aInProgress,
TimeDuration aVsyncInterval)
{
UpdateAnimationThroughput("apz",
aInProgress,
mApzAnimation,
aVsyncInterval,
Telemetry::COMPOSITOR_ANIMATION_THROUGHPUT_APZ,
Telemetry::COMPOSITOR_ANIMATION_MAX_CONTIGUOUS_DROPS_APZ);
}
void
AnimationMetricsTracker::AnimationStarted()
{
}
void
AnimationMetricsTracker::AnimationEnded()
{
MOZ_ASSERT(mCurrentAnimationStart);
Telemetry::AccumulateTimeDelta(Telemetry::COMPOSITOR_ANIMATION_DURATION, mCurrentAnimationStart);
Telemetry::Accumulate(Telemetry::COMPOSITOR_ANIMATION_MAX_LAYER_AREA, mMaxLayerAreaAnimated);
AMT_LOG("Ended animation; duration: %f ms, area: %" PRIu64 "\n",
(TimeStamp::Now() - mCurrentAnimationStart).ToMilliseconds(),
mMaxLayerAreaAnimated);
}
void
AnimationMetricsTracker::UpdateAnimationThroughput(const char* aLabel,
bool aInProgress,
AnimationData& aAnimation,
TimeDuration aVsyncInterval,
Telemetry::HistogramID aThroughputHistogram,
Telemetry::HistogramID aMaxDropsHistogram)
{
if (aInProgress && !aAnimation.mStart) {
// the animation just started
aAnimation.mStart = TimeStamp::Now();
aAnimation.mLastFrameTime = aAnimation.mStart;
aAnimation.mLongestFrame = TimeDuration();
aAnimation.mFrameCount = 1;
AMT_LOG("Compositor animation of type %s just started\n", aLabel);
} else if (aInProgress && aAnimation.mStart) {
// the animation continues
aAnimation.mFrameCount++;
TimeStamp now = TimeStamp::Now();
aAnimation.mLongestFrame = std::max(aAnimation.mLongestFrame, now - aAnimation.mLastFrameTime);
aAnimation.mLastFrameTime = now;
} else if (!aInProgress && aAnimation.mStart) {
// the animation just ended
TimeStamp now = TimeStamp::Now();
// Get the length and clear aAnimation.mStart before the early-returns below
TimeDuration animationLength = now - aAnimation.mStart;
aAnimation.mStart = TimeStamp();
if (aVsyncInterval == TimeDuration::Forever()) {
AMT_LOG("Invalid vsync interval: forever\n");
return;
}
double vsyncIntervalMs = aVsyncInterval.ToMilliseconds();
if (vsyncIntervalMs < 1.0f) {
// Guard to avoid division by zero or other crazy results below
AMT_LOG("Invalid vsync interval: %fms\n", vsyncIntervalMs);
return;
}
// We round the expectedFrameCount because it's a count and should be an
// integer. The animationLength might not be an exact vsync multiple because
// it's taken during the composition process and the amount of work done
// between the vsync signal and the Timestamp::Now() call may vary slightly
// from one composite to another.
uint32_t expectedFrameCount = std::lround(animationLength.ToMilliseconds() / vsyncIntervalMs);
AMT_LOG("Type %s ran for %fms (interval: %fms), %u frames (expected: %u)\n",
aLabel, animationLength.ToMilliseconds(), vsyncIntervalMs,
aAnimation.mFrameCount, expectedFrameCount);
if (expectedFrameCount <= 0) {
// Graceful handling of probably impossible thing, unless the clock
// changes while running?
// Note that we also skip the frames-dropped probe if this happens,
// because we cannot be sure that the frame length measurements are valid.
return;
}
// Scale up by 1000 because telemetry takes ints, truncate intentionally
// to avoid artificial inflation of the result.
uint32_t frameHitRatio = (uint32_t)(1000.0f * aAnimation.mFrameCount / expectedFrameCount);
Telemetry::Accumulate(aThroughputHistogram, frameHitRatio);
AMT_LOG("Reported frameHitRatio %u\n", frameHitRatio);
// Get the longest frame time (make sure to check the final frame as well)
TimeDuration longestFrame = std::max(aAnimation.mLongestFrame, now - aAnimation.mLastFrameTime);
// As above, we round to get the frame count. Additionally we subtract one
// from the frame count to get the number of dropped frames.
uint32_t framesDropped = std::lround(longestFrame.ToMilliseconds() / vsyncIntervalMs) - 1;
AMT_LOG("Longest frame was %fms (%d drops)\n", longestFrame.ToMilliseconds(), framesDropped);
Telemetry::Accumulate(aMaxDropsHistogram, framesDropped);
}
}
} // namespace layers
} // namespace mozilla

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

@ -1,92 +0,0 @@
/* -*- 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_AnimationMetricsTracker_h
#define mozilla_layers_AnimationMetricsTracker_h
#include "mozilla/Telemetry.h"
#include "mozilla/TimeStamp.h"
#include "mozilla/TypedEnumBits.h"
namespace mozilla {
namespace layers {
enum class AnimationProcessTypes {
eNone = 0x0,
eContent = 0x1,
eChrome = 0x2
};
MOZ_MAKE_ENUM_CLASS_BITWISE_OPERATORS(AnimationProcessTypes)
/**
* Tracks the start and end of compositor animations.
*/
class AnimationMetricsTracker {
public:
AnimationMetricsTracker();
~AnimationMetricsTracker();
/**
* This function should be called per composite, to inform the metrics
* tracker which processes have active animations. If there is are animations
* in progress, the sum of their areas should also be provided, along with
* the vsync interval.
*/
void UpdateAnimationInProgress(AnimationProcessTypes aActive, uint64_t aLayerArea,
TimeDuration aVsyncInterval);
/**
* Similar to UpdateAnimationInProgress, but this is for APZ animations. Again,
* this should be called per composite.
*/
void UpdateApzAnimationInProgress(bool aInProgress, TimeDuration aVsyncInterval);
private:
// A struct to group data that we need for each type of compositor animation.
struct AnimationData {
// The start time of the current animation.
TimeStamp mStart;
// The timestamp of the most recent animation frame.
TimeStamp mLastFrameTime;
// The longest animation frame length encountered so far.
TimeDuration mLongestFrame;
// The number of frames composited for the current animation.
uint32_t mFrameCount;
AnimationData()
: mFrameCount(0)
{
}
};
void AnimationStarted();
void AnimationEnded();
void UpdateAnimationThroughput(const char* aLabel,
bool aInProgress,
AnimationData& aAnimationData,
TimeDuration aVsyncInterval,
Telemetry::HistogramID aThroughputHistogram,
Telemetry::HistogramID aMaxDropsHistogram);
// The start time of the current compositor animation. This just tracks
// whether the compositor is running an animation, without regard to which
// process the animation is coming from.
TimeStamp mCurrentAnimationStart;
// The max area (in layer pixels) that the current compositor animation
// has touched on any given animation frame.
uint64_t mMaxLayerAreaAnimated;
// We keep an instance of the struct for each type of compositor animation.
AnimationData mChromeAnimation;
AnimationData mContentAnimation;
AnimationData mApzAnimation;
};
} // namespace layers
} // namespace mozilla
#endif // mozilla_layers_AnimationMetricsTracker_h

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

@ -638,31 +638,17 @@ ApplyAnimatedValue(Layer* aLayer,
}
}
static AnimationProcessTypes
static bool
SampleAnimations(Layer* aLayer,
CompositorAnimationStorage* aStorage,
TimeStamp aTime,
uint64_t* aLayerAreaAnimated)
TimeStamp aTime)
{
// This tracks the first-encountered RefLayer in the layer tree. Since we are
// doing a depth-first traversal, it is set to a non-null value if and only if
// the currently-being-traversed node has a RefLayer ancestor. In the case of
// nested RefLayers it points to the rootmost RefLayer.
RefLayer* ancestorRefLayer = nullptr;
// This bitfield-enum tracks which processes have active animations. Anything
// "above" the |ancestorRefLayer| in the layer tree is assumed to be the
// chrome process, and anything "below" is assumed to be the content process.
AnimationProcessTypes animProcess = AnimationProcessTypes::eNone;
bool isAnimating = false;
ForEachNode<ForwardIterator>(
aLayer,
[&] (Layer* layer)
{
if (!ancestorRefLayer) {
ancestorRefLayer = layer->AsRefLayer();
}
bool hasInEffectAnimations = false;
AnimationValue animationValue = layer->GetBaseAnimationStyle();
if (AnimationHelper::SampleAnimationForEachNode(aTime,
@ -670,8 +656,7 @@ SampleAnimations(Layer* aLayer,
layer->GetAnimationData(),
animationValue,
hasInEffectAnimations)) {
animProcess |= (ancestorRefLayer ? AnimationProcessTypes::eContent
: AnimationProcessTypes::eChrome);
isAnimating = true;
}
if (hasInEffectAnimations) {
Animation& animation = layer->GetAnimations().LastElement();
@ -680,20 +665,10 @@ SampleAnimations(Layer* aLayer,
animation.property(),
animation.data(),
animationValue);
if (aLayerAreaAnimated) {
*aLayerAreaAnimated += (layer->GetVisibleRegion().Area());
}
}
},
[&ancestorRefLayer] (Layer* aLayer)
{
// If we're unwinding up past the rootmost RefLayer, clear our pointer
if (ancestorRefLayer && aLayer->AsRefLayer() == ancestorRefLayer) {
ancestorRefLayer = nullptr;
}
});
return animProcess;
return isAnimating;
}
void
@ -1200,17 +1175,11 @@ AsyncCompositionManager::TransformShadowTree(TimeStamp aCurrentFrame,
// more in sync with each other.
// On the initial frame we use aVsyncTimestamp here so the timestamp on the
// second frame are the same as the initial frame, but it does not matter.
uint64_t layerAreaAnimated = 0;
AnimationProcessTypes animationProcess =
bool wantNextFrame =
SampleAnimations(root,
storage,
!mPreviousFrameTimeStamp.IsNull() ?
mPreviousFrameTimeStamp : aCurrentFrame,
&layerAreaAnimated);
bool wantNextFrame = (animationProcess != AnimationProcessTypes::eNone);
mAnimationMetricsTracker.UpdateAnimationInProgress(
animationProcess, layerAreaAnimated, aVsyncRate);
mPreviousFrameTimeStamp : aCurrentFrame);
if (!wantNextFrame) {
// Clean up the CompositorAnimationStorage because
@ -1267,7 +1236,6 @@ AsyncCompositionManager::TransformShadowTree(TimeStamp aCurrentFrame,
if (RefPtr<APZSampler> apz = mCompositorBridge->GetAPZSampler()) {
apzAnimating = apz->SampleAnimations(LayerMetricsWrapper(root), nextFrame);
}
mAnimationMetricsTracker.UpdateApzAnimationInProgress(apzAnimating, aVsyncRate);
wantNextFrame |= apzAnimating;
}

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

@ -15,7 +15,6 @@
#include "mozilla/dom/ScreenOrientation.h" // for ScreenOrientation
#include "mozilla/gfx/BasePoint.h" // for BasePoint
#include "mozilla/gfx/Matrix.h" // for Matrix4x4
#include "mozilla/layers/AnimationMetricsTracker.h" // for AnimationMetricsTracker
#include "mozilla/layers/FrameUniformityData.h" // For FrameUniformityData
#include "mozilla/layers/LayersMessages.h" // for TargetConfig
#include "mozilla/RefPtr.h" // for nsRefPtr
@ -222,7 +221,6 @@ private:
LayerTransformRecorder mLayerTransformRecorder;
TimeStamp mPreviousFrameTimeStamp;
AnimationMetricsTracker mAnimationMetricsTracker;
MOZ_NON_OWNING_REF CompositorBridgeParent* mCompositorBridge;

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

@ -138,7 +138,6 @@ EXPORTS.mozilla.layers += [
'client/TextureClientRecycleAllocator.h',
'client/TextureClientSharedSurface.h',
'client/TiledContentClient.h',
'composite/AnimationMetricsTracker.h',
'composite/AsyncCompositionManager.h',
'composite/CanvasLayerComposite.h',
'composite/ColorLayerComposite.h',
@ -370,7 +369,6 @@ UNIFIED_SOURCES += [
'client/TextureClientRecycleAllocator.cpp',
'client/TextureClientSharedSurface.cpp',
'client/TiledContentClient.cpp',
'composite/AnimationMetricsTracker.cpp',
'composite/AsyncCompositionManager.cpp',
'composite/CanvasLayerComposite.cpp',
'composite/ColorLayerComposite.cpp',

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

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

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

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

@ -39,9 +39,10 @@ class BinASTParser;
*/
class BinASTParser : private JS::AutoGCRooter, public ErrorReporter
{
using Names = JS::GCVector<JSString*, 8>;
using Tokenizer = BinTokenReaderTester;
using BinFields = Tokenizer::BinFields;
using Chars = Tokenizer::Chars;
using Names = JS::GCVector<JSString*, 8>;
public:
BinASTParser(JSContext* cx, LifoAlloc& alloc, UsedNameTracker& usedNames, const JS::ReadOnlyCompileOptions& options)
@ -92,87 +93,63 @@ class BinASTParser : private JS::AutoGCRooter, public ErrorReporter
//
// These methods return a (failed) JS::Result for convenience.
MOZ_MUST_USE mozilla::GenericErrorResult<JS::Error&> raiseInvalidKind(const char* superKind, const BinKind kind);
MOZ_MUST_USE mozilla::GenericErrorResult<JS::Error&> raiseInvalidField(const char* kind, const BinField field);
MOZ_MUST_USE mozilla::GenericErrorResult<JS::Error&> raiseInvalidEnum(const char* kind, const Chars& value);
MOZ_MUST_USE mozilla::GenericErrorResult<JS::Error&> raiseMissingField(const char* kind, const BinField field);
MOZ_MUST_USE mozilla::GenericErrorResult<JS::Error&> raiseMissingVariableInAssertedScope(JSAtom* name);
MOZ_MUST_USE mozilla::GenericErrorResult<JS::Error&> raiseMissingDirectEvalInAssertedScope();
MOZ_MUST_USE mozilla::GenericErrorResult<JS::Error&> raiseInvalidKind(const char* superKind,
const BinKind kind);
MOZ_MUST_USE mozilla::GenericErrorResult<JS::Error&> raiseInvalidField(const char* kind,
const BinField field);
MOZ_MUST_USE mozilla::GenericErrorResult<JS::Error&> raiseInvalidNumberOfFields(
const BinKind kind, const uint32_t expected, const uint32_t got);
MOZ_MUST_USE mozilla::GenericErrorResult<JS::Error&> raiseInvalidEnum(const char* kind,
const Chars& value);
MOZ_MUST_USE mozilla::GenericErrorResult<JS::Error&> raiseMissingField(const char* kind,
const BinField field);
MOZ_MUST_USE mozilla::GenericErrorResult<JS::Error&> raiseEmpty(const char* description);
MOZ_MUST_USE mozilla::GenericErrorResult<JS::Error&> raiseOOM();
MOZ_MUST_USE mozilla::GenericErrorResult<JS::Error&> raiseError(const char* description);
MOZ_MUST_USE mozilla::GenericErrorResult<JS::Error&> raiseError(BinKind kind, const char* description);
MOZ_MUST_USE mozilla::GenericErrorResult<JS::Error&> raiseError(BinKind kind,
const char* description);
// Ensure that this parser will never be used again.
void poison();
// --- Parse full nodes (methods are sorted by alphabetical order)
//
// These method may NEVER return `nullptr`. // FIXME: We can probably optimize Result<> based on this.
// Auto-generated methods
#include "frontend/BinSource-auto.h"
MOZ_MUST_USE JS::Result<ParseNode*> parseBlockStatement();
MOZ_MUST_USE JS::Result<ParseNode*> parseCatchClause();
MOZ_MUST_USE JS::Result<ParseNode*> parseExpression();
MOZ_MUST_USE JS::Result<ParseNode*> parseForInit();
MOZ_MUST_USE JS::Result<ParseNode*> parseForInInit();
MOZ_MUST_USE JS::Result<ParseNode*> parseIdentifier();
MOZ_MUST_USE JS::Result<ParseNode*> parseObjectPropertyName();
MOZ_MUST_USE JS::Result<ParseNode*> parseObjectMember();
MOZ_MUST_USE JS::Result<ParseNode*> parsePattern(); // Parse a *binding* pattern.
MOZ_MUST_USE JS::Result<ParseNode*> parsePropertyName();
MOZ_MUST_USE JS::Result<ParseNode*> parseProgram();
MOZ_MUST_USE JS::Result<ParseNode*> parseStatement();
MOZ_MUST_USE JS::Result<ParseNode*> parseSwitchCase();
MOZ_MUST_USE JS::Result<ParseNode*> parseVariableDeclarator();
// --- Auxiliary parsing functions
template<size_t N>
JS::Result<Ok, JS::Error&>
checkFields(const BinKind kind, const BinFields& actual, const BinField (&expected)[N]);
JS::Result<Ok, JS::Error&>
checkFields0(const BinKind kind, const BinFields& actual);
JS::Result<ParseNode*>
buildFunction(const size_t start, const BinKind kind, ParseNode* name, ParseNode* params,
ParseNode* body, FunctionBox* funbox);
JS::Result<FunctionBox*>
buildFunctionBox(GeneratorKind generatorKind, FunctionAsyncKind functionAsyncKind);
// --- Parse lists of nodes (methods are sorted by alphabetical order)
MOZ_MUST_USE JS::Result<ParseNode*> parseArgumentList();
MOZ_MUST_USE JS::Result<ParseNode*> parseDirectiveList();
MOZ_MUST_USE JS::Result<ParseNode*> parseExpressionList(bool acceptElisions);
// Returns a list of PNK_COLON.
MOZ_MUST_USE JS::Result<ParseNode*> parseObjectMemberList();
MOZ_MUST_USE JS::Result<ParseNode*> parseStatementList();
MOZ_MUST_USE JS::Result<ParseNode*> parseSwitchCaseList();
// --- Parse the contents of a node whose kind has already been determined.
MOZ_MUST_USE JS::Result<ParseNode*> parseArrayExpressionAux(const BinKind kind, const Tokenizer::BinFields& fields);
MOZ_MUST_USE JS::Result<ParseNode*> parseBreakOrContinueStatementAux(const BinKind kind, const Tokenizer::BinFields& fields);
MOZ_MUST_USE JS::Result<ParseNode*> parseBlockStatementAux(const BinKind kind, const Tokenizer::BinFields& fields);
MOZ_MUST_USE JS::Result<ParseNode*> parseExpressionStatementAux(const BinKind kind, const Tokenizer::BinFields& fields);
MOZ_MUST_USE JS::Result<ParseNode*> parseExpressionAux(const BinKind kind, const Tokenizer::BinFields& fields);
MOZ_MUST_USE JS::Result<ParseNode*> parseFunctionAux(const BinKind kind, const Tokenizer::BinFields& fields);
MOZ_MUST_USE JS::Result<ParseNode*> parseIdentifierAux(const BinKind, const Tokenizer::BinFields& fields, const bool expectObjectPropertyName = false);
MOZ_MUST_USE JS::Result<ParseNode*> parseMemberExpressionAux(const BinKind kind, const Tokenizer::BinFields& fields);
MOZ_MUST_USE JS::Result<ParseNode*> parseNumericLiteralAux(const BinKind kind, const Tokenizer::BinFields& fields);
MOZ_MUST_USE JS::Result<ParseNode*> parseObjectExpressionAux(const BinKind kind, const Tokenizer::BinFields& fields);
MOZ_MUST_USE JS::Result<ParseNode*> parsePatternAux(const BinKind kind, const Tokenizer::BinFields& fields);
MOZ_MUST_USE JS::Result<ParseNode*> parseStringLiteralAux(const BinKind kind, const Tokenizer::BinFields& fields);
MOZ_MUST_USE JS::Result<ParseNode*> parseStatementAux(const BinKind kind, const Tokenizer::BinFields& fields);
MOZ_MUST_USE JS::Result<ParseNode*> parseVariableDeclarationAux(const BinKind kind, const Tokenizer::BinFields& fields);
// --- Auxiliary parsing functions that may have a side-effect on the parser but do not return a node.
MOZ_MUST_USE JS::Result<Ok> checkEmptyTuple(const BinKind kind, const Tokenizer::BinFields& fields);
MOZ_MUST_USE JS::Result<Ok> parseElisionAux(const BinKind kind, const Tokenizer::BinFields& fields);
// Parse full scope information to the current innermost scope.
MOZ_MUST_USE JS::Result<Ok> parseAndUpdateCurrentScope();
// Parse full scope information to a specific var scope / let scope combination.
MOZ_MUST_USE JS::Result<Ok> parseAndUpdateScope(ParseContext::Scope& varScope, ParseContext::Scope& letScope);
MOZ_MUST_USE JS::Result<Ok> parseAndUpdateScope(ParseContext::Scope& varScope,
ParseContext::Scope& letScope);
// Parse a list of names and add it to a given scope.
MOZ_MUST_USE JS::Result<Ok> parseAndUpdateScopeNames(ParseContext::Scope& scope, DeclarationKind kind);
MOZ_MUST_USE JS::Result<Ok> parseStringList(MutableHandle<Maybe<Names>> out);
MOZ_MUST_USE JS::Result<Ok> parseAndUpdateScopeNames(ParseContext::Scope& scope,
DeclarationKind kind);
MOZ_MUST_USE JS::Result<Ok> parseAndUpdateCapturedNames();
MOZ_MUST_USE JS::Result<Ok> checkBinding(JSAtom* name);
// --- Utilities.
MOZ_MUST_USE JS::Result<ParseNode*> appendDirectivesToBody(ParseNode* body, ParseNode* directives);
MOZ_MUST_USE JS::Result<ParseNode*> appendDirectivesToBody(ParseNode* body,
ParseNode* directives);
// Read a string as a `Chars`.
MOZ_MUST_USE JS::Result<Ok> readString(Maybe<Chars>& out);
// Read a string
MOZ_MUST_USE JS::Result<Ok> readString(Chars& out);
MOZ_MUST_USE JS::Result<Ok> readMaybeString(Maybe<Chars>& out);
MOZ_MUST_USE JS::Result<Ok> readString(MutableHandleAtom out);
MOZ_MUST_USE JS::Result<Ok> readMaybeString(MutableHandleAtom out);
MOZ_MUST_USE JS::Result<bool> readBool();
MOZ_MUST_USE JS::Result<double> readNumber();
@ -261,8 +238,10 @@ class BinASTParser : private JS::AutoGCRooter, public ErrorReporter
UsedNameTracker& usedNames_;
Maybe<Tokenizer> tokenizer_;
FullParseHandler factory_;
VariableDeclarationKind variableDeclarationKind_;
friend class BinParseContext;
friend class AutoVariableDeclarationKind;
// Needs access to AutoGCRooter.
friend void TraceBinParser(JSTracer* trc, AutoGCRooter* parser);
@ -271,7 +250,8 @@ class BinASTParser : private JS::AutoGCRooter, public ErrorReporter
class BinParseContext : public ParseContext
{
public:
BinParseContext(JSContext* cx, BinASTParser* parser, SharedContext* sc, Directives* newDirectives)
BinParseContext(JSContext* cx, BinASTParser* parser, SharedContext* sc,
Directives* newDirectives)
: ParseContext(cx, parser->parseContext_, sc, *parser,
parser->usedNames_, newDirectives, /* isFull = */ true)
{ }

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

@ -0,0 +1,871 @@
// Type aliases and enums.
typedef FrozenArray<(SpreadElement or Expression)> Arguments;
typedef DOMString string;
typedef string Identifier;
typedef string IdentifierName;
typedef string Label;
enum VariableDeclarationKind {
"var",
"let",
"const"
};
enum CompoundAssignmentOperator {
"+=",
"-=",
"*=",
"/=",
"%=",
"**=",
"<<=",
">>=",
">>>=",
"|=",
"^=",
"&="
};
enum BinaryOperator {
",",
"||",
"&&",
"|",
"^",
"&",
"==",
"!=",
"===",
"!==",
"<",
"<=",
">",
">=",
"in",
"instanceof",
"<<",
">>",
">>>",
"+",
"-",
"*",
"/",
"%",
"**",
};
enum UnaryOperator {
"+",
"-",
"!",
"~",
"typeof",
"void",
"delete"
};
enum UpdateOperator {
"++",
"--"
};
// deferred assertions
interface AssertedBlockScope {
// checked eagerly during transformation
attribute FrozenArray<IdentifierName> lexicallyDeclaredNames;
// checked lazily as inner functions are invoked
attribute FrozenArray<IdentifierName> capturedNames;
attribute boolean hasDirectEval;
};
interface AssertedVarScope {
// checked eagerly during transformation
attribute FrozenArray<IdentifierName> lexicallyDeclaredNames;
attribute FrozenArray<IdentifierName> varDeclaredNames;
// checked lazily as inner functions are invoked
attribute FrozenArray<IdentifierName> capturedNames;
attribute boolean hasDirectEval;
};
interface AssertedParameterScope {
// checked eagerly during transformation
attribute FrozenArray<IdentifierName> parameterNames;
// checked lazily as inner functions are invoked
attribute FrozenArray<IdentifierName> capturedNames;
attribute boolean hasDirectEval;
};
// nodes
interface Node {
[TypeIndicator] readonly attribute Type type;
};
typedef (Script or Module) Program;
typedef (DoWhileStatement or
ForInStatement or
ForOfStatement or
ForStatement or
WhileStatement)
IterationStatement;
typedef (Block or
BreakStatement or
ContinueStatement or
ClassDeclaration or
DebuggerStatement or
EmptyStatement or
ExpressionStatement or
FunctionDeclaration or
IfStatement or
IterationStatement or
LabelledStatement or
ReturnStatement or
SwitchStatement or
SwitchStatementWithDefault or
ThrowStatement or
TryCatchStatement or
TryFinallyStatement or
VariableDeclaration or
WithStatement)
Statement;
typedef (LiteralBooleanExpression or
LiteralInfinityExpression or
LiteralNullExpression or
LiteralNumericExpression or
LiteralStringExpression)
Literal;
typedef (Literal or
LiteralRegExpExpression or
ArrayExpression or
ArrowExpression or
AssignmentExpression or
BinaryExpression or
CallExpression or
CompoundAssignmentExpression or
ComputedMemberExpression or
ConditionalExpression or
ClassExpression or
FunctionExpression or
IdentifierExpression or
NewExpression or
NewTargetExpression or
ObjectExpression or
UnaryExpression or
StaticMemberExpression or
TemplateExpression or
ThisExpression or
UpdateExpression or
YieldExpression or
YieldStarExpression or
AwaitExpression)
Expression;
typedef (ComputedPropertyName or
LiteralPropertyName)
PropertyName;
typedef (Method or Getter or Setter) MethodDefinition;
typedef (MethodDefinition or
DataProperty or
ShorthandProperty)
ObjectProperty;
typedef (ExportAllFrom or
ExportFrom or
ExportLocals or
ExportDefault or
Export)
ExportDeclaration;
typedef (ImportNamespace or Import) ImportDeclaration;
// bindings
interface BindingIdentifier : Node {
attribute Identifier name;
};
typedef (ObjectBinding or
ArrayBinding)
BindingPattern;
typedef (BindingPattern or
BindingIdentifier)
Binding;
typedef (AssignmentTargetIdentifier or
ComputedMemberAssignmentTarget or
StaticMemberAssignmentTarget)
SimpleAssignmentTarget;
typedef (ObjectAssignmentTarget or
ArrayAssignmentTarget)
AssignmentTargetPattern;
// `DestructuringAssignmentTarget`
typedef (AssignmentTargetPattern or
SimpleAssignmentTarget)
AssignmentTarget;
// `FormalParameter`
typedef (Binding or
BindingWithInitializer)
Parameter;
interface BindingWithInitializer : Node {
attribute Binding binding;
attribute Expression init;
};
interface AssignmentTargetIdentifier : Node {
attribute Identifier name;
};
interface ComputedMemberAssignmentTarget : Node {
// The object whose property is being assigned.
attribute (Expression or Super) _object;
// The expression resolving to the name of the property to be accessed.
attribute Expression expression;
};
interface StaticMemberAssignmentTarget : Node {
// The object whose property is being assigned.
attribute (Expression or Super) _object;
// The name of the property to be accessed.
attribute IdentifierName property;
};
// `ArrayBindingPattern`
interface ArrayBinding : Node {
// The elements of the array pattern; a null value represents an elision.
attribute FrozenArray<(Binding or BindingWithInitializer)?> elements;
attribute Binding? rest;
};
// `SingleNameBinding`
interface BindingPropertyIdentifier : Node {
attribute BindingIdentifier binding;
attribute Expression? init;
};
// `BindingProperty :: PropertyName : BindingElement`
interface BindingPropertyProperty : Node {
attribute PropertyName name;
attribute (Binding or BindingWithInitializer) binding;
};
typedef (BindingPropertyIdentifier or
BindingPropertyProperty)
BindingProperty;
interface ObjectBinding : Node {
attribute FrozenArray<BindingProperty> properties;
};
// This interface represents the case where the initializer is present in
// `AssignmentElement :: DestructuringAssignmentTarget Initializer_opt`.
interface AssignmentTargetWithInitializer : Node {
attribute AssignmentTarget binding;
attribute Expression init;
};
// `ArrayAssignmentPattern`
interface ArrayAssignmentTarget : Node {
// The elements of the array pattern; a null value represents an elision.
attribute FrozenArray<(AssignmentTarget or AssignmentTargetWithInitializer?)> elements;
attribute AssignmentTarget? rest;
};
// `AssignmentProperty :: IdentifierReference Initializer_opt`
interface AssignmentTargetPropertyIdentifier : Node {
attribute AssignmentTargetIdentifier binding;
attribute Expression? init;
};
// `AssignmentProperty :: PropertyName : Node`
interface AssignmentTargetPropertyProperty : Node {
attribute PropertyName name;
attribute (AssignmentTarget or AssignmentTargetWithInitializer) binding;
};
typedef (AssignmentTargetPropertyIdentifier or
AssignmentTargetPropertyProperty)
AssignmentTargetProperty;
// `ObjectAssignmentPattern`
interface ObjectAssignmentTarget : Node {
attribute FrozenArray<AssignmentTargetProperty> properties;
};
// classes
interface ClassExpression : Node {
attribute BindingIdentifier? name;
attribute Expression? super;
attribute FrozenArray<ClassElement> elements;
};
interface ClassDeclaration : Node {
attribute BindingIdentifier name;
attribute Expression? super;
attribute FrozenArray<ClassElement> elements;
};
interface ClassElement : Node {
// True iff `IsStatic` of ClassElement is true.
attribute boolean isStatic;
attribute MethodDefinition method;
};
// modules
interface Module : Node {
attribute AssertedVarScope? scope;
attribute FrozenArray<Directive> directives;
attribute FrozenArray<(ImportDeclaration or ExportDeclaration or Statement)> items;
};
// An `ImportDeclaration` not including a namespace import.
interface Import : Node {
attribute string moduleSpecifier;
// `ImportedDefaultBinding`, if present.
attribute BindingIdentifier? defaultBinding;
attribute FrozenArray<ImportSpecifier> namedImports;
};
// An `ImportDeclaration` including a namespace import.
interface ImportNamespace : Node {
attribute string moduleSpecifier;
// `ImportedDefaultBinding`, if present.
attribute BindingIdentifier? defaultBinding;
attribute BindingIdentifier namespaceBinding;
};
interface ImportSpecifier : Node {
// The `IdentifierName` in the production `ImportSpecifier :: IdentifierName as ImportedBinding`;
// absent if this specifier represents the production `ImportSpecifier :: ImportedBinding`.
attribute IdentifierName? name;
attribute BindingIdentifier binding;
};
// `export * FromClause;`
interface ExportAllFrom : Node {
attribute string moduleSpecifier;
};
// `export ExportClause FromClause;`
interface ExportFrom : Node {
attribute FrozenArray<ExportFromSpecifier> namedExports;
attribute string moduleSpecifier;
};
// `export ExportClause;`
interface ExportLocals : Node {
attribute FrozenArray<ExportLocalSpecifier> namedExports;
};
// `export VariableStatement`, `export Declaration`
interface Export : Node {
attribute (FunctionDeclaration or ClassDeclaration or VariableDeclaration) declaration;
};
// `export default HoistableDeclaration`,
// `export default ClassDeclaration`,
// `export default AssignmentExpression`
interface ExportDefault : Node {
attribute (FunctionDeclaration or ClassDeclaration or Expression) body;
};
// `ExportSpecifier`, as part of an `ExportFrom`.
interface ExportFromSpecifier : Node {
// The only `IdentifierName in `ExportSpecifier :: IdentifierName`,
// or the first in `ExportSpecifier :: IdentifierName as IdentifierName`.
attribute IdentifierName name;
// The second `IdentifierName` in `ExportSpecifier :: IdentifierName as IdentifierName`,
// if that is the production represented.
attribute IdentifierName? exportedName;
};
// `ExportSpecifier`, as part of an `ExportLocals`.
interface ExportLocalSpecifier : Node {
// The only `IdentifierName in `ExportSpecifier :: IdentifierName`,
// or the first in `ExportSpecifier :: IdentifierName as IdentifierName`.
attribute IdentifierExpression name;
// The second `IdentifierName` in `ExportSpecifier :: IdentifierName as IdentifierName`, if present.
attribute IdentifierName? exportedName;
};
// property definition
// `MethodDefinition :: PropertyName ( UniqueFormalParameters ) { FunctionBody }`,
// `GeneratorMethod :: * PropertyName ( UniqueFormalParameters ) { GeneratorBody }`,
// `AsyncMethod :: async PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody }`
interface Method : Node {
// True for `AsyncMethod`, false otherwise.
attribute boolean isAsync;
// True for `GeneratorMethod`, false otherwise.
attribute boolean isGenerator;
attribute AssertedParameterScope? parameterScope;
attribute AssertedVarScope? bodyScope;
attribute PropertyName name;
// The `UniqueFormalParameters`.
attribute FormalParameters params;
attribute FunctionBody body;
};
// `get PropertyName ( ) { FunctionBody }`
interface Getter : Node {
attribute AssertedVarScope? bodyScope;
attribute PropertyName name;
attribute FunctionBody body;
};
// `set PropertyName ( PropertySetParameterList ) { FunctionBody }`
interface Setter : Node {
attribute AssertedParameterScope? parameterScope;
attribute AssertedVarScope? bodyScope;
attribute PropertyName name;
// The `PropertySetParameterList`.
attribute Parameter param;
attribute FunctionBody body;
};
// `PropertyDefinition :: PropertyName : AssignmentExpression`
interface DataProperty : Node {
attribute PropertyName name;
// The `AssignmentExpression`.
attribute Expression expression;
};
// `PropertyDefinition :: IdentifierReference`
interface ShorthandProperty : Node {
// The `IdentifierReference`.
attribute IdentifierExpression name;
};
interface ComputedPropertyName : Node {
attribute Expression expression;
};
// `LiteralPropertyName`
interface LiteralPropertyName : Node {
attribute string value;
};
// literals
// `BooleanLiteral`
interface LiteralBooleanExpression : Node {
attribute boolean value;
};
// A `NumericLiteral` for which the Number value of its MV is positive infinity.
interface LiteralInfinityExpression : Node { };
// `NullLiteral`
interface LiteralNullExpression : Node { };
// `NumericLiteral`
interface LiteralNumericExpression : Node {
attribute double value;
};
// `RegularExpressionLiteral`
interface LiteralRegExpExpression : Node {
attribute string pattern;
attribute string flags;
};
// `StringLiteral`
interface LiteralStringExpression : Node {
attribute string value;
};
// other expressions
// `ArrayLiteral`
interface ArrayExpression : Node {
// The elements of the array literal; a null value represents an elision.
attribute FrozenArray<(SpreadElement or Expression)?> elements;
};
// `ArrowFunction`,
// `AsyncArrowFunction`
interface ArrowExpression : Node {
// True for `AsyncArrowFunction`, false otherwise.
attribute boolean isAsync;
attribute AssertedParameterScope? parameterScope;
attribute AssertedVarScope? bodyScope;
attribute FormalParameters params;
attribute (FunctionBody or Expression) body;
};
// `AssignmentExpression :: LeftHandSideExpression = AssignmentExpression`
interface AssignmentExpression : Node {
// The `LeftHandSideExpression`.
attribute AssignmentTarget binding;
// The `AssignmentExpression` following the `=`.
attribute Expression expression;
};
// `ExponentiationExpression`,
// `MultiplicativeExpression`,
// `AdditiveExpression`,
// `ShiftExpression`,
// `RelationalExpression`,
// `EqualityExpression`,
// `BitwiseANDExpression`,
// `BitwiseXORExpression`,
// `BitwiseORExpression`,
// `LogicalANDExpression`,
// `LogicalORExpression`
interface BinaryExpression : Node {
attribute BinaryOperator operator;
// The expression before the operator.
attribute Expression left;
// The expression after the operator.
attribute Expression right;
};
interface CallExpression : Node {
attribute (Expression or Super) callee;
attribute Arguments arguments;
};
// `AssignmentExpression :: LeftHandSideExpression AssignmentOperator AssignmentExpression`
interface CompoundAssignmentExpression : Node {
attribute CompoundAssignmentOperator operator;
// The `LeftHandSideExpression`.
attribute SimpleAssignmentTarget binding;
// The `AssignmentExpression`.
attribute Expression expression;
};
interface ComputedMemberExpression : Node {
// The object whose property is being accessed.
attribute (Expression or Super) _object;
// The expression resolving to the name of the property to be accessed.
attribute Expression expression;
};
// `ConditionalExpression :: LogicalORExpression ? AssignmentExpression : AssignmentExpression`
interface ConditionalExpression : Node {
// The `LogicalORExpression`.
attribute Expression test;
// The first `AssignmentExpression`.
attribute Expression consequent;
// The second `AssignmentExpression`.
attribute Expression alternate;
};
// `FunctionExpression`,
// `GeneratorExpression`,
// `AsyncFunctionExpression`,
interface FunctionExpression : Node {
attribute boolean isAsync;
attribute boolean isGenerator;
attribute AssertedParameterScope? parameterScope;
attribute AssertedVarScope? bodyScope;
attribute BindingIdentifier? name;
attribute FormalParameters params;
attribute FunctionBody body;
};
// `IdentifierReference`
interface IdentifierExpression : Node {
attribute Identifier name;
};
interface NewExpression : Node {
attribute Expression callee;
attribute Arguments arguments;
};
interface NewTargetExpression : Node { };
interface ObjectExpression : Node {
attribute FrozenArray<ObjectProperty> properties;
};
interface UnaryExpression : Node {
attribute UnaryOperator operator;
attribute Expression operand;
};
interface StaticMemberExpression : Node {
// The object whose property is being accessed.
attribute (Expression or Super) _object;
// The name of the property to be accessed.
attribute IdentifierName property;
};
// `TemplateLiteral`,
// `MemberExpression :: MemberExpression TemplateLiteral`,
// `CallExpression : CallExpression TemplateLiteral`
interface TemplateExpression : Node {
// The second `MemberExpression` or `CallExpression`, if present.
attribute Expression? tag;
// The contents of the template. This list must be alternating
// TemplateElements and Expressions, beginning and ending with
// TemplateElement.
attribute FrozenArray<(Expression or TemplateElement)> elements;
};
// `PrimaryExpression :: this`
interface ThisExpression : Node { };
// `UpdateExpression :: LeftHandSideExpression ++`,
// `UpdateExpression :: LeftHandSideExpression --`,
// `UpdateExpression :: ++ LeftHandSideExpression`,
// `UpdateExpression :: -- LeftHandSideExpression`
interface UpdateExpression : Node {
// True for `UpdateExpression :: ++ LeftHandSideExpression` and
// `UpdateExpression :: -- LeftHandSideExpression`, false otherwise.
attribute boolean isPrefix;
attribute UpdateOperator operator;
attribute SimpleAssignmentTarget operand;
};
// `YieldExpression :: yield`,
// `YieldExpression :: yield AssignmentExpression`
interface YieldExpression : Node {
// The `AssignmentExpression`, if present.
attribute Expression? expression;
};
// `YieldExpression :: yield * AssignmentExpression`
interface YieldStarExpression : Node {
attribute Expression expression;
};
interface AwaitExpression : Node {
attribute Expression expression;
};
// other statements
interface BreakStatement : Node {
attribute Label? label;
};
interface ContinueStatement : Node {
attribute Label? label;
};
interface DebuggerStatement : Node { };
interface DoWhileStatement : Node {
attribute Expression test;
attribute Statement body;
};
interface EmptyStatement : Node { };
interface ExpressionStatement : Node {
attribute Expression expression;
};
interface ForInOfBinding : Node {
attribute VariableDeclarationKind kind;
attribute Binding binding;
};
// `for ( LeftHandSideExpression in Expression ) Statement`,
// `for ( var ForBinding in Expression ) Statement`,
// `for ( ForDeclaration in Expression ) Statement`,
// `for ( var BindingIdentifier Initializer in Expression ) Statement`
interface ForInStatement : Node {
// The expression or declaration before `in`.
attribute (ForInOfBinding or AssignmentTarget) left;
// The expression after `in`.
attribute Expression right;
attribute Statement body;
};
// `for ( LeftHandSideExpression of Expression ) Statement`,
// `for ( var ForBinding of Expression ) Statement`,
// `for ( ForDeclaration of Expression ) Statement`
interface ForOfStatement : Node {
// The expression or declaration before `of`.
attribute (ForInOfBinding or AssignmentTarget) left;
// The expression after `of`.
attribute Expression right;
attribute Statement body;
};
// `for ( Expression ; Expression ; Expression ) Statement`,
// `for ( var VariableDeclarationList ; Expression ; Expression ) Statement`
interface ForStatement : Node {
// The expression or declaration before the first `;`, if present.
attribute (VariableDeclaration or Expression)? init;
// The expression before the second `;`, if present
attribute Expression? test;
// The expression after the second `;`, if present
attribute Expression? update;
attribute Statement body;
};
// `if ( Expression ) Statement`,
// `if ( Expression ) Statement else Statement`,
interface IfStatement : Node {
attribute Expression test;
// The first `Statement`.
attribute Statement consequent;
// The second `Statement`, if present.
attribute Statement? alternate;
};
interface LabelledStatement : Node {
attribute Label label;
attribute Statement body;
};
interface ReturnStatement : Node {
attribute Expression? expression;
};
// A `SwitchStatement` whose `CaseBlock` is
// `CaseBlock :: { CaseClauses }`.
interface SwitchStatement : Node {
attribute Expression discriminant;
attribute FrozenArray<SwitchCase> cases;
};
// A `SwitchStatement` whose `CaseBlock` is
// `CaseBlock :: { CaseClauses DefaultClause CaseClauses }`.
interface SwitchStatementWithDefault : Node {
attribute Expression discriminant;
// The `CaseClauses` before the `DefaultClause`.
attribute FrozenArray<SwitchCase> preDefaultCases;
// The `DefaultClause`.
attribute SwitchDefault defaultCase;
// The `CaseClauses` after the `DefaultClause`.
attribute FrozenArray<SwitchCase> postDefaultCases;
};
interface ThrowStatement : Node {
attribute Expression expression;
};
// `TryStatement :: try Block Catch`
interface TryCatchStatement : Node {
attribute Block body;
attribute CatchClause catchClause;
};
// `TryStatement :: try Block Finally`,
// `TryStatement :: try Block Catch Finally`
interface TryFinallyStatement : Node {
// The `Block`.
attribute Block body;
// The `Catch`, if present.
attribute CatchClause? catchClause;
// The `Finally`.
attribute Block finalizer;
};
interface WhileStatement : Node {
attribute Expression test;
attribute Statement body;
};
interface WithStatement : Node {
attribute Expression _object;
attribute Statement body;
};
// other nodes
interface Block : Node {
attribute AssertedBlockScope? scope;
attribute FrozenArray<Statement> statements;
};
// `Catch`
interface CatchClause : Node {
attribute Binding binding;
attribute Block body;
};
// An item in a `DirectivePrologue`
interface Directive : Node {
attribute string rawValue;
};
interface FormalParameters : Node {
attribute FrozenArray<Parameter> items;
attribute Binding? rest;
};
interface FunctionBody : Node {
attribute FrozenArray<Directive> directives;
attribute FrozenArray<Statement> statements;
};
// `FunctionDeclaration`,
// `GeneratorDeclaration`,
// `AsyncFunctionDeclaration`
interface FunctionDeclaration : Node {
attribute boolean isAsync;
attribute boolean isGenerator;
attribute AssertedParameterScope? parameterScope;
attribute AssertedVarScope? bodyScope;
attribute BindingIdentifier name;
attribute FormalParameters params;
attribute FunctionBody body;
};
interface Script : Node {
attribute AssertedVarScope? scope;
attribute FrozenArray<Directive> directives;
attribute FrozenArray<Statement> statements;
};
interface SpreadElement : Node {
attribute Expression expression;
};
// `super`
interface Super : Node { };
// `CaseClause`
interface SwitchCase : Node {
attribute Expression test;
attribute FrozenArray<Statement> consequent;
};
// `DefaultClause`
interface SwitchDefault : Node {
attribute FrozenArray<Statement> consequent;
};
// `TemplateCharacters`
interface TemplateElement : Node {
attribute string rawValue;
};
interface VariableDeclaration : Node {
attribute VariableDeclarationKind kind;
[NonEmpty] attribute FrozenArray<VariableDeclarator> declarators;
};
interface VariableDeclarator : Node {
attribute Binding binding;
attribute Expression? init;
};

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

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

@ -1,12 +1,20 @@
// This file was autogenerated by binjs_generate_spidermonkey,
// please DO NOT EDIT BY HAND.
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
* vim: set ts=8 sts=4 et sw=4 tw=99:
* 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/. */
// To generate this file, see the documentation in
// js/src/frontend/binsource/README.md.
#ifndef frontend_BinToken_h
#define frontend_BinToken_h
#include <stddef.h>
/**
* Definition of Binary AST tokens.
*
@ -18,32 +26,25 @@
* - a Value, which may be either a node or a primitive value.
*
* The mapping between Kind and list of fields is determined entirely by
* the grammar of Binary AST. The mapping between (Kind, Name) and the structure
* of Value is also determined entirely by the grammar of Binary AST.
* the grammar of Binary AST. The mapping between (Kind, Name) and the
* structure of Value is also determined entirely by the grammar of
* Binary AST.
*
* As per the specifications of Binary AST, kinds may be added as the language
* grows, but never removed. The mapping between Kind and list of fields may
* also change to add new fields or make some fields optional, but may never
* remove a field. Finally, the mapping between (Kind, Name) and the structure
* of Value may be modified to add new possible values, but never to remove a
* value.
* As per the specifications of Binary AST, kinds may be added as the
* language grows, but never removed. The mapping between Kind and list
* of fields may also change to add new fields or make some fields optional,
* but may never remove a field. Finally, the mapping between (Kind, Name)
* and the structure of Value may be modified to add new possible values,
* but never to remove a value.
*
* A Binary AST parser must be able to fail gracefully when confronted with
* unknown Kinds or Names.
*
* At the time of this writing, the Binary AST defined from the Babylon AST
* (see https://github.com/babel/babylon/blob/master/ast/spec.md) restricted
* to ES5, with a few amendments to store additional scoping data and to
* represent the empty AST.
*
* Future versions of the Binary AST will progressively grow to encompass ES6
* and beyond.
*/
namespace js {
namespace frontend {
/**
/**
* The different kinds of Binary AST nodes, as per the specifications of
* Binary AST.
*
@ -60,80 +61,188 @@ namespace frontend {
* (sorted by alphabetical order)
*/
#define FOR_EACH_BIN_KIND(F) \
F(Arguments, Arguments) \
F(ArrayAssignmentTarget, ArrayAssignmentTarget) \
F(ArrayBinding, ArrayBinding) \
F(ArrayExpression, ArrayExpression) \
F(ArrowExpression, ArrowExpression) \
F(AssertedBlockScope, AssertedBlockScope) \
F(AssertedParameterScope, AssertedParameterScope) \
F(AssertedVarScope, AssertedVarScope) \
F(AssignmentExpression, AssignmentExpression) \
F(AssignmentOperator, AssignmentOperator) \
F(AssignmentTarget, AssignmentTarget) \
F(AssignmentTargetIdentifier, AssignmentTargetIdentifier) \
F(AssignmentTargetOrAssignmentTargetWithInitializer, AssignmentTargetOrAssignmentTargetWithInitializer) \
F(AssignmentTargetPattern, AssignmentTargetPattern) \
F(AssignmentTargetProperty, AssignmentTargetProperty) \
F(AssignmentTargetPropertyIdentifier, AssignmentTargetPropertyIdentifier) \
F(AssignmentTargetPropertyProperty, AssignmentTargetPropertyProperty) \
F(AssignmentTargetWithInitializer, AssignmentTargetWithInitializer) \
F(AwaitExpression, AwaitExpression) \
F(BinaryExpression, BinaryExpression) \
F(BinaryOperator, BinaryOperator) \
F(BINJS_Scope, BINJS:Scope) \
F(BlockStatement, BlockStatement) \
F(BooleanLiteral, BooleanLiteral) \
F(BracketExpression, BracketExpression) \
F(Binding, Binding) \
F(BindingIdentifier, BindingIdentifier) \
F(BindingOrBindingWithInitializer, BindingOrBindingWithInitializer) \
F(BindingPattern, BindingPattern) \
F(BindingProperty, BindingProperty) \
F(BindingPropertyIdentifier, BindingPropertyIdentifier) \
F(BindingPropertyProperty, BindingPropertyProperty) \
F(BindingWithInitializer, BindingWithInitializer) \
F(Block, Block) \
F(BreakStatement, BreakStatement) \
F(CallExpression, CallExpression) \
F(CatchClause, CatchClause) \
F(ClassDeclaration, ClassDeclaration) \
F(ClassElement, ClassElement) \
F(ClassExpression, ClassExpression) \
F(CompoundAssignmentExpression, CompoundAssignmentExpression) \
F(CompoundAssignmentOperator, CompoundAssignmentOperator) \
F(ComputedMemberAssignmentTarget, ComputedMemberAssignmentTarget) \
F(ComputedMemberExpression, ComputedMemberExpression) \
F(ComputedPropertyName, ComputedPropertyName) \
F(ConditionalExpression, ConditionalExpression) \
F(ContinueStatement, ContinueStatement) \
F(DataProperty, DataProperty) \
F(DebuggerStatement, DebuggerStatement) \
F(Declaration, Declaration) \
F(Directive, Directive) \
F(DirectiveLiteral, DirectiveLiteral) \
F(DotExpression, DotExpression) \
F(DoWhileStatement, DoWhileStatement) \
F(Elision, Elision) \
F(EmptyStatement, EmptyStatement) \
F(Export, Export) \
F(ExportAllFrom, ExportAllFrom) \
F(ExportDeclaration, ExportDeclaration) \
F(ExportDefault, ExportDefault) \
F(ExportFrom, ExportFrom) \
F(ExportFromSpecifier, ExportFromSpecifier) \
F(ExportLocalSpecifier, ExportLocalSpecifier) \
F(ExportLocals, ExportLocals) \
F(Expression, Expression) \
F(ExpressionOrSuper, ExpressionOrSuper) \
F(ExpressionOrTemplateElement, ExpressionOrTemplateElement) \
F(ExpressionStatement, ExpressionStatement) \
F(ForStatement, ForStatement) \
F(ForInOfBinding, ForInOfBinding) \
F(ForInOfBindingOrAssignmentTarget, ForInOfBindingOrAssignmentTarget) \
F(ForInStatement, ForInStatement) \
F(FunctionExpression, FunctionExpression) \
F(ForOfStatement, ForOfStatement) \
F(ForStatement, ForStatement) \
F(FormalParameters, FormalParameters) \
F(FunctionBody, FunctionBody) \
F(FunctionBodyOrExpression, FunctionBodyOrExpression) \
F(FunctionDeclaration, FunctionDeclaration) \
F(FunctionDeclarationOrClassDeclarationOrExpression, FunctionDeclarationOrClassDeclarationOrExpression) \
F(FunctionDeclarationOrClassDeclarationOrVariableDeclaration, FunctionDeclarationOrClassDeclarationOrVariableDeclaration) \
F(FunctionExpression, FunctionExpression) \
F(Getter, Getter) \
F(Identifier, Identifier) \
F(IdentifierExpression, IdentifierExpression) \
F(IdentifierName, IdentifierName) \
F(IfStatement, IfStatement) \
F(LabeledStatement, LabeledStatement) \
F(Import, Import) \
F(ImportDeclaration, ImportDeclaration) \
F(ImportDeclarationOrExportDeclarationOrStatement, ImportDeclarationOrExportDeclarationOrStatement) \
F(ImportNamespace, ImportNamespace) \
F(ImportSpecifier, ImportSpecifier) \
F(IterationStatement, IterationStatement) \
F(Label, Label) \
F(LabelledStatement, LabelledStatement) \
F(ListOfAssignmentTargetOrAssignmentTargetWithInitializer, ListOfAssignmentTargetOrAssignmentTargetWithInitializer) \
F(ListOfAssignmentTargetProperty, ListOfAssignmentTargetProperty) \
F(ListOfBindingProperty, ListOfBindingProperty) \
F(ListOfClassElement, ListOfClassElement) \
F(ListOfDirective, ListOfDirective) \
F(ListOfExportFromSpecifier, ListOfExportFromSpecifier) \
F(ListOfExportLocalSpecifier, ListOfExportLocalSpecifier) \
F(ListOfExpressionOrTemplateElement, ListOfExpressionOrTemplateElement) \
F(ListOfIdentifierName, ListOfIdentifierName) \
F(ListOfImportDeclarationOrExportDeclarationOrStatement, ListOfImportDeclarationOrExportDeclarationOrStatement) \
F(ListOfImportSpecifier, ListOfImportSpecifier) \
F(ListOfObjectProperty, ListOfObjectProperty) \
F(ListOfOptionalBindingOrBindingWithInitializer, ListOfOptionalBindingOrBindingWithInitializer) \
F(ListOfOptionalSpreadElementOrExpression, ListOfOptionalSpreadElementOrExpression) \
F(ListOfParameter, ListOfParameter) \
F(ListOfStatement, ListOfStatement) \
F(ListOfSwitchCase, ListOfSwitchCase) \
F(ListOfVariableDeclarator, ListOfVariableDeclarator) \
F(Literal, Literal) \
F(LogicalExpression, LogicalExpression) \
F(LogicalOperator, LogicalOperator) \
F(LiteralBooleanExpression, LiteralBooleanExpression) \
F(LiteralInfinityExpression, LiteralInfinityExpression) \
F(LiteralNullExpression, LiteralNullExpression) \
F(LiteralNumericExpression, LiteralNumericExpression) \
F(LiteralPropertyName, LiteralPropertyName) \
F(LiteralRegExpExpression, LiteralRegExpExpression) \
F(LiteralStringExpression, LiteralStringExpression) \
F(Method, Method) \
F(MethodDefinition, MethodDefinition) \
F(Module, Module) \
F(NewExpression, NewExpression) \
F(NullLiteral, NullLiteral) \
F(NumericLiteral, NumericLiteral) \
F(NewTargetExpression, NewTargetExpression) \
F(ObjectAssignmentTarget, ObjectAssignmentTarget) \
F(ObjectBinding, ObjectBinding) \
F(ObjectExpression, ObjectExpression) \
F(ObjectGetter, ObjectGetter) \
F(ObjectMethod, ObjectMethod) \
F(ObjectSetter, ObjectSetter) \
F(ObjectProperty, ObjectProperty) \
F(Pattern, Pattern) \
F(OptionalAssertedBlockScope, OptionalAssertedBlockScope) \
F(OptionalAssertedParameterScope, OptionalAssertedParameterScope) \
F(OptionalAssertedVarScope, OptionalAssertedVarScope) \
F(OptionalAssignmentTarget, OptionalAssignmentTarget) \
F(OptionalBinding, OptionalBinding) \
F(OptionalBindingIdentifier, OptionalBindingIdentifier) \
F(OptionalBindingOrBindingWithInitializer, OptionalBindingOrBindingWithInitializer) \
F(OptionalCatchClause, OptionalCatchClause) \
F(OptionalExpression, OptionalExpression) \
F(OptionalIdentifierName, OptionalIdentifierName) \
F(OptionalLabel, OptionalLabel) \
F(OptionalSpreadElementOrExpression, OptionalSpreadElementOrExpression) \
F(OptionalStatement, OptionalStatement) \
F(OptionalVariableDeclarationOrExpression, OptionalVariableDeclarationOrExpression) \
F(Parameter, Parameter) \
F(Program, Program) \
F(PropertyKind, PropertyKind) \
F(RegExpLiteral, RegExpLiteral) \
F(PropertyName, PropertyName) \
F(ReturnStatement, ReturnStatement) \
F(SequenceExpression, SequenceExpression) \
F(StringLiteral, StringLiteral) \
F(Script, Script) \
F(Setter, Setter) \
F(ShorthandProperty, ShorthandProperty) \
F(SimpleAssignmentTarget, SimpleAssignmentTarget) \
F(SpreadElement, SpreadElement) \
F(SpreadElementOrExpression, SpreadElementOrExpression) \
F(Statement, Statement) \
F(StaticMemberAssignmentTarget, StaticMemberAssignmentTarget) \
F(StaticMemberExpression, StaticMemberExpression) \
F(Super, Super) \
F(SwitchCase, SwitchCase) \
F(SwitchDefault, SwitchDefault) \
F(SwitchStatement, SwitchStatement) \
F(SwitchStatementWithDefault, SwitchStatementWithDefault) \
F(TemplateElement, TemplateElement) \
F(TemplateExpression, TemplateExpression) \
F(ThisExpression, ThisExpression) \
F(ThrowStatement, ThrowStatement) \
F(TryStatement, TryStatement) \
F(TryCatchStatement, TryCatchStatement) \
F(TryFinallyStatement, TryFinallyStatement) \
F(UnaryExpression, UnaryExpression) \
F(UnaryOperator, UnaryOperator) \
F(UpdateExpression, UpdateExpression) \
F(UpdateOperator, UpdateOperator) \
F(VariableDeclaration, VariableDeclaration) \
F(VariableDeclarationKind, VariableDeclarationKind) \
F(VariableDeclarationOrExpression, VariableDeclarationOrExpression) \
F(VariableDeclarator, VariableDeclarator) \
F(VariableKind, VariableKind) \
F(WhileStatement, WhileStatement) \
F(WithStatement, WithStatement)
F(WithStatement, WithStatement) \
F(YieldExpression, YieldExpression) \
F(YieldStarExpression, YieldStarExpression) \
F(_Null, _Null) \
F(string, string)
enum class BinKind {
#define EMIT_ENUM(name, _) name,
FOR_EACH_BIN_KIND(EMIT_ENUM)
#undef EMIT_ENUM
BINKIND_LIMIT /* domain size */
};
const char* describeBinKind(const BinKind& kind);
// The number of distinct values of BinKind.
const size_t BINKIND_LIMIT = 171;
/**
* The different fields of Binary AST nodes, as per the specifications of
@ -148,60 +257,91 @@ const char* describeBinKind(const BinKind& kind);
*
* (sorted by alphabetical order)
*/
#define FOR_EACH_BIN_FIELD(F) \
#define FOR_EACH_BIN_FIELD(F) \
F(Alternate, alternate) \
F(Argument, argument) \
F(Arguments, arguments) \
F(BINJS_CapturedNames, BINJS:CapturedNames) \
F(BINJS_ConstDeclaredNames, BINJS:ConstDeclaredNames) \
F(BINJS_HasDirectEval, BINJS:HasDirectEval) \
F(BINJS_LetDeclaredNames, BINJS:LetDeclaredNames) \
F(BINJS_VarDeclaredNames, BINJS:VarDeclaredNames) \
F(BINJS_Scope, BINJS:Scope) \
F(Block, block) \
F(Callee, callee) \
F(Cases, cases) \
F(Consequent, consequent) \
F(Binding, binding) \
F(Body, body) \
F(Declarations, declarations) \
F(BodyScope, bodyScope) \
F(Callee, callee) \
F(CapturedNames, capturedNames) \
F(Cases, cases) \
F(CatchClause, catchClause) \
F(Consequent, consequent) \
F(Declaration, declaration) \
F(Declarators, declarators) \
F(DefaultBinding, defaultBinding) \
F(DefaultCase, defaultCase) \
F(Directives, directives) \
F(Discriminant, discriminant) \
F(Elements, elements) \
F(ExportedName, exportedName) \
F(Expression, expression) \
F(Expressions, expressions) \
F(Finalizer, finalizer) \
F(Flags, flags) \
F(Handler, handler) \
F(Id, id) \
F(HasDirectEval, hasDirectEval) \
F(Init, init) \
F(Key, key) \
F(IsAsync, isAsync) \
F(IsGenerator, isGenerator) \
F(IsPrefix, isPrefix) \
F(IsStatic, isStatic) \
F(Items, items) \
F(Kind, kind) \
F(Label, label) \
F(Left, left) \
F(LexicallyDeclaredNames, lexicallyDeclaredNames) \
F(Method, method) \
F(ModuleSpecifier, moduleSpecifier) \
F(Name, name) \
F(NamedExports, namedExports) \
F(NamedImports, namedImports) \
F(NamespaceBinding, namespaceBinding) \
F(Object, object) \
F(Operand, operand) \
F(Operator, operator) \
F(Param, param) \
F(ParameterNames, parameterNames) \
F(ParameterScope, parameterScope) \
F(Params, params) \
F(Pattern, pattern) \
F(Prefix, prefix) \
F(PostDefaultCases, postDefaultCases) \
F(PreDefaultCases, preDefaultCases) \
F(Properties, properties) \
F(Property, property) \
F(RawValue, rawValue) \
F(Rest, rest) \
F(Right, right) \
F(Scope, scope) \
F(Statements, statements) \
F(Super, super) \
F(Tag, tag) \
F(Test, test) \
F(Update, update) \
F(Value, value)
F(Value, value) \
F(VarDeclaredNames, varDeclaredNames)
enum class BinField {
#define EMIT_ENUM(name, _) name,
FOR_EACH_BIN_FIELD(EMIT_ENUM)
#undef EMIT_ENUM
BINFIELD_LIMIT /* domain size */
};
// The number of distinct values of BinField.
const size_t BINFIELD_LIMIT = 61;
/**
* Return a string describing a `BinKind`.
*/
const char* describeBinKind(const BinKind& kind);
/**
* Return a string describing a `BinField`.
*/
const char* describeBinField(const BinField& kind);
} // namespace frontend
} // namespace js
#endif // frontend_BinToken_h

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

@ -200,23 +200,20 @@ BinTokenReaderTester::readMaybeChars(Maybe<Chars>& out)
if (current_ + byteLen > stop_)
return raiseError("Not enough bytes to read chars");
// 3. Check null string (no allocation)
if (byteLen == 2 && *current_ == 255 && *(current_ + 1) == 0) {
// Special case: null string.
// 3. Special case: null string.
out = Nothing();
current_ += byteLen;
return true;
} else {
// 4. Other strings (bytes are copied)
out.emplace(cx_);
if (!out->resize(byteLen)) {
ReportOutOfMemory(cx_);
return false;
}
PodCopy(out->begin(), current_, byteLen);
}
// 4. Other strings (bytes are copied)
out.emplace(cx_);
if (!out->resize(byteLen)) {
ReportOutOfMemory(cx_);
return false;
}
PodCopy(out->begin(), current_, byteLen);
current_ += byteLen;
if (!readConst("</string>"))
return false;

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

@ -691,6 +691,7 @@ NullaryNode::dump(GenericPrinter& out)
}
case ParseNodeKind::String:
case ParseNodeKind::ObjectPropertyName:
pn_atom->dumpCharsNoNewline(out);
break;

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

@ -0,0 +1,13 @@
[package]
name = "binsource"
version = "0.1.0"
authors = ["David Teller <D.O.Teller@gmail.com>"]
[dependencies]
binjs_meta = "^0.3.6"
clap = "^2"
env_logger = "^0.5.6"
itertools = "^0.7.6"
log = "0.4.1"
yaml-rust = "^0.4"
webidl = "^0.6.0"

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

@ -0,0 +1,19 @@
A parser generator used to generate the following files:
- js/src/frontend/BinSource-auto.h
- js/src/frontend/BinSource-auto.cpp
- js/src/frontent/BinToken.h
from the following files:
- js/src/frontend/BinSource.webidl_ (specifications of BinAST)
- js/src/frontend/BinSource.yaml (parser generator driver)
To use it:
```sh
$ cd $(topsrcdir)/js/src/frontend/binsource
% cargo run -- $(topsrcdir)/js/src/frontend/BinSource.webidl_ $(topsrcdir)/js/src/frontend/BinSource.yaml \
--out-class $(topsrcdir)/js/src/frontend/BinSource-auto.h \
--out-impl $(topsrcdir)/js/src/frontend/BinSource-auto.cpp \
--out-token $(topsrcdir)/js/src/frontend/BinToken.h
```

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

Двоичный файл не отображается.

Двоичный файл не отображается.

Двоичный файл не отображается.

Двоичный файл не отображается.

Двоичный файл не отображается.

Двоичный файл не отображается.

Двоичный файл не отображается.

Двоичный файл не отображается.

Двоичный файл не отображается.

Двоичный файл не отображается.

Двоичный файл не отображается.

Двоичный файл не отображается.

Двоичный файл не отображается.

Двоичный файл не отображается.

Двоичный файл не отображается.

Двоичный файл не отображается.

Двоичный файл не отображается.

Двоичный файл не отображается.

Двоичный файл не отображается.

Двоичный файл не отображается.

Двоичный файл не отображается.

Двоичный файл не отображается.

Двоичный файл не отображается.

Двоичный файл не отображается.

Двоичный файл не отображается.

Двоичный файл не отображается.

Двоичный файл не отображается.

Двоичный файл не отображается.

Двоичный файл не отображается.

Двоичный файл не отображается.

Двоичный файл не отображается.

Двоичный файл не отображается.

Двоичный файл не отображается.

Двоичный файл не отображается.

Двоичный файл не отображается.

Двоичный файл не отображается.

Двоичный файл не отображается.

Двоичный файл не отображается.

Двоичный файл не отображается.

Двоичный файл не отображается.

Двоичный файл не отображается.

Двоичный файл не отображается.

Двоичный файл не отображается.

Двоичный файл не отображается.

Двоичный файл не отображается.

Двоичный файл не отображается.

Двоичный файл не отображается.

Двоичный файл не отображается.

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