mirror of
https://github.com/servo/servo
synced 2026-04-25 17:15:48 +02:00
The origin of a `file` URL is unspecified. Engines act like they're opaque except in a few special cases - one of which is the "is potentially trustworthy" algorithm. This change allows consumers of `servo-url` to distinguish between regular opaque origins and file origins. Then we use that to mark file origins as "potentially trustworthy" which is what the spec wants. For now we can get away without changes to the `url` crate (the one used in the wider ecosystem, not just servo), but I'm unsure if that will be the case in the future. Testing: This change adds a test Fixes: https://github.com/servo/servo/issues/42540 --------- Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>