mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:17:44 +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:
parent
25970f2763
commit
761d29d647
2 changed files with 4 additions and 4 deletions
|
@ -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>
|
||||
|
|
|
@ -36,7 +36,7 @@ class ParsingContext {
|
|||
public:
|
||||
ParsingContext() = default;
|
||||
explicit ParsingContext(DOM::Document const&);
|
||||
explicit ParsingContext(DOM::Document const&, Optional<AK::URL> const);
|
||||
explicit ParsingContext(DOM::Document const&, AK::URL);
|
||||
explicit ParsingContext(DOM::ParentNode&);
|
||||
|
||||
bool in_quirks_mode() const;
|
||||
|
@ -49,7 +49,7 @@ public:
|
|||
private:
|
||||
DOM::Document const* m_document { nullptr };
|
||||
PropertyID m_current_property_id { PropertyID::Invalid };
|
||||
Optional<AK::URL> m_url;
|
||||
AK::URL m_url;
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue