LibWeb/CSS: Make ParsingContext's Realm optional

We only need a Realm to allocate CSSOM objects on the GC heap. Style
values are not such objects, and over time, we'll be changing the
parser to only produce non-CSSOM objects.
This commit is contained in:
Sam Atkins 2024-12-05 10:41:19 +00:00 committed by Alexander Kalenik
parent 861f6e3965
commit 863ce746dc
Notes: github-actions[bot] 2024-12-05 19:01:02 +00:00
2 changed files with 12 additions and 2 deletions

View file

@ -13,6 +13,11 @@
namespace Web::CSS::Parser {
ParsingContext::ParsingContext(Mode mode)
: m_mode(mode)
{
}
ParsingContext::ParsingContext(JS::Realm& realm, Mode mode)
: m_realm(realm)
, m_mode(mode)