servo/components/layout_2020/flow/inline
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
..
construct.rs layout: Stop using unicode-segmentation in layout (#33250) 2024-08-29 14:51:39 +00:00
inline_box.rs tidy: Fix rustdoc warnings and add a tidy check for a common URL issue (#33366) 2024-09-08 15:04:19 +00:00
line.rs uses app units in display_list (#33420) 2024-09-13 10:49:59 +00:00
line_breaker.rs layout: Linebreak the entire InlineFormattingContext at once (#32483) 2024-06-13 20:12:14 +00:00
mod.rs fix many clippy warnings (#33510) 2024-09-21 13:58:31 +00:00
text_run.rs fonts: Simplify FontContext in two ways that affect the unit test (#33541) 2024-09-25 20:15:47 +00:00