LibWeb/CSS: Remove an unnecessary ParsingContext constructor

Anywhere we have a Node, we have a Document. So just use that.
This commit is contained in:
Sam Atkins 2025-02-04 15:59:56 +00:00
commit ca5dee4c55
Notes: github-actions[bot] 2025-02-06 16:49:02 +00:00
4 changed files with 3 additions and 12 deletions

View file

@ -47,14 +47,6 @@ ParsingContext::ParsingContext(DOM::Document const& document, Mode mode)
{
}
ParsingContext::ParsingContext(DOM::ParentNode& parent_node, Mode mode)
: m_realm(parent_node.realm())
, m_document(&parent_node.document())
, m_url(parent_node.document().url())
, m_mode(mode)
{
}
bool ParsingContext::in_quirks_mode() const
{
return m_document ? m_document->in_quirks_mode() : false;

View file

@ -24,7 +24,6 @@ public:
explicit ParsingContext(JS::Realm&, URL::URL, Mode = Mode::Normal);
explicit ParsingContext(DOM::Document const&, Mode = Mode::Normal);
explicit ParsingContext(DOM::Document const&, URL::URL, Mode = Mode::Normal);
explicit ParsingContext(DOM::ParentNode&, Mode = Mode::Normal);
Mode mode() const { return m_mode; }
bool is_parsing_svg_presentation_attribute() const { return m_mode == Mode::SVGPresentationAttribute; }