1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 05:48:12 +00:00

AK: Port URL scheme from DeprecatedString to String

This commit is contained in:
Shannon Booth 2023-08-12 16:52:41 +12:00 committed by Andrew Kaster
parent 21fe86d235
commit c25485700a
16 changed files with 30 additions and 30 deletions

View file

@ -180,7 +180,7 @@ void UrlBox::highlight_url()
if (url.is_valid() && !is_focused()) {
if (url.scheme() == "http" || url.scheme() == "https" || url.scheme() == "gemini") {
auto serialized_host = url.serialized_host().release_value_but_fixme_should_propagate_errors().to_deprecated_string();
auto host_start = url.scheme().length() + 3;
auto host_start = url.scheme().bytes_as_string_view().length() + 3;
auto host_length = serialized_host.length();
// FIXME: Maybe add a generator to use https://publicsuffix.org/list/public_suffix_list.dat
@ -208,7 +208,7 @@ void UrlBox::highlight_url()
Gfx::TextAttributes scheme_format;
scheme_format.color = palette().color(Gfx::ColorRole::PlaceholderText);
spans.append({
{ { 0, 0 }, { 0, url.scheme().length() + 3 } },
{ { 0, 0 }, { 0, url.scheme().bytes_as_string_view().length() + 3 } },
scheme_format,
});
}