script: Move FontContext from Window to GlobalScope (#38918)

This change makes it so that every `GlobalScope` can contain an optional
`FontContext`. This will be necessary for every `GlobalScope` that
accesses canvas. Currently, `FontContext` is created and accessed via
the canvas worker thread, but this means that web fonts are not
available to canvas. This change will eventually make it possible for
canvas to share web fonts with the `Document` that owns them.

Testing: This should not change behavior and is thus covered by existing
tests.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
Martin Robinson 2025-08-26 08:56:50 -07:00 committed by GitHub
parent 909ceee830
commit 4f68508624
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
18 changed files with 281 additions and 193 deletions

View file

@ -18,9 +18,11 @@ webgpu = ["wgpu-core"]
[dependencies]
base = { workspace = true }
canvas_traits = { workspace = true }
compositing_traits = { workspace = true }
devtools_traits = { workspace = true }
embedder_traits = { workspace = true }
euclid = { workspace = true }
fonts_traits = { workspace = true }
http = { workspace = true }
hyper_serde = { workspace = true }
ipc-channel = { workspace = true }