Files
ladybird/Libraries/LibWeb/Fetch/Fetching
Andreas Kling f2976807da LibWeb/Fetch: Allow file:// pages to load fonts from file:// URLs
Fonts require CORS mode per spec, but file:// origins are opaque in
our implementation, so the standard same-origin check in main_fetch
always fails for file-to-file font loads. This caused @font-face rules
referencing local .woff2 files to fail with a NetworkError.

Fix this by treating file:// font loads from file:// pages as
same-origin, routing them through scheme_fetch with basic response
tainting instead of rejecting them for not being HTTP(S).

This matches the behavior of Chromium, WebKit, and Firefox, all of
which allow local font loading from local pages.
2026-03-14 22:21:55 -05:00
..