servo/components/layout
Martin Robinson f949d2adc8
fonts: Remove the per-FontGroup cached fallback font (#35705)
Instead of keeping a per-FontGroup cache of the previously used fallback
font, cache this value in the caller of `FontGroup::find_by_codepoint`.
The problem with caching this value in the `FontGroup` is that it can
make one layout different from the next.

Still, it is important to cache the value somewhere so that, for
instance, Chinese character don't have to continuously walk through the
entire fallback list when laying out. The heuristic here is to try to
last used font first if the `Script`s match. At the very least this
should make one layout consistent with the next.

Fixes #35704.
Fixes #35697.
Fixes #35689.
Fixes #35679.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2025-02-28 14:33:21 +00:00
..
display_list clippy: Fix a couple clippy warnings on macOS (#35703) 2025-02-27 14:16:31 +00:00
block.rs layout: Remove the obsolete layout tracing functionality (#35001) 2025-01-15 13:24:14 +00:00
Cargo.toml Remove some unused dependencies (#34355) 2024-11-25 10:29:58 +00:00
construct.rs layout: Remove the obsolete layout tracing functionality (#35001) 2025-01-15 13:24:14 +00:00
context.rs script: Do not set up an IPC route for every image load (#35041) 2025-01-25 09:39:04 +00:00
data.rs script: Split style and layout data in DOM nodes (#31985) 2024-04-04 07:56:51 +00:00
flex.rs layout: Remove the obsolete layout tracing functionality (#35001) 2025-01-15 13:24:14 +00:00
floats.rs Upgrade Stylo to 2024-12-04 (#34501) 2024-12-06 01:05:54 +00:00
flow.rs layout: Remove the obsolete layout tracing functionality (#35001) 2025-01-15 13:24:14 +00:00
flow_list.rs Elide lifetimes where possible after rustup (#34824) 2025-01-03 18:54:44 +00:00
flow_ref.rs Address issues uncovered by rust-1.78 beta (#32130) 2024-04-22 18:20:47 +00:00
fragment.rs script: Do not set up an IPC route for every image load (#35041) 2025-01-25 09:39:04 +00:00
generated_content.rs Elide lifetimes where possible after rustup (#34824) 2025-01-03 18:54:44 +00:00
incremental.rs Upgrade Stylo to 2024-12-04 (#34501) 2024-12-06 01:05:54 +00:00
inline.rs layout: Remove the obsolete layout tracing functionality (#35001) 2025-01-15 13:24:14 +00:00
lib.rs layout: Remove the obsolete layout tracing functionality (#35001) 2025-01-15 13:24:14 +00:00
linked_list.rs Update MPL license to https (part 4) 2018-11-19 14:47:27 +01:00
list_item.rs fonts: Make FontContext thread-safe and share it per-Layout (#32205) 2024-05-02 10:34:10 +00:00
model.rs Upgrade Stylo to 2024-10-04 (#33767) 2024-10-20 19:53:38 +00:00
multicol.rs Enable min-content, max-content, fit-content and stretch (#33492) 2024-09-20 14:48:27 +00:00
parallel.rs config: Remove legacy-layout and unused Preferences and Opts (#34994) 2025-01-14 20:12:14 +00:00
persistent_list.rs Lint layout_2013 with clippy (#31221) 2024-01-30 11:46:35 +00:00
query.rs Layout: Implement innerText/outerText (#33312) 2024-09-24 09:45:33 +00:00
sequential.rs config: Remove legacy-layout and unused Preferences and Opts (#34994) 2025-01-14 20:12:14 +00:00
table.rs Let resolve_color() take its parameter by reference (#35247) 2025-01-31 23:34:40 +00:00
table_caption.rs Move non-gfx things out of gfx_traits and create a base crate (#32296) 2024-05-17 12:28:58 +00:00
table_cell.rs layout: Remove the obsolete layout tracing functionality (#35001) 2025-01-15 13:24:14 +00:00
table_colgroup.rs layout: Remove the obsolete layout tracing functionality (#35001) 2025-01-15 13:24:14 +00:00
table_row.rs layout: Remove the obsolete layout tracing functionality (#35001) 2025-01-15 13:24:14 +00:00
table_rowgroup.rs layout: Remove the obsolete layout tracing functionality (#35001) 2025-01-15 13:24:14 +00:00
table_wrapper.rs Elide lifetimes where possible after rustup (#34824) 2025-01-03 18:54:44 +00:00
text.rs fonts: Remove the per-FontGroup cached fallback font (#35705) 2025-02-28 14:33:21 +00:00
text_run.rs Elide lifetimes where possible after rustup (#34824) 2025-01-03 18:54:44 +00:00
traversal.rs layout: Remove the obsolete layout tracing functionality (#35001) 2025-01-15 13:24:14 +00:00
wrapper.rs layout: Remove the obsolete layout tracing functionality (#35001) 2025-01-15 13:24:14 +00:00