servo/components
Martin Robinson ac567645a7
fonts: Simplify FontContext in two ways that affect the unit test (#33541)
This is done by no longer forwarding compositor-bound messages through
SystemFontService and making `FontContext` non-generic:

- Messages from the `FontContext` to the `Compositor` no longer need to be
  forwarded through the `SystemFontService`. Instead send these messages
  directly through the script IPC channel to the `Compositor`.

- Instead of adding a mock `SystemFontServiceProxy`, simply implement a
  mock `SystemFontService` on the other side of an IPC channel in the
  `font_context` unit test. This allows making `FontContext`
  non-generic, greatly simplifying the code. The extra complexity moves
  into the unit test.

These changes necessitate adding a new kind of `FontIdentifier`,
`FontIdentifier::Mock` due to the fact that local fonts have
platform-specific identifiers. This avoids having to pretend like the
system font service can have web fonts -- which was always a bit of a
hack.

These two changes are combined into one PR because they both require
extensive and similar chages in the font_context unit test which
dependended on the details of both of them.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2024-09-25 20:15:47 +00:00
..
allocator Add rust-version to all Cargo.toml files (#33483) 2024-09-17 16:39:07 +00:00
background_hang_monitor Add rust-version to all Cargo.toml files (#33483) 2024-09-17 16:39:07 +00:00
bluetooth Add rust-version to all Cargo.toml files (#33483) 2024-09-17 16:39:07 +00:00
canvas fonts: Simplify FontContext in two ways that affect the unit test (#33541) 2024-09-25 20:15:47 +00:00
compositing fonts: Simplify FontContext in two ways that affect the unit test (#33541) 2024-09-25 20:15:47 +00:00
config Add rust-version to all Cargo.toml files (#33483) 2024-09-17 16:39:07 +00:00
config_plugins Add rust-version to all Cargo.toml files (#33483) 2024-09-17 16:39:07 +00:00
constellation fonts: Use IpcSharedMemory to send font data (#33530) 2024-09-25 07:31:55 +00:00
deny_public_fields Add rust-version to all Cargo.toml files (#33483) 2024-09-17 16:39:07 +00:00
devtools Add rust-version to all Cargo.toml files (#33483) 2024-09-17 16:39:07 +00:00
dom_struct Add rust-version to all Cargo.toml files (#33483) 2024-09-17 16:39:07 +00:00
domobject_derive Add rust-version to all Cargo.toml files (#33483) 2024-09-17 16:39:07 +00:00
fonts fonts: Simplify FontContext in two ways that affect the unit test (#33541) 2024-09-25 20:15:47 +00:00
geometry Add rust-version to all Cargo.toml files (#33483) 2024-09-17 16:39:07 +00:00
hyper_serde Stop using time@0.1 in Servo (#33394) 2024-09-11 07:09:56 +00:00
jstraceable_derive Add rust-version to all Cargo.toml files (#33483) 2024-09-17 16:39:07 +00:00
layout fonts: Simplify FontContext in two ways that affect the unit test (#33541) 2024-09-25 20:15:47 +00:00
layout_2020 fonts: Simplify FontContext in two ways that affect the unit test (#33541) 2024-09-25 20:15:47 +00:00
layout_thread fonts: Simplify FontContext in two ways that affect the unit test (#33541) 2024-09-25 20:15:47 +00:00
layout_thread_2020 fonts: Simplify FontContext in two ways that affect the unit test (#33541) 2024-09-25 20:15:47 +00:00
media Add rust-version to all Cargo.toml files (#33483) 2024-09-17 16:39:07 +00:00
metrics Add rust-version to all Cargo.toml files (#33483) 2024-09-17 16:39:07 +00:00
net fix many clippy warnings (#33510) 2024-09-21 13:58:31 +00:00
pixels Add rust-version to all Cargo.toml files (#33483) 2024-09-17 16:39:07 +00:00
profile Add rust-version to all Cargo.toml files (#33483) 2024-09-17 16:39:07 +00:00
rand Add rust-version to all Cargo.toml files (#33483) 2024-09-17 16:39:07 +00:00
range Add rust-version to all Cargo.toml files (#33483) 2024-09-17 16:39:07 +00:00
script webgpu: destroy GPUTexture without erroring (#33534) 2024-09-25 09:36:09 +00:00
servo fonts: Simplify FontContext in two ways that affect the unit test (#33541) 2024-09-25 20:15:47 +00:00
shared fonts: Simplify FontContext in two ways that affect the unit test (#33541) 2024-09-25 20:15:47 +00:00
url Add rust-version to all Cargo.toml files (#33483) 2024-09-17 16:39:07 +00:00
webdriver_server Add rust-version to all Cargo.toml files (#33483) 2024-09-17 16:39:07 +00:00
webgpu webgpu: destroy GPUTexture without erroring (#33534) 2024-09-25 09:36:09 +00:00