diff --git a/Cargo.lock b/Cargo.lock index 60ac7c0..eb604b0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -20,9 +20,9 @@ checksum = "366ffbaa4442f4684d91e2cd7c5ea7c4ed8add41959a31447066e279e432b618" [[package]] name = "accesskit" -version = "0.24.0" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5351dcebb14b579ccab05f288596b2ae097005be7ee50a7c3d4ca9d0d5a66f6a" +checksum = "d3b7f7f85a7e5f68090000ed7622545829afd484d210358702ae4cb97dd0c320" dependencies = [ "enumn", "serde", @@ -114,6 +114,16 @@ dependencies = [ "generic-array", ] +[[package]] +name = "aead" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef60ac202874e574ce7a7158cc8bca7313dd344322482e4fadee288bf4a306b8" +dependencies = [ + "crypto-common 0.2.2", + "inout 0.2.2", +] + [[package]] name = "aes" version = "0.8.4" @@ -121,7 +131,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" dependencies = [ "cfg-if", - "cipher", + "cipher 0.4.4", "cpufeatures 0.2.17", ] @@ -131,9 +141,9 @@ version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "831010a0f742e1209b3bcea8fab6a8e149051ba6099432c8cb2cc117dec3ead1" dependencies = [ - "aead", + "aead 0.5.2", "aes", - "cipher", + "cipher 0.4.4", "ctr", "ghash", "subtle", @@ -196,9 +206,9 @@ checksum = "cc7bb162ec39d46ab1ca8c77bf72e890535becd1751bb45f64c597edb4c8c6b3" [[package]] name = "alloc-stdlib" -version = "0.2.2" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94fb8275041c72129eb51b7d0322c29b8387a0386127718b096429201a5d6ece" +checksum = "0e76a019e91224d279006ff972f1e984179a6e9feb050adba6ce8274aef23195" dependencies = [ "alloc-no-stdlib", ] @@ -892,9 +902,9 @@ dependencies = [ [[package]] name = "block-buffer" -version = "0.12.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdd35008169921d80bc60d3d0ab416eecb028c4cd653352907921d95084790be" +checksum = "d2f6c7dbe95a6ed67ad9f18e57daf93a2f034c524b99fd2b76d18fdfeb6660aa" dependencies = [ "hybrid-array", ] @@ -966,9 +976,9 @@ dependencies = [ [[package]] name = "brotli" -version = "8.0.3" +version = "8.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8119e4516436f5708bbc474a9d395bf12f1b5395e93a92a56e647ac3388c8610" +checksum = "5cc91aac060a7a1e25823bdccbfb6af1875b88f17c6daac97894eed8207166b3" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", @@ -977,9 +987,9 @@ dependencies = [ [[package]] name = "brotli-decompressor" -version = "5.0.1" +version = "5.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5962523e1b92ce1b5e793d9169b9943eece10d39f62550bc04bb605d75b94924" +checksum = "3a32acac15fe1967bc3986b2a6347dffc965602354ea6f450ad07e8bfd253583" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", @@ -1158,14 +1168,14 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26b52a9543ae338f279b96b0b9fed9c8093744685043739079ce85cd58f289a6" dependencies = [ - "cipher", + "cipher 0.4.4", ] [[package]] name = "cc" -version = "1.2.63" +version = "1.2.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "556e016178bb5662a08681bbe0f00f8e17631781a4dfc8c45e466e4b185ec27f" +checksum = "dad887fd958be91b5098c0248def011f4523ab786cd411be668777e55063501f" dependencies = [ "find-msvc-tools", "jobserver", @@ -1229,17 +1239,6 @@ dependencies = [ "libc", ] -[[package]] -name = "chacha20" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3613f74bd2eac03dad61bd53dbe620703d4371614fe0bc3b9f04dd36fe4e818" -dependencies = [ - "cfg-if", - "cipher", - "cpufeatures 0.2.17", -] - [[package]] name = "chacha20" version = "0.10.0" @@ -1247,19 +1246,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6f8d983286843e49675a4b7a2d174efe136dc93a18d69130dd18198a6c167601" dependencies = [ "cfg-if", + "cipher 0.5.2", "cpufeatures 0.3.0", "rand_core 0.10.1", + "zeroize", ] [[package]] name = "chacha20poly1305" -version = "0.10.1" +version = "0.11.0-rc.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10cd79432192d1c0f4e1a0fef9527696cc039165d729fb41b3f4f4f354c2dc35" +checksum = "1c9ed179664f12fd6f155f6dd632edf5f3806d48c228c67ff78366f2a0eb6b5e" dependencies = [ - "aead", - "chacha20 0.9.1", - "cipher", + "aead 0.6.0", + "chacha20", + "cipher 0.5.2", "poly1305", "zeroize", ] @@ -1334,8 +1335,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" dependencies = [ "crypto-common 0.1.7", - "inout", - "zeroize", + "inout 0.1.4", +] + +[[package]] +name = "cipher" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8cf2a2c93cd704877c0858356ed03480ff301ee950b43f1cbe4573b088bfa6c" +dependencies = [ + "block-buffer 0.12.1", + "crypto-common 0.2.2", + "inout 0.2.2", ] [[package]] @@ -1643,6 +1654,12 @@ dependencies = [ "libm", ] +[[package]] +name = "cpubits" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15b85f9c39137c3a891689859392b1bd49812121d0d61c9caf00d46ed5ce06ae" + [[package]] name = "cpufeatures" version = "0.2.17" @@ -1764,6 +1781,20 @@ dependencies = [ "zeroize", ] +[[package]] +name = "crypto-bigint" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42a0d26b245348befa0c121944541476763dcc46ede886c88f9d12e1697d27c3" +dependencies = [ + "cpubits", + "ctutils", + "num-traits", + "rand_core 0.10.1", + "serdect 0.4.3", + "zeroize", +] + [[package]] name = "crypto-common" version = "0.1.7" @@ -1786,6 +1817,16 @@ dependencies = [ "rand_core 0.10.1", ] +[[package]] +name = "crypto-primes" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3633a51a39c69ebbaa4feaa694bd83d241e4093901c84a0963b19d9bb3f0cf8f" +dependencies = [ + "crypto-bigint 0.7.3", + "rand_core 0.10.1", +] + [[package]] name = "cshake" version = "0.2.1" @@ -1827,7 +1868,7 @@ version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835" dependencies = [ - "cipher", + "cipher 0.4.4", ] [[package]] @@ -2002,7 +2043,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e7c1832837b905bbfb5101e07cc24c8deddf52f93225eee6ead5f4d63d53ddcb" dependencies = [ "const-oid 0.9.6", - "der_derive", "pem-rfc7468 0.7.0", "zeroize", ] @@ -2018,24 +2058,12 @@ dependencies = [ "zeroize", ] -[[package]] -name = "der_derive" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8034092389675178f570469e6c3b0465d3d30b4505c294a6550db47f3c17ad18" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.117", -] - [[package]] name = "deranged" version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7cd812cc2bc1d69d4764bd80df88b4317eaef9e773c75226407d9bc0876b211c" dependencies = [ - "powerfmt", "serde_core", ] @@ -2117,7 +2145,7 @@ version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f1dd6dbb5841937940781866fa1281a1ff7bd3bf827091440879f9994983d5c2" dependencies = [ - "block-buffer 0.12.0", + "block-buffer 0.12.1", "const-oid 0.10.2", "crypto-common 0.2.2", "ctutils", @@ -2362,7 +2390,7 @@ checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" dependencies = [ "base16ct 0.2.0", "base64ct", - "crypto-bigint", + "crypto-bigint 0.5.5", "digest 0.10.7", "ff", "generic-array", @@ -3846,9 +3874,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.4.14" +version = "0.4.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "171fefbc92fe4a4de27e0698d6a5b392d6a0e333506bc49133760b3bcf948733" +checksum = "6cb093c84e8bd9b188d4c4a8cb6579fc016968d14c99882163cd3ff402a4f155" dependencies = [ "atomic-waker", "bytes", @@ -4052,7 +4080,7 @@ dependencies = [ "futures-channel", "futures-io", "futures-util", - "h2 0.4.14", + "h2 0.4.15", "hickory-proto 0.26.1", "http 1.4.2", "idna", @@ -4320,7 +4348,7 @@ dependencies = [ "bytes", "futures-channel", "futures-core", - "h2 0.4.14", + "h2 0.4.15", "http 1.4.2", "http-body 1.0.1", "httparse", @@ -5069,6 +5097,15 @@ dependencies = [ "generic-array", ] +[[package]] +name = "inout" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4250ce6452e92010fdf7268ccc5d14faa80bb12fc741938534c58f16804e03c7" +dependencies = [ + "hybrid-array", +] + [[package]] name = "interpolate_name" version = "0.2.4" @@ -5266,9 +5303,9 @@ dependencies = [ [[package]] name = "iroh-metrics-derive" -version = "1.0.0-rc.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91c8e0c97f1dc787107f388433c349397c565572fe6406d600ff7bb7b7fe3b30" +checksum = "1ae5f0c4405d1fbc9fb16ff422ca40620e93dc36c30ecaba0c2aee3992b7bd48" dependencies = [ "heck 0.5.0", "proc-macro2", @@ -5520,15 +5557,26 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.100" +version = "0.3.102" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2025f20d7a4fa7785846e7b63d10a76d3f1cee98ee5cb79ea59703f95e42162" +checksum = "03d04c30968dffe80775bd4d7fb676131cd04a1fb46d2686dbffbaec2d9dfd31" dependencies = [ "cfg-if", "futures-util", "wasm-bindgen", ] +[[package]] +name = "k12" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38a8cc72399dffa4a445bc5f5a84d4af4d441c76604231bc52e9c529c1d47693" +dependencies = [ + "digest 0.11.3", + "keccak 0.2.0", + "sponge-cursor", +] + [[package]] name = "k256" version = "0.13.4" @@ -5560,6 +5608,7 @@ checksum = "9e24a010dd405bd7ed803e5253182815b41bf2e6a80cc3bfc066658e03a198aa" dependencies = [ "cfg-if", "cpufeatures 0.3.0", + "hybrid-array", ] [[package]] @@ -5972,9 +6021,9 @@ dependencies = [ [[package]] name = "memchr" -version = "2.8.1" +version = "2.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b947ae49db0d222b1dbc6b113ce7248a3fc3a6ca21b696717bfc000ba4484d8" +checksum = "88904434abc2901f197fe8cc55f0445e7ded921dba5911dad2e2b39b48e663c4" [[package]] name = "memmap2" @@ -6124,9 +6173,9 @@ dependencies = [ [[package]] name = "mozjs" -version = "0.16.0" +version = "0.16.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50cd64afbbf78b296765b823bdebc9e70024604881a0b1d9e41eb873fab95bbd" +checksum = "dd8bd40dc947a6bfe93eb45ef1dc784f48cd3008fb466f63940e7d9a160bba69" dependencies = [ "bindgen", "cc", @@ -6139,9 +6188,9 @@ dependencies = [ [[package]] name = "mozjs_sys" -version = "140.10.1-0" +version = "140.11.0-1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf708f34816a335a5c019451a3776196d2c66eb7d4d950c04d4b781821e8feff" +checksum = "5c1f9f0e5d9957edaf0f833a97edd41680c9231026dcf3fc617847e1571f377c" dependencies = [ "bindgen", "cc", @@ -6219,7 +6268,7 @@ version = "1.0.0-rc.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "223e946a84aa91644507a6b7865cfebbb9a231ace499041c747ab0fd30408212" dependencies = [ - "n0-error-macros 1.0.0-rc.0", + "n0-error-macros 1.0.0", "spez", ] @@ -6236,9 +6285,9 @@ dependencies = [ [[package]] name = "n0-error-macros" -version = "1.0.0-rc.0" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "565305a21e6b3bf26640ad98f05a0fda12d3ab4315394566b52a7bddb8b34828" +checksum = "e2acd8b070213b0299282f884b4beba4e7b52d624fdcd504a3ad3665390c11e1" dependencies = [ "proc-macro2", "quote", @@ -6631,7 +6680,6 @@ dependencies = [ "num-iter", "num-traits", "rand 0.8.6", - "serde", "smallvec", "zeroize", ] @@ -7158,8 +7206,8 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c196e0276c471c843dd5777e7543a36a298a4be942a2a688d8111cd43390dedb" dependencies = [ - "aead", - "cipher", + "aead 0.5.2", + "cipher 0.4.4", "ctr", "subtle", ] @@ -7624,6 +7672,16 @@ dependencies = [ "spki 0.7.3", ] +[[package]] +name = "pkcs1" +version = "0.8.0-rc.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "986d2e952779af96ea048f160fd9194e1751b4faea78bcf3ceb456efe008088e" +dependencies = [ + "der 0.8.0", + "spki 0.8.0", +] + [[package]] name = "pkcs8" version = "0.10.2" @@ -7631,7 +7689,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" dependencies = [ "der 0.7.10", - "rand_core 0.6.4", "spki 0.7.3", ] @@ -7757,13 +7814,12 @@ checksum = "2f3a9f18d041e6d0e102a0a46750538147e5e8992d3b4873aaafee2520b00ce3" [[package]] name = "poly1305" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8159bd90725d2df49889a078b54f4f79e87f1f8a8444194cdca81d38f5393abf" +checksum = "a00baa632505d05512f48a963e16051c54fda9a95cc9acea1a4e3c90991c4a2e" dependencies = [ - "cpufeatures 0.2.17", - "opaque-debug", - "universal-hash", + "cpufeatures 0.3.0", + "universal-hash 0.6.1", ] [[package]] @@ -7784,7 +7840,7 @@ dependencies = [ "cfg-if", "cpufeatures 0.2.17", "opaque-debug", - "universal-hash", + "universal-hash 0.5.1", ] [[package]] @@ -8033,9 +8089,9 @@ dependencies = [ [[package]] name = "psl" -version = "2.1.212" +version = "2.1.213" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9f6415ab1b08394487005d41ae7ee69e69903efa1ace538f3b274db605bf8ec" +checksum = "04e78830163eebdf905adb55ba26ba9b3ba554b08bd84c2fbe3b643c8addf22c" dependencies = [ "psl-types", ] @@ -8192,7 +8248,7 @@ version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2e8e8bcc7961af1fdac401278c6a831614941f6164ee3bf4ce61b7edb162207" dependencies = [ - "chacha20 0.10.0", + "chacha20", "getrandom 0.4.2", "rand_core 0.10.1", ] @@ -8446,7 +8502,7 @@ dependencies = [ "bytes", "encoding_rs", "futures-core", - "h2 0.4.14", + "h2 0.4.15", "http 1.4.2", "http-body 1.0.1", "http-body-util", @@ -8610,10 +8666,9 @@ dependencies = [ "num-bigint-dig", "num-integer", "num-traits", - "pkcs1", + "pkcs1 0.7.5", "pkcs8 0.10.2", "rand_core 0.6.4", - "sha1 0.10.6", "sha2 0.10.9", "signature 2.2.0", "spki 0.7.3", @@ -8621,6 +8676,24 @@ dependencies = [ "zeroize", ] +[[package]] +name = "rsa" +version = "0.10.0-rc.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30b2aa4ba0d89f73d1e332df05be0eeab8840351c36ca5654341dfdb57bb3caf" +dependencies = [ + "const-oid 0.10.2", + "crypto-bigint 0.7.3", + "crypto-primes", + "digest 0.11.3", + "pkcs1 0.8.0-rc.4", + "pkcs8 0.11.0", + "rand_core 0.10.1", + "signature 3.0.0", + "spki 0.8.0", + "zeroize", +] + [[package]] name = "rsqlite-vfs" version = "0.1.1" @@ -8960,7 +9033,7 @@ dependencies = [ [[package]] name = "selectors" version = "0.38.0" -source = "git+https://github.com/servo/stylo?rev=813923186eff5bcb957fe6da8538038acd918e98#813923186eff5bcb957fe6da8538038acd918e98" +source = "git+https://github.com/servo/stylo?rev=49e912cf401a7f867d33d61baa2389bb3d6f73e0#49e912cf401a7f867d33d61baa2389bb3d6f73e0" dependencies = [ "bitflags 2.13.0", "cssparser", @@ -10292,15 +10365,15 @@ dependencies = [ "chacha20poly1305", "chardetng", "chrono", - "cipher", + "cipher 0.4.4", "content-security-policy", "cookie 0.18.1", "crossbeam-channel", + "crypto-bigint 0.7.3", "cshake", "cssparser", "ctr", "data-url", - "der 0.7.10", "digest 0.11.3", "ecdsa", "elliptic-curve", @@ -10317,6 +10390,7 @@ dependencies = [ "indexmap", "ipc-channel", "itertools 0.14.0", + "k12", "keyboard-types 0.8.3", "libc", "log", @@ -10329,7 +10403,6 @@ dependencies = [ "mozangle", "mozjs", "nom-rfc8288", - "num-bigint-dig", "num-traits", "num_cpus", "ocb3", @@ -10339,11 +10412,11 @@ dependencies = [ "parking_lot", "percent-encoding", "phf", - "pkcs8 0.10.2", + "pkcs8 0.11.0", "postcard", "rand 0.10.1", "regex", - "rsa", + "rsa 0.10.0-rc.18", "rustc-hash 2.1.2", "sec1", "selectors", @@ -10384,9 +10457,7 @@ dependencies = [ "servo-webxr-api", "servo-xpath", "servo_arc", - "sha1 0.10.6", "sha1 0.11.0", - "sha2 0.10.9", "sha2 0.11.0", "sha3 0.10.9", "smallvec", @@ -10676,7 +10747,7 @@ dependencies = [ [[package]] name = "servo_arc" version = "0.4.3" -source = "git+https://github.com/servo/stylo?rev=813923186eff5bcb957fe6da8538038acd918e98#813923186eff5bcb957fe6da8538038acd918e98" +source = "git+https://github.com/servo/stylo?rev=49e912cf401a7f867d33d61baa2389bb3d6f73e0#49e912cf401a7f867d33d61baa2389bb3d6f73e0" dependencies = [ "serde", "stable_deref_trait", @@ -10902,9 +10973,9 @@ checksum = "9b0e903ee191d8f7a8fbf0d712c3a1699d19e04ceba5ad1eb673053c7d938a09" [[package]] name = "smallvec" -version = "1.15.1" +version = "1.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" +checksum = "8ed6a63f02c8539c91a8685a86f4099661ba3da017932f6ebbea6de3f0fa7c90" dependencies = [ "serde", ] @@ -11060,7 +11131,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "caac132742f0d33c3af65bfcde7f6aa8f62f0e991d80db99149eb9d44708784f" dependencies = [ - "cipher", + "cipher 0.4.4", "ssh-encoding", ] @@ -11086,7 +11157,7 @@ dependencies = [ "p384", "p521", "rand_core 0.6.4", - "rsa", + "rsa 0.9.10", "sec1", "sha2 0.10.9", "signature 2.2.0", @@ -11209,7 +11280,7 @@ dependencies = [ [[package]] name = "stylo" version = "0.18.0" -source = "git+https://github.com/servo/stylo?rev=813923186eff5bcb957fe6da8538038acd918e98#813923186eff5bcb957fe6da8538038acd918e98" +source = "git+https://github.com/servo/stylo?rev=49e912cf401a7f867d33d61baa2389bb3d6f73e0#49e912cf401a7f867d33d61baa2389bb3d6f73e0" dependencies = [ "app_units", "arrayvec", @@ -11265,7 +11336,7 @@ dependencies = [ [[package]] name = "stylo_atoms" version = "0.18.0" -source = "git+https://github.com/servo/stylo?rev=813923186eff5bcb957fe6da8538038acd918e98#813923186eff5bcb957fe6da8538038acd918e98" +source = "git+https://github.com/servo/stylo?rev=49e912cf401a7f867d33d61baa2389bb3d6f73e0#49e912cf401a7f867d33d61baa2389bb3d6f73e0" dependencies = [ "string_cache", "string_cache_codegen", @@ -11274,7 +11345,7 @@ dependencies = [ [[package]] name = "stylo_derive" version = "0.18.0" -source = "git+https://github.com/servo/stylo?rev=813923186eff5bcb957fe6da8538038acd918e98#813923186eff5bcb957fe6da8538038acd918e98" +source = "git+https://github.com/servo/stylo?rev=49e912cf401a7f867d33d61baa2389bb3d6f73e0#49e912cf401a7f867d33d61baa2389bb3d6f73e0" dependencies = [ "darling", "proc-macro2", @@ -11286,7 +11357,7 @@ dependencies = [ [[package]] name = "stylo_dom" version = "0.18.0" -source = "git+https://github.com/servo/stylo?rev=813923186eff5bcb957fe6da8538038acd918e98#813923186eff5bcb957fe6da8538038acd918e98" +source = "git+https://github.com/servo/stylo?rev=49e912cf401a7f867d33d61baa2389bb3d6f73e0#49e912cf401a7f867d33d61baa2389bb3d6f73e0" dependencies = [ "bitflags 2.13.0", "stylo_malloc_size_of", @@ -11295,7 +11366,7 @@ dependencies = [ [[package]] name = "stylo_malloc_size_of" version = "0.18.0" -source = "git+https://github.com/servo/stylo?rev=813923186eff5bcb957fe6da8538038acd918e98#813923186eff5bcb957fe6da8538038acd918e98" +source = "git+https://github.com/servo/stylo?rev=49e912cf401a7f867d33d61baa2389bb3d6f73e0#49e912cf401a7f867d33d61baa2389bb3d6f73e0" dependencies = [ "app_units", "cssparser", @@ -11312,7 +11383,7 @@ dependencies = [ [[package]] name = "stylo_static_prefs" version = "0.18.0" -source = "git+https://github.com/servo/stylo?rev=813923186eff5bcb957fe6da8538038acd918e98#813923186eff5bcb957fe6da8538038acd918e98" +source = "git+https://github.com/servo/stylo?rev=49e912cf401a7f867d33d61baa2389bb3d6f73e0#49e912cf401a7f867d33d61baa2389bb3d6f73e0" dependencies = [ "toml 1.1.2+spec-1.1.0", ] @@ -11320,7 +11391,7 @@ dependencies = [ [[package]] name = "stylo_traits" version = "0.18.0" -source = "git+https://github.com/servo/stylo?rev=813923186eff5bcb957fe6da8538038acd918e98#813923186eff5bcb957fe6da8538038acd918e98" +source = "git+https://github.com/servo/stylo?rev=49e912cf401a7f867d33d61baa2389bb3d6f73e0#49e912cf401a7f867d33d61baa2389bb3d6f73e0" dependencies = [ "app_units", "bitflags 2.13.0", @@ -11346,9 +11417,9 @@ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "surfman" -version = "0.12.3" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15317532328e0f6e5da2abad68391297621ddf66810e5819e92271318cc08feb" +checksum = "6ef7ecad967262d0b8bf1cbe753fe9b13ddf068606d30ceb370b87c73c5964b5" dependencies = [ "bitflags 2.13.0", "cfg_aliases", @@ -11398,9 +11469,9 @@ checksum = "e454d048db5527d000bfddb77bd072bbf3a1e2ae785f16d9bd116e07c2ab45eb" [[package]] name = "swarm-discovery" -version = "0.6.1" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36ae41d2d4ad85250007d0f061fddeec5212a15d5c4abad52c475265775572ac" +checksum = "767b9081b45ad2fd1d31b80d08d64f4208a35cef860505f9ec7478081fa06c77" dependencies = [ "acto", "hickory-proto 0.26.1", @@ -11715,12 +11786,11 @@ dependencies = [ [[package]] name = "time" -version = "0.3.47" +version = "0.3.49" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "743bd48c283afc0388f9b8827b976905fb217ad9e647fae3a379a9283c4def2c" +checksum = "711a53c2d47bbd818258c498c8dbfe186a2526c631495cfe7e078567f86b8469" dependencies = [ "deranged", - "itoa", "js-sys", "libc", "num-conv", @@ -11733,15 +11803,15 @@ dependencies = [ [[package]] name = "time-core" -version = "0.1.8" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7694e1cfe791f8d31026952abf09c69ca6f6fa4e1a1229e18988f06a04a12dca" +checksum = "9e1c906769ad99c88eaa54e728060edef082f8e358ff32030cb7c7d315e81109" [[package]] name = "time-macros" -version = "0.2.27" +version = "0.2.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e70e4c5a0e0a8a4823ad65dfe1a6930e4f4d756dcd9dd7939022b5e8c501215" +checksum = "71c652a3727a9cbb9a02f707f530b618ce00d0ccd762009c8c23bd191df3c17d" dependencies = [ "num-conv", "time-core", @@ -11847,7 +11917,7 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "to_shmem" version = "0.4.0" -source = "git+https://github.com/servo/stylo?rev=813923186eff5bcb957fe6da8538038acd918e98#813923186eff5bcb957fe6da8538038acd918e98" +source = "git+https://github.com/servo/stylo?rev=49e912cf401a7f867d33d61baa2389bb3d6f73e0#49e912cf401a7f867d33d61baa2389bb3d6f73e0" dependencies = [ "cssparser", "servo_arc", @@ -11860,7 +11930,7 @@ dependencies = [ [[package]] name = "to_shmem_derive" version = "0.1.0" -source = "git+https://github.com/servo/stylo?rev=813923186eff5bcb957fe6da8538038acd918e98#813923186eff5bcb957fe6da8538038acd918e98" +source = "git+https://github.com/servo/stylo?rev=49e912cf401a7f867d33d61baa2389bb3d6f73e0#49e912cf401a7f867d33d61baa2389bb3d6f73e0" dependencies = [ "darling", "proc-macro2", @@ -12355,6 +12425,16 @@ dependencies = [ "subtle", ] +[[package]] +name = "universal-hash" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4987bdc12753382e0bec4a65c50738ffaabc998b9cdd1f952fb5f39b0048a96" +dependencies = [ + "crypto-common 0.2.2", + "ctutils", +] + [[package]] name = "unsigned-varint" version = "0.8.0" @@ -12380,9 +12460,9 @@ dependencies = [ [[package]] name = "urlpattern" -version = "0.5.2" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37ffe0983283c841b6c6e9f116833a0061cc690c0eb67994d65bbdfa5cd3f24e" +checksum = "df16f50ef4cc145211879a3867ba757076b25dfee812040dcb0658bd9ae7904b" dependencies = [ "icu_properties 2.2.0", "regex", @@ -12662,9 +12742,9 @@ checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" [[package]] name = "wasip2" -version = "1.0.3+wasi-0.2.9" +version = "1.0.4+wasi-0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20064672db26d7cdc89c7798c48a0fdfac8213434a1186e5ef29fd560ae223d6" +checksum = "b67efb37e106e55ce722a510d6b5f9c17f083e5fc79afc2badeb12cc313d9487" dependencies = [ "wit-bindgen 0.57.1", ] @@ -12680,9 +12760,9 @@ dependencies = [ [[package]] name = "wasm-bindgen" -version = "0.2.123" +version = "0.2.125" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a254a4b10c19a76f09a27640e7ffbf9bc30bf67e16a3bf28aaefa4920fe81563" +checksum = "8ddb3f79143bced6de84270411622a2699cee572fc0875aeaf1e7867cf9fca1a" dependencies = [ "cfg-if", "once_cell", @@ -12693,9 +12773,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.73" +version = "0.4.75" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54568702fabf5d4849ce2b90fadfa64168a097eaf4b351ce9df8b687a0086aaf" +checksum = "503b14d284f2c8dac03b819967e155ea753f573586193b2b2c95990cb5d69280" dependencies = [ "js-sys", "wasm-bindgen", @@ -12703,9 +12783,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.123" +version = "0.2.125" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24a40fc75b0ec6f3746ceb10d36f53a93dcd68a93b11b6445983945d79eba0dc" +checksum = "4e21a184b13fb19e157296e2c46056aec9092264fab83e4ba59e68c61b323c3d" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -12713,9 +12793,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.123" +version = "0.2.125" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "908f34bd9b9ce3d4caf07b72dfab63d61504d156856c6bd3cd87fa350cf3985b" +checksum = "fecefd9c35bd935a20fc3fc344b5f29138961e4f47fb03297d88f2587afb5ebd" dependencies = [ "bumpalo", "proc-macro2", @@ -12726,9 +12806,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.123" +version = "0.2.125" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7acbf7616c27b194bbb550bf77ed0c2c3e5b7fd1260a93082b95fb7f47959b92" +checksum = "23939e44bb9a5d7576fa2b563dc2e136628f1224e88a8deed09e04858b77871f" dependencies = [ "unicode-ident", ] @@ -12891,9 +12971,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.100" +version = "0.3.102" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e0871acf327f283dc6da28a1696cdc64fb355ba9f935d052021fa77f35cce69" +checksum = "a6430a72df5eb332242960fe84b3002a241163998241eb596d4f739b9757061d" dependencies = [ "js-sys", "wasm-bindgen", @@ -14140,9 +14220,9 @@ dependencies = [ [[package]] name = "yuv" -version = "0.8.14" +version = "0.8.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89c90da4fb561f9750984de2c5e7f0ba01035d2eb29d69a7f375b1caef37fdf4" +checksum = "5d85a782d94ee43f078bcfd6fa82d4e6a5b2d1cfbbad168e4df5a9f7b39ef48c" dependencies = [ "num-traits", "rayon", @@ -14203,18 +14283,18 @@ dependencies = [ [[package]] name = "zeroize" -version = "1.8.2" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b97154e67e32c85465826e8bcc1c59429aaaf107c1e4a9e53c8d8ccd5eff88d0" +checksum = "e13c156562582aa81c60cb29407084cdb54c4164760106ab78e6c5b0858cf64e" dependencies = [ "zeroize_derive", ] [[package]] name = "zeroize_derive" -version = "1.4.3" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85a5b4158499876c763cb03bc4e49185d3cccbabb15b33c627f7884f43db852e" +checksum = "3c50655cbb0fe3fc43170059e702f1ce5e19b84cec58dc87b037a09935c2f328" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index e274591..6e471d1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -50,10 +50,10 @@ byteorder = "1.5" bytes = "1.0" cbc = "0.1.2" cfg-if = "1.0.4" -chacha20poly1305 = "0.10" +chacha20poly1305 = { version = "=0.11.0-rc.3", features = ["rand_core", "zeroize"] } chardetng = "0.1" chrono = { version = "0.4", features = ["serde"] } -cipher = { version = "0.4.4", features = ["alloc"] } +cipher = { version = "0.4.4", features = ["alloc", "rand_core"] } content-security-policy = { version = "0.8.0", features = ["serde"] } cookie = { package = "cookie", version = "0.18" } criterion = "0.5" @@ -61,6 +61,7 @@ crossbeam-channel = "0.5" cssparser = { version = "0.37", features = ["serde"] } cshake = "0.2" ctr = "0.9.2" +crypto-bigint = "0.7" data-url = "0.3" deny_public_fields = { package = "servo-deny-public-fields", version = "0.1.0", path = "source/components/deny_public_fields" } der = { version = "0.7", features = ["alloc", "derive"] } @@ -131,10 +132,11 @@ iroh = { version = "1.0.0-rc.1", default-features = false, features = ["tls-aws- iroh-mdns-address-lookup = "0.3" iroh-persist = { git = "https://github.com/webbeef/iroh-persist.git", branch = "iroh-1.0.0-rc.1" } itertools = "0.14" -js = { package = "mozjs", version = "=0.16", default-features = false, features = ["libz-sys", "intl"] } +js = { package = "mozjs", version = "=0.16.2", default-features = false, features = ["libz-sys", "intl"] } jstraceable_derive = { package = "servo-jstraceable-derive", version = "0.1.0", path = "source/components/jstraceable_derive" } keyboard-types = { version = "0.8.3", features = ["serde", "webdriver"] } kurbo = { version = "0.13.1", features = ["euclid"] } +k12 = "0.5" layout = { package = "servo-layout", version = "0.1.0", path = "source/components/layout" } layout_api = { package = "servo-layout-api", path = "source/components/shared/layout" } libc = "0.2" @@ -158,7 +160,6 @@ net_traits = { package = "servo-net-traits", path = "source/components/shared/ne nix = "0.30" nom = "8.0.0" nom-rfc8288 = "0.4.0" -num-bigint-dig = "0.8" num-complex = "0.4.6" num-derive = "0.4.2" num-traits = "0.2" @@ -189,7 +190,7 @@ phf = "0.13" phf_codegen = "0.13" phf_shared = "0.13" pixels = { package = "servo-pixels", version = "0.1.0", path = "source/components/pixels" } -pkcs8 = { version = "0.10", features = ["rand_core"] } +pkcs8 = "0.11" pollster = "0.4" postcard = { version = "1.1.3", default-features = false, features = ["use-std"] } prettyplease = "0.2.32" @@ -206,7 +207,7 @@ rayon = "1" read-fonts = "0.39.2" regex = "1.12" resvg = "0.47.0" -rsa = { version = "0.9.10", features = ["sha1", "sha2"] } +rsa = "=0.10.0-rc.18" rustc-demangle = "0.1" rusqlite = "0.38" rustc-hash = "2.1.1" @@ -219,7 +220,7 @@ script_traits = { package = "servo-script-traits", path = "source/components/sha sea-query = { version = "1.0.0-rc.30", default-features = false, features = ["backend-sqlite", "derive"] } sea-query-rusqlite = { version = "0.8.0-rc.15" } sec1 = "0.7" -selectors = { git = "https://github.com/servo/stylo", rev = "813923186eff5bcb957fe6da8538038acd918e98" } +selectors = { git = "https://github.com/servo/stylo", rev = "49e912cf401a7f867d33d61baa2389bb3d6f73e0" } seq-macro = "0.3.6" serde = "1.0.228" serde_bytes = "0.11" @@ -257,12 +258,10 @@ servo-media-webrtc = { version = "0.1.0", path = "source/components/media/webrtc servo-wakelock = { version = "0.1.0", path = "source/components/wakelock" } servo_allocator = { package = "servo-allocator", version = "0.1.0", path = "source/components/allocator" } servo-tracing = { path = "source/components/servo_tracing" } -servo_arc = { git = "https://github.com/servo/stylo", rev = "813923186eff5bcb957fe6da8538038acd918e98" } +servo_arc = { git = "https://github.com/servo/stylo", rev = "49e912cf401a7f867d33d61baa2389bb3d6f73e0" } servo-url = { version = "0.1.0", path = "source/components/url" } sha1 = "0.11" -sha1_0_10 = { package = "sha1", version = "0.10" } sha2 = "0.11" -sha2_0_10 = { package = "sha2", version = "0.10" } sha3 = "0.10" speexdsp-resampler = "0.1.0" skrifa = "0.42.1" @@ -271,14 +270,14 @@ storage = { package = "servo-storage", version = "0.1.0", path = "source/compone storage_traits = { package = "servo-storage-traits", path = "source/components/shared/storage" } string_cache = "0.9" strum = { version = "0.27", features = ["derive"] } -stylo = { git = "https://github.com/servo/stylo", rev = "813923186eff5bcb957fe6da8538038acd918e98" } -stylo_atoms = { git = "https://github.com/servo/stylo", rev = "813923186eff5bcb957fe6da8538038acd918e98" } -stylo_config = { git = "https://github.com/servo/stylo", rev = "813923186eff5bcb957fe6da8538038acd918e98" } -stylo_dom = { git = "https://github.com/servo/stylo", rev = "813923186eff5bcb957fe6da8538038acd918e98" } -stylo_malloc_size_of = { git = "https://github.com/servo/stylo", rev = "813923186eff5bcb957fe6da8538038acd918e98" } -stylo_static_prefs = { git = "https://github.com/servo/stylo", rev = "813923186eff5bcb957fe6da8538038acd918e98" } -stylo_traits = { git = "https://github.com/servo/stylo", rev = "813923186eff5bcb957fe6da8538038acd918e98" } -surfman = { version = "0.12.0", features = ["chains"] } +stylo = { git = "https://github.com/servo/stylo", rev = "49e912cf401a7f867d33d61baa2389bb3d6f73e0" } +stylo_atoms = { git = "https://github.com/servo/stylo", rev = "49e912cf401a7f867d33d61baa2389bb3d6f73e0" } +stylo_config = { git = "https://github.com/servo/stylo", rev = "49e912cf401a7f867d33d61baa2389bb3d6f73e0" } +stylo_dom = { git = "https://github.com/servo/stylo", rev = "49e912cf401a7f867d33d61baa2389bb3d6f73e0" } +stylo_malloc_size_of = { git = "https://github.com/servo/stylo", rev = "49e912cf401a7f867d33d61baa2389bb3d6f73e0" } +stylo_static_prefs = { git = "https://github.com/servo/stylo", rev = "49e912cf401a7f867d33d61baa2389bb3d6f73e0" } +stylo_traits = { git = "https://github.com/servo/stylo", rev = "49e912cf401a7f867d33d61baa2389bb3d6f73e0" } +surfman = { version = "0.13.0", features = ["chains"] } swapper = "0.1" syn = { version = "2", default-features = false, features = ["clone-impls", "derive", "parsing"] } synstructure = "0.13" @@ -306,7 +305,7 @@ unicode-properties = { version = "0.1.4", features = ["emoji"] } unicode-script = "0.5" unicode-segmentation = "1.12.0" url = "2.5" -urlpattern = "0.5" +urlpattern = "0.6" utf-8 = "0.7" uuid = { version = "1.20.0", features = ["v4", "v5"] } vello = "0.9" @@ -341,8 +340,8 @@ zeroize = "1.8" # consider RSA key generation tests fail due to timeout. # Building with higher optimization levels can speed up the key # generation process to avoid false negative result in those tests. -# More details: -[profile.dev.package.num-bigint-dig] +# More details: +[profile.dev.package.crypto-bigint] opt-level = 3 # Force tikv-jemalloc-sys to build with at least -O1. diff --git a/forkme.lock b/forkme.lock index de98fe3..1b7e2bc 100644 --- a/forkme.lock +++ b/forkme.lock @@ -1 +1 @@ -c2d53a8ea96da1cf999930e5ccda2e9efb644e49 +414dc78d85067b619dbe39c5ff8f0d331f0ae958 diff --git a/patches/Cargo.lock.patch b/patches/Cargo.lock.patch index 1178454..8b9b31d 100644 --- a/patches/Cargo.lock.patch +++ b/patches/Cargo.lock.patch @@ -1,6 +1,6 @@ --- original +++ modified -@@ -651,6 +651,33 @@ +@@ -661,6 +661,33 @@ checksum = "21e4227379beff4205943696e6c3e0cd809bacdf3f0edd6e3dd153e2269571a4" [[package]] @@ -34,7 +34,7 @@ name = "atspi" version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -@@ -774,6 +801,12 @@ +@@ -784,6 +811,12 @@ ] [[package]] @@ -47,24 +47,7 @@ name = "base16ct" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -@@ -780,6 +813,16 @@ - checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" - - [[package]] -+name = "base256emoji" -+version = "1.0.2" -+source = "registry+https://github.com/rust-lang/crates.io-index" -+checksum = "b5e9430d9a245a77c92176e649af6e275f20839a48389859d1661e9a128d077c" -+dependencies = [ -+ "const-str", -+ "match-lookup", -+] -+ -+[[package]] - name = "base64" - version = "0.22.1" - source = "registry+https://github.com/rust-lang/crates.io-index" -@@ -1161,6 +1204,15 @@ +@@ -1177,6 +1210,15 @@ ] [[package]] @@ -80,7 +63,7 @@ name = "cc" version = "1.2.62" source = "registry+https://github.com/rust-lang/crates.io-index" -@@ -1306,6 +1358,20 @@ +@@ -1313,6 +1355,20 @@ ] [[package]] @@ -101,7 +84,7 @@ name = "cipher" version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -@@ -1571,11 +1637,20 @@ +@@ -1588,11 +1644,20 @@ dependencies = [ "core-foundation 0.9.4", "core-graphics", @@ -123,7 +106,7 @@ name = "core_maths" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -@@ -1647,6 +1722,12 @@ +@@ -1670,6 +1735,12 @@ ] [[package]] @@ -136,7 +119,7 @@ name = "crossbeam-channel" version = "0.5.15" source = "registry+https://github.com/rust-lang/crates.io-index" -@@ -1866,6 +1947,26 @@ +@@ -1913,6 +1984,26 @@ checksum = "a4ae5f15dda3c708c0ade84bfee31ccab44a3da4f88015ed22f63732abe300c8" [[package]] @@ -163,15 +146,7 @@ name = "data-url" version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -@@ -2245,6 +2346,7 @@ - checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" - dependencies = [ - "base16ct", -+ "base64ct", - "crypto-bigint", - "digest 0.10.7", - "ff", -@@ -2255,6 +2357,8 @@ +@@ -2290,6 +2381,8 @@ "pkcs8 0.10.2", "rand_core 0.6.4", "sec1", @@ -180,7 +155,7 @@ "subtle", "zeroize", ] -@@ -2315,6 +2419,18 @@ +@@ -2350,6 +2443,18 @@ checksum = "66b7e2430c6dff6a955451e2cfc438f09cea1965a9d6f87f7e3b90decc014099" [[package]] @@ -199,7 +174,7 @@ name = "enumflags2" version = "0.7.12" source = "registry+https://github.com/rust-lang/crates.io-index" -@@ -2684,12 +2800,21 @@ +@@ -2719,12 +2824,21 @@ [[package]] name = "foreign-types" @@ -222,7 +197,7 @@ ] [[package]] -@@ -2705,6 +2830,12 @@ +@@ -2740,6 +2854,12 @@ [[package]] name = "foreign-types-shared" @@ -235,7 +210,7 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b" -@@ -2901,6 +3032,7 @@ +@@ -2936,6 +3056,7 @@ checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0" dependencies = [ "cfg-if", @@ -243,7 +218,7 @@ "libc", "wasi", ] -@@ -2912,9 +3044,11 @@ +@@ -2947,9 +3068,11 @@ checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" dependencies = [ "cfg-if", @@ -255,7 +230,7 @@ ] [[package]] -@@ -3564,7 +3698,7 @@ +@@ -3599,7 +3722,7 @@ "cc", "core-graphics", "core-text", @@ -264,7 +239,7 @@ "freetype-sys", "pkg-config", "winapi", -@@ -3677,6 +3811,52 @@ +@@ -3712,6 +3835,52 @@ checksum = "dfa686283ad6dd069f105e5ab091b04c62850d3e4cf5d67debad1933f55023df" [[package]] @@ -317,7 +292,7 @@ name = "hilog" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -@@ -3866,6 +4046,22 @@ +@@ -3901,6 +4070,22 @@ ] [[package]] @@ -340,7 +315,7 @@ name = "hyper-util" version = "0.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" -@@ -3886,6 +4082,7 @@ +@@ -3921,6 +4106,7 @@ "tokio", "tower-service", "tracing", @@ -348,7 +323,7 @@ ] [[package]] -@@ -4502,6 +4699,29 @@ +@@ -4546,6 +4732,29 @@ ] [[package]] @@ -378,7 +353,7 @@ name = "ipnet" version = "2.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -@@ -4508,6 +4728,27 @@ +@@ -4552,6 +4761,27 @@ checksum = "d98f6fed1fde3f8c21bc40a1abb88dd75e67924f9cffc3ef95607bad8017f8e2" [[package]] @@ -406,28 +381,7 @@ name = "is_terminal_polyfill" version = "1.70.2" source = "registry+https://github.com/rust-lang/crates.io-index" -@@ -4665,6 +4906,20 @@ - ] - - [[package]] -+name = "k256" -+version = "0.13.4" -+source = "registry+https://github.com/rust-lang/crates.io-index" -+checksum = "f6e3919bbaa2945715f0bb6d3934a173d1e9a59ac23767fbaaef277265a7411b" -+dependencies = [ -+ "cfg-if", -+ "ecdsa", -+ "elliptic-curve", -+ "once_cell", -+ "sha2", -+ "signature", -+] -+ -+[[package]] - name = "keccak" - version = "0.2.0" - source = "registry+https://github.com/rust-lang/crates.io-index" -@@ -4968,6 +5223,17 @@ +@@ -5021,6 +5251,17 @@ ] [[package]] @@ -445,7 +399,7 @@ name = "matchers" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -@@ -5161,6 +5427,29 @@ +@@ -5214,6 +5455,29 @@ checksum = "956787520e75e9bd233246045d19f42fb73242759cc57fba9611d940ae96d4b0" [[package]] @@ -475,7 +429,7 @@ name = "naga" version = "29.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -@@ -5244,6 +5533,23 @@ +@@ -5297,6 +5561,23 @@ ] [[package]] @@ -499,7 +453,7 @@ name = "ndk" version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -@@ -5993,6 +6299,10 @@ +@@ -6018,6 +6299,10 @@ version = "1.21.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" @@ -510,7 +464,7 @@ [[package]] name = "once_cell_polyfill" -@@ -6013,6 +6323,32 @@ +@@ -6038,6 +6323,32 @@ checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" [[package]] @@ -543,7 +497,7 @@ name = "openssl-probe" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -@@ -6019,6 +6355,18 @@ +@@ -6044,6 +6355,18 @@ checksum = "7c87def4c32ab89d880effc9e097653c8da5d6ef28e6b539d313baaacfbafcbe" [[package]] @@ -562,7 +516,7 @@ name = "openxr" version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -@@ -6693,6 +7041,61 @@ +@@ -6724,6 +7047,61 @@ ] [[package]] @@ -624,7 +578,7 @@ name = "quote" version = "1.0.45" source = "registry+https://github.com/rust-lang/crates.io-index" -@@ -6980,6 +7383,56 @@ +@@ -7011,6 +7389,56 @@ checksum = "19b30a45b0cd0bcca8037f3d0dc3421eaf95327a17cad11964fb8179b4fc4832" [[package]] @@ -681,7 +635,7 @@ name = "resvg" version = "0.47.0" source = "registry+https://github.com/rust-lang/crates.io-index" -@@ -7156,6 +7609,7 @@ +@@ -7183,6 +7611,7 @@ "aws-lc-rs", "log", "once_cell", @@ -689,7 +643,7 @@ "rustls-pki-types", "rustls-webpki", "subtle", -@@ -7180,6 +7634,7 @@ +@@ -7207,6 +7636,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "30a7197ae7eb376e574fe940d068c30fe0462554a3ddbe4eca7838e049c937a9" dependencies = [ @@ -697,7 +651,7 @@ "zeroize", ] -@@ -7469,6 +7924,18 @@ +@@ -7497,6 +7927,18 @@ ] [[package]] @@ -716,24 +670,7 @@ name = "serde_json" version = "1.0.150" source = "registry+https://github.com/rust-lang/crates.io-index" -@@ -7524,6 +7991,16 @@ - ] - - [[package]] -+name = "serdect" -+version = "0.2.0" -+source = "registry+https://github.com/rust-lang/crates.io-index" -+checksum = "a84f14a19e9a014bb9f4512488d9829a68e04ecabffb0f9904cd1ace94598177" -+dependencies = [ -+ "base16ct", -+ "serde", -+] -+ -+[[package]] - name = "servo" - version = "0.3.0" - dependencies = [ -@@ -7798,6 +8275,7 @@ +@@ -7836,6 +8278,7 @@ "rand 0.10.1", "rustc-hash 2.1.2", "serde", @@ -741,7 +678,7 @@ "servo-background-hang-monitor", "servo-background-hang-monitor-api", "servo-base", -@@ -7824,6 +8302,8 @@ +@@ -7862,6 +8305,8 @@ "servo-webxr-api", "stylo", "stylo_traits", @@ -750,7 +687,7 @@ "tracing", ] -@@ -8453,9 +8933,11 @@ +@@ -8491,9 +8936,11 @@ name = "servo-net" version = "0.3.0" dependencies = [ @@ -762,7 +699,7 @@ "base64", "bytes", "chrono", -@@ -8485,6 +8967,7 @@ +@@ -8523,6 +8970,7 @@ "parking_lot", "quick_cache", "regex", @@ -770,7 +707,7 @@ "resvg", "rustc-hash 2.1.2", "rustls", -@@ -8491,9 +8974,11 @@ +@@ -8529,9 +8977,11 @@ "rustls-pki-types", "rustls-platform-verifier", "serde", @@ -782,7 +719,7 @@ "servo-devtools-traits", "servo-embedder-traits", "servo-hyper-serde", -@@ -8544,6 +9029,7 @@ +@@ -8582,6 +9032,7 @@ "rustc-hash 2.1.2", "rustls-pki-types", "serde", @@ -790,7 +727,7 @@ "servo-base", "servo-config", "servo-default-resources", -@@ -8555,8 +9041,10 @@ +@@ -8593,8 +9044,10 @@ "servo-profile-traits", "servo-url", "servo_arc", @@ -801,7 +738,7 @@ "url", "uuid", "webrender_api", -@@ -9139,6 +9627,7 @@ +@@ -9175,6 +9628,7 @@ "bpaf", "cc", "cfg-if", @@ -809,7 +746,7 @@ "crossbeam-channel", "dirs", "dpi", -@@ -9153,6 +9642,7 @@ +@@ -9189,6 +9643,7 @@ "headers", "hilog", "hitrace", @@ -817,7 +754,7 @@ "image", "ipc-channel", "jni 0.22.4", -@@ -9173,6 +9663,7 @@ +@@ -9209,6 +9664,7 @@ "ohos-window-manager-sys", "raw-window-handle", "rustls", @@ -825,7 +762,7 @@ "serde_json", "servo", "servo-allocator", -@@ -9179,6 +9670,7 @@ +@@ -9215,6 +9671,7 @@ "servo-base", "servo-webdriver-server", "signal-hook-registry", @@ -833,7 +770,7 @@ "surfman", "tokio", "tracing", -@@ -9823,6 +10315,9 @@ +@@ -9853,6 +10310,9 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" @@ -843,7 +780,7 @@ [[package]] name = "synstructure" -@@ -9857,6 +10352,27 @@ +@@ -9887,6 +10347,27 @@ ] [[package]] @@ -871,7 +808,7 @@ name = "system-deps" version = "7.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -@@ -9882,6 +10398,12 @@ +@@ -9912,6 +10393,12 @@ ] [[package]] @@ -884,7 +821,7 @@ name = "tar" version = "0.4.46" source = "registry+https://github.com/rust-lang/crates.io-index" -@@ -10201,6 +10723,16 @@ +@@ -10230,6 +10717,16 @@ ] [[package]] @@ -901,16 +838,16 @@ name = "tokio-rustls" version = "0.26.4" source = "registry+https://github.com/rust-lang/crates.io-index" -@@ -10302,6 +10834,25 @@ +@@ -10331,11 +10828,30 @@ "futures-util", "pin-project-lite", "sync_wrapper", + "tokio", -+ "tower-layer", -+ "tower-service", -+] -+ -+[[package]] + "tower-layer", + "tower-service", + ] + + [[package]] +name = "tower-http" +version = "0.6.8" +source = "registry+https://github.com/rust-lang/crates.io-index" @@ -924,23 +861,15 @@ + "iri-string", + "pin-project-lite", + "tower", - "tower-layer", - "tower-service", - ] -@@ -10602,6 +11153,12 @@ - ] - - [[package]] -+name = "unsigned-varint" -+version = "0.8.0" -+source = "registry+https://github.com/rust-lang/crates.io-index" -+checksum = "eb066959b24b5196ae73cb057f45598450d2c5f71460e98c49b738086eff9c06" ++ "tower-layer", ++ "tower-service", ++] + +[[package]] - name = "untrusted" - version = "0.9.0" + name = "tower-layer" + version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -@@ -10621,6 +11178,12 @@ +@@ -10660,6 +11176,12 @@ ] [[package]] @@ -953,7 +882,7 @@ name = "urlpattern" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -@@ -11606,6 +12169,17 @@ +@@ -11645,6 +12167,17 @@ ] [[package]] diff --git a/patches/components/layout/layout_impl.rs.patch b/patches/components/layout/layout_impl.rs.patch index 09ba019..8e84269 100644 --- a/patches/components/layout/layout_impl.rs.patch +++ b/patches/components/layout/layout_impl.rs.patch @@ -1,6 +1,6 @@ --- original +++ modified -@@ -230,6 +230,10 @@ +@@ -232,6 +232,10 @@ /// See [Layout::needs_accessibility_update()]. needs_accessibility_update: Cell, @@ -11,7 +11,7 @@ } pub struct LayoutFactoryImpl(); -@@ -270,12 +274,25 @@ +@@ -272,12 +276,25 @@ fn set_viewport_details(&mut self, viewport_details: ViewportDetails) -> bool { let device = self.stylist.device_mut(); let device_pixel_ratio = Scale::new(viewport_details.hidpi_scale_factor.get()); @@ -41,7 +41,7 @@ device.set_viewport_size(viewport_details.size); device.set_device_pixel_ratio(device_pixel_ratio); self.device_has_changed = true; -@@ -809,6 +826,7 @@ +@@ -831,6 +848,7 @@ accessibility_active: Cell::new(false), accessibility_tree: Default::default(), needs_accessibility_update: Cell::new(false), diff --git a/patches/components/net/resource_thread.rs.patch b/patches/components/net/resource_thread.rs.patch index 7e23399..97b0490 100644 --- a/patches/components/net/resource_thread.rs.patch +++ b/patches/components/net/resource_thread.rs.patch @@ -64,7 +64,7 @@ }; (Arc::new(http_state), Arc::new(private_http_state)) -@@ -682,9 +693,16 @@ +@@ -678,9 +689,16 @@ return false; }, // Ignore these messages as they are only sent on very specific channels. diff --git a/patches/components/script/dom/atproto.rs.patch b/patches/components/script/dom/atproto.rs.patch index 4b9d26c..5307a5b 100644 --- a/patches/components/script/dom/atproto.rs.patch +++ b/patches/components/script/dom/atproto.rs.patch @@ -1,6 +1,6 @@ --- original +++ modified -@@ -0,0 +1,150 @@ +@@ -0,0 +1,131 @@ +// SPDX-License-Identifier: AGPL-3.0-or-later + +use std::rc::Rc; @@ -18,7 +18,6 @@ +use crate::dom::bindings::root::DomRoot; +use crate::dom::globalscope::GlobalScope; +use crate::dom::promise::Promise; -+use crate::realms::InRealm; +use crate::routed_promise::{RoutedPromiseListener, callback_promise}; +use crate::script_runtime::CanGc; + @@ -40,9 +39,9 @@ +} + +impl AtProto { -+ fn request(&self, request: AtProtoRequest, comp: InRealm, can_gc: CanGc) -> Rc { ++ fn request(&self, cx: &mut JSContext, request: AtProtoRequest) -> Rc { + let global = &self.global(); -+ let promise = Promise::new_in_current_realm(comp, can_gc); ++ let promise = Promise::new2(cx, global); + let task_source = global.task_manager().dom_manipulation_task_source(); + let callback = callback_promise(&promise, self, task_source); + @@ -52,8 +51,8 @@ + .is_err() + { + promise.reject_error( ++ cx, + Error::Operation(Some("Constellation is dead".to_owned())), -+ can_gc, + ); + } + promise @@ -62,48 +61,33 @@ + +impl AtProtoMethods for AtProto { + /// -+ fn Login( -+ &self, -+ handle: USVString, -+ password: USVString, -+ comp: InRealm, -+ can_gc: CanGc, -+ ) -> Rc { ++ fn Login(&self, cx: &mut JSContext, handle: USVString, password: USVString) -> Rc { + self.request( ++ cx, + AtProtoRequest::Login(handle.to_string(), password.to_string()), -+ comp, -+ can_gc, + ) + } + + /// -+ fn Logout(&self, comp: InRealm, can_gc: CanGc) -> Rc { -+ self.request(AtProtoRequest::Logout, comp, can_gc) ++ fn Logout(&self, cx: &mut JSContext) -> Rc { ++ self.request(cx, AtProtoRequest::Logout) + } + + /// -+ fn Current(&self, comp: InRealm, can_gc: CanGc) -> Rc { -+ self.request(AtProtoRequest::Current, comp, can_gc) ++ fn Current(&self, cx: &mut JSContext) -> Rc { ++ self.request(cx, AtProtoRequest::Current) + } + -+ fn AuthorizeOrigin(&self, origin: USVString, comp: InRealm, can_gc: CanGc) -> Rc { -+ self.request( -+ AtProtoRequest::AuthorizeOrigin(origin.to_string()), -+ comp, -+ can_gc, -+ ) ++ fn AuthorizeOrigin(&self, cx: &mut JSContext, origin: USVString) -> Rc { ++ self.request(cx, AtProtoRequest::AuthorizeOrigin(origin.to_string())) + } + -+ fn RevokeOrigin(&self, origin: USVString, comp: InRealm, can_gc: CanGc) -> Rc { -+ self.request( -+ AtProtoRequest::RevokeOrigin(origin.to_string()), -+ comp, -+ can_gc, -+ ) ++ fn RevokeOrigin(&self, cx: &mut JSContext, origin: USVString) -> Rc { ++ self.request(cx, AtProtoRequest::RevokeOrigin(origin.to_string())) + } + -+ fn AuthorizedOrigins(&self, comp: InRealm, can_gc: CanGc) -> Rc { -+ self.request(AtProtoRequest::GetAuthorizedOrigins, comp, can_gc) ++ fn AuthorizedOrigins(&self, cx: &mut JSContext) -> Rc { ++ self.request(cx, AtProtoRequest::GetAuthorizedOrigins) + } +} + @@ -136,16 +120,13 @@ + }, + AtProtoResult::Error => { + error!("ATProto error :("); -+ promise.reject_error( -+ Error::Operation(Some("ATProto error".to_owned())), -+ CanGc::from_cx(cx), -+ ) ++ promise.reject_error(cx, Error::Operation(Some("ATProto error".to_owned()))) + }, + AtProtoResult::RefreshRequired => { + error!("ATProto refresh required :("); + promise.reject_error( ++ cx, + Error::Operation(Some("ATProto refresh required".to_owned())), -+ CanGc::from_cx(cx), + ) + }, + } diff --git a/patches/components/script/dom/contentblocker.rs.patch b/patches/components/script/dom/contentblocker.rs.patch index 26822ee..22440a7 100644 --- a/patches/components/script/dom/contentblocker.rs.patch +++ b/patches/components/script/dom/contentblocker.rs.patch @@ -1,6 +1,6 @@ --- original +++ modified -@@ -0,0 +1,139 @@ +@@ -0,0 +1,137 @@ +/* SPDX Id: AGPL-3.0-or-later */ + +use std::rc::Rc; @@ -19,7 +19,6 @@ +use crate::dom::bindings::str::USVString; +use crate::dom::globalscope::GlobalScope; +use crate::dom::promise::Promise; -+use crate::realms::InRealm; +use crate::routed_promise::{RoutedPromiseListener, callback_promise}; +use crate::script_runtime::CanGc; + @@ -41,9 +40,9 @@ +} + +impl ContentBlockerMethods for ContentBlocker { -+ fn GetOriginState(&self, origin: USVString, comp: InRealm, can_gc: CanGc) -> Rc { ++ fn GetOriginState(&self, cx: &mut JSContext, origin: USVString) -> Rc { + let global = &self.global(); -+ let promise = Promise::new_in_current_realm(comp, can_gc); ++ let promise = Promise::new2(cx, global); + let task_source = global.task_manager().dom_manipulation_task_source(); + let callback = callback_promise(&promise, self, task_source); + @@ -54,20 +53,19 @@ + )) + .is_err() + { -+ promise.reject_error(Error::Operation(None), can_gc); ++ promise.reject_error(cx, Error::Operation(None)); + } + promise + } + + fn SetOriginEnabled( + &self, ++ cx: &mut JSContext, + origin: USVString, + enabled: bool, -+ comp: InRealm, -+ can_gc: CanGc, + ) -> Rc { + let global = &self.global(); -+ let promise = Promise::new_in_current_realm(comp, can_gc); ++ let promise = Promise::new2(cx, global); + let task_source = global.task_manager().dom_manipulation_task_source(); + let callback = callback_promise(&promise, self, task_source); + @@ -80,14 +78,14 @@ + ) + .is_err() + { -+ promise.reject_error(Error::Operation(None), can_gc); ++ promise.reject_error(cx, Error::Operation(None)); + } + promise + } + -+ fn ResetCounts(&self, origin: USVString, comp: InRealm, can_gc: CanGc) -> Rc { ++ fn ResetCounts(&self, cx: &mut JSContext, origin: USVString) -> Rc { + let global = &self.global(); -+ let promise = Promise::new_in_current_realm(comp, can_gc); ++ let promise = Promise::new2(cx, global); + let task_source = global.task_manager().dom_manipulation_task_source(); + let callback = callback_promise(&promise, self, task_source); + @@ -98,7 +96,7 @@ + )) + .is_err() + { -+ promise.reject_error(Error::Operation(None), can_gc); ++ promise.reject_error(cx, Error::Operation(None)); + } + promise + } @@ -121,7 +119,7 @@ + promise.resolve_native(&dict, CanGc::from_cx(cx)); + }, + Err(msg) => { -+ promise.reject_error(Error::Operation(Some(msg)), CanGc::from_cx(cx)); ++ promise.reject_error(cx, Error::Operation(Some(msg))); + }, + } + } @@ -136,7 +134,7 @@ + ) { + match response { + Ok(()) => promise.resolve_native(&(), CanGc::from_cx(cx)), -+ Err(msg) => promise.reject_error(Error::Operation(Some(msg)), CanGc::from_cx(cx)), ++ Err(msg) => promise.reject_error(cx, Error::Operation(Some(msg))), + } + } +} diff --git a/patches/components/script/dom/dbus.rs.patch b/patches/components/script/dom/dbus.rs.patch index 654cbd2..5b77e4c 100644 --- a/patches/components/script/dom/dbus.rs.patch +++ b/patches/components/script/dom/dbus.rs.patch @@ -1,6 +1,6 @@ --- original +++ modified -@@ -0,0 +1,302 @@ +@@ -0,0 +1,291 @@ +/* SPDX Id: AGPL-3.0-or-later */ + +use std::rc::Rc; @@ -12,7 +12,6 @@ +use js::rust::HandleValue; +use script_bindings::error::Error; +use script_bindings::reflector::reflect_dom_object; -+use script_bindings::script_runtime::JSContext as SafeJSContext; +use script_bindings::trace::RootedTraceableBox; +use servo_constellation_traits::{DbusSignalEvent, DbusValue, ScriptToConstellationMessage}; + @@ -29,7 +28,6 @@ +use crate::dom::eventtarget::EventTarget; +use crate::dom::globalscope::GlobalScope; +use crate::dom::promise::Promise; -+use crate::realms::InRealm; +use crate::routed_promise::{RoutedPromiseListener, callback_promise}; +use crate::script_runtime::CanGc; + @@ -58,7 +56,7 @@ +} + +#[expect(unsafe_code)] -+fn jsval_to_dbus(cx: *mut js::jsapi::JSContext, val: &JSVal) -> DbusValue { ++fn jsval_to_dbus(cx: &mut JSContext, val: &JSVal) -> DbusValue { + if val.is_boolean() { + DbusValue::Bool(val.to_boolean()) + } else if val.is_int32() { @@ -67,8 +65,8 @@ + DbusValue::Double(val.to_double()) + } else if val.is_string() { + unsafe { -+ rooted!(in(cx) let rooted_val = *val); -+ match String::from_jsval(cx, rooted_val.handle(), ()) { ++ rooted!(&in(cx) let rooted_val = *val); ++ match String::from_jsval(cx.raw_cx(), rooted_val.handle(), ()) { + Ok(js::conversions::ConversionResult::Success(s)) => DbusValue::String(s), + _ => DbusValue::String(String::new()), + } @@ -81,20 +79,18 @@ +impl DBusMethods for DBus { + fn Call( + &self, ++ cx: &mut JSContext, + options: RootedTraceableBox, -+ comp: InRealm, -+ can_gc: CanGc, + ) -> Rc { + let global = &self.global(); -+ let promise = Promise::new_in_current_realm(comp, can_gc); ++ let promise = Promise::new2(cx, global); + let task_source = global.task_manager().dom_manipulation_task_source(); + let callback = callback_promise(&promise, self, task_source); + -+ let cx = GlobalScope::get_cx(); + let args: Vec = options + .args + .iter() -+ .map(|arg| jsval_to_dbus(cx.raw_cx(), &arg.get())) ++ .map(|arg| jsval_to_dbus(cx, &arg.get())) + .collect(); + + let chan = global.script_to_constellation_chan(); @@ -110,19 +106,14 @@ + )) + .is_err() + { -+ promise.reject_error(Error::Operation(None), can_gc); ++ promise.reject_error(cx, Error::Operation(None)); + } + promise + } + -+ fn GetProperty( -+ &self, -+ options: &DBusPropertyOptions, -+ comp: InRealm, -+ can_gc: CanGc, -+ ) -> Rc { ++ fn GetProperty(&self, cx: &mut JSContext, options: &DBusPropertyOptions) -> Rc { + let global = &self.global(); -+ let promise = Promise::new_in_current_realm(comp, can_gc); ++ let promise = Promise::new2(cx, global); + let task_source = global.task_manager().dom_manipulation_task_source(); + let callback = callback_promise(&promise, self, task_source); + @@ -138,25 +129,23 @@ + )) + .is_err() + { -+ promise.reject_error(Error::Operation(None), can_gc); ++ promise.reject_error(cx, Error::Operation(None)); + } + promise + } + + fn SetProperty( + &self, -+ cx: SafeJSContext, ++ cx: &mut JSContext, + options: &DBusPropertyOptions, + value: HandleValue, -+ comp: InRealm, -+ can_gc: CanGc, + ) -> Rc { + let global = &self.global(); -+ let promise = Promise::new_in_current_realm(comp, can_gc); ++ let promise = Promise::new2(cx, global); + let task_source = global.task_manager().dom_manipulation_task_source(); + let callback = callback_promise(&promise, self, task_source); + -+ let dbus_value = jsval_to_dbus(cx.raw_cx(), &value.get()); ++ let dbus_value = jsval_to_dbus(cx, &value.get()); + + let chan = global.script_to_constellation_chan(); + if chan @@ -171,14 +160,14 @@ + )) + .is_err() + { -+ promise.reject_error(Error::Operation(None), can_gc); ++ promise.reject_error(cx, Error::Operation(None)); + } + promise + } + -+ fn Subscribe(&self, options: &DBusSignalOptions, comp: InRealm, can_gc: CanGc) -> Rc { ++ fn Subscribe(&self, cx: &mut JSContext, options: &DBusSignalOptions) -> Rc { + let global = &self.global(); -+ let promise = Promise::new_in_current_realm(comp, can_gc); ++ let promise = Promise::new2(cx, global); + let task_source = global.task_manager().dom_manipulation_task_source(); + let callback = callback_promise(&promise, self, task_source); + @@ -200,14 +189,14 @@ + )) + .is_err() + { -+ promise.reject_error(Error::Operation(None), can_gc); ++ promise.reject_error(cx, Error::Operation(None)); + } + promise + } + -+ fn Unsubscribe(&self, subscription_id: u32, comp: InRealm, can_gc: CanGc) -> Rc { ++ fn Unsubscribe(&self, cx: &mut JSContext, subscription_id: u32) -> Rc { + let global = &self.global(); -+ let promise = Promise::new_in_current_realm(comp, can_gc); ++ let promise = Promise::new2(cx, global); + let task_source = global.task_manager().dom_manipulation_task_source(); + let callback = callback_promise(&promise, self, task_source); + @@ -219,7 +208,7 @@ + )) + .is_err() + { -+ promise.reject_error(Error::Operation(None), can_gc); ++ promise.reject_error(cx, Error::Operation(None)); + } + promise + } @@ -271,7 +260,7 @@ + // let value = serde_json::to_string(&value).unwrap_or("{}".into()); + promise.resolve_native(&value, CanGc::from_cx(cx)) + }, -+ Err(msg) => promise.reject_error(Error::Operation(Some(msg)), CanGc::from_cx(cx)), ++ Err(msg) => promise.reject_error(cx, Error::Operation(Some(msg))), + } + } +} @@ -285,7 +274,7 @@ + ) { + match response { + Ok(()) => promise.resolve_native(&(), CanGc::from_cx(cx)), -+ Err(msg) => promise.reject_error(Error::Operation(Some(msg)), CanGc::from_cx(cx)), ++ Err(msg) => promise.reject_error(cx, Error::Operation(Some(msg))), + } + } +} @@ -299,7 +288,7 @@ + ) { + match response { + Ok(id) => promise.resolve_native(&id, CanGc::from_cx(cx)), -+ Err(msg) => promise.reject_error(Error::Operation(Some(msg)), CanGc::from_cx(cx)), ++ Err(msg) => promise.reject_error(cx, Error::Operation(Some(msg))), + } + } +} diff --git a/patches/components/script/dom/document/document.rs.patch b/patches/components/script/dom/document/document.rs.patch index 3eae4c9..cec0ef1 100644 --- a/patches/components/script/dom/document/document.rs.patch +++ b/patches/components/script/dom/document/document.rs.patch @@ -7,8 +7,8 @@ +use euclid::Size2D; use html5ever::{LocalName, Namespace, QualName, local_name, ns}; use hyper_serde::Serde; - use js::context::NoGC; -@@ -55,11 +56,13 @@ + use js::context::{JSContext, NoGC}; +@@ -54,11 +55,13 @@ use script_traits::{DocumentActivity, ProgressiveWebMetricType}; use servo_arc::Arc; use servo_base::cross_process_instant::CrossProcessInstant; @@ -24,7 +24,7 @@ use servo_media::{ClientContextId, ServoMedia}; use servo_url::{ImmutableOrigin, MutableOrigin, ServoUrl}; use style::attr::AttrValue; -@@ -635,6 +638,9 @@ +@@ -634,6 +637,9 @@ #[no_trace] favicon: RefCell>, @@ -34,7 +34,7 @@ /// All websockets created that are associated with this document. websockets: DOMTracker, -@@ -665,6 +671,11 @@ +@@ -664,6 +670,11 @@ /// Data necessary for maintaining the accessibility tree. accessibility_data: DomRefCell, @@ -46,7 +46,7 @@ } impl Document { -@@ -890,6 +901,12 @@ +@@ -889,6 +900,12 @@ // Set the document's activity level, reflow if necessary, and suspend or resume timers. self.activity.set(activity); @@ -59,7 +59,7 @@ let media = ServoMedia::get(); let pipeline_id = self.window().pipeline_id(); let client_context_id = -@@ -903,6 +920,7 @@ +@@ -902,6 +919,7 @@ self.title_changed(); self.notify_embedder_favicon(); @@ -67,7 +67,7 @@ self.dirty_all_nodes(); self.window().resume(CanGc::from_cx(cx)); media.resume(&client_context_id); -@@ -1303,6 +1321,9 @@ +@@ -1285,6 +1303,9 @@ LoadStatus::Started, )); self.send_to_embedder(EmbedderMsg::Status(self.webview_id(), None)); @@ -77,7 +77,7 @@ } }, DocumentReadyState::Complete => { -@@ -1311,6 +1332,9 @@ +@@ -1293,6 +1314,9 @@ self.webview_id(), LoadStatus::Complete, )); @@ -87,7 +87,7 @@ } update_with_current_instant(&self.navigation_timing.dom_complete); }, -@@ -1391,7 +1415,13 @@ +@@ -1373,7 +1397,13 @@ let window = self.window(); if window.is_top_level() { let title = self.title().map(String::from); @@ -102,7 +102,7 @@ } } -@@ -1400,6 +1430,18 @@ +@@ -1382,6 +1412,18 @@ window.send_to_embedder(msg); } @@ -121,7 +121,7 @@ pub(crate) fn dirty_all_nodes(&self) { let root = match self.GetDocumentElement() { Some(root) => root, -@@ -2968,9 +3010,59 @@ +@@ -2950,9 +2992,59 @@ current_rendering_epoch, ); @@ -181,7 +181,7 @@ pub(crate) fn handle_no_longer_waiting_on_asynchronous_image_updates(&self) { self.waiting_on_canvas_image_updates.set(false); } -@@ -3678,6 +3770,7 @@ +@@ -3663,6 +3755,7 @@ active_sandboxing_flag_set: Cell::new(creation_sandboxing_flag_set), creation_sandboxing_flag_set: Cell::new(creation_sandboxing_flag_set), favicon: RefCell::new(None), @@ -189,7 +189,7 @@ websockets: DOMTracker::new(), details_name_groups: Default::default(), protocol_handler_automation_mode: Default::default(), -@@ -3687,6 +3780,7 @@ +@@ -3672,6 +3765,7 @@ default_single_line_container_name: Default::default(), css_styling_flag: Default::default(), accessibility_data: Default::default(), @@ -197,7 +197,7 @@ } } -@@ -4718,6 +4812,36 @@ +@@ -4703,6 +4797,36 @@ pub(crate) fn notify_embedder_favicon(&self) { if let Some(ref image) = *self.favicon.borrow() { @@ -234,7 +234,7 @@ self.send_to_embedder(EmbedderMsg::NewFavicon(self.webview_id(), image.clone())); } } -@@ -4788,6 +4912,30 @@ +@@ -4773,6 +4897,30 @@ pub(crate) fn set_css_styling_flag(&self, value: bool) { self.css_styling_flag.set(value) } diff --git a/patches/components/script/dom/globalscope.rs.patch b/patches/components/script/dom/globalscope.rs.patch index 1dcb013..582e603 100644 --- a/patches/components/script/dom/globalscope.rs.patch +++ b/patches/components/script/dom/globalscope.rs.patch @@ -61,7 +61,7 @@ /// Handle the transfer of a port in the current task. pub(crate) fn mark_port_as_transferred(&self, port_id: &MessagePortId) -> MessagePortImpl { if let MessagePortState::Managed(_id, message_ports) = -@@ -3196,6 +3229,16 @@ +@@ -3194,6 +3227,16 @@ self.inherited_secure_context } diff --git a/patches/components/script/dom/html/htmlembeddedwebview.rs.patch b/patches/components/script/dom/html/htmlembeddedwebview.rs.patch index 3a8d209..1397acc 100644 --- a/patches/components/script/dom/html/htmlembeddedwebview.rs.patch +++ b/patches/components/script/dom/html/htmlembeddedwebview.rs.patch @@ -1,6 +1,6 @@ --- original +++ modified -@@ -0,0 +1,1141 @@ +@@ -0,0 +1,1138 @@ +/* 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 https://mozilla.org/MPL/2.0/. */ @@ -1116,10 +1116,7 @@ + EmbeddedWebViewScreenshotError::CaptureFailed => "Failed to capture screenshot", + EmbeddedWebViewScreenshotError::EncodingFailed => "Failed to encode screenshot", + }; -+ promise.reject_error( -+ Error::InvalidState(Some(error_msg.to_string())), -+ CanGc::from_cx(cx), -+ ); ++ promise.reject_error(cx, Error::InvalidState(Some(error_msg.to_string()))); + }, + } + } diff --git a/patches/components/script/dom/html/input_element/mod.rs.patch b/patches/components/script/dom/html/input_element/mod.rs.patch index 92f2e8c..5f50712 100644 --- a/patches/components/script/dom/html/input_element/mod.rs.patch +++ b/patches/components/script/dom/html/input_element/mod.rs.patch @@ -1,6 +1,6 @@ --- original +++ modified -@@ -7,7 +7,9 @@ +@@ -6,7 +6,9 @@ use std::{f64, ptr}; use dom_struct::dom_struct; diff --git a/patches/components/script/dom/navigator.rs.patch b/patches/components/script/dom/navigator.rs.patch index f9aa492..c0baf75 100644 --- a/patches/components/script/dom/navigator.rs.patch +++ b/patches/components/script/dom/navigator.rs.patch @@ -62,16 +62,15 @@ use crate::dom::serviceworkercontainer::ServiceWorkerContainer; use crate::dom::servointernals::ServoInternals; use crate::dom::storagemanager::StorageManager; -@@ -69,6 +79,8 @@ +@@ -69,6 +79,7 @@ use crate::dom::xrsystem::XRSystem; use crate::fetch::RequestWithGlobalScope; use crate::network_listener::{FetchResponseListener, ResourceTimingListener, submit_timing}; -+use crate::realms::InRealm; +use crate::routed_promise::{RoutedPromiseListener, callback_promise}; use crate::script_runtime::CanGc; pub(super) fn hardware_concurrency() -> u64 { -@@ -140,6 +152,9 @@ +@@ -140,6 +151,9 @@ servo_internals: MutNullableDom, user_activation: MutNullableDom, wake_lock: MutNullableDom, @@ -81,7 +80,7 @@ } impl Navigator { -@@ -168,6 +183,9 @@ +@@ -168,6 +182,9 @@ servo_internals: Default::default(), user_activation: Default::default(), wake_lock: Default::default(), @@ -91,7 +90,7 @@ } } -@@ -180,6 +198,11 @@ +@@ -180,6 +197,11 @@ self.xr.get() } @@ -103,7 +102,7 @@ #[cfg(feature = "gamepad")] pub(crate) fn get_gamepad(&self, index: usize) -> Option> { self.gamepads.borrow().get(index).and_then(|g| g.get()) -@@ -620,6 +643,18 @@ +@@ -620,6 +642,18 @@ .or_init(|| ServoInternals::new(&self.global(), CanGc::deprecated_note())) } @@ -122,25 +121,24 @@ /// fn RegisterProtocolHandler(&self, scheme: DOMString, url: USVString) -> Fallible<()> { // Step 1. Let (normalizedScheme, normalizedURLString) be the result of -@@ -668,6 +703,213 @@ +@@ -668,6 +702,209 @@ fn WakeLock(&self, cx: &mut js::context::JSContext) -> DomRoot { self.wake_lock.or_init(|| WakeLock::new(cx, &self.global())) } + + fn CreatePeerStream( + &self, ++ cx: &mut js::context::JSContext, + peer_id: DOMString, + target_url: USVString, -+ comp: InRealm, -+ can_gc: CanGc, + ) -> Fallible> { + let global = self.global(); -+ let promise = Promise::new_in_current_realm(comp, can_gc); ++ let promise = Promise::new2(cx, &global); + + // Create a local port and a virtual remote port ID. + // The remote port is NOT tracked in this global — it only exists + // in the constellation as a Remote proxy. -+ let port1 = MessagePort::new(&global, can_gc); ++ let port1 = MessagePort::new(&global, CanGc::from_cx(cx)); + let remote_port_id = MessagePortId::new(); + + // Set port1's entanglement so postMessage knows where to route. @@ -168,12 +166,12 @@ + )) + .is_err() + { -+ promise.reject_error(script_bindings::error::Error::Operation(None), can_gc); ++ promise.reject_error(cx, script_bindings::error::Error::Operation(None)); + return Ok(promise); + } + + // Resolve with port1 immediately. -+ promise.resolve_native(&port1, can_gc); ++ promise.resolve_native(&port1, CanGc::from_cx(cx)); + Ok(promise) + } + @@ -198,7 +196,7 @@ + match structuredclone::write(cx, rooted_data.handle(), None) { + Ok(serialized) => Some(serialized), + Err(err) => { -+ promise.reject_error(err, CanGc::from_cx(cx)); ++ promise.reject_error(cx, err); + return Ok(promise); + }, + } @@ -319,10 +317,7 @@ + )) + .is_err() + { -+ promise.reject_error( -+ script_bindings::error::Error::Operation(None), -+ CanGc::from_cx(cx), -+ ); ++ promise.reject_error(cx, script_bindings::error::Error::Operation(None)); + } + + Ok(promise) @@ -336,7 +331,7 @@ } struct BeaconFetchListener { -@@ -723,3 +965,34 @@ +@@ -723,3 +960,31 @@ self.global.root() } } @@ -358,15 +353,12 @@ + promise.resolve_native(&result_val.handle(), CanGc::from_cx(cx)); + }, + Err(err) => { -+ promise.reject_error(err, CanGc::from_cx(cx)); ++ promise.reject_error(cx, err); + }, + } + }, + Err(err) => { -+ promise.reject_error( -+ script_bindings::error::Error::Operation(Some(err)), -+ CanGc::from_cx(cx), -+ ); ++ promise.reject_error(cx, script_bindings::error::Error::Operation(Some(err))); + }, + } + } diff --git a/patches/components/script/dom/notification.rs.patch b/patches/components/script/dom/notification.rs.patch index df9dbda..ea2693f 100644 --- a/patches/components/script/dom/notification.rs.patch +++ b/patches/components/script/dom/notification.rs.patch @@ -36,7 +36,7 @@ } // TODO: step 7: If shown is false or oldNotification is non-null, -@@ -887,6 +899,11 @@ +@@ -877,6 +889,11 @@ for (request, resource_type) in pending_requests { self.fetch_and_show_when_ready(request, resource_type); } diff --git a/patches/components/script/dom/pairing.rs.patch b/patches/components/script/dom/pairing.rs.patch index a32c34e..45ade87 100644 --- a/patches/components/script/dom/pairing.rs.patch +++ b/patches/components/script/dom/pairing.rs.patch @@ -1,6 +1,6 @@ --- original +++ modified -@@ -0,0 +1,409 @@ +@@ -0,0 +1,398 @@ +/* SPDX Id: AGPL-3.0-or-later */ + +use std::rc::Rc; @@ -18,13 +18,13 @@ +use crate::dom::bindings::inheritance::Castable; +use crate::dom::bindings::reflector::DomGlobal; +use crate::dom::bindings::root::DomRoot; ++use crate::dom::bindings::str::DOMString; +use crate::dom::event::Event; +use crate::dom::eventtarget::EventTarget; +use crate::dom::globalscope::GlobalScope; +use crate::dom::pairingpeerevent::PairingPeerEvent; +use crate::dom::peer::Peer; +use crate::dom::promise::Promise; -+use crate::realms::InRealm; +use crate::routed_promise::{RoutedPromiseListener, callback_promise}; +use crate::script_runtime::CanGc; + @@ -80,9 +80,9 @@ +} + +impl PairingMethods for Pairing { -+ fn Local(&self, comp: InRealm, can_gc: CanGc) -> Rc { ++ fn Local(&self, cx: &mut JSContext) -> Rc { + let global = &self.global(); -+ let promise = Promise::new_in_current_realm(comp, can_gc); ++ let promise = Promise::new2(cx, global); + let task_source = global.task_manager().dom_manipulation_task_source(); + let callback = callback_promise(&promise, self, task_source); + @@ -91,14 +91,14 @@ + .send(ScriptToConstellationMessage::PairingGetLocal(callback)) + .is_err() + { -+ promise.reject_error(Error::Operation(None), can_gc); ++ promise.reject_error(cx, Error::Operation(None)); + } + promise + } + -+ fn Peers(&self, comp: InRealm, can_gc: CanGc) -> Rc { ++ fn Peers(&self, cx: &mut JSContext) -> Rc { + let global = &self.global(); -+ let promise = Promise::new_in_current_realm(comp, can_gc); ++ let promise = Promise::new2(cx, global); + let task_source = global.task_manager().dom_manipulation_task_source(); + let callback = callback_promise(&promise, self, task_source); + @@ -107,14 +107,14 @@ + .send(ScriptToConstellationMessage::PairingGetPeers(callback)) + .is_err() + { -+ promise.reject_error(Error::Operation(None), can_gc); ++ promise.reject_error(cx, Error::Operation(None)); + } + promise + } + -+ fn RequestPairing(&self, peer: &Peer, comp: InRealm, can_gc: CanGc) -> Rc { ++ fn RequestPairing(&self, cx: &mut JSContext, peer: &Peer) -> Rc { + let global = &self.global(); -+ let promise = Promise::new_in_current_realm(comp, can_gc); ++ let promise = Promise::new2(cx, global); + let task_source = global.task_manager().dom_manipulation_task_source(); + let callback = callback_promise(&promise, self, task_source); + @@ -126,14 +126,14 @@ + )) + .is_err() + { -+ promise.reject_error(Error::Operation(None), can_gc); ++ promise.reject_error(cx, Error::Operation(None)); + } + promise + } + -+ fn AcceptPairing(&self, peer: &Peer, comp: InRealm, can_gc: CanGc) -> Rc { ++ fn AcceptPairing(&self, cx: &mut JSContext, peer: &Peer) -> Rc { + let global = &self.global(); -+ let promise = Promise::new_in_current_realm(comp, can_gc); ++ let promise = Promise::new2(cx, global); + let task_source = global.task_manager().dom_manipulation_task_source(); + let callback = callback_promise(&promise, self, task_source); + @@ -145,14 +145,14 @@ + )) + .is_err() + { -+ promise.reject_error(Error::Operation(None), can_gc); ++ promise.reject_error(cx, Error::Operation(None)); + } + promise + } + -+ fn RejectPairing(&self, peer: &Peer, comp: InRealm, can_gc: CanGc) -> Rc { ++ fn RejectPairing(&self, cx: &mut JSContext, peer: &Peer) -> Rc { + let global = &self.global(); -+ let promise = Promise::new_in_current_realm(comp, can_gc); ++ let promise = Promise::new2(cx, global); + let task_source = global.task_manager().dom_manipulation_task_source(); + let callback = callback_promise(&promise, self, task_source); + @@ -164,14 +164,14 @@ + )) + .is_err() + { -+ promise.reject_error(Error::Operation(None), can_gc); ++ promise.reject_error(cx, Error::Operation(None)); + } + promise + } + -+ fn RemovePeer(&self, peer: &Peer, comp: InRealm, can_gc: CanGc) -> Rc { ++ fn RemovePeer(&self, cx: &mut JSContext, peer: &Peer) -> Rc { + let global = &self.global(); -+ let promise = Promise::new_in_current_realm(comp, can_gc); ++ let promise = Promise::new2(cx, global); + let task_source = global.task_manager().dom_manipulation_task_source(); + let callback = callback_promise(&promise, self, task_source); + @@ -183,14 +183,14 @@ + )) + .is_err() + { -+ promise.reject_error(Error::Operation(None), can_gc); ++ promise.reject_error(cx, Error::Operation(None)); + } + promise + } + -+ fn EnableGuestMode(&self, duration_minutes: u32, comp: InRealm, can_gc: CanGc) -> Rc { ++ fn EnableGuestMode(&self, cx: &mut JSContext, duration_minutes: u32) -> Rc { + let global = &self.global(); -+ let promise = Promise::new_in_current_realm(comp, can_gc); ++ let promise = Promise::new2(cx, global); + let task_source = global.task_manager().dom_manipulation_task_source(); + let callback = callback_promise(&promise, self, task_source); + @@ -202,14 +202,14 @@ + )) + .is_err() + { -+ promise.reject_error(Error::Operation(None), can_gc); ++ promise.reject_error(cx, Error::Operation(None)); + } + promise + } + -+ fn DisableGuestMode(&self, comp: InRealm, can_gc: CanGc) -> Rc { ++ fn DisableGuestMode(&self, cx: &mut JSContext) -> Rc { + let global = &self.global(); -+ let promise = Promise::new_in_current_realm(comp, can_gc); ++ let promise = Promise::new2(cx, global); + let task_source = global.task_manager().dom_manipulation_task_source(); + let callback = callback_promise(&promise, self, task_source); + @@ -220,20 +220,14 @@ + )) + .is_err() + { -+ promise.reject_error(Error::Operation(None), can_gc); ++ promise.reject_error(cx, Error::Operation(None)); + } + promise + } + -+ fn RequestGuestPairing( -+ &self, -+ peer: &Peer, -+ pin: crate::dom::bindings::str::DOMString, -+ comp: InRealm, -+ can_gc: CanGc, -+ ) -> Rc { ++ fn RequestGuestPairing(&self, cx: &mut JSContext, peer: &Peer, pin: DOMString) -> Rc { + let global = &self.global(); -+ let promise = Promise::new_in_current_realm(comp, can_gc); ++ let promise = Promise::new2(cx, global); + let task_source = global.task_manager().dom_manipulation_task_source(); + let callback = callback_promise(&promise, self, task_source); + @@ -246,19 +240,14 @@ + )) + .is_err() + { -+ promise.reject_error(Error::Operation(None), can_gc); ++ promise.reject_error(cx, Error::Operation(None)); + } + promise + } + -+ fn SetName( -+ &self, -+ name: crate::dom::bindings::str::DOMString, -+ comp: InRealm, -+ can_gc: CanGc, -+ ) -> Rc { ++ fn SetName(&self, cx: &mut JSContext, name: DOMString) -> Rc { + let global = &self.global(); -+ let promise = Promise::new_in_current_realm(comp, can_gc); ++ let promise = Promise::new2(cx, global); + let task_source = global.task_manager().dom_manipulation_task_source(); + let callback = callback_promise(&promise, self, task_source); + @@ -270,14 +259,14 @@ + )) + .is_err() + { -+ promise.reject_error(Error::Operation(None), can_gc); ++ promise.reject_error(cx, Error::Operation(None)); + } + promise + } + -+ fn Start(&self, comp: InRealm, can_gc: CanGc) -> Rc { ++ fn Start(&self, cx: &mut JSContext) -> Rc { + let global = &self.global(); -+ let promise = Promise::new_in_current_realm(comp, can_gc); ++ let promise = Promise::new2(cx, global); + let task_source = global.task_manager().dom_manipulation_task_source(); + let callback = callback_promise(&promise, self, task_source); + @@ -286,14 +275,14 @@ + .send(ScriptToConstellationMessage::PairingStart(callback)) + .is_err() + { -+ promise.reject_error(Error::Operation(None), can_gc); ++ promise.reject_error(cx, Error::Operation(None)); + } + promise + } + -+ fn Stop(&self, comp: InRealm, can_gc: CanGc) -> Rc { ++ fn Stop(&self, cx: &mut JSContext) -> Rc { + let global = &self.global(); -+ let promise = Promise::new_in_current_realm(comp, can_gc); ++ let promise = Promise::new2(cx, global); + let task_source = global.task_manager().dom_manipulation_task_source(); + let callback = callback_promise(&promise, self, task_source); + @@ -302,7 +291,7 @@ + .send(ScriptToConstellationMessage::PairingStop(callback)) + .is_err() + { -+ promise.reject_error(Error::Operation(None), can_gc); ++ promise.reject_error(cx, Error::Operation(None)); + } + promise + } @@ -325,7 +314,7 @@ + ) { + match response { + Ok(()) => promise.resolve_native(&(), CanGc::from_cx(cx)), -+ Err(msg) => promise.reject_error(Error::Operation(Some(msg)), CanGc::from_cx(cx)), ++ Err(msg) => promise.reject_error(cx, Error::Operation(Some(msg))), + } + } +} @@ -343,7 +332,7 @@ + let peer = Peer::new(&global, info.id, info.name, CanGc::from_cx(cx)); + promise.resolve_native(&peer, CanGc::from_cx(cx)); + }, -+ Err(msg) => promise.reject_error(Error::Operation(Some(msg)), CanGc::from_cx(cx)), ++ Err(msg) => promise.reject_error(cx, Error::Operation(Some(msg))), + } + } +} @@ -378,7 +367,7 @@ + .collect(); + promise.resolve_native(&peer_objects, CanGc::from_cx(cx)); + }, -+ Err(msg) => promise.reject_error(Error::Operation(Some(msg)), CanGc::from_cx(cx)), ++ Err(msg) => promise.reject_error(cx, Error::Operation(Some(msg))), + } + } +} @@ -392,7 +381,7 @@ + ) { + match response { + Ok(accepted) => promise.resolve_native(&accepted, CanGc::from_cx(cx)), -+ Err(msg) => promise.reject_error(Error::Operation(Some(msg)), CanGc::from_cx(cx)), ++ Err(msg) => promise.reject_error(cx, Error::Operation(Some(msg))), + } + } +} @@ -406,7 +395,7 @@ + ) { + match response { + Ok(value) => promise.resolve_native(&value, CanGc::from_cx(cx)), -+ Err(msg) => promise.reject_error(Error::Operation(Some(msg)), CanGc::from_cx(cx)), ++ Err(msg) => promise.reject_error(cx, Error::Operation(Some(msg))), + } + } +} diff --git a/patches/components/script/dom/servointernals.rs.patch b/patches/components/script/dom/servointernals.rs.patch index b37e0cb..691ff5f 100644 --- a/patches/components/script/dom/servointernals.rs.patch +++ b/patches/components/script/dom/servointernals.rs.patch @@ -20,8 +20,8 @@ +use crate::dom::embedder::Embedder; use crate::dom::globalscope::GlobalScope; use crate::dom::promise::Promise; - use crate::realms::InRealm; -@@ -143,22 +145,38 @@ + use crate::routed_promise::{RoutedPromiseListener, callback_promise}; +@@ -142,22 +144,38 @@ /// fn GetBoolPreference(&self, name: USVString) -> Fallible { @@ -70,7 +70,7 @@ } Err(Error::TypeMismatch(None)) } -@@ -165,11 +183,19 @@ +@@ -164,11 +182,19 @@ /// fn GetStringPreference(&self, name: USVString) -> Fallible { @@ -95,7 +95,7 @@ } Err(Error::TypeMismatch(None)) } -@@ -176,23 +202,59 @@ +@@ -175,23 +201,59 @@ /// fn SetBoolPreference(&self, name: USVString, value: bool) { @@ -164,7 +164,7 @@ } } -@@ -212,7 +274,10 @@ +@@ -211,7 +273,10 @@ impl ServoInternalsHelpers for ServoInternals { /// The navigator.servo api is exposed to about: pages except about:blank, as /// well as any URLs provided by embedders that register new protocol handlers. diff --git a/patches/components/script/dom/url/urlpattern.rs.patch b/patches/components/script/dom/url/urlpattern.rs.patch index 959d8a7..1fc7088 100644 --- a/patches/components/script/dom/url/urlpattern.rs.patch +++ b/patches/components/script/dom/url/urlpattern.rs.patch @@ -8,3 +8,25 @@ }; // Parse and initialize the URL pattern. +@@ -218,10 +219,10 @@ + + pub(super) fn map_urlpattern_input( + input: USVStringOrURLPatternInit, +- ) -> urlpattern::quirks::StringOrInit { ++ ) -> urlpattern::quirks::StringOrInit<'static> { + match input { + USVStringOrURLPatternInit::USVString(usv_string) => { +- urlpattern::quirks::StringOrInit::String(usv_string.0) ++ urlpattern::quirks::StringOrInit::String(usv_string.0.into()) + }, + USVStringOrURLPatternInit::URLPatternInit(pattern_init) => { + urlpattern::quirks::StringOrInit::Init(map_urlpatterninit(pattern_init)) +@@ -281,7 +282,7 @@ + ) -> URLPatternResult { + let string_or_init = match string_or_init { + urlpattern::quirks::StringOrInit::String(string) => { +- USVStringOrURLPatternInit::USVString(USVString(string)) ++ USVStringOrURLPatternInit::USVString(USVString(string.into())) + }, + urlpattern::quirks::StringOrInit::Init(pattern_init) => { + USVStringOrURLPatternInit::URLPatternInit(map_urlpatterninit(pattern_init)) diff --git a/patches/components/script/dom/window.rs.patch b/patches/components/script/dom/window.rs.patch index 55ca7a2..d9b3034 100644 --- a/patches/components/script/dom/window.rs.patch +++ b/patches/components/script/dom/window.rs.patch @@ -1,6 +1,6 @@ --- original +++ modified -@@ -27,14 +27,16 @@ +@@ -26,14 +26,16 @@ use embedder_traits::{ AlertResponse, ConfirmResponse, EmbedderMsg, JavaScriptEvaluationError, PromptResponse, ScriptToEmbedderChan, SimpleDialogRequest, Theme, UntrustedNodeAddress, ViewportDetails, @@ -9,7 +9,7 @@ }; use euclid::{Point2D, Rect, Scale, Size2D, Vector2D}; use fonts::{CspViolationHandler, FontContext, NetworkTimingHandler, WebFontDocumentContext}; - use js::context::JSContext; + use js::context::{JSContext, NoGC}; use js::glue::DumpJSStack; -use js::jsapi::{GCReason, Heap, JSContext as RawJSContext, JSObject, JSPROP_ENUMERATE}; -use js::jsval::{NullValue, UndefinedValue}; @@ -20,7 +20,7 @@ use js::realm::{AutoRealm, CurrentRealm}; use js::rust::wrappers::JS_DefineProperty; use js::rust::wrappers2::JS_GC; -@@ -158,6 +160,7 @@ +@@ -157,6 +159,7 @@ use crate::dom::html::htmliframeelement::HTMLIFrameElement; use crate::dom::idbfactory::IDBFactory; use crate::dom::inputevent::HitTestResult; @@ -28,16 +28,7 @@ use crate::dom::location::Location; use crate::dom::medialist::MediaList; use crate::dom::mediaquerylist::{MediaQueryList, MediaQueryListMatchState}; -@@ -189,7 +192,7 @@ - use crate::messaging::{MainThreadScriptMsg, ScriptEventLoopReceiver, ScriptEventLoopSender}; - use crate::microtask::{Microtask, UserMicrotask}; - use crate::network_listener::{ResourceTimingListener, submit_timing}; --use crate::realms::{enter_auto_realm, enter_realm}; -+use crate::realms::{InRealm, enter_auto_realm, enter_realm}; - use crate::script_runtime::{CanGc, JSContext as SafeJSContext, Runtime}; - use crate::script_thread::ScriptThread; - use crate::script_window_proxies::ScriptWindowProxies; -@@ -1146,12 +1149,22 @@ +@@ -1145,12 +1148,22 @@ let (sender, receiver) = ProfiledGenericChannel::channel(self.global().time_profiler_chan().clone()).unwrap(); @@ -61,7 +52,7 @@ receiver.recv().unwrap_or_else(|_| { // If the receiver is closed, we assume the dialog was cancelled. debug!("Alert dialog was cancelled or failed to show."); -@@ -1179,13 +1192,22 @@ +@@ -1178,13 +1191,22 @@ // the user to respond with a positive or negative response. let (sender, receiver) = ProfiledGenericChannel::channel(self.global().time_profiler_chan().clone()).unwrap(); @@ -85,7 +76,7 @@ // Step 5: Let userPromptHandler be WebDriver BiDi user prompt opened with this, // "confirm", and message. // -@@ -1230,6 +1252,7 @@ +@@ -1229,6 +1251,7 @@ // defaulted to the value given by default. let (sender, receiver) = ProfiledGenericChannel::channel(self.global().time_profiler_chan().clone()).unwrap(); @@ -93,7 +84,7 @@ let dialog = SimpleDialogRequest::Prompt { id: self.Document().embedder_controls().next_control_id(), message: String::from(message), -@@ -1236,8 +1259,16 @@ +@@ -1235,8 +1258,16 @@ default: String::from(default), response_sender: sender, }; @@ -111,16 +102,16 @@ // Step 6: Let userPromptHandler be WebDriver BiDi user prompt opened with this, // "prompt", and message. // TODO: Add support for WebDriver BiDi. -@@ -1721,6 +1752,26 @@ +@@ -1720,6 +1751,26 @@ // https://html.spec.whatwg.org/multipage/#windoweventhandlers window_event_handlers!(); + // PeerStream event handler + event_handler!(peerstream, GetOnpeerstream, SetOnpeerstream); + -+ fn AcceptTask(&self, comp: InRealm, can_gc: CanGc) -> Fallible> { ++ fn AcceptTask(&self, cx: &mut js::context::JSContext) -> Fallible> { + let global = self.upcast::(); -+ let promise = Promise::new_in_current_realm(comp, can_gc); ++ let promise = Promise::new2(cx, global); + let task_source = global.task_manager().dom_manipulation_task_source(); + let callback = crate::routed_promise::callback_promise(&promise, self, task_source); + @@ -129,7 +120,7 @@ + .send(ScriptToConstellationMessage::AcceptTask(callback)) + .is_err() + { -+ promise.reject_error(script_bindings::error::Error::Operation(None), can_gc); ++ promise.reject_error(cx, script_bindings::error::Error::Operation(None)); + } + + Ok(promise) @@ -138,7 +129,7 @@ /// fn Screen(&self, can_gc: CanGc) -> DomRoot { self.screen.or_init(|| Screen::new(self, can_gc)) -@@ -3138,9 +3189,33 @@ +@@ -3104,9 +3155,33 @@ &self, input_event: &ConstellationInputEvent, ) -> Option { @@ -175,7 +166,7 @@ } #[expect(unsafe_code)] -@@ -3159,8 +3234,34 @@ +@@ -3125,8 +3200,34 @@ // SAFETY: This is safe because `Window::query_elements_from_point` has ensured that // layout has run and any OpaqueNodes that no longer refer to real nodes are gone. let address = UntrustedNodeAddress(result.node.0 as *const c_void); @@ -211,7 +202,7 @@ cursor: result.cursor, point_in_node: result.point_in_target, point_in_frame, -@@ -3722,6 +3823,8 @@ +@@ -3688,6 +3789,8 @@ player_context: WindowGLContext, #[cfg(feature = "webgpu")] gpu_id_hub: Arc, inherited_secure_context: Option, @@ -220,7 +211,7 @@ theme: Theme, weak_script_thread: Weak, ) -> DomRoot { -@@ -3748,6 +3851,8 @@ +@@ -3714,6 +3817,8 @@ gpu_id_hub, inherited_secure_context, unminify_js, @@ -229,7 +220,7 @@ Some(font_context), ), ongoing_navigation: Default::default(), -@@ -4009,3 +4114,114 @@ +@@ -3975,3 +4080,114 @@ Self::create_named_properties_object(cx, proto, object) } } @@ -249,10 +240,10 @@ + ) { + let Some((task_name, data, port_id_bytes)) = response else { + promise.reject_error( ++ cx, + script_bindings::error::Error::Operation(Some( + "No task assigned to this page".into(), + )), -+ CanGc::from_cx(cx), + ); + return; + }; @@ -264,8 +255,8 @@ + postcard::from_bytes::(&port_id_bytes) + else { + promise.reject_error( ++ cx, + script_bindings::error::Error::Operation(Some("Invalid port ID".into())), -+ CanGc::from_cx(cx), + ); + return; + }; @@ -299,10 +290,10 @@ + rooted!(&in(cx) let result_obj = JS_NewObject(cx.raw_cx(), std::ptr::null())); + if result_obj.get().is_null() { + promise.reject_error( ++ cx, + script_bindings::error::Error::Operation(Some( + "Failed to create result".into(), + )), -+ CanGc::from_cx(cx), + ); + return; + } diff --git a/patches/components/script/script_thread.rs.patch b/patches/components/script/script_thread.rs.patch index 32d7ea4..e5db565 100644 --- a/patches/components/script/script_thread.rs.patch +++ b/patches/components/script/script_thread.rs.patch @@ -58,7 +58,7 @@ use crate::dom::servoparser::{ParserContext, ServoParser}; use crate::dom::types::DebuggerGlobalScope; #[cfg(feature = "webgpu")] -@@ -1986,12 +1993,47 @@ +@@ -1987,12 +1994,47 @@ self.handle_refresh_cursor(pipeline_id); }, ScriptThreadMessage::PreferencesUpdated(updates) => { @@ -110,7 +110,7 @@ ScriptThreadMessage::ForwardKeyboardScroll(pipeline_id, scroll) => { if let Some(document) = self.documents.borrow().find_document(pipeline_id) { document.event_handler().do_keyboard_scroll(cx, scroll); -@@ -2023,6 +2065,43 @@ +@@ -2024,6 +2066,43 @@ ScriptThreadMessage::TriggerGarbageCollection => unsafe { JS_GC(*GlobalScope::get_cx(), GCReason::API); }, @@ -154,7 +154,7 @@ } } -@@ -3064,6 +3143,9 @@ +@@ -3065,6 +3144,9 @@ .documents .borrow() .find_iframe(parent_pipeline_id, browsing_context_id); @@ -164,7 +164,7 @@ let Some(frame_element) = frame_element else { return; }; -@@ -3088,6 +3170,7 @@ +@@ -3089,6 +3171,7 @@ // is no need to pass along existing opener information that // will be discarded. None, @@ -172,7 +172,7 @@ ); } -@@ -3373,6 +3456,170 @@ +@@ -3374,6 +3457,170 @@ } } @@ -343,7 +343,7 @@ fn ask_constellation_for_top_level_info( &self, sender_webview_id: WebViewId, -@@ -3481,7 +3728,13 @@ +@@ -3482,7 +3729,13 @@ self.senders.pipeline_to_embedder_sender.clone(), self.senders.constellation_sender.clone(), incomplete.pipeline_id, @@ -358,7 +358,7 @@ incomplete.viewport_details, origin.clone(), final_url.clone(), -@@ -3503,6 +3756,8 @@ +@@ -3504,6 +3757,8 @@ #[cfg(feature = "webgpu")] self.gpu_id_hub.clone(), incomplete.load_data.inherited_secure_context, @@ -367,7 +367,7 @@ incomplete.theme, self.this.clone(), ); -@@ -3528,6 +3783,7 @@ +@@ -3529,6 +3784,7 @@ incomplete.webview_id, incomplete.parent_info, incomplete.opener, @@ -375,7 +375,7 @@ ); if window_proxy.parent().is_some() { // https://html.spec.whatwg.org/multipage/#navigating-across-documents:delaying-load-events-mode-2 -@@ -4361,10 +4617,84 @@ +@@ -4362,10 +4618,84 @@ document.event_handler().handle_refresh_cursor(); } @@ -460,7 +460,7 @@ fn handle_request_screenshot_readiness( &self, webview_id: WebViewId, -@@ -4405,7 +4735,7 @@ +@@ -4406,7 +4736,7 @@ can_gc: CanGc, ) { let Some(window) = self.documents.borrow().find_window(pipeline_id) else { diff --git a/patches/components/script_bindings/codegen/Bindings.conf.patch b/patches/components/script_bindings/codegen/Bindings.conf.patch index cc01bde..dd5e628 100644 --- a/patches/components/script_bindings/codegen/Bindings.conf.patch +++ b/patches/components/script_bindings/codegen/Bindings.conf.patch @@ -1,35 +1,32 @@ --- original +++ modified -@@ -40,6 +40,11 @@ +@@ -40,6 +40,10 @@ 'cx': ['Constructor'] }, +'AtProto': { -+ 'inRealms': ['Login', 'Logout', 'Current', 'AuthorizeOrigin', 'RevokeOrigin', 'AuthorizedOrigins'], -+ 'canGc': ['Login', 'Logout', 'Current', 'AuthorizeOrigin', 'RevokeOrigin', 'AuthorizedOrigins'], ++ 'cx': ['Login', 'Logout', 'Current', 'AuthorizeOrigin', 'RevokeOrigin', 'AuthorizedOrigins'], +}, + 'Attr': { 'implicitCxSetters': True, }, -@@ -157,6 +162,16 @@ +@@ -157,6 +161,14 @@ 'cx': ['Constructor'], }, +'ContentBlocker': { -+ 'inRealms': ['GetOriginState', 'SetOriginEnabled', 'ResetCounts'], -+ 'canGc': ['GetOriginState', 'SetOriginEnabled', 'ResetCounts'], ++ 'cx': ['GetOriginState', 'SetOriginEnabled', 'ResetCounts'], +}, + +'DBus': { -+ 'inRealms': ['Call', 'GetProperty', 'SetProperty', 'Subscribe', 'Unsubscribe'], -+ 'canGc': ['Call', 'GetProperty', 'SetProperty', 'Subscribe', 'Unsubscribe'], ++ 'cx': ['Call', 'GetProperty', 'SetProperty', 'Subscribe', 'Unsubscribe'], +}, + 'CookieStore': { 'cx': ['Set', 'Set_', 'Get', 'Get_', 'GetAll', 'GetAll_', 'Delete', 'Delete_'], }, -@@ -496,6 +511,11 @@ +@@ -497,6 +509,11 @@ 'cx': ['CheckValidity', 'GetValidity', 'ReportValidity', 'SetValidity'], }, @@ -41,37 +38,31 @@ 'EventSource': { 'weakReferenceable': True, }, -@@ -1003,8 +1023,9 @@ - }, +@@ -1001,7 +1018,7 @@ 'Navigator': { -- 'inRealms': ['GetVRDisplays'], -- 'cx': ['Bluetooth', 'Clipboard', 'Gpu', 'Languages', 'SendBeacon', 'ServiceWorker', 'Storage', 'UserActivation', 'WakeLock'], -+ 'inRealms': ['GetVRDisplays', 'CreatePeerStream'], -+ 'canGc': ['CreatePeerStream'], -+ 'cx': ['Atproto', 'Bluetooth', 'Clipboard', 'Embedder', 'Gpu', 'Keyboard', 'Languages', 'RequestTask', 'SendBeacon', 'ServiceWorker', 'Storage', 'UserActivation', 'WakeLock'], + 'inRealms': ['GetVRDisplays'], +- 'cx': ['Bluetooth', 'Clipboard', 'Gpu', 'Languages', 'SendBeacon', 'ServiceWorker', 'Storage', 'UserActivation', 'WakeLock', 'Xr'], ++ 'cx': ['Atproto', 'Bluetooth', 'Clipboard', 'CreatePeerStream', 'Embedder', 'Gpu', 'Keyboard', 'Languages', 'RequestTask', 'SendBeacon', 'ServiceWorker', 'Storage', 'UserActivation', 'WakeLock', 'Xr'], }, 'CredentialsContainer': { -@@ -1056,6 +1077,11 @@ +@@ -1053,6 +1070,10 @@ 'cx': ['RegisterPaint'], }, +'Pairing': { -+ 'inRealms': ['Start', 'Stop', 'Local', 'Peers', 'RequestPairing', 'SetName', 'AcceptPairing', 'RejectPairing', 'RemovePeer', 'EnableGuestMode', 'DisableGuestMode', 'RequestGuestPairing'], -+ 'canGc': ['Start', 'Stop', 'Local', 'Peers', 'RequestPairing', 'SetName', 'AcceptPairing', 'RejectPairing', 'RemovePeer', 'EnableGuestMode', 'DisableGuestMode', 'RequestGuestPairing'], ++ 'cx': ['Start', 'Stop', 'Local', 'Peers', 'RequestPairing', 'SetName', 'AcceptPairing', 'RejectPairing', 'RemovePeer', 'EnableGuestMode', 'DisableGuestMode', 'RequestGuestPairing'], +}, + 'PannerNode': { 'cx': ['Constructor'], }, -@@ -1276,7 +1302,8 @@ - }, - - 'Window': { -- 'canGc': ['CookieStore', 'GetVisualViewport', 'Screen'], -+ 'canGc': ['CookieStore', 'GetVisualViewport', 'Screen', 'AcceptTask'], -+ 'inRealms': ['AcceptTask'], +@@ -1275,6 +1296,7 @@ 'additionalTraits': ['crate::interfaces::WindowHelpers'], 'realm': ['CreateImageBitmap', 'CreateImageBitmap_', 'WebdriverCallback', 'GetOpener', 'Fetch'], 'cx': [ ++ 'AcceptTask', + 'Focus', + 'FetchLater', + 'GetComputedStyle',