mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-05 08:06:09 +00:00
LibWeb: Use correct URL parsing methods throughout LibWeb
There are essentially 3 URL parsing AOs defined by the spec: 1. Parse a URL 2. Encoding parse a URL 3. Encoding parse a URL and serialize the result Further, these are replicated between the Document and the ESO. This patch defines these methods in accordance with the spec and updates existing users to invoke the correct method. In places where the correct method is ambiguous, we use the encoding parser to preserve existing ad- hoc behavior.
This commit is contained in:
@@ -2825,7 +2825,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->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()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user