aboutsummaryrefslogtreecommitdiffstats
path: root/components/shared/script_layout
diff options
context:
space:
mode:
authorMartin Robinson <mrobinson@igalia.com>2024-05-20 16:13:03 +0200
committerGitHub <noreply@github.com>2024-05-20 14:13:03 +0000
commitbe5b527ea34c8be1bfa53d4a4eaf2729e100db28 (patch)
tree371df7732a9c095e268fc3c6a9321672dc515922 /components/shared/script_layout
parent8d2d955bbb23826b75faf866e4dcccabb8d7f4e8 (diff)
downloadservo-be5b527ea34c8be1bfa53d4a4eaf2729e100db28.tar.gz
servo-be5b527ea34c8be1bfa53d4a4eaf2729e100db28.zip
fonts: Store web fonts in the per-Layout `FontContext` (#32303)
This moves mangement of web fonts to the per-Layout `FontContext`, preventing web fonts from being available in different Documents. Fixes #12920. Signed-off-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Mukilan Thiyagarajan <mukilan@igalia.com>
Diffstat (limited to 'components/shared/script_layout')
-rw-r--r--components/shared/script_layout/lib.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/components/shared/script_layout/lib.rs b/components/shared/script_layout/lib.rs
index d07a009af0e..a15f0be9bde 100644
--- a/components/shared/script_layout/lib.rs
+++ b/components/shared/script_layout/lib.rs
@@ -29,6 +29,7 @@ use libc::c_void;
use malloc_size_of_derive::MallocSizeOf;
use metrics::PaintTimeMetrics;
use net_traits::image_cache::{ImageCache, PendingImageId};
+use net_traits::ResourceThreads;
use profile_traits::mem::Report;
use profile_traits::time;
use script_traits::{
@@ -164,6 +165,7 @@ pub struct LayoutConfig {
pub constellation_chan: IpcSender<LayoutMsg>,
pub script_chan: IpcSender<ConstellationControlMsg>,
pub image_cache: Arc<dyn ImageCache>,
+ pub resource_threads: ResourceThreads,
pub font_cache_thread: FontCacheThread,
pub time_profiler_chan: time::ProfilerChan,
pub webrender_api_sender: WebRenderScriptApi,