diff --git a/Cargo.lock b/Cargo.lock index 47a2bce4aae..02730d18a27 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4873,6 +4873,7 @@ dependencies = [ "quickcheck", "range", "rayon", + "rustc-hash 2.1.1", "script", "script_traits", "selectors", @@ -4910,7 +4911,6 @@ dependencies = [ "fnv", "fonts", "fonts_traits", - "fxhash", "html5ever", "ipc-channel", "libc", @@ -4920,6 +4920,7 @@ dependencies = [ "pixels", "profile_traits", "range", + "rustc-hash 2.1.1", "script_traits", "selectors", "serde", @@ -7376,6 +7377,7 @@ dependencies = [ "profile_traits", "range", "regex", + "rustc-hash 2.1.1", "script_bindings", "script_traits", "selectors", diff --git a/Cargo.toml b/Cargo.toml index 4a6431e9162..6531a915e4d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -126,6 +126,7 @@ resvg = "0.45.0" rustls = { version = "0.23", default-features = false, features = ["logging", "std", "tls12"] } rustls-pemfile = "2.0" rustls-pki-types = "1.12" +rustc-hash = "2.1.1" script_traits = { path = "components/shared/script" } selectors = { git = "https://github.com/servo/stylo", branch = "2025-09-02" } serde = "1.0.219" diff --git a/components/layout/Cargo.toml b/components/layout/Cargo.toml index 139f2ce3dba..4ca3062e430 100644 --- a/components/layout/Cargo.toml +++ b/components/layout/Cargo.toml @@ -46,6 +46,7 @@ pixels = { path = "../pixels" } profile_traits = { workspace = true } range = { path = "../range" } rayon = { workspace = true } +rustc-hash = { workspace = true } script = { path = "../script" } script_traits = { workspace = true } selectors = { workspace = true } diff --git a/components/layout/context.rs b/components/layout/context.rs index 5c932163771..1008dbc927a 100644 --- a/components/layout/context.rs +++ b/components/layout/context.rs @@ -8,7 +8,6 @@ use embedder_traits::UntrustedNodeAddress; use euclid::Size2D; use fnv::FnvHashMap; use fonts::FontContext; -use fxhash::FxHashMap; use layout_api::wrapper_traits::ThreadSafeLayoutNode; use layout_api::{ IFrameSizes, ImageAnimationState, PendingImage, PendingImageState, PendingRasterizationImage, @@ -19,6 +18,7 @@ use net_traits::image_cache::{ }; use parking_lot::{Mutex, RwLock}; use pixels::RasterImage; +use rustc_hash::FxHashMap; use script::layout_dom::ServoThreadSafeLayoutNode; use servo_url::{ImmutableOrigin, ServoUrl}; use style::context::SharedStyleContext; diff --git a/components/layout/fragment_tree/fragment_tree.rs b/components/layout/fragment_tree/fragment_tree.rs index 852e7f2e0bd..1920cbde5f6 100644 --- a/components/layout/fragment_tree/fragment_tree.rs +++ b/components/layout/fragment_tree/fragment_tree.rs @@ -7,8 +7,8 @@ use std::cell::Cell; use app_units::Au; use base::print_tree::PrintTree; use compositing_traits::display_list::AxesScrollSensitivity; -use fxhash::FxHashSet; use malloc_size_of_derive::MallocSizeOf; +use rustc_hash::FxHashSet; use style::animation::AnimationSetKey; use style::computed_values::position::T as Position; diff --git a/components/script/Cargo.toml b/components/script/Cargo.toml index cd440866cd1..4fb6a8590d8 100644 --- a/components/script/Cargo.toml +++ b/components/script/Cargo.toml @@ -100,6 +100,7 @@ parking_lot = { workspace = true } percent-encoding = { workspace = true } phf = "0.11" pixels = { path = "../pixels" } +rustc-hash = { workspace = true } profile_traits = { workspace = true } range = { path = "../range" } regex = { workspace = true } diff --git a/components/script/image_animation.rs b/components/script/image_animation.rs index 3d41f70ca35..8aa51abfcf3 100644 --- a/components/script/image_animation.rs +++ b/components/script/image_animation.rs @@ -8,12 +8,12 @@ use std::time::Duration; use compositing_traits::{ImageUpdate, SerializableImageData}; use embedder_traits::UntrustedNodeAddress; -use fxhash::FxHashMap; use ipc_channel::ipc::IpcSharedMemory; use layout_api::ImageAnimationState; use libc::c_void; use malloc_size_of::MallocSizeOf; use parking_lot::RwLock; +use rustc_hash::FxHashMap; use script_bindings::codegen::GenericBindings::WindowBinding::WindowMethods; use script_bindings::root::Dom; use style::dom::OpaqueNode; diff --git a/components/shared/layout/Cargo.toml b/components/shared/layout/Cargo.toml index ae5d005d103..d3cd03d144c 100644 --- a/components/shared/layout/Cargo.toml +++ b/components/shared/layout/Cargo.toml @@ -23,7 +23,6 @@ euclid = { workspace = true } fnv = { workspace = true } fonts = { path = "../../fonts" } fonts_traits = { workspace = true } -fxhash = { workspace = true } html5ever = { workspace = true } ipc-channel = { workspace = true } libc = { workspace = true } @@ -33,6 +32,7 @@ net_traits = { workspace = true } parking_lot = { workspace = true } pixels = { path = "../../pixels" } profile_traits = { workspace = true } +rustc-hash = { workspace = true } range = { path = "../../range" } script_traits = { workspace = true } selectors = { workspace = true } diff --git a/components/shared/layout/lib.rs b/components/shared/layout/lib.rs index 4d1c4b661f9..ed534df093c 100644 --- a/components/shared/layout/lib.rs +++ b/components/shared/layout/lib.rs @@ -30,7 +30,6 @@ use euclid::Point2D; use euclid::default::{Point2D as UntypedPoint2D, Rect}; use fnv::FnvHashMap; use fonts::{FontContext, SystemFontServiceProxy}; -use fxhash::FxHashMap; pub use layout_damage::LayoutDamage; use libc::c_void; use malloc_size_of::{MallocSizeOf as MallocSizeOfTrait, MallocSizeOfOps, malloc_size_of_is_0}; @@ -40,6 +39,7 @@ use parking_lot::RwLock; use pixels::RasterImage; use profile_traits::mem::Report; use profile_traits::time; +use rustc_hash::FxHashMap; use script_traits::{InitialScriptState, Painter, ScriptThreadMessage}; use serde::{Deserialize, Serialize}; use servo_arc::Arc as ServoArc;