diff --git a/Cargo.lock b/Cargo.lock index 0ca2420..a42d0b2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2638,9 +2638,9 @@ dependencies = [ [[package]] name = "enum-assoc" -version = "1.4.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "872ece5a3d5aa63541e400219676c38e8f5474cf3366834c3f2d1fe23d29bc55" +checksum = "0590c4a94da3372e83493b956755a6e2266830b6e4e3b101afe66e3f39477b91" dependencies = [ "proc-macro2", "quote", @@ -4071,9 +4071,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.4.16" +version = "0.4.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9f37a958b41b3b19ee2707c06439c0e9e547e847223eb791ecb0cb821c65e27" +checksum = "9f877e75f39e9827ec50a572dd592684ac28c029578726c85f1b2aa6ab807449" dependencies = [ "atomic-waker", "bytes", @@ -4298,7 +4298,7 @@ dependencies = [ "futures-channel", "futures-io", "futures-util", - "h2 0.4.16", + "h2 0.4.17", "hickory-proto 0.26.1", "http 1.5.0", "idna", @@ -4567,7 +4567,7 @@ dependencies = [ "bytes", "futures-channel", "futures-core", - "h2 0.4.16", + "h2 0.4.17", "http 1.5.0", "http-body 1.1.0", "httparse", @@ -4768,7 +4768,7 @@ dependencies = [ "utf8_iter", "yoke 0.8.3", "zerofrom", - "zerovec 0.11.7", + "zerovec 0.11.8", ] [[package]] @@ -4887,7 +4887,7 @@ dependencies = [ "serde", "tinystr 0.8.4", "writeable 0.6.4", - "zerovec 0.11.7", + "zerovec 0.11.8", ] [[package]] @@ -4901,7 +4901,7 @@ dependencies = [ "icu_provider 2.3.0", "potential_utf", "tinystr 0.8.4", - "zerovec 0.11.7", + "zerovec 0.11.8", ] [[package]] @@ -4972,7 +4972,7 @@ dependencies = [ "icu_properties 2.3.0", "icu_provider 2.3.0", "smallvec", - "zerovec 0.11.7", + "zerovec 0.11.8", ] [[package]] @@ -5048,7 +5048,7 @@ dependencies = [ "icu_properties_data 2.3.0", "icu_provider 2.3.0", "zerotrie 0.2.5", - "zerovec 0.11.7", + "zerovec 0.11.8", ] [[package]] @@ -5094,7 +5094,7 @@ dependencies = [ "yoke 0.8.3", "zerofrom", "zerotrie 0.2.5", - "zerovec 0.11.7", + "zerovec 0.11.8", ] [[package]] @@ -5151,7 +5151,7 @@ dependencies = [ "potential_utf", "smallvec", "utf8_iter", - "zerovec 0.11.7", + "zerovec 0.11.8", ] [[package]] @@ -6397,9 +6397,9 @@ dependencies = [ [[package]] name = "mozjs" -version = "0.21.3" +version = "0.21.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29596ccede272dfd26a6377d65be42dc8da3d6f41916d29a9ce8a7945b0a235b" +checksum = "267f2f944b93c97cb8759d4ce1fd1d18705a80879212bc8976cf70e2f4d2f6d4" dependencies = [ "bindgen", "cc", @@ -6412,9 +6412,9 @@ dependencies = [ [[package]] name = "mozjs_sys" -version = "140.13.0-3" +version = "140.13.0-4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a7f303ebd1ccc07f1748a8ed9048df7dd88e23ac706b63fb89af82c80145fa8" +checksum = "427a26f5b4ce14f66f5e59cdbde6588a4cc831c0f3ce3acd39b517ecd66422a1" dependencies = [ "bindgen", "cc", @@ -8244,7 +8244,7 @@ checksum = "d83eb9bc6d8e5cf568e7a1101d60ee05e81ed50ea106026f3d18deeb046d7661" dependencies = [ "serde_core", "writeable 0.6.4", - "zerovec 0.11.7", + "zerovec 0.11.8", ] [[package]] @@ -8900,7 +8900,7 @@ dependencies = [ "bytes", "encoding_rs", "futures-core", - "h2 0.4.16", + "h2 0.4.17", "http 1.5.0", "http-body 1.1.0", "http-body-util", @@ -9424,7 +9424,7 @@ dependencies = [ [[package]] name = "selectors" version = "0.40.0" -source = "git+https://github.com/servo/stylo?rev=e6b0b9dd4233237d13e28a8a8d0e484992a1a572#e6b0b9dd4233237d13e28a8a8d0e484992a1a572" +source = "git+https://github.com/servo/stylo?rev=800d90bf8018da8d596e3cb50d0df5491bf1df78#800d90bf8018da8d596e3cb50d0df5491bf1df78" dependencies = [ "bitflags 2.13.1", "cssparser", @@ -11244,7 +11244,7 @@ dependencies = [ [[package]] name = "servo_arc" version = "0.4.3" -source = "git+https://github.com/servo/stylo?rev=e6b0b9dd4233237d13e28a8a8d0e484992a1a572#e6b0b9dd4233237d13e28a8a8d0e484992a1a572" +source = "git+https://github.com/servo/stylo?rev=800d90bf8018da8d596e3cb50d0df5491bf1df78#800d90bf8018da8d596e3cb50d0df5491bf1df78" dependencies = [ "serde", "stable_deref_trait", @@ -11788,7 +11788,7 @@ dependencies = [ [[package]] name = "stylo" version = "0.20.0" -source = "git+https://github.com/servo/stylo?rev=e6b0b9dd4233237d13e28a8a8d0e484992a1a572#e6b0b9dd4233237d13e28a8a8d0e484992a1a572" +source = "git+https://github.com/servo/stylo?rev=800d90bf8018da8d596e3cb50d0df5491bf1df78#800d90bf8018da8d596e3cb50d0df5491bf1df78" dependencies = [ "app_units", "arrayvec", @@ -11844,7 +11844,7 @@ dependencies = [ [[package]] name = "stylo_atoms" version = "0.20.0" -source = "git+https://github.com/servo/stylo?rev=e6b0b9dd4233237d13e28a8a8d0e484992a1a572#e6b0b9dd4233237d13e28a8a8d0e484992a1a572" +source = "git+https://github.com/servo/stylo?rev=800d90bf8018da8d596e3cb50d0df5491bf1df78#800d90bf8018da8d596e3cb50d0df5491bf1df78" dependencies = [ "string_cache", "string_cache_codegen", @@ -11853,7 +11853,7 @@ dependencies = [ [[package]] name = "stylo_derive" version = "0.20.0" -source = "git+https://github.com/servo/stylo?rev=e6b0b9dd4233237d13e28a8a8d0e484992a1a572#e6b0b9dd4233237d13e28a8a8d0e484992a1a572" +source = "git+https://github.com/servo/stylo?rev=800d90bf8018da8d596e3cb50d0df5491bf1df78#800d90bf8018da8d596e3cb50d0df5491bf1df78" dependencies = [ "darling", "proc-macro2", @@ -11865,7 +11865,7 @@ dependencies = [ [[package]] name = "stylo_dom" version = "0.20.0" -source = "git+https://github.com/servo/stylo?rev=e6b0b9dd4233237d13e28a8a8d0e484992a1a572#e6b0b9dd4233237d13e28a8a8d0e484992a1a572" +source = "git+https://github.com/servo/stylo?rev=800d90bf8018da8d596e3cb50d0df5491bf1df78#800d90bf8018da8d596e3cb50d0df5491bf1df78" dependencies = [ "bitflags 2.13.1", "stylo_malloc_size_of", @@ -11874,7 +11874,7 @@ dependencies = [ [[package]] name = "stylo_malloc_size_of" version = "0.20.0" -source = "git+https://github.com/servo/stylo?rev=e6b0b9dd4233237d13e28a8a8d0e484992a1a572#e6b0b9dd4233237d13e28a8a8d0e484992a1a572" +source = "git+https://github.com/servo/stylo?rev=800d90bf8018da8d596e3cb50d0df5491bf1df78#800d90bf8018da8d596e3cb50d0df5491bf1df78" dependencies = [ "app_units", "cssparser", @@ -11891,7 +11891,7 @@ dependencies = [ [[package]] name = "stylo_static_prefs" version = "0.20.0" -source = "git+https://github.com/servo/stylo?rev=e6b0b9dd4233237d13e28a8a8d0e484992a1a572#e6b0b9dd4233237d13e28a8a8d0e484992a1a572" +source = "git+https://github.com/servo/stylo?rev=800d90bf8018da8d596e3cb50d0df5491bf1df78#800d90bf8018da8d596e3cb50d0df5491bf1df78" dependencies = [ "toml 1.1.4+spec-1.1.0", ] @@ -11899,7 +11899,7 @@ dependencies = [ [[package]] name = "stylo_traits" version = "0.20.0" -source = "git+https://github.com/servo/stylo?rev=e6b0b9dd4233237d13e28a8a8d0e484992a1a572#e6b0b9dd4233237d13e28a8a8d0e484992a1a572" +source = "git+https://github.com/servo/stylo?rev=800d90bf8018da8d596e3cb50d0df5491bf1df78#800d90bf8018da8d596e3cb50d0df5491bf1df78" dependencies = [ "app_units", "bitflags 2.13.1", @@ -12404,7 +12404,7 @@ checksum = "b1e27c91459209c2986af3dcf603a5a74a4368754ce37414f59acc971167f643" dependencies = [ "displaydoc", "serde_core", - "zerovec 0.11.7", + "zerovec 0.11.8", ] [[package]] @@ -12435,7 +12435,7 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "to_shmem" version = "0.5.0" -source = "git+https://github.com/servo/stylo?rev=e6b0b9dd4233237d13e28a8a8d0e484992a1a572#e6b0b9dd4233237d13e28a8a8d0e484992a1a572" +source = "git+https://github.com/servo/stylo?rev=800d90bf8018da8d596e3cb50d0df5491bf1df78#800d90bf8018da8d596e3cb50d0df5491bf1df78" dependencies = [ "cssparser", "servo_arc", @@ -12448,7 +12448,7 @@ dependencies = [ [[package]] name = "to_shmem_derive" version = "0.1.0" -source = "git+https://github.com/servo/stylo?rev=e6b0b9dd4233237d13e28a8a8d0e484992a1a572#e6b0b9dd4233237d13e28a8a8d0e484992a1a572" +source = "git+https://github.com/servo/stylo?rev=800d90bf8018da8d596e3cb50d0df5491bf1df78#800d90bf8018da8d596e3cb50d0df5491bf1df78" dependencies = [ "darling", "proc-macro2", @@ -14863,7 +14863,7 @@ dependencies = [ "displaydoc", "yoke 0.8.3", "zerofrom", - "zerovec 0.11.7", + "zerovec 0.11.8", ] [[package]] @@ -14879,9 +14879,9 @@ dependencies = [ [[package]] name = "zerovec" -version = "0.11.7" +version = "0.11.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94b5c6b5976d66c1d703c4fd17d3f5e43c8cedaacf604961b171adc7130896d8" +checksum = "bb0464e17806c1d976d5cba29399c7f08e516e279e2ba493f63123b5fca67dd8" dependencies = [ "serde", "yoke 0.8.3", diff --git a/Cargo.toml b/Cargo.toml index 0c47c2e..85ccbfa 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -136,7 +136,7 @@ iroh = { version = "1.0", default-features = false, features = ["tls-aws-lc-rs"] iroh-mdns-address-lookup = "0.4" iroh-persist = { git = "https://github.com/webbeef/iroh-persist.git", branch = "iroh-1.0" } itertools = "0.15" -js = { package = "mozjs", version = "=0.21.3", default-features = false, features = ["libz-sys", "intl"] } +js = { package = "mozjs", version = "=0.21.5", default-features = false, features = ["libz-sys", "intl"] } jstraceable_derive = { package = "servo-jstraceable-derive", version = "0.5.0", path = "source/components/jstraceable_derive" } keyboard-types = { version = "0.8.3", features = ["serde", "webdriver"] } kurbo = { version = "0.13.1", features = ["euclid"] } @@ -226,7 +226,7 @@ script_webgpu = { package = "servo-script-webgpu", version = "=0.5.0", path = "s script_traits = { package = "servo-script-traits", path = "source/components/shared/script" } sea-query = { version = "1.0.1", default-features = false, features = ["backend-sqlite", "derive"] } sea-query-rusqlite = "0.8.0" -selectors = { git = "https://github.com/servo/stylo", rev = "e6b0b9dd4233237d13e28a8a8d0e484992a1a572" } +selectors = { git = "https://github.com/servo/stylo", rev = "800d90bf8018da8d596e3cb50d0df5491bf1df78" } seq-macro = "0.3.6" serde = "1.0.228" serde_bytes = "0.11" @@ -266,7 +266,7 @@ servo-wakelock = { version = "0.5.0", path = "source/components/wakelock" } servo-webvtt = { version = "0.5.0", path = "source/components/webvtt" } servo_allocator = { package = "servo-allocator", version = "0.5.0", path = "source/components/allocator" } servo-tracing = { path = "source/components/servo_tracing" } -servo_arc = { git = "https://github.com/servo/stylo", rev = "e6b0b9dd4233237d13e28a8a8d0e484992a1a572" } +servo_arc = { git = "https://github.com/servo/stylo", rev = "800d90bf8018da8d596e3cb50d0df5491bf1df78" } servo-url = { version = "0.5.0", path = "source/components/url" } sha1 = "0.11" sha2 = "0.11" @@ -279,13 +279,13 @@ storage = { package = "servo-storage", version = "0.5.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 = "e6b0b9dd4233237d13e28a8a8d0e484992a1a572" } -stylo_atoms = { git = "https://github.com/servo/stylo", rev = "e6b0b9dd4233237d13e28a8a8d0e484992a1a572" } -stylo_config = { git = "https://github.com/servo/stylo", rev = "e6b0b9dd4233237d13e28a8a8d0e484992a1a572" } -stylo_dom = { git = "https://github.com/servo/stylo", rev = "e6b0b9dd4233237d13e28a8a8d0e484992a1a572" } -stylo_malloc_size_of = { git = "https://github.com/servo/stylo", rev = "e6b0b9dd4233237d13e28a8a8d0e484992a1a572" } -stylo_static_prefs = { git = "https://github.com/servo/stylo", rev = "e6b0b9dd4233237d13e28a8a8d0e484992a1a572" } -stylo_traits = { git = "https://github.com/servo/stylo", rev = "e6b0b9dd4233237d13e28a8a8d0e484992a1a572" } +stylo = { git = "https://github.com/servo/stylo", rev = "800d90bf8018da8d596e3cb50d0df5491bf1df78" } +stylo_atoms = { git = "https://github.com/servo/stylo", rev = "800d90bf8018da8d596e3cb50d0df5491bf1df78" } +stylo_config = { git = "https://github.com/servo/stylo", rev = "800d90bf8018da8d596e3cb50d0df5491bf1df78" } +stylo_dom = { git = "https://github.com/servo/stylo", rev = "800d90bf8018da8d596e3cb50d0df5491bf1df78" } +stylo_malloc_size_of = { git = "https://github.com/servo/stylo", rev = "800d90bf8018da8d596e3cb50d0df5491bf1df78" } +stylo_static_prefs = { git = "https://github.com/servo/stylo", rev = "800d90bf8018da8d596e3cb50d0df5491bf1df78" } +stylo_traits = { git = "https://github.com/servo/stylo", rev = "800d90bf8018da8d596e3cb50d0df5491bf1df78" } surfman = { version = "0.13.0", features = ["chains"] } swapper = "0.1" syn = { version = "2", default-features = false, features = ["clone-impls", "derive", "parsing"] } diff --git a/forkme.lock b/forkme.lock index 1ce2823..465bc5e 100644 --- a/forkme.lock +++ b/forkme.lock @@ -1 +1 @@ -2c08527d97378be9dde7bb8dc12f891570ed3cf9 +7576642cae7fc3515bde0e75679d82de9168cf14 diff --git a/patches/Cargo.lock.patch b/patches/Cargo.lock.patch index 3889313..e23941e 100644 --- a/patches/Cargo.lock.patch +++ b/patches/Cargo.lock.patch @@ -536,7 +536,7 @@ name = "quote" version = "1.0.47" source = "registry+https://github.com/rust-lang/crates.io-index" -@@ -7215,6 +7567,56 @@ +@@ -7205,6 +7557,56 @@ checksum = "19b30a45b0cd0bcca8037f3d0dc3421eaf95327a17cad11964fb8179b4fc4832" [[package]] @@ -593,7 +593,7 @@ name = "resvg" version = "0.48.1" source = "registry+https://github.com/rust-lang/crates.io-index" -@@ -7385,6 +7787,7 @@ +@@ -7375,6 +7777,7 @@ "aws-lc-rs", "log", "once_cell", @@ -601,7 +601,7 @@ "rustls-pki-types", "rustls-webpki", "subtle", -@@ -7409,6 +7812,7 @@ +@@ -7399,6 +7802,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2f4925028c7eb5d1fcdaf196971378ed9d2c1c4efc7dc5d011256f76c99c0a96" dependencies = [ @@ -609,7 +609,7 @@ "zeroize", ] -@@ -7674,6 +8078,18 @@ +@@ -7664,6 +8068,18 @@ ] [[package]] @@ -628,7 +628,7 @@ name = "serde_json" version = "1.0.151" source = "registry+https://github.com/rust-lang/crates.io-index" -@@ -8017,6 +8433,7 @@ +@@ -8007,6 +8423,7 @@ "rand 0.10.2", "rustc-hash 2.1.3", "serde", @@ -636,7 +636,7 @@ "servo-background-hang-monitor", "servo-background-hang-monitor-api", "servo-base", -@@ -8043,6 +8460,8 @@ +@@ -8033,6 +8450,8 @@ "servo-webxr-api", "stylo", "stylo_traits", @@ -645,7 +645,7 @@ "tracing", ] -@@ -8686,6 +9105,7 @@ +@@ -8676,6 +9095,7 @@ name = "servo-net" version = "0.5.0" dependencies = [ @@ -653,7 +653,7 @@ "async-compression", "async-recursion", "async-tungstenite", -@@ -8721,6 +9141,7 @@ +@@ -8711,6 +9131,7 @@ "quick_cache", "rand 0.10.2", "regex", @@ -661,7 +661,7 @@ "resvg", "rusqlite", "rustc-hash 2.1.3", -@@ -8730,9 +9151,11 @@ +@@ -8720,9 +9141,11 @@ "sea-query", "sea-query-rusqlite", "serde", @@ -673,7 +673,7 @@ "servo-devtools-traits", "servo-embedder-traits", "servo-fonts", -@@ -8786,6 +9209,7 @@ +@@ -8776,6 +9199,7 @@ "rustls-pki-types", "serde", "serde_bytes", @@ -681,7 +681,7 @@ "servo-base", "servo-config", "servo-default-resources", -@@ -8797,8 +9221,10 @@ +@@ -8787,8 +9211,10 @@ "servo-profile-traits", "servo-url", "servo_arc", @@ -692,7 +692,7 @@ "url", "uuid", "webrender_api", -@@ -9415,6 +9841,7 @@ +@@ -9405,6 +9831,7 @@ "bpaf", "cc", "cfg-if", @@ -700,7 +700,7 @@ "crossbeam-channel", "dirs", "dpi", -@@ -9429,6 +9856,7 @@ +@@ -9419,6 +9846,7 @@ "headers", "hilog", "hitrace", @@ -708,7 +708,7 @@ "image", "ipc-channel", "jni 0.22.4", -@@ -9451,6 +9879,7 @@ +@@ -9441,6 +9869,7 @@ "ohos-window-sys", "raw-window-handle", "rustls", @@ -716,7 +716,7 @@ "serde_json", "servo", "servo-allocator", -@@ -9457,6 +9886,7 @@ +@@ -9447,6 +9876,7 @@ "servo-base", "servo-webdriver-server", "signal-hook-registry", @@ -724,7 +724,7 @@ "surfman", "tokio", "tracing", -@@ -10103,6 +10533,9 @@ +@@ -10083,6 +10513,9 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" @@ -734,7 +734,7 @@ [[package]] name = "synstructure" -@@ -10137,6 +10570,27 @@ +@@ -10117,6 +10550,27 @@ ] [[package]] @@ -762,7 +762,7 @@ name = "system-deps" version = "7.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -@@ -10162,6 +10616,12 @@ +@@ -10142,6 +10596,12 @@ ] [[package]] @@ -775,7 +775,7 @@ name = "tar" version = "0.4.46" source = "registry+https://github.com/rust-lang/crates.io-index" -@@ -10479,6 +10939,16 @@ +@@ -10459,6 +10919,16 @@ ] [[package]] @@ -792,7 +792,7 @@ name = "tokio-rustls" version = "0.26.4" source = "registry+https://github.com/rust-lang/crates.io-index" -@@ -10581,11 +11051,30 @@ +@@ -10561,11 +11031,30 @@ "futures-util", "pin-project-lite", "sync_wrapper", @@ -823,7 +823,7 @@ name = "tower-layer" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -@@ -10899,6 +11388,12 @@ +@@ -10879,6 +11368,12 @@ ] [[package]] @@ -836,7 +836,7 @@ name = "urlpattern" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -@@ -12019,6 +12514,17 @@ +@@ -11999,6 +12494,17 @@ ] [[package]] diff --git a/patches/components/constellation/constellation.rs.patch b/patches/components/constellation/constellation.rs.patch index 7fa72d8..b805edf 100644 --- a/patches/components/constellation/constellation.rs.patch +++ b/patches/components/constellation/constellation.rs.patch @@ -36,33 +36,32 @@ }; use euclid::Size2D; use euclid::default::Size2D as UntypedSize2D; -@@ -159,15 +162,16 @@ +@@ -159,14 +162,16 @@ use servo_canvas_traits::canvas::{CanvasId, CanvasMsg}; use servo_config::{opts, pref}; use servo_constellation_traits::{ - AuxiliaryWebViewCreationRequest, AuxiliaryWebViewCreationResponse, ConstellationInterest, -- DocumentState, EmbedderToConstellationMessage, HistoryTraversalSource, IFrameLoadInfo, -- IFrameLoadInfoWithData, IFrameSizeMsg, LoadData, LogEntry, MessagePortMsg, -- NavigationHistoryBehavior, PaintMetricEvent, PortMessageTask, PortTransferInfo, -- RemoteFocusOperation, SWManagerSenders, ScreenshotReadinessResponse, -- ScriptToConstellationMessage, ScrollStateUpdate, ServiceWorkerAlgorithm, -- ServiceWorkerManagerFactory, ServiceWorkerMsg, SessionHistoryTraversalRequest, -- StructuredSerializedData, TargetSnapshotParams, TraversalDirection, UserContentManagerAction, -- WindowSizeType, WorkerAnimationFrameTick, +- EmbedderToConstellationMessage, HistoryTraversalSource, IFrameLoadInfo, IFrameLoadInfoWithData, +- IFrameSizeMsg, LoadData, LogEntry, MessagePortMsg, NavigationHistoryBehavior, PaintMetricEvent, +- PortMessageTask, PortTransferInfo, RemoteFocusOperation, SWManagerSenders, +- ScreenshotReadinessResponse, ScriptToConstellationMessage, ScrollStateUpdate, +- ServiceWorkerAlgorithm, ServiceWorkerManagerFactory, ServiceWorkerMsg, +- SessionHistoryTraversalRequest, StructuredSerializedData, TargetSnapshotParams, +- TraversalDirection, UserContentManagerAction, WindowSizeType, WorkerAnimationFrameTick, + AuxiliaryWebViewCreationRequest, AuxiliaryWebViewCreationResponse, BroadcastChannelMsg, -+ ConstellationInterest, DocumentState, EmbeddedWebViewCreationRequest, -+ EmbeddedWebViewCreationResponse, EmbeddedWebViewEventType, EmbedderToConstellationMessage, -+ HistoryTraversalSource, IFrameLoadInfo, IFrameLoadInfoWithData, IFrameSizeMsg, LoadData, -+ LogEntry, MessagePortMsg, NavigationHistoryBehavior, PaintMetricEvent, PairingEvent, -+ PortMessageTask, PortTransferInfo, RemoteFocusOperation, SWManagerSenders, -+ ScreenshotReadinessResponse, ScriptToConstellationMessage, ScrollStateUpdate, -+ ServiceWorkerAlgorithm, ServiceWorkerManagerFactory, ServiceWorkerMsg, -+ SessionHistoryTraversalRequest, StructuredSerializedData, TargetSnapshotParams, -+ TraversalDirection, UserContentManagerAction, WindowSizeType, WorkerAnimationFrameTick, ++ ConstellationInterest, EmbeddedWebViewCreationRequest, EmbeddedWebViewCreationResponse, ++ EmbeddedWebViewEventType, EmbedderToConstellationMessage, HistoryTraversalSource, ++ IFrameLoadInfo, IFrameLoadInfoWithData, IFrameSizeMsg, LoadData, LogEntry, MessagePortMsg, ++ NavigationHistoryBehavior, PaintMetricEvent, PairingEvent, PortMessageTask, PortTransferInfo, ++ RemoteFocusOperation, SWManagerSenders, ScreenshotReadinessResponse, ++ ScriptToConstellationMessage, ScrollStateUpdate, ServiceWorkerAlgorithm, ++ ServiceWorkerManagerFactory, ServiceWorkerMsg, SessionHistoryTraversalRequest, ++ StructuredSerializedData, TargetSnapshotParams, TraversalDirection, UserContentManagerAction, ++ WindowSizeType, WorkerAnimationFrameTick, }; use servo_url::{Host, ImmutableOrigin, ServoUrl}; use storage_traits::StorageThreads; -@@ -182,6 +186,7 @@ +@@ -181,6 +186,7 @@ use webgpu_traits::{WebGPU, WebGPURequest}; use super::embedder::ConstellationToEmbedderMsg; @@ -70,7 +69,7 @@ use crate::broadcastchannel::BroadcastChannels; use crate::browsingcontext::{ AllBrowsingContextsIterator, BrowsingContext, FullyActiveBrowsingContextsIterator, -@@ -188,11 +193,18 @@ +@@ -187,11 +193,18 @@ NewBrowsingContextInfo, }; use crate::constellation_webview::{ConstellationWebView, OngoingHistoryTraversalRequest}; @@ -89,7 +88,7 @@ struct PendingApprovalNavigation { load_data: LoadData, -@@ -223,6 +235,12 @@ +@@ -222,6 +235,12 @@ /// While a completion failed, another global requested to complete the transfer. /// We are still buffering messages, and awaiting the return of the buffer from the global who failed. CompletionRequested(MessagePortRouterId, VecDeque), @@ -102,7 +101,7 @@ } #[derive(Debug)] -@@ -481,6 +499,13 @@ +@@ -470,6 +489,13 @@ /// currently being pressed. pressed_mouse_buttons: MouseButtons, @@ -116,7 +115,7 @@ /// The currently activated keyboard modifiers. active_keyboard_modifiers: Modifiers, -@@ -534,6 +559,47 @@ +@@ -523,6 +549,47 @@ /// to the `UserContents` need to be forwared to all the `ScriptThread`s that host /// the relevant `WebView`. pub(crate) user_contents_for_manager_id: FxHashMap, @@ -164,7 +163,7 @@ } /// State needed to construct a constellation. -@@ -598,6 +664,9 @@ +@@ -587,6 +654,9 @@ /// The wake lock provider for acquiring and releasing OS-level screen wake locks. pub wake_lock_provider: Box, @@ -174,7 +173,7 @@ } /// When we are exiting a pipeline, we can either force exiting or not. A normal exit -@@ -681,6 +750,11 @@ +@@ -670,6 +740,11 @@ let broken_image_icon_data = resources::read_bytes(Resource::BrokenImageIcon); @@ -186,7 +185,7 @@ let mut constellation: Constellation = Constellation { event_loops: Default::default(), namespace_receiver, -@@ -702,7 +776,7 @@ +@@ -691,7 +766,7 @@ script_to_devtools_callback: Default::default(), #[cfg(feature = "bluetooth")] bluetooth_ipc_sender: state.bluetooth_thread, @@ -195,7 +194,7 @@ private_resource_threads: state.private_resource_threads, public_storage_threads: state.public_storage_threads, private_storage_threads: state.private_storage_threads, -@@ -741,6 +815,7 @@ +@@ -728,6 +803,7 @@ canvas: OnceCell::new(), pending_approval_navigations: Default::default(), pressed_mouse_buttons: MouseButtons::empty(), @@ -203,7 +202,7 @@ active_keyboard_modifiers: Modifiers::empty(), hard_fail, active_media_session: None, -@@ -757,6 +832,23 @@ +@@ -744,6 +820,23 @@ pending_viewport_changes: Default::default(), screenshot_readiness_requests: Vec::new(), user_contents_for_manager_id: Default::default(), @@ -227,7 +226,7 @@ }; constellation.run(); -@@ -782,6 +874,18 @@ +@@ -769,6 +862,18 @@ fn clean_up_finished_script_event_loops(&mut self) { self.event_loop_join_handles .retain(|join_handle| !join_handle.is_finished()); @@ -246,7 +245,7 @@ self.event_loops .retain(|event_loop| event_loop.upgrade().is_some()); } -@@ -1063,6 +1167,11 @@ +@@ -1050,6 +1155,11 @@ .get(&webview_id) .and_then(|webview| webview.user_content_manager_id); @@ -258,7 +257,7 @@ let new_pipeline_info = NewPipelineInfo { parent_info: parent_pipeline_id, new_pipeline_id, -@@ -1075,6 +1184,13 @@ +@@ -1062,6 +1172,13 @@ embedder_theme: theme, target_snapshot_params, frame_name: name, @@ -272,7 +271,7 @@ }; let pipeline = match Pipeline::spawn(new_pipeline_info, event_loop, self, throttled) { Ok(pipeline) => pipeline, -@@ -1240,6 +1356,9 @@ +@@ -1215,6 +1332,9 @@ Script((WebViewId, PipelineId, ScriptToConstellationMessage)), BackgroundHangMonitor(HangAlert), Embedder(EmbedderToConstellationMessage), @@ -282,7 +281,7 @@ RemoveProcess(usize), } // Get one incoming request. -@@ -1259,6 +1378,28 @@ +@@ -1234,6 +1354,28 @@ sel.recv(&self.background_hang_monitor_receiver); sel.recv(&self.embedder_to_constellation_receiver); @@ -311,7 +310,7 @@ self.process_manager.register(&mut sel); let request = { -@@ -1285,9 +1426,30 @@ +@@ -1260,9 +1402,30 @@ oper.recv(&self.embedder_to_constellation_receiver) .expect("Unexpected embedder channel panic in constellation"), )), @@ -343,7 +342,7 @@ let _ = oper.recv(self.process_manager.receiver_at(process_index)); Ok(Request::RemoveProcess(process_index)) }, -@@ -1310,10 +1472,67 @@ +@@ -1285,10 +1448,67 @@ Request::BackgroundHangMonitor(message) => { self.handle_request_from_background_hang_monitor(message); }, @@ -411,7 +410,7 @@ #[servo_tracing::instrument(skip_all)] fn handle_request_for_pipeline_namespace(&mut self, request: PipelineNamespaceRequest) { let PipelineNamespaceRequest(sender) = request; -@@ -1398,6 +1617,15 @@ +@@ -1373,6 +1593,15 @@ EmbedderToConstellationMessage::ThemeChange(webview_id, theme) => { self.handle_theme_change(webview_id, theme); }, @@ -427,7 +426,7 @@ EmbedderToConstellationMessage::TickAnimation(webview_ids) => { self.handle_tick_animation(webview_ids) }, -@@ -1416,6 +1644,16 @@ +@@ -1391,6 +1620,16 @@ EmbedderToConstellationMessage::ForwardInputEvent(webview_id, event, hit_test) => { self.forward_input_event(webview_id, event, hit_test); }, @@ -444,7 +443,7 @@ EmbedderToConstellationMessage::RefreshCursor(pipeline_id) => { self.handle_refresh_cursor(pipeline_id) }, -@@ -1465,11 +1703,7 @@ +@@ -1440,11 +1679,7 @@ } }, EmbedderToConstellationMessage::PreferencesUpdated(updates) => { @@ -457,7 +456,7 @@ let _ = event_loop.send(ScriptThreadMessage::PreferencesUpdated( updates .iter() -@@ -1496,6 +1730,18 @@ +@@ -1471,6 +1706,18 @@ EmbedderToConstellationMessage::SetAccessibilityActive(webview_id, active) => { self.set_accessibility_active(webview_id, active); }, @@ -476,7 +475,7 @@ } } -@@ -1693,7 +1939,13 @@ +@@ -1668,7 +1915,13 @@ return warn!("Attempt to add channel name from an unexpected origin."); } self.broadcast_channels @@ -491,7 +490,7 @@ }, ScriptToConstellationMessage::RemoveBroadcastChannelNameInRouter( router_id, -@@ -1707,7 +1959,13 @@ +@@ -1682,7 +1935,13 @@ return warn!("Attempt to remove channel name from an unexpected origin."); } self.broadcast_channels @@ -506,7 +505,7 @@ }, ScriptToConstellationMessage::RemoveBroadcastChannelRouter(router_id, origin) => { if self -@@ -1719,6 +1977,12 @@ +@@ -1694,6 +1953,12 @@ self.broadcast_channels .remove_broadcast_channel_router(router_id); }, @@ -519,7 +518,7 @@ ScriptToConstellationMessage::ScheduleBroadcast(router_id, message) => { if self .check_origin_against_pipeline(&source_pipeline_id, &message.origin) -@@ -1728,8 +1992,15 @@ +@@ -1703,8 +1968,15 @@ "Attempt to schedule broadcast from an origin not matching the origin of the msg." ); } @@ -536,7 +535,7 @@ }, ScriptToConstellationMessage::PipelineExited => { self.handle_pipeline_exited(source_pipeline_id); -@@ -1749,6 +2020,12 @@ +@@ -1724,6 +1996,12 @@ ScriptToConstellationMessage::CreateAuxiliaryWebView(load_info) => { self.handle_script_new_auxiliary(load_info); }, @@ -549,7 +548,7 @@ ScriptToConstellationMessage::ChangeRunningAnimationsState(animation_state) => { self.handle_change_running_animations_state(source_pipeline_id, animation_state) }, -@@ -1820,7 +2097,7 @@ +@@ -1795,7 +2073,7 @@ ScriptToConstellationMessage::SetFinalUrl(final_url) => { // The script may have finished loading after we already started shutting down. if let Some(ref mut pipeline) = self.pipelines.get_mut(&source_pipeline_id) { @@ -558,7 +557,7 @@ } else { warn!("constellation got set final url message for dead pipeline"); } -@@ -1945,6 +2222,12 @@ +@@ -1918,6 +2196,12 @@ .entry(interest) .or_default() .insert(source_pipeline_id); @@ -571,7 +570,7 @@ }, ScriptToConstellationMessage::UnregisterInterest(interest) => { if let Some(set) = self.pipeline_interests.get_mut(&interest) { -@@ -1970,6 +2253,29 @@ +@@ -1943,6 +2227,29 @@ new_value, ); }, @@ -601,22 +600,21 @@ ScriptToConstellationMessage::MediaSessionEvent(pipeline_id, event) => { // Unlikely at this point, but we may receive events coming from // different media sessions, so we set the active media session based -@@ -1988,8 +2294,13 @@ +@@ -1961,7 +2268,12 @@ }; self.active_media_session = Some(pipeline_id); self.constellation_to_embedder_proxy.send( - ConstellationToEmbedderMsg::MediaSessionEvent(webview_id, event), + ConstellationToEmbedderMsg::MediaSessionEvent(webview_id, event.clone()), - ); ++ ); + // Also route to embedded webview parent iframe. + self.handle_embedded_webview_notification( + webview_id, + EmbeddedWebViewEventType::MediaSessionEvent(event), -+ ); + ); }, #[cfg(feature = "webgpu")] - ScriptToConstellationMessage::RequestAdapter(response_sender, options, ids) => self -@@ -2062,9 +2373,1093 @@ +@@ -2035,7 +2347,1091 @@ } }, }, @@ -1384,9 +1382,9 @@ + let _ = callback.send(None); + } + }, - } - } - ++ } ++ } ++ + fn handle_pairing_event(&mut self, event: PairingEvent) { + if let PairingEvent::MessageReceived { ref from, ref data } = event { + debug!("P2P message received from {from}, {} bytes", data.len()); @@ -1674,7 +1672,7 @@ + } + } + return; -+ } + } + + // Handle peer disconnect: clean up remote channel state. + if let PairingEvent::PeerExpired { ref id } = event { @@ -1705,12 +1703,10 @@ + let _ = event_loop.send(ScriptThreadMessage::DispatchPairingEvent(event.clone())); + } + } -+ } -+ + } + /// Check the origin of a message against that of the pipeline it came from. - /// Note: this is still limited as a security check, - /// see -@@ -2381,6 +3776,55 @@ +@@ -2354,6 +3750,55 @@ TransferState::TransferInProgress(queue) => queue.push_back(task), TransferState::CompletionFailed(queue) => queue.push_back(task), TransferState::CompletionRequested(_, queue) => queue.push_back(task), @@ -1766,7 +1762,7 @@ } } -@@ -3186,6 +4630,101 @@ +@@ -3179,6 +4624,101 @@ ); } @@ -1868,7 +1864,7 @@ fn forward_input_event( &mut self, webview_id: WebViewId, -@@ -3205,6 +4744,66 @@ +@@ -3198,6 +4738,66 @@ let pressed_mouse_buttons = self.pressed_mouse_buttons; let active_keyboard_modifiers = self.active_keyboard_modifiers; @@ -1935,7 +1931,7 @@ let event_id = event.id; let Some(webview) = self.webviews.get_mut(&webview_id) else { warn!("Got input event for unknown WebViewId: {webview_id:?}"); -@@ -3308,6 +4907,40 @@ +@@ -3299,6 +4899,40 @@ /// fn handle_close_top_level_browsing_context(&mut self, webview_id: WebViewId) { debug!("{webview_id}: Closing"); @@ -1976,7 +1972,7 @@ let browsing_context_id = BrowsingContextId::from(webview_id); // Step 5. Remove traversable from the user agent's top-level traversable set. let browsing_context = -@@ -3600,8 +5233,27 @@ +@@ -3601,8 +5235,27 @@ opener_webview_id, opener_pipeline_id, response_sender, @@ -2004,8 +2000,8 @@ let Some((webview_id_sender, webview_id_receiver)) = generic_channel::channel() else { warn!("Failed to create channel"); let _ = response_sender.send(None); -@@ -3700,6 +5352,403 @@ - }); +@@ -3699,6 +5352,410 @@ + .insert(new_webview_id); } + /// Handle a request to create an embedded webview (from an iframe with "embed" attribute). @@ -2169,7 +2165,11 @@ + viewport_details + }; + -+ self.add_pending_change(SessionHistoryChange { ++ let Some(webview) = self.webviews.get_mut(&new_webview_id) else { ++ return warn!("Adding pending change to unknown WebView: {new_webview_id:?}"); ++ }; ++ ++ webview.add_pending_change(SessionHistoryChange { + webview_id: new_webview_id, + browsing_context_id: new_browsing_context_id, + new_pipeline_id, @@ -2328,7 +2328,10 @@ + self.browsing_context_group_set + .insert(bc_group_id, bc_group); + -+ self.add_pending_change(SessionHistoryChange { ++ let Some(new_webview) = self.webviews.get_mut(&new_webview_id) else { ++ return warn!("Adding pending change to unknown WebView: {new_webview_id:?}"); ++ }; ++ new_webview.add_pending_change(SessionHistoryChange { + webview_id: new_webview_id, + browsing_context_id: new_browsing_context_id, + new_pipeline_id, @@ -2408,7 +2411,7 @@ #[servo_tracing::instrument(skip_all)] fn handle_refresh_cursor(&self, pipeline_id: PipelineId) { let Some(pipeline) = self.pipelines.get(&pipeline_id) else { -@@ -4675,7 +6724,7 @@ +@@ -4664,7 +6721,7 @@ }, }; @@ -2417,7 +2420,7 @@ match self.browsing_contexts.get_mut(&browsing_context_id) { Some(browsing_context) => { let old_pipeline_id = browsing_context.pipeline_id; -@@ -4684,6 +6733,7 @@ +@@ -4673,6 +6730,7 @@ old_pipeline_id, browsing_context.parent_pipeline_id, browsing_context.webview_id, @@ -2425,7 +2428,7 @@ ) }, None => { -@@ -4694,6 +6744,15 @@ +@@ -4683,6 +6741,15 @@ self.unload_document(old_pipeline_id); @@ -2441,7 +2444,7 @@ if let Some(new_pipeline) = self.pipelines.get(&new_pipeline_id) { if let Some(ref chan) = self.devtools_sender { let state = NavigationState::Start(new_pipeline.url.clone()); -@@ -5264,7 +7323,7 @@ +@@ -5254,7 +7321,7 @@ } #[servo_tracing::instrument(skip_all)] @@ -2450,7 +2453,7 @@ // Send a flat projection of the history to embedder. // The final vector is a concatenation of the URLs of the past // entries, the current entry and the future entries. -@@ -5376,9 +7435,22 @@ +@@ -5366,9 +7433,22 @@ self.constellation_to_embedder_proxy .send(ConstellationToEmbedderMsg::HistoryChanged( webview_id, @@ -2474,7 +2477,7 @@ } #[servo_tracing::instrument(skip_all)] -@@ -5397,7 +7469,7 @@ +@@ -5387,7 +7467,7 @@ webview.focused_browsing_context_id = change.browsing_context_id; } @@ -2483,7 +2486,7 @@ match self.browsing_contexts.get_mut(&change.browsing_context_id) { Some(browsing_context) => { debug!("Adding pipeline to existing browsing context."); -@@ -5404,11 +7476,15 @@ +@@ -5394,11 +7474,15 @@ let old_pipeline_id = browsing_context.pipeline_id; browsing_context.pipelines.insert(change.new_pipeline_id); browsing_context.update_current_entry(change.new_pipeline_id); @@ -2501,7 +2504,7 @@ }, }; -@@ -5416,6 +7492,18 @@ +@@ -5406,6 +7490,18 @@ self.unload_document(old_pipeline_id); } diff --git a/patches/components/constellation/constellation_webview.rs.patch b/patches/components/constellation/constellation_webview.rs.patch index 973f74b..38d034e 100644 --- a/patches/components/constellation/constellation_webview.rs.patch +++ b/patches/components/constellation/constellation_webview.rs.patch @@ -1,6 +1,6 @@ --- original +++ modified -@@ -72,6 +72,11 @@ +@@ -80,6 +80,11 @@ /// via [`ScriptThreadMessage::SetAccessibilityActive`] in `set_accessibility_active()` /// and [`crate::Constellation::set_frame_tree_for_webview()`]. pub accessibility_active: bool, @@ -12,7 +12,7 @@ } impl ConstellationWebView { -@@ -80,6 +85,20 @@ +@@ -88,6 +93,20 @@ focused_browsing_context_id: BrowsingContextId, user_content_manager_id: Option, ) -> Self { @@ -33,7 +33,7 @@ Self { webview_id, user_content_manager_id, -@@ -93,6 +112,7 @@ +@@ -102,6 +121,7 @@ ongoing_history_traversal_request: None, theme: Theme::Light, accessibility_active: false, @@ -41,7 +41,7 @@ } } -@@ -112,12 +132,41 @@ +@@ -121,12 +141,41 @@ event: &ConstellationInputEvent, browsing_contexts: &FxHashMap, ) -> Option { @@ -85,7 +85,7 @@ let browsing_context_id = if matches!(event.event.event, InputEvent::MouseLeftViewport(_)) { self.hovered_browsing_context_id .unwrap_or(self.focused_browsing_context_id) -@@ -187,11 +236,9 @@ +@@ -196,11 +245,9 @@ if let InputEvent::MouseMove(_) = &event.event.event { update_hovered_browsing_context(Some(pipeline.browsing_context_id), true); diff --git a/patches/components/constellation/tracing.rs.patch b/patches/components/constellation/tracing.rs.patch index 05d8a03..d75d913 100644 --- a/patches/components/constellation/tracing.rs.patch +++ b/patches/components/constellation/tracing.rs.patch @@ -60,9 +60,9 @@ + Self::CreateEmbeddedWebView(..) => target!("CreateEmbeddedWebView"), + Self::RemoveEmbeddedWebView(..) => target!("RemoveEmbeddedWebView"), Self::ActivateDocument => target!("ActivateDocument"), - Self::SetDocumentState(..) => target!("SetDocumentState"), Self::SetFinalUrl(..) => target!("SetFinalUrl"), -@@ -200,6 +213,84 @@ + Self::LogEntry(..) => target!("LogEntry"), +@@ -199,6 +212,84 @@ Self::TriggerGarbageCollection => target!("TriggerGarbageCollection"), Self::AcquireWakeLock(..) => target!("AcquireWakeLock"), Self::ReleaseWakeLock(..) => target!("ReleaseWakeLock"), diff --git a/patches/components/layout/display_list/mod.rs.patch b/patches/components/layout/display_list/mod.rs.patch index aa0cb7c..bee8079 100644 --- a/patches/components/layout/display_list/mod.rs.patch +++ b/patches/components/layout/display_list/mod.rs.patch @@ -93,7 +93,7 @@ ); @@ -237,6 +275,11 @@ builder.paint_dom_inspector_highlight(); - builder.paint_timing_handler.compute_new_lcp_candidate(); + builder.paint_timing_handler.mark_paint_timing(); + // Pop the zoom reference frame if we pushed one + if page_zoom_for_rendering.is_some() { diff --git a/patches/components/script/dom/document/document.rs.patch b/patches/components/script/dom/document/document.rs.patch index da42925..bfbce01 100644 --- a/patches/components/script/dom/document/document.rs.patch +++ b/patches/components/script/dom/document/document.rs.patch @@ -42,7 +42,7 @@ use crate::dom::intersectionobserver::IntersectionObserver; use crate::dom::iterators::ShadowIncluding; use crate::dom::keyboardevent::KeyboardEvent; -@@ -202,7 +209,9 @@ +@@ -203,7 +210,9 @@ use crate::dom::touchevent::TouchEvent as DomTouchEvent; use crate::dom::touchlist::TouchList; use crate::dom::trustedtypes::trustedhtml::TrustedHTML; @@ -53,7 +53,7 @@ use crate::dom::uievent::UIEvent; use crate::dom::window::Window; use crate::dom::window::scrolling_box::{ScrollAxisState, ScrollingBox}; -@@ -219,6 +228,7 @@ +@@ -220,6 +229,7 @@ use crate::tasks::task_manager::TaskManager; use crate::tasks::task_source::TaskSourceName; use crate::timers::{OneshotTimerCallback, OneshotTimers}; @@ -61,7 +61,7 @@ use crate::xpath::parse_expression; #[derive(Clone, Copy, PartialEq)] -@@ -417,6 +427,8 @@ +@@ -418,6 +428,8 @@ applets: MutNullableDom, /// Information about the `` in this [`Document`]. iframes: RefCell, @@ -70,7 +70,7 @@ /// Shared locks used for style attributes, author-origin stylesheets, and user and /// user agent stylesheets in this document. Can be acquired once for accessing many /// objects. This is shared with the owning [`ScriptThread`]. -@@ -583,6 +595,14 @@ +@@ -584,6 +596,14 @@ /// - /// - resize_observers: DomRefCell>>, @@ -85,7 +85,7 @@ /// The set of all fonts loaded by this document. /// fonts: MutNullableDom, -@@ -662,6 +682,9 @@ +@@ -663,6 +683,9 @@ #[no_trace] favicon: RefCell>, @@ -95,7 +95,7 @@ /// All websockets created that are associated with this document. websockets: DOMTracker, -@@ -675,6 +698,18 @@ +@@ -676,6 +699,18 @@ /// Reflect the value of that preferences to prevent paying the cost of a RwLock access. layout_animations_test_enabled: bool, @@ -114,7 +114,7 @@ /// #[no_trace] state_override: DomRefCell>, -@@ -719,6 +754,11 @@ +@@ -720,6 +755,11 @@ /// Theme specific for this document, set by a meta element #[no_trace] theme: Cell>, @@ -126,7 +126,7 @@ } impl Document { -@@ -946,6 +986,68 @@ +@@ -947,6 +987,68 @@ self.dirty_root.take() } @@ -195,7 +195,7 @@ #[inline] pub(crate) fn loader(&self) -> Ref<'_, DocumentLoader> { self.loader.borrow() -@@ -1017,6 +1119,12 @@ +@@ -1018,6 +1120,12 @@ // Set the document's activity level, reflow if necessary, and suspend or resume timers. self.activity.set(activity); @@ -208,7 +208,7 @@ let media = ServoMedia::get(); let pipeline_id = self.window().pipeline_id(); let client_context_id = -@@ -1030,6 +1138,7 @@ +@@ -1031,6 +1139,7 @@ self.title_changed(); self.notify_embedder_favicon(); @@ -216,7 +216,7 @@ self.dirty_all_nodes(cx.no_gc()); self.window().resume(cx); media.resume(&client_context_id); -@@ -1420,6 +1529,9 @@ +@@ -1425,6 +1534,9 @@ )); self.send_to_embedder(EmbedderMsg::Status(self.webview_id(), None)); update_with_current_instant(&self.navigation_timing.dom_loading); @@ -226,7 +226,7 @@ } }, DocumentReadyState::Complete => { -@@ -1428,6 +1540,9 @@ +@@ -1433,6 +1545,9 @@ self.webview_id(), LoadStatus::Complete, )); @@ -236,7 +236,7 @@ } update_with_current_instant(&self.navigation_timing.dom_complete); }, -@@ -1508,7 +1623,13 @@ +@@ -1513,7 +1628,13 @@ let window = self.window(); if window.is_top_level() { let title = self.title().map(String::from); @@ -251,7 +251,7 @@ } } -@@ -1517,6 +1638,18 @@ +@@ -1522,6 +1643,18 @@ window.send_to_embedder(msg); } @@ -270,7 +270,7 @@ pub(crate) fn dirty_all_nodes(&self, no_gc: &NoGC) { let root = match self.GetDocumentElement() { Some(root) => root, -@@ -2967,6 +3100,17 @@ +@@ -2972,6 +3105,17 @@ self.iframes.borrow_mut() } @@ -288,7 +288,7 @@ pub(crate) fn set_navigation_start(&self, navigation_start: CrossProcessInstant) { self.interactive_time .borrow_mut() -@@ -3269,6 +3413,60 @@ +@@ -3274,6 +3418,60 @@ .push(Dom::from_ref(resize_observer)); } @@ -349,7 +349,7 @@ /// /// pub(crate) fn gather_active_resize_observations_at_depth( -@@ -3863,6 +4061,7 @@ +@@ -3871,6 +4069,7 @@ anchors: Default::default(), applets: Default::default(), iframes: RefCell::new(IFrameCollection::new()), @@ -357,7 +357,7 @@ shared_style_locks, stylesheets: DomRefCell::new(DocumentStylesheetSet::new()), stylesheet_list: MutNullableDom::new(None), -@@ -3922,6 +4121,8 @@ +@@ -3930,6 +4129,8 @@ dirty_root: Default::default(), declarative_refresh: Default::default(), resize_observers: Default::default(), @@ -366,7 +366,7 @@ fonts: Default::default(), visibility_state: Cell::new(DocumentVisibilityState::Hidden), status_code, -@@ -3944,10 +4145,12 @@ +@@ -3952,10 +4153,12 @@ active_sandboxing_flag_set: Cell::new(creation_sandboxing_flag_set), creation_sandboxing_flag_set: Cell::new(creation_sandboxing_flag_set), favicon: RefCell::new(None), @@ -379,7 +379,7 @@ state_override: Default::default(), value_override: Default::default(), default_single_line_container_name: Default::default(), -@@ -3965,6 +4168,7 @@ +@@ -3973,6 +4176,7 @@ image_cache, history: Default::default(), theme: Default::default(), @@ -387,7 +387,7 @@ } } -@@ -4716,6 +4920,33 @@ +@@ -4724,6 +4928,33 @@ .mark_animating_nodes_as_dirty(no_gc, current_timeline_value); } @@ -421,7 +421,7 @@ pub(crate) fn current_animation_timeline_value(&self) -> f64 { self.timeline .upcast::() -@@ -4775,10 +5006,8 @@ +@@ -4783,10 +5014,8 @@ /// An implementation of . pub(crate) fn update_animations_and_send_events(&self, cx: &mut CurrentRealm) { @@ -434,7 +434,7 @@ // > 1. Update the current time of all timelines associated with doc passing now // > as the timestamp. -@@ -5024,6 +5253,36 @@ +@@ -5032,6 +5261,36 @@ pub(crate) fn notify_embedder_favicon(&self) { if let Some(ref image) = *self.favicon.borrow() { @@ -471,7 +471,7 @@ self.send_to_embedder(EmbedderMsg::NewFavicon(self.webview_id(), image.clone())); } } -@@ -5111,6 +5370,30 @@ +@@ -5119,6 +5378,30 @@ self.theme.set(new_theme); self.window.refresh_theme(); } diff --git a/patches/components/script/dom/document/document_event_handler.rs.patch b/patches/components/script/dom/document/document_event_handler.rs.patch index 7227322..32b45e7 100644 --- a/patches/components/script/dom/document/document_event_handler.rs.patch +++ b/patches/components/script/dom/document/document_event_handler.rs.patch @@ -39,7 +39,7 @@ use crate::dom::event::{EventBubbles, EventCancelable, EventComposed, EventFlags}; #[cfg(feature = "gamepad")] use crate::dom::gamepad::gamepad::{Gamepad, contains_user_gesture}; -@@ -70,14 +74,15 @@ +@@ -71,14 +75,15 @@ use crate::dom::node::{self, Node, NodeTraits}; use crate::dom::pointerevent::{PointerEvent, PointerId}; use crate::dom::types::{ @@ -58,7 +58,7 @@ /// A data structure used for tracking the current click count. This can be /// reset to 0 if a mouse button event happens at a sufficient distance or time -@@ -141,6 +146,56 @@ +@@ -142,6 +147,56 @@ } } @@ -115,7 +115,7 @@ /// The [`DocumentEventHandler`] is a structure responsible for handling input events for /// the [`crate::Document`] and storing data related to event handling. It exists to /// decrease the size of the [`crate::Document`] structure. -@@ -211,6 +266,20 @@ +@@ -213,6 +268,20 @@ /// The current drag gesture, if one exists. Events that affect this drag /// gesture will be forwarded to it. drag_gesture: DomRefCell>, @@ -136,7 +136,7 @@ } impl DocumentEventHandler { -@@ -238,6 +307,9 @@ +@@ -240,6 +309,9 @@ pending_pointer_capture: Default::default(), pointer_capture_target: Default::default(), drag_gesture: Default::default(), @@ -146,7 +146,7 @@ } } -@@ -576,6 +648,220 @@ +@@ -578,6 +650,220 @@ } } @@ -367,7 +367,7 @@ /// fn handle_native_mouse_move_event( &self, -@@ -616,6 +902,57 @@ +@@ -618,6 +904,57 @@ return; } @@ -425,7 +425,7 @@ // Update the cursor when the mouse moves, if it has changed. self.set_cursor(Some(hit_test_result.cursor)); -@@ -908,6 +1245,12 @@ +@@ -910,6 +1247,12 @@ return; }; @@ -438,7 +438,7 @@ debug!( "{:?}: at {:?}", mouse_button_event.action, hit_test_result.point_in_frame -@@ -1051,7 +1394,12 @@ +@@ -1053,7 +1396,12 @@ // Step 9. If mbutton is the secondary mouse button, then // Maybe show context menu with native, target. if let MouseButton::Secondary = mouse_button_event.button { @@ -452,7 +452,7 @@ } }, // https://w3c.github.io/pointerevents/#dfn-handle-native-mouse-up -@@ -1208,8 +1556,29 @@ +@@ -1211,8 +1559,29 @@ cx: &mut js::context::JSContext, target: &EventTarget, hit_test_result: &HitTestResult, @@ -483,7 +483,7 @@ // let menu_event = PointerEvent::new( cx, -@@ -1224,25 +1593,25 @@ +@@ -1227,25 +1596,25 @@ hit_test_result .point_relative_to_initial_containing_block .to_i32(), @@ -528,7 +528,7 @@ ); menu_event.upcast::().set_composed(true); -@@ -1258,6 +1627,91 @@ +@@ -1261,6 +1630,91 @@ }; } @@ -620,7 +620,7 @@ fn handle_touch_event( &self, cx: &mut JSContext, -@@ -1265,6 +1719,30 @@ +@@ -1268,6 +1722,30 @@ input_event: &ConstellationInputEvent, ) -> InputEventResult { let flags = HitTestFlags::empty(); @@ -651,7 +651,7 @@ // Ignore all incoming events without a hit test. let Some(hit_test_result) = self.window.hit_test_from_input_event(flags, input_event) else { -@@ -1272,6 +1750,19 @@ +@@ -1275,6 +1753,19 @@ return Default::default(); }; @@ -671,7 +671,7 @@ let TouchId(identifier) = event.touch_id; let Some(element) = hit_test_result -@@ -1443,6 +1934,10 @@ +@@ -1446,6 +1937,10 @@ .safe_borrow_mut(cx.no_gc()) .push(Dom::from_ref(&*pointer_touch)); self.set_active_element(&element); @@ -682,7 +682,7 @@ (current_target, pointer_touch) }, _ => { -@@ -1477,15 +1972,47 @@ +@@ -1480,15 +1975,47 @@ ); let mut active_touch_points = self.active_touch_points.safe_borrow_mut(cx.no_gc()); @@ -731,7 +731,7 @@ }, TouchEventType::Down => unreachable!("Should have been handled above"), } -@@ -1533,6 +2060,19 @@ +@@ -1536,6 +2063,19 @@ ); let event = touch_event.upcast::(); event.fire(cx, &touch_dispatch_target); @@ -751,7 +751,7 @@ event.flags().into() } -@@ -1669,6 +2209,16 @@ +@@ -1672,6 +2212,16 @@ return Default::default(); }; @@ -768,7 +768,7 @@ let Some(el) = hit_test_result .node .inclusive_ancestors(ShadowIncluding::Yes) -@@ -2233,6 +2783,26 @@ +@@ -2236,6 +2786,26 @@ return; } diff --git a/patches/components/script/dom/document/spatial_navigation.rs.patch b/patches/components/script/dom/document/spatial_navigation.rs.patch index 9641656..ca1c5ea 100644 --- a/patches/components/script/dom/document/spatial_navigation.rs.patch +++ b/patches/components/script/dom/document/spatial_navigation.rs.patch @@ -1,6 +1,6 @@ --- original +++ modified -@@ -0,0 +1,326 @@ +@@ -0,0 +1,329 @@ +/* SPDX Id: AGPL-3.0-or-later */ + +//! Spatial navigation: navigate to the nearest focusable element using arrow keys. @@ -30,6 +30,7 @@ +use crate::dom::html::htmlmetaelement::HTMLMetaElement; +use crate::dom::iterators::ShadowIncluding; +use crate::dom::node::Node; ++use crate::dom::node::focus::FocusTrigger; +use crate::dom::scrolling_box::{ScrollAxisState, ScrollRequirement}; + +/// Direction for spatial navigation. @@ -313,7 +314,9 @@ + +/// Focus an element and scroll it into view. +fn focus_element(cx: &mut js::context::JSContext, element: &Element) { -+ element.upcast::().run_the_focusing_steps(cx, None); ++ element ++ .upcast::() ++ .run_the_focusing_steps(cx, None, FocusTrigger::Other); + let scroll_axis = ScrollAxisState { + position: ScrollLogicalPosition::Center, + requirement: ScrollRequirement::IfNotVisible, diff --git a/patches/components/shared/constellation/from_script_message.rs.patch b/patches/components/shared/constellation/from_script_message.rs.patch index 310ecc4..9112d9c 100644 --- a/patches/components/shared/constellation/from_script_message.rs.patch +++ b/patches/components/shared/constellation/from_script_message.rs.patch @@ -32,7 +32,7 @@ }; pub type ScriptToConstellationSender = -@@ -463,11 +464,14 @@ +@@ -454,11 +455,14 @@ pub opener_webview_id: WebViewId, /// The pipeline opener browsing context. pub opener_pipeline_id: PipelineId, @@ -49,7 +49,7 @@ #[derive(Debug, Deserialize, Serialize)] pub struct AuxiliaryWebViewCreationResponse { /// The new webview ID. -@@ -478,6 +482,38 @@ +@@ -469,6 +473,38 @@ pub user_content_manager_id: Option, } @@ -88,7 +88,7 @@ /// Specifies the information required to load an iframe. #[derive(Debug, Deserialize, Serialize)] pub struct IFrameLoadInfo { -@@ -619,6 +655,141 @@ +@@ -610,6 +646,141 @@ pub enum ConstellationInterest { /// Interest in `storage` events (fired when another same-origin pipeline modifies storage). StorageEvent, @@ -230,7 +230,7 @@ } /// Messages from the script to the constellation. -@@ -666,6 +837,10 @@ +@@ -657,6 +828,10 @@ NewBroadcastChannelNameInRouter(BroadcastChannelRouterId, String, ImmutableOrigin), /// A global stopped managing broadcast channels for a given channel-name. RemoveBroadcastChannelNameInRouter(BroadcastChannelRouterId, String, ImmutableOrigin), @@ -241,7 +241,7 @@ /// Broadcast a message to all same-origin broadcast channels, /// excluding the source of the broadcast. ScheduleBroadcast(BroadcastChannelRouterId, BroadcastChannelMsg), -@@ -684,6 +859,9 @@ +@@ -675,6 +850,9 @@ Option, Option, ), @@ -251,7 +251,7 @@ /// Indicates whether this pipeline is currently running animations. ChangeRunningAnimationsState(AnimationState), /// Register a dedicated worker that can receive animation frame ticks. -@@ -777,6 +955,10 @@ +@@ -768,6 +946,10 @@ ScriptNewIFrame(IFrameLoadInfoWithData), /// Script has opened a new auxiliary browsing context. CreateAuxiliaryWebView(AuxiliaryWebViewCreationRequest), @@ -261,8 +261,8 @@ + RemoveEmbeddedWebView(WebViewId), /// Mark a new document as active ActivateDocument, - /// Set the document state for a pipeline (used by screenshot / reftests) -@@ -832,6 +1014,209 @@ + /// Update the pipeline Url, which can change after redirections. +@@ -821,6 +1003,209 @@ /// aggregate lock count and notify the provider only when the count transitions from N to 0. /// ReleaseWakeLock(WakeLockType),