1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-10 10:01:13 +09:00

LibWeb: Port Document encoding_parse_url and parse_url to Optional<URL>

This ports two more APIs away from URL::is_valid.
This commit is contained in:
Shannon Booth 2025-01-23 19:40:57 +13:00 committed by Tim Ledbetter
parent cfe9b7a82b
commit 22a7cd9700
Notes: github-actions[bot] 2025-01-27 00:04:07 +00:00
26 changed files with 135 additions and 107 deletions

View file

@ -2923,7 +2923,7 @@ Optional<FontLoader&> StyleComputer::load_font_face(ParsedFontFace const& font_f
for (auto const& source : font_face.sources()) {
// FIXME: These should be loaded relative to the stylesheet URL instead of the document URL.
if (source.local_or_url.has<URL::URL>())
urls.append(m_document->encoding_parse_url(source.local_or_url.get<URL::URL>().to_string()));
urls.append(*m_document->encoding_parse_url(source.local_or_url.get<URL::URL>().to_string()));
// FIXME: Handle local()
}