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>
This commit is contained in:
Martin Robinson 2024-05-20 16:13:03 +02:00 committed by GitHub
parent 8d2d955bbb
commit be5b527ea3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
30 changed files with 1010 additions and 558 deletions

View file

@ -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,