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

LibWeb: Make CSS ParsingContext::m_url not Optional

This always has a value, so let's make that clearer.
This commit is contained in:
Sam Atkins 2022-04-25 16:17:21 +01:00 committed by Andreas Kling
parent 25970f2763
commit 761d29d647
2 changed files with 4 additions and 4 deletions

View file

@ -36,7 +36,7 @@ static void log_parse_error(SourceLocation const& location = SourceLocation::cur
namespace Web::CSS::Parser {
ParsingContext::ParsingContext(DOM::Document const& document, Optional<AK::URL> const url)
ParsingContext::ParsingContext(DOM::Document const& document, AK::URL url)
: m_document(&document)
, m_url(move(url))
{
@ -62,7 +62,7 @@ bool ParsingContext::in_quirks_mode() const
// https://www.w3.org/TR/css-values-4/#relative-urls
AK::URL ParsingContext::complete_url(String const& addr) const
{
return m_url.has_value() ? m_url->complete_url(addr) : AK::URL::create_with_url_or_path(addr);
return m_url.complete_url(addr);
}
template<typename T>