mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-29 22:42:52 +00:00
LibWeb/CSS: Avoid URL validity check parsing CSS URLs
This commit is contained in:
parent
733dfdaa05
commit
f48b760011
Notes:
github-actions[bot]
2025-04-19 11:19:56 +00:00
Author: https://github.com/shannonbooth
Commit: f48b760011
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4401
Reviewed-by: https://github.com/trflynn89 ✅
2 changed files with 3 additions and 3 deletions
|
@ -1871,9 +1871,9 @@ bool Parser::is_parsing_svg_presentation_attribute() const
|
||||||
// FIXME: URLs shouldn't be completed during parsing, but when used.
|
// FIXME: URLs shouldn't be completed during parsing, but when used.
|
||||||
Optional<::URL::URL> Parser::complete_url(StringView relative_url) const
|
Optional<::URL::URL> Parser::complete_url(StringView relative_url) const
|
||||||
{
|
{
|
||||||
if (!m_url.is_valid())
|
if (!m_url.has_value())
|
||||||
return ::URL::Parser::basic_parse(relative_url);
|
return ::URL::Parser::basic_parse(relative_url);
|
||||||
return m_url.complete_url(relative_url);
|
return m_url->complete_url(relative_url);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -477,7 +477,7 @@ private:
|
||||||
|
|
||||||
GC::Ptr<DOM::Document const> m_document;
|
GC::Ptr<DOM::Document const> m_document;
|
||||||
GC::Ptr<JS::Realm> m_realm;
|
GC::Ptr<JS::Realm> m_realm;
|
||||||
::URL::URL m_url;
|
Optional<::URL::URL> m_url;
|
||||||
ParsingMode m_parsing_mode { ParsingMode::Normal };
|
ParsingMode m_parsing_mode { ParsingMode::Normal };
|
||||||
|
|
||||||
Vector<Token> m_tokens;
|
Vector<Token> m_tokens;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue