script: Load and rasterize favicons before passing them to the embedder (#38949)

Currently the embedding API only provides the embedder with the URL for
a favicon. This is not great, for multiple reasons:
* Loading the icon should happen according to the fetch spec which is
not easy for the embedder to recreate (consider CSP, timing information
etc)
* Rasterizing a svg favicon is not trivial

With this change, servo fetches and rasterizes the icon to a bitmap
which is then passed to the embedder.

Testing: I'm not sure how I can write tests for the embedding api. I've
tested the correctness manually using
https://github.com/servo/servo/pull/36680.
Prepares for https://github.com/servo/servo/pull/36680

---------

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
This commit is contained in:
Simon Wülker 2025-08-27 16:28:42 +02:00 committed by GitHub
parent a5d890c13a
commit dcd25072d3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 373 additions and 159 deletions

View file

@ -1,67 +1,6 @@
[element-link-icon.https.sub.html]
expected: TIMEOUT
[sec-fetch-site - Same origin no attributes]
expected: TIMEOUT
[sec-fetch-site - Cross-site no attributes]
expected: NOTRUN
[sec-fetch-site - Same site no attributes]
expected: NOTRUN
[sec-fetch-site - Same-Origin -> Cross-Site -> Same-Origin redirect no attributes]
expected: NOTRUN
[sec-fetch-site - Same-Origin -> Same-Site -> Same-Origin redirect no attributes]
expected: NOTRUN
[sec-fetch-site - Cross-Site -> Same Origin no attributes]
expected: NOTRUN
[sec-fetch-site - Cross-Site -> Same-Site no attributes]
expected: NOTRUN
[sec-fetch-site - Cross-Site -> Cross-Site no attributes]
expected: NOTRUN
[sec-fetch-site - Same-Origin -> Same Origin no attributes]
expected: NOTRUN
[sec-fetch-site - Same-Origin -> Same-Site no attributes]
expected: NOTRUN
[sec-fetch-site - Same-Origin -> Cross-Site no attributes]
expected: NOTRUN
[sec-fetch-site - Same-Site -> Same Origin no attributes]
expected: NOTRUN
[sec-fetch-site - Same-Site -> Same-Site no attributes]
expected: NOTRUN
[sec-fetch-site - Same-Site -> Cross-Site no attributes]
expected: NOTRUN
[sec-fetch-mode no attributes]
expected: NOTRUN
[sec-fetch-mode attributes: crossorigin]
expected: NOTRUN
[sec-fetch-mode attributes: crossorigin=anonymous]
expected: NOTRUN
[sec-fetch-mode attributes: crossorigin=use-credentials]
expected: NOTRUN
[sec-fetch-dest no attributes]
expected: NOTRUN
[sec-fetch-user no attributes]
expected: NOTRUN
expected: FAIL
[sec-fetch-storage-access - Cross-site no attributes]
expected: NOTRUN
[sec-fetch-storage-access - Same site no attributes]
expected: NOTRUN
expected: FAIL