LibURL: Migrate Origin scheme from ByteString to String

This commit is contained in:
Sam Atkins 2024-11-27 16:18:42 +00:00 committed by Andreas Kling
commit 2e64e0b836
Notes: github-actions[bot] 2024-11-30 11:23:49 +00:00
6 changed files with 10 additions and 13 deletions

View file

@ -392,7 +392,7 @@ Origin URL::origin() const
// -> "wss"
if (scheme().is_one_of("ftp"sv, "http"sv, "https"sv, "ws"sv, "wss"sv)) {
// Return the tuple origin (urls scheme, urls host, urls port, null).
return Origin(scheme().to_byte_string(), host().value(), port());
return Origin(scheme(), host().value(), port());
}
// -> "file"
@ -400,7 +400,7 @@ Origin URL::origin() const
if (scheme() == "file"sv || scheme() == "resource"sv) {
// Unfortunate as it is, this is left as an exercise to the reader. When in doubt, return a new opaque origin.
// Note: We must return an origin with the `file://' protocol for `file://' iframes to work from `file://' pages.
return Origin(scheme().to_byte_string(), String {}, {});
return Origin(scheme(), String {}, {});
}
// -> Otherwise