mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-29 04:37:55 +00:00
LibWeb: Add CSS ParsingContext constructor with a realm and URL
This is useful for when we want to parse paths relative to the current ESO's api base url when there isn't a document, such as in a Worker context.
This commit is contained in:
committed by
Andreas Kling
parent
8872008958
commit
d76167b8a4
@@ -19,6 +19,13 @@ ParsingContext::ParsingContext(JS::Realm& realm, Mode mode)
|
||||
{
|
||||
}
|
||||
|
||||
ParsingContext::ParsingContext(JS::Realm& realm, URL::URL url, Mode mode)
|
||||
: m_realm(realm)
|
||||
, m_url(move(url))
|
||||
, m_mode(mode)
|
||||
{
|
||||
}
|
||||
|
||||
ParsingContext::ParsingContext(DOM::Document const& document, URL::URL url, Mode mode)
|
||||
: m_realm(const_cast<JS::Realm&>(document.realm()))
|
||||
, m_document(&document)
|
||||
|
||||
Reference in New Issue
Block a user