servo/components/shared
Tim van der Lippe 8a837778d9
Create new image cache per document (#36832)
Rather than sharing the full image cache in a script_thread, the image
cache is now unique per document. This ensures that CSP factors no
longer affect whether the image is retrieved from the cache incorrectly.

To do so, the thread_pool is shared across all caches, but the store is
fresh. Except for the place_holder{image,url}, which are cloned. That's
because the `rippy_data` is only available in the constellation and no
longer accessible at the point that we need to create the document in
the script_thread.

Contrary to the description in #36505, the script_thread still has an
image_cache for this reason: so it has access to the store and
thread_pool to clone it.

With these changes, the two CSP tests no longer flake. Confirmed with
running the following commmand:

```
./mach test-wpt tests/wpt/tests/content-security-policy/generic/ --rerun=10
```

Fixes #36505

Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
2025-05-04 20:20:56 +00:00
..
background_hang_monitor script: add skeleton implementation of FontFace API (#35262) 2025-02-19 05:50:01 +00:00
base Reduce indexing boilerplate for serializable/transferrable objects. (#36624) 2025-04-22 02:02:02 +00:00
bluetooth Include WebViewId into EmbedderMsg variants where possible (#35211) 2025-01-30 11:15:35 +00:00
canvas Introduce snapshot concept of canvas (#36119) 2025-04-23 07:32:47 +00:00
compositing Introduce snapshot concept of canvas (#36119) 2025-04-23 07:32:47 +00:00
constellation Propagate parent policy container to local iframes (#36710) 2025-05-03 08:47:40 +00:00
devtools Send info about the DocumentType node to the devtools inspector (#36787) 2025-05-01 06:37:23 +00:00
embedder Embed user agent stylesheets and media control resouces in libservo (#36803) 2025-05-04 18:48:09 +00:00
fonts Update rustfmt to the 2024 style edition (#35764) 2025-03-03 11:26:53 +00:00
net Create new image cache per document (#36832) 2025-05-04 20:20:56 +00:00
profile Refactor common infrastructure for creating memory reports. (#36579) 2025-04-18 02:14:49 +00:00
script Improve inter-document focus handling (#36649) 2025-04-30 04:37:53 +00:00
script_layout Remove HTMLCanvasDataSource and CanvasSource (#36794) 2025-05-01 17:49:59 +00:00
snapshot Introduce snapshot concept of canvas (#36119) 2025-04-23 07:32:47 +00:00
webgpu Introduce snapshot concept of canvas (#36119) 2025-04-23 07:32:47 +00:00
webxr libservo: Move EventLooperWaker from webxr_traits to embedder_traits (#36420) 2025-04-09 14:19:33 +00:00