mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-05 07:41:01 +00:00
LibURL: Migrate Origin scheme from ByteString to String
This commit is contained in:
parent
7f7f6e490b
commit
2e64e0b836
Notes:
github-actions[bot]
2024-11-30 11:23:49 +00:00
Author: https://github.com/AtkinsSJ
Commit: 2e64e0b836
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2610
Reviewed-by: https://github.com/shannonbooth ✅
6 changed files with 10 additions and 13 deletions
|
@ -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 (url’s scheme, url’s host, url’s 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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue