mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 12:48:10 +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:
parent
54a1ec2f10
commit
f7ff1fd985
12 changed files with 73 additions and 72 deletions
|
@ -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())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue