mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-03 23:25:20 +00:00
LibWeb: Remove CSS::Parser::ParsingContext's default constructor
This relied on pulling the current realm from the main thread VM, which requires an execution context to be on the VM's stack. This heavily relied on the dummy execution context that is always on the stack, for example, when parsing the UA style sheets where no JavaScript is running.
This commit is contained in:
@@ -99,7 +99,7 @@ DeprecatedString CSSStyleRule::selector_text() const
|
||||
void CSSStyleRule::set_selector_text(StringView selector_text)
|
||||
{
|
||||
// 1. Run the parse a group of selectors algorithm on the given value.
|
||||
auto parsed_selectors = parse_selector({}, selector_text);
|
||||
auto parsed_selectors = parse_selector(Parser::ParsingContext { realm() }, selector_text);
|
||||
|
||||
// 2. If the algorithm returns a non-null value replace the associated group of selectors with the returned value.
|
||||
if (parsed_selectors.has_value())
|
||||
|
||||
Reference in New Issue
Block a user